Skip to content

fromYoctoNEAR()

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / fromYoctoNEAR

fromYoctoNEAR(amount, decimals): string

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18444

Convert smallest units to human-readable amount

bigint

Amount in smallest units

number

Token decimals

string

Human-readable string

// 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"