fromYoctoNEAR()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / fromYoctoNEAR
Function: fromYoctoNEAR()
Section titled “Function: fromYoctoNEAR()”fromYoctoNEAR(
amount,decimals):string
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18444
Convert smallest units to human-readable amount
Parameters
Section titled “Parameters”amount
Section titled “amount”bigint
Amount in smallest units
decimals
Section titled “decimals”number
Token decimals
Returns
Section titled “Returns”string
Human-readable string
Example
Section titled “Example”// 1_000_000_000_000_000_000_000_000 yoctoNEAR = "1"const readable = fromYoctoNEAR(1_000_000_000_000_000_000_000_000n, 24)// "1"