Constructors
constructor
- new TokenAmount(lamports: BN, decimals: number, mint: PublicKey): TokenAmount
Parameters
lamports: BN
decimals: number
mint: PublicKey
Methods
eq
Parameters
Returns boolean
gt
Parameters
Returns boolean
lt
Parameters
Returns boolean
Static mint
Parameters
mint: Mint
mintAddress: PublicKey
Static tokenAccount
- tokenAccount(tokenAccount: Account, decimals: number): TokenAmount
Parameters
tokenAccount: Account
decimals: number
Static tokenPrice
- tokenPrice(marketValue: number, price: number, decimals: number, mint: PublicKey): TokenAmount
Parameters
marketValue: number
price: number
decimals: number
mint: PublicKey
Static tokens
- tokens(tokenAmount: string, decimals: number, mint: PublicKey): TokenAmount
Parameters
tokenAmount: string
decimals: number
mint: PublicKey
Static zero
Parameters
decimals: number
mint: PublicKey
Creates an instance of TokenAmount.
TokenAmount