Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • TokenAmount

Index

Constructors

  • new TokenAmount(lamports: BN, decimals: number, mint: PublicKey): TokenAmount

Properties

decimals: number

Number of decimals configured for token's mint

lamports: BN

Raw amount of token lamports

mint: PublicKey
tokens: number

Token amount as a float, accounts for decimals. Imprecise at large numbers

uiTokens: string

Token amount as string for UI, accounts for decimals. Imprecise at large numbers

Methods

  • isZero(): boolean
  • tokenAccount(tokenAccount: Account, decimals: number): TokenAmount
  • tokenPrice(marketValue: number, price: number, decimals: number, mint: PublicKey): TokenAmount
  • tokens(tokenAmount: string, decimals: number, mint: PublicKey): TokenAmount

Generated using TypeDoc