gill

tokenAmountToUiAmount

function tokenAmountToUiAmount(amount, decimals): number;

Converts a raw amount (BigInt) to UI amount (human-readable)

Parameters

ParameterTypeDescription
amountbigintThe raw token amount as BigInt
decimalsnumberThe number of decimals for the token

Returns

number

UI representation of the amount as a number

On this page