export const MICROSTX_IN_STX = 1_000_000; /** * Convert μSTX (micro-STX) to STX denomination. * `1 STX = 1,000,000 μSTX` * * @example * ```ts * microStxToStx(1000000n); // 1n * ``` */ export function microStxToStx(amountInMicroStx: number): number { return amountInMicroStx / MICROSTX_IN_STX; } /** * Convert STX to μSTX (micro-STX) denomination. * `1 STX = 1,000,000 μSTX` * * @example * ```ts * stxToMicroStx(1); // 1000000 * ``` */ export function stxToMicroStx(amountInStx: number): number { return amountInStx * MICROSTX_IN_STX; }