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>

  • delegateTokens(delegatorAddress: string, validatorAddress: string, amount: Coin, fee: number | StdFee | "auto", memo?: string): Promise<DeliverTxResponse>
  • disconnect(): void
  • forceGetTmClient(): Tendermint34Client
  • getAccount(searchAddress: string): Promise<null | Account>
  • getAllBalances(address: string): Promise<readonly Coin[]>
  • Queries all balances for all denoms that belong to this address.

    Uses the grpc queries (which iterates over the store internally), and we cannot get proofs from such a method.

    Parameters

    • address: string

    Returns Promise<readonly Coin[]>

  • getBalance(address: string, searchDenom: string): Promise<Coin>
  • getBalanceStaked(address: string): Promise<null | Coin>
  • getBlock(height?: number): Promise<Block>
  • getChainId(): Promise<string>
  • getDelegation(delegatorAddress: string, validatorAddress: string): Promise<null | Coin>
  • getHeight(): Promise<number>
  • getTmClient(): undefined | Tendermint34Client
  • sendIbcTokens(senderAddress: string, recipientAddress: string, transferAmount: Coin, sourcePort: string, sourceChannel: string, timeoutHeight: undefined | Height, timeoutTimestamp: undefined | number, fee: number | StdFee | "auto", memo?: string): Promise<DeliverTxResponse>
  • 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>
  • Gets account number and sequence from the API, creates a sign doc, creates a single signature and assembles the signed transaction.

    The sign mode (SIGN_MODE_DIRECT or SIGN_MODE_LEGACY_AMINO_JSON) is determined by this client's signer.

    You can pass signer data (account number, sequence and chain ID) explicitly instead of querying them from the chain. This is needed when signing for a multisig account, but it also allows for offline signing (See the SigningStargateClient.offline constructor).

    Parameters

    • signerAddress: string
    • messages: readonly EncodeObject[]
    • fee: StdFee
    • memo: string
    • Optional explicitSignerData: SignerData

    Returns Promise<TxRaw>

  • signAndBroadcast(signerAddress: string, messages: readonly EncodeObject[], fee: number | StdFee | "auto", memo?: string): 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>
  • withdrawRewards(delegatorAddress: string, validatorAddress: string, fee: number | StdFee | "auto", memo?: string): Promise<DeliverTxResponse>

Generated using TypeDoc