Type Alias TokenAmount

TokenAmount: {
    amount: string;
    decimals: number;
    uiAmount: number | null;
    uiAmountString?: string;
}

Token amount object which returns a token amount in different formats for various client use cases.

Type declaration

  • amount: string

    Raw amount of tokens as string ignoring decimals

  • decimals: number

    Number of decimals configured for token's mint

  • uiAmount: number | null

    Token amount as float, accounts for decimals

  • OptionaluiAmountString?: string

    Token amount as string, accounts for decimals