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

60 lines 1.78 kB
"use strict"; /** * Web3 API Key Generation Resource * * This module provides access to the Web3 API Key Generation API resources. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Web3ApiKeyResource = void 0; const get_1 = require("./get"); const post_1 = require("./post"); /** * Web3 API Key Generation Resource */ class Web3ApiKeyResource { /** * Creates a new Web3 API key resource * * @param http - HTTP client */ constructor(http) { this.getResource = new get_1.Web3ApiKeyGetResource(http); this.postResource = new post_1.Web3ApiKeyPostResource(http); } /** * 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) { return this.getResource.getMessage(params); } /** * 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) { return this.postResource.generateKey(params); } } exports.Web3ApiKeyResource = Web3ApiKeyResource; //# sourceMappingURL=index.js.map