import stargate, { DeliverTxResponse, StdFee } from '@cosmjs/stargate'; import { SigningCosmWasmClient, SigningCosmWasmClientOptions, ExecuteResult } from '@cosmjs/cosmwasm-stargate'; import { Coin, OfflineSigner, Registry } from '@cosmjs/proto-signing'; import { CometClient } from '@cosmjs/tendermint-rpc'; import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx'; import { MsgSend } from 'cosmjs-types/cosmos/bank/v1beta1/tx'; import { ContractData } from '../contracts/types/ContractData'; import { Pubkey } from '@cosmjs/amino'; import { MsgTransfer } from 'cosmjs-types/ibc/applications/transfer/v1/tx'; import { MsgDelegate, MsgUndelegate, MsgBeginRedelegate } from 'cosmjs-types/cosmos/staking/v1beta1/tx'; import { MsgWithdrawDelegatorReward } from 'cosmjs-types/cosmos/distribution/v1beta1/tx'; import { QuerySmartContractStateRequest } from 'cosmjs-types/cosmwasm/wasm/v1/query'; import { MsgVote } from 'cosmjs-types/cosmos/gov/v1beta1/tx'; import { QueryParamsResponse } from '../messages'; /** * Nolus Wallet service class. * * Usage: * * ```ts * import { nolusOfflineSigner } from '@nolus/nolusjs/build/wallet/NolusWalletFactory'; * * const nolusWallet = await nolusOfflineSigner(offlineSigner); * nolusWallet.useAccount(); * ``` */ export declare class NolusWallet extends SigningCosmWasmClient { address?: string; pubKey?: Uint8Array; algo?: string; protected offlineSigner: OfflineSigner & { simulateMultiTx?: Function; simulateTx?: Function; getSequence?: Function; getGasInfo?: Function; registry?: Registry; }; constructor(tmClient: CometClient | undefined | any, signer: OfflineSigner, options: SigningCosmWasmClientOptions); getOfflineSigner(): OfflineSigner & { simulateMultiTx?: Function; simulateTx?: Function; getSequence?: Function; getGasInfo?: Function; registry?: Registry; }; simulateTx(msg: MsgSend | MsgExecuteContract | MsgTransfer | MsgDelegate | MsgBeginRedelegate | MsgUndelegate | MsgVote | MsgWithdrawDelegatorReward, msgTypeUrl: string, memo?: string): Promise; getGasInfo(messages: { msg: MsgSend | MsgExecuteContract | MsgTransfer | MsgDelegate | MsgBeginRedelegate | MsgUndelegate | MsgVote | MsgWithdrawDelegatorReward; msgTypeUrl: string; }[], memo: string, pubkey: Pubkey, sequence: number): Promise<{ gasInfo: import("cosmjs-types/cosmos/base/abci/v1beta1/abci").GasInfo | undefined; gas: number; usedFee: stargate.StdFee; }>; private simulateMultiTx; private getBalanceOut; private parseCoins; useAccount(): Promise; transferAmount(receiverAddress: string, amount: Coin[], fee: StdFee | 'auto' | number, memo?: string): Promise; executeContract(contractAddress: string, msg: Record, fee: StdFee | 'auto' | number, memo?: string, funds?: Coin[]): Promise; executeContractSubMsg(contractData: ContractData[], fee: StdFee | 'auto' | number, memo?: string, funds?: Coin[]): Promise; /** * Usage: * * ```ts * const amount = coin(1, 'unls'); * const { * txHash, * txBytes, * usedFee * } = await wallet.simulateBankTransferTx('nolusAddress', [amount]); * const item = await wallet.broadcastTx(txBytes); *``` */ simulateBankTransferTx(toAddress: string, amount: Coin[]): Promise; /** * Usage: * * ```ts * const downpayment = coin(1, 'ibc/....'); * const msg = { * open_lease: { * currency: 'OSMO', * }, * }; * const { * txHash, * txBytes, * usedFee * } = await wallet.simulateExecuteContractTx('leaserAddress', msg, [downpayment]); * const item = await wallet.broadcastTx(txBytes); * ``` */ simulateExecuteContractTx(contract: string, msgData: Record, funds?: Coin[]): Promise; simulateSendIbcTokensTx({ toAddress, amount, sourcePort, sourceChannel, memo }: { toAddress: string; amount: Coin; sourcePort: string; sourceChannel: string; memo?: string; }): Promise; simulateDelegateTx(data: { validator: string; amount: Coin; }[]): Promise; simulateRedelegateTx(data: { srcValidator: string; dstValidator: string; amount: Coin; }[]): Promise; simulateUndelegateTx(data: { validator: string; amount: Coin; }[]): Promise; simulateWithdrawRewardTx(data: { validator: string; delegator: string; }[]): Promise; simulateClaimRewards(data: { validator: string; delegator: string; }[], lppContracts: string[]): Promise; private sequence; private createDeliverTxResponseErrorMessage; querySmartContract(contract: string, msg: object, height?: number): Promise; getBalance(address: string, denom: string): Promise; selectDynamicFee(gasEstimate: number, msgs: { msg: MsgSend | MsgExecuteContract | MsgTransfer | MsgDelegate | MsgBeginRedelegate | MsgUndelegate | MsgVote | MsgWithdrawDelegatorReward; msgTypeUrl: string; }[]): Promise; gasPrices(): Promise<{ [denom: string]: number; }>; queryTaxParams(): Promise; }