UNPKG

venice-ai-sdk-apl

Version:

A comprehensive SDK for the Venice AI API with CLI support, programmatic CLI usage, CLI-style interface, and interactive demo

57 lines (56 loc) 1.77 kB
/** * Web3 API Key Generation Resource * * This module provides access to the Web3 API Key Generation API resources. */ import { HttpClient } from '../../../utils/http'; import { GenerateWeb3KeyGetParams, GenerateWeb3KeyGetResponse, GenerateWeb3KeyPostParams, GenerateWeb3KeyPostResponse } from '../../../types/api-keys'; /** * Web3 API Key Generation Resource */ export declare class Web3ApiKeyResource { /** * Web3 API key GET resource */ private getResource; /** * Web3 API key POST resource */ private postResource; /** * Creates a new Web3 API key resource * * @param http - HTTP client */ constructor(http: HttpClient); /** * Gets a message to sign for generating an API key with a Web3 wallet * * @param params - Parameters for getting a message to sign * @returns Promise that resolves with the message to sign * * @example * ```typescript * const response = await venice.apiKeys.web3.getMessage({ * wallet_address: '0x1234567890abcdef1234567890abcdef12345678' * }); * ``` */ getMessage(params: GenerateWeb3KeyGetParams): Promise<GenerateWeb3KeyGetResponse>; /** * Generates an API key with a Web3 wallet * * @param params - Parameters for generating an API key * @returns Promise that resolves with the generated API key * * @example * ```typescript * const response = await venice.apiKeys.web3.generateKey({ * wallet_address: '0x1234567890abcdef1234567890abcdef12345678', * signature: 'signed-message', * name: 'My Web3 API Key' * }); * ``` */ generateKey(params: GenerateWeb3KeyPostParams): Promise<GenerateWeb3KeyPostResponse>; }