import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { GasPrice } from "@cosmjs/stargate"; import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate"; import { CosmosChain, CosmosChainInfo } from "../../types"; export declare class CosmosClient { chainInfo: Required; owner: DirectSecp256k1HdWallet; client: SigningCosmWasmClient; gasPrice: GasPrice; /** * Constructs a new instance of the CosmosClient. * @param chainInfo The required information about the Cosmos chain. * @param owner The DirectSecp256k1HdWallet instance representing the owner's account. * @param client The SigningCosmWasmClient instance for interacting with the blockchain. * @param gasPrice The gas price to be used for transactions. Defaults to `1denom`. */ private constructor(); /** * Asynchronously creates a new instance of the CosmosClient. * @param chain The Cosmos chain to interact with. Defaults to 'wasm'. * @param mnemonic The mnemonic for generating the wallet. If not provided, one is generated. * @param config Additional configuration for the chain, excluding the owner's info. * @param gasPrice The gas price to be used for transactions. Defaults to `1denom`. * @returns A promise that resolves to an instance of CosmosClient. */ static create(chain?: CosmosChain, mnemonic?: string, config?: Omit, gasPrice?: GasPrice): Promise; /** * Create a relayer account from mnemonic or generate a new one if not provided * @param prefix chain prefix. Available options: wasm, axelar * @param mnemonic mnemonic of the relayer account * @returns an instance of DirectSecp256k1HdWallet */ static createOrImportAccount(prefix: CosmosChain, mnemonic?: string): Promise; /** * Retrieves the balance of a given address. Defaults to the chain's denom. * @param address The address to query the balance for. * @param denom The denomination of the tokens. * @returns Promise The balance of the account. * * @example * const balance = await cosmosClient.getBalance("cosmos1...", "uatom"); * console.log(balance); // Outputs the balance, e.g., "1000" * * @throws {Error} Throws an error if the network request fails. */ getBalance(address: string, denom?: string): Promise; /** * Retrieves the chain information of the CosmosClient instance. * @returns An object containing the chain's information, excluding the owner's details. */ getChainInfo(): Omit; /** * Sends tokens from the owner's account to another address. * @param address The address to send tokens to. * @param amount The amount of tokens to send. * @returns A promise that resolves to the transaction result. * @throws An error if the transaction fails. */ fundWallet(address: string, amount: string): Promise; /** * Uploads a WebAssembly module to the blockchain. * @param path The file path of the WebAssembly module. * @returns A promise that resolves to the upload transaction result. * @throws An error if the upload fails. */ uploadWasm(path: string): Promise; getOwnerAccount(): string; /** * Creates a random signing client with a new account and funds it. * @param chain The chain for which to generate the client. Defaults to 'wasm'. * @param amount The amount of tokens to fund the new account. Defaults to '10000000'. * @returns A promise that resolves to an object containing the new client and its address. */ createFundedSigningClient(chain?: CosmosChain, amount?: string): Promise<{ client: SigningCosmWasmClient; address: string; }>; } //# sourceMappingURL=CosmosClient.d.ts.map