import { ChangeAdminResult, ExecuteInstruction, ExecuteResult, HttpEndpoint, InstantiateOptions, InstantiateResult, JsonObject, MigrateResult, UploadResult } from "@cosmjs/cosmwasm-stargate"; import { Coin, EncodeObject, OfflineSigner, Registry } from "@cosmjs/proto-signing"; import { AminoTypes, DeliverTxResponse, GasPrice, SignerData, StdFee } from "@cosmjs/stargate"; import { CometClient } from "@cosmjs/tendermint-rpc"; import { NibiCosmWasmClient, NibiCosmWasmClientOptions } from "./cosmwasmclient"; import { AccessConfig } from "cosmjs-types/cosmwasm/wasm/v1/types"; import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx"; export interface NibiSigningCosmWasmClientOptions extends NibiCosmWasmClientOptions { readonly registry?: Registry; readonly aminoTypes?: AminoTypes; readonly broadcastTimeoutMs?: number; readonly broadcastPollIntervalMs?: number; readonly gasPrice?: GasPrice; } type FeeOption = StdFee | "auto" | number; export declare class NibiSigningCosmWasmClient extends NibiCosmWasmClient { readonly registry: Registry; readonly broadcastTimeoutMs: number | undefined; readonly broadcastPollIntervalMs: number | undefined; private readonly signer; private readonly aminoTypes; private readonly gasPrice; private readonly defaultGasMultiplier; /** * Creates an instance by connecting to the given CometBFT RPC endpoint. * * This uses auto-detection to decide between a CometBFT 0.38, Tendermint 0.37 and 0.34 client. * To set the Comet client explicitly, use `createWithSigner`. */ static connectWithSigner(endpoint: string | HttpEndpoint, signer: OfflineSigner, options?: NibiSigningCosmWasmClientOptions): Promise; /** * Creates an instance from a manually created Comet client. * Use this to use `Comet38Client` or `Tendermint37Client` instead of `Tendermint34Client`. */ static createWithSigner(cometClient: CometClient, signer: OfflineSigner, options?: NibiSigningCosmWasmClientOptions): Promise; /** * Creates a client in offline mode. * * This should only be used in niche cases where you know exactly what you're doing, * e.g. when building an offline signing application. * * When you try to use online functionality with such a signer, an * exception will be raised. */ static offline(signer: OfflineSigner, options?: NibiSigningCosmWasmClientOptions): Promise; protected constructor(cometClient: CometClient | undefined, signer: OfflineSigner, options: NibiSigningCosmWasmClientOptions); simulate(signerAddress: string, messages: readonly EncodeObject[], memo: string | undefined): Promise; /** Uploads code and returns a receipt, including the code ID */ upload(senderAddress: string, wasmCode: Uint8Array, fee: FeeOption, memo?: string, instantiatePermission?: AccessConfig): Promise; instantiate(senderAddress: string, codeId: number, msg: JsonObject, label: string, fee: FeeOption, options?: InstantiateOptions): Promise; instantiate2(senderAddress: string, codeId: number, salt: Uint8Array, msg: JsonObject, label: string, fee: FeeOption, options?: InstantiateOptions): Promise; updateAdmin(senderAddress: string, contractAddress: string, newAdmin: string, fee: FeeOption, memo?: string): Promise; clearAdmin(senderAddress: string, contractAddress: string, fee: FeeOption, memo?: string): Promise; migrate(senderAddress: string, contractAddress: string, codeId: number, migrateMsg: JsonObject, fee: FeeOption, memo?: string): Promise; execute(senderAddress: string, contractAddress: string, msg: JsonObject, fee: FeeOption, memo?: string, funds?: readonly Coin[]): Promise; /** * Like `execute` but allows executing multiple messages in one transaction. */ executeMultiple(senderAddress: string, instructions: readonly ExecuteInstruction[], fee: FeeOption, memo?: string): Promise; sendTokens(senderAddress: string, recipientAddress: string, amount: readonly Coin[], fee: FeeOption, memo?: string): Promise; delegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: FeeOption, memo?: string): Promise; undelegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: FeeOption, memo?: string): Promise; withdrawRewards(delegatorAddress: string, validatorAddress: string, fee: FeeOption, memo?: string): Promise; /** * Creates a transaction with the given messages, fee, memo and timeout height. Then signs and broadcasts the transaction. * * @param signerAddress The address that will sign transactions using this instance. The signer must be able to sign with this address. * @param messages * @param fee * @param memo * @param timeoutHeight (optional) timeout height to prevent the tx from being committed past a certain height */ signAndBroadcast(signerAddress: string, messages: readonly EncodeObject[], fee: FeeOption, memo?: string, timeoutHeight?: bigint): Promise; /** * Creates a transaction with the given messages, fee, memo and timeout height. Then signs and broadcasts the transaction. * * This method is useful if you want to send a transaction in broadcast, * without waiting for it to be placed inside a block, because for example * I would like to receive the hash to later track the transaction with another tool. * * @param signerAddress The address that will sign transactions using this instance. The signer must be able to sign with this address. * @param messages * @param fee * @param memo * @param timeoutHeight (optional) timeout height to prevent the tx from being committed past a certain height * * @returns Returns the hash of the transaction */ signAndBroadcastSync(signerAddress: string, messages: readonly EncodeObject[], fee: FeeOption, memo?: string, timeoutHeight?: bigint): Promise; sign(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee, memo: string, explicitSignerData?: SignerData, timeoutHeight?: bigint): Promise; private signAmino; private signDirect; } export {}; //# sourceMappingURL=signingcosmwasmclient.d.ts.map