Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface to query token balances of a particular transaction.

Hierarchy

  • TokenBalances

Index

Methods

  • balance(account: PublicKey, mint: PublicKey): Promise<undefined | null | { amountPost: number | BN; amountPre: number | BN }>
  • Gets token balance for the provided account and mint.

    Parameters

    • account: PublicKey
    • mint: PublicKey

    Returns Promise<undefined | null | { amountPost: number | BN; amountPre: number | BN }>

  • byAccountMap(rawAddresses?: boolean): Promise<Map<string, Record<string, { amountPost: number | BN; amountPre: number | BN; rawMint: string }>>>
  • Gets all token balances for the transaction mapped by account and then grouped by mint.

    Parameters

    • rawAddresses: boolean = false

    Returns Promise<Map<string, Record<string, { amountPost: number | BN; amountPre: number | BN; rawMint: string }>>>

  • dump(log?: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void } & { enabled?: boolean }): Promise<TokenBalances>
  • Provides an interfact to query token balances for the transaction with the provided {@link signature}.

    If {@link addressLabels} are provided then they are used to resolve account and mint addresses to more meaningful labels.

    Parameters

    • connection: Connection
    • signature: string
    • Optional addressLabels: AddressLabels

    Returns TokenBalances

Generated using TypeDoc