Understand the Dnum data structure
mainIn dnum, numbers are represented as a Dnum type, which is a tuple consisting of a bigint value and a number representing decimal precision. This structure allows you to maintain high precision for large numbers while offering flexibility for mathematical operations and formatting.
type Dnum = [value: bigint, decimals: number];
type Dnum = [value: bigint, decimals: number];
// Example of a Dnum value representing 2 followed by 18 decimals
let a: Dnum = [2000000000000000000n, 18];