UNPKG

@firmachain/firma-js

Version:

The Official FirmaChain Javascript SDK written in Typescript

48 lines (47 loc) 3.96 kB
import { CosmWasmTxClient, TxMisc, CodeInfo, CodeData, ContractInfo, ContractHistoryInfo, ContractStateInfo, Pagination } from "./firmachain/cosmwasm"; import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx"; import { FirmaWalletService } from "./FirmaWalletService"; import { FirmaConfig } from "./FirmaConfig"; import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin"; import { AccessConfig } from "cosmjs-types/cosmwasm/wasm/v1/types"; import { EncodeObject } from "@cosmjs/proto-signing"; import { DeliverTxResponse } from "@cosmjs/stargate"; export { AccessConfig, AccessType } from "cosmjs-types/cosmwasm/wasm/v1/types"; export declare class FirmaCosmWasmService { private readonly config; constructor(config: FirmaConfig); getTxClient(wallet: FirmaWalletService): CosmWasmTxClient; getGasEstimationStoreCode(wallet: FirmaWalletService, wasmCode: Uint8Array, accessConfig: AccessConfig, txMisc?: TxMisc): Promise<number>; storeCode(wallet: FirmaWalletService, wasmCode: Uint8Array, accessConfig: AccessConfig, txMisc?: TxMisc): Promise<DeliverTxResponse>; getGasEstimationUpdateAdmin(wallet: FirmaWalletService, contractAddress: string, adminAddress: string, txMisc?: TxMisc): Promise<number>; updateAdmin(wallet: FirmaWalletService, contractAddress: string, adminAddress: string, txMisc?: TxMisc): Promise<DeliverTxResponse>; getGasEstimationClearAdmin(wallet: FirmaWalletService, contractAddress: string, txMisc?: TxMisc): Promise<number>; clearAdmin(wallet: FirmaWalletService, contractAddress: string, txMisc?: TxMisc): Promise<DeliverTxResponse>; getGasEstimationMigrateContract(wallet: FirmaWalletService, contractAddress: string, codeId: string, msg: string, txMisc?: TxMisc): Promise<number>; migrateContract(wallet: FirmaWalletService, contractAddress: string, codeId: string, msg: string, txMisc?: TxMisc): Promise<DeliverTxResponse>; getGasEstimationExecuteContract(wallet: FirmaWalletService, contractAddress: string, msg: string, funds?: Coin[], txMisc?: TxMisc): Promise<number>; executeContract(wallet: FirmaWalletService, contractAddress: string, msg: string, funds?: Coin[], txMisc?: TxMisc): Promise<DeliverTxResponse>; signAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<DeliverTxResponse>; getGasEstimationSignAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<number>; getGasEstimationInstantiateContract(wallet: FirmaWalletService, admin: string, codeId: string, label: string, msg: string, funds: Coin[], txMisc?: TxMisc): Promise<number>; instantiateContract(wallet: FirmaWalletService, admin: string, codeId: string, label: string, msg: string, funds: Coin[], txMisc?: TxMisc): Promise<DeliverTxResponse>; private getSignedTxInstantiateContract; private getSignedTxUpdateAdmin; private getSignedTxClearAdmin; private getSignedTxMigrateContract; getUnsignedTxExecuteContract(wallet: FirmaWalletService, contractAddress: string, msg: string, funds: Coin[]): Promise<EncodeObject>; getSignedTxExecuteContract(wallet: FirmaWalletService, contractAddress: string, msg: string, funds: Coin[], txMisc?: TxMisc): Promise<TxRaw>; private getSignedTxStoreCode; getCodeList(): Promise<CodeInfo[]>; getCodeData(codeId: string): Promise<CodeData>; getContractListFromCodeId(codeId: string, paginationKey?: string): Promise<{ dataList: string[]; pagination: Pagination; }>; getContractInfo(contractAddress: string): Promise<ContractInfo>; getContractHistory(contractAddress: string): Promise<ContractHistoryInfo[]>; getContractRawQueryData(contractAddress: string, hexString: string): Promise<string>; getContractSmartQueryData(contractAddress: string, query: string): Promise<string>; getContractState(contractAddress: string): Promise<ContractStateInfo[]>; getPinnedCodeList(): Promise<string[]>; }