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

  • Optional uiAmountString?: string

    Token amount as string, accounts for decimals

Generated using TypeDoc