Methods
balance
- balance(account: PublicKey, mint: PublicKey): Promise<undefined | null | { amountPost: number | BN; amountPre: number | BN }>
Parameters
account: PublicKey
mint: PublicKey
Returns Promise<undefined | null | { amountPost: number | BN; amountPre: number | BN }>
byAccountMap
- byAccountMap(rawAddresses?: boolean): Promise<Map<string, Record<string, { amountPost: number | BN; amountPre: number | BN; rawMint: string }>>>
Parameters
rawAddresses: boolean = false
Returns Promise<Map<string, Record<string, { amountPost: number | BN; amountPre: number | BN; rawMint: string }>>>
dump
- dump(log?: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void } & { enabled?: boolean }): Promise<TokenBalances>
Parameters
log: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void } & { enabled?: boolean } = console.log
Static forTransaction
Parameters
connection: Connection
signature: string
Interface to query token balances of a particular transaction.