Type Alias AmountLike

    AmountLike: number | bigint | string

    Amount in smallest units (raw value)

    • bigint: Native JavaScript bigint (recommended)
    • number: JavaScript number (limited to safe integer range)
    • string: String representation of raw value (e.g., "10000000" for 10 KLV)

    Note: All values are treated as raw (smallest units). No automatic conversion. For human-readable values, use parseKLV() to convert before passing to SDK.

    // All these are 10 KLV (raw value = 10000000):
    amount: 10000000n // bigint (recommended)
    amount: 10000000 // number
    amount: "10000000" // string

    // Convert human-readable to raw:
    import { parseKLV } from '@klever/connect-core'
    amount: parseKLV("10") // Returns 10000000n (10 KLV)
    amount: parseKLV("10.5") // Returns 10500000n (10.5 KLV)