Function formatKLV

    • Format KLV amount from smallest units to human-readable string

      Convenience function that calls formatUnits with 6 decimals (KLV precision).

      Parameters

      • amount: string | number | bigint

        Amount in smallest units

      Returns string

      Formatted KLV string

      formatKLV(1000000n) // '1'
      formatKLV(1500000n) // '1.5'
      formatKLV('2000000') // '2'