Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Properties

broadcastPollIntervalMs: undefined | number
broadcastTimeoutMs: undefined | number
registry: Registry

Methods

  • broadcastTx(tx: Uint8Array, timeoutMs?: number, pollIntervalMs?: number): Promise<DeliverTxResponse>
  • Broadcasts a signed transaction to the network and monitors its inclusion in a block.

    If broadcasting is rejected by the node for some reason (e.g. because of a CheckTx failure), an error is thrown.

    If the transaction is not included in a block before the provided timeout, this errors with a TimeoutError.

    If the transaction is included in a block, a DeliverTxResponse is returned. The caller then usually needs to check for execution success or failure.

    Parameters

    • tx: Uint8Array
    • timeoutMs: number = 60_000
    • pollIntervalMs: number = 3_000

    Returns Promise<DeliverTxResponse>

  • clearAdmin(senderAddress: string, contractAddress: string, fee: number | StdFee | "auto", memo?: string): Promise<ChangeAdminResult>
  • delegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: number | StdFee | "auto", memo?: string): Promise<DeliverTxResponse>
  • disconnect(): void
  • execute(senderAddress: string, contractAddress: string, msg: any, fee: number | StdFee | "auto", memo?: string, funds?: readonly Coin[]): Promise<ExecuteResult>
  • forceGetQueryClient(): QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
  • forceGetTmClient(): Tendermint34Client
  • getAccount(searchAddress: string): Promise<null | Account>
  • getBalance(address: string, searchDenom: string): Promise<Coin>
  • getBlock(height?: number): Promise<Block>
  • getChainId(): Promise<string>
  • getCodes(): Promise<readonly Code[]>
  • getCodes() returns all codes and is just looping through all pagination pages.

    This is potentially inefficient and advanced apps should consider creating their own query client to handle pagination together with the app's screens.

    Returns Promise<readonly Code[]>

  • getContract(address: string): Promise<Contract>
  • getContracts(codeId: number): Promise<readonly string[]>
  • getContracts() returns all contract instances for one code and is just looping through all pagination pages.

    This is potentially inefficient and advanced apps should consider creating their own query client to handle pagination together with the app's screens.

    Parameters

    • codeId: number

    Returns Promise<readonly string[]>

  • getHeight(): Promise<number>
  • getQueryClient(): undefined | QueryClient & AuthExtension & BankExtension & TxExtension & WasmExtension
  • getSequence(address: string): Promise<SequenceResponse>
  • getTmClient(): undefined | Tendermint34Client
  • migrate(senderAddress: string, contractAddress: string, codeId: number, migrateMsg: any, fee: number | StdFee | "auto", memo?: string): Promise<MigrateResult>
  • queryContractRaw(address: string, key: Uint8Array): Promise<null | Uint8Array>
  • queryContractSmart(address: string, queryMsg: any): Promise<any>
  • Makes a smart query on the contract, returns the parsed JSON document.

    Promise is rejected when contract does not exist. Promise is rejected for invalid query format. Promise is rejected for invalid response format.

    Parameters

    • address: string
    • queryMsg: any

    Returns Promise<any>

  • searchTx(query: SearchTxQuery, filter?: SearchTxFilter): Promise<readonly IndexedTx[]>
  • sendTokens(senderAddress: string, recipientAddress: string, amount: readonly Coin[], fee: number | StdFee | "auto", memo?: string): Promise<DeliverTxResponse>
  • sign(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee, memo: string, explicitSignerData?: SignerData): Promise<TxRaw>
  • signAndBroadcast(signerAddress: string, messages: readonly EncodeObject[], fee: number | StdFee | "auto", memo?: string): Promise<DeliverTxResponse>
  • Creates a transaction with the given messages, fee and memo. Then signs and broadcasts the transaction.

    Parameters

    • signerAddress: string

      The address that will sign transactions using this instance. The signer must be able to sign with this address.

    • messages: readonly EncodeObject[]
    • fee: number | StdFee | "auto"
    • memo: string = ""

    Returns Promise<DeliverTxResponse>

  • simulate(signerAddress: string, messages: readonly EncodeObject[], memo: undefined | string): Promise<number>
  • undelegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: number | StdFee | "auto", memo?: string): Promise<DeliverTxResponse>
  • updateAdmin(senderAddress: string, contractAddress: string, newAdmin: string, fee: number | StdFee | "auto", memo?: string): Promise<ChangeAdminResult>
  • upload(senderAddress: string, wasmCode: Uint8Array, fee: number | StdFee | "auto", memo?: string): Promise<UploadResult>
  • withdrawRewards(delegatorAddress: string, validatorAddress: string, fee: number | StdFee | "auto", memo?: string): Promise<DeliverTxResponse>

Generated using TypeDoc