UNPKG

@kubiklabs/wasmkit

Version:

Wasmkit is a development environment to compile, deploy, test, run cosmwasm contracts on different networks.

20 lines (19 loc) 2.15 kB
/// <reference types="node" /> import { ArchwayClient, SigningArchwayClient } from '@archwayhq/arch3.js'; import { CosmWasmClient, SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate"; import { SecretNetworkClient } from "secretjs"; import { Coin } from "secretjs/dist/protobuf/cosmos/base/v1beta1/coin"; import { Account, ChainType, Network, TxnStdFee } from "../types"; export declare function getClient(network: Network): Promise<SecretNetworkClient | CosmWasmClient | ArchwayClient>; export declare function getSigningClient(network: Network, account: Account): Promise<SecretNetworkClient | SigningCosmWasmClient | SigningArchwayClient>; export declare function getChainFromAccount(network: Network): ChainType; export declare function storeCode(network: Network, signingClient: SecretNetworkClient | SigningCosmWasmClient | SigningArchwayClient, sender: string, contractName: string, wasmFileContent: Buffer, customFees?: TxnStdFee, source?: string, builder?: string): Promise<{ codeId: number; contractCodeHash: { code_hash: string; }; }>; export declare function instantiateContract(network: Network, signingClient: SecretNetworkClient | SigningCosmWasmClient | SigningArchwayClient, codeId: number, sender: string, contractName: string, contractCodeHash: string, initArgs: Record<string, unknown>, label: string, transferAmount?: Coin[], customFees?: TxnStdFee, contractAdmin?: string | undefined): Promise<string>; export declare function executeTransaction(network: Network, signingClient: SecretNetworkClient | SigningCosmWasmClient | SigningArchwayClient, sender: string, contractAddress: string, contractCodeHash: string, msgData: Record<string, unknown>, transferAmount?: readonly Coin[], customFees?: TxnStdFee, memo?: string): Promise<any>; export declare function sendQuery(client: SecretNetworkClient | CosmWasmClient | ArchwayClient, network: Network, msgData: Record<string, unknown>, contractAddress: string, contractHash: string): Promise<any>; export declare function getBalance(client: SecretNetworkClient | CosmWasmClient | ArchwayClient, accountAddress: string, network: Network): Promise<Coin[]>;