Skip to main content
Provides safe integer types and arbitrary-precision decimal arithmetic to prevent JavaScript number precision issues when handling token amounts.

Uint32

32-bit unsigned integer. Range: 0 to 4,294,967,295.

Uint53

53-bit unsigned integer (JavaScript safe integer range). Range: 0 to 9,007,199,254,740,991.

Int53

53-bit signed integer. Range: -9,007,199,254,740,991 to 9,007,199,254,740,991.

Uint64

64-bit unsigned integer. Uses bigint internal representation for values beyond JavaScript’s safe integer range.

Decimal

Arbitrary-precision decimal type for safe financial calculations. Internally stores values as integer atomics with a fixed fractional digit count.

Static Methods

Instance Methods

Instance Properties

Usage