UNPKG

nanocurrency

Version:

A toolkit for the Nano cryptocurrency, allowing you to derive keys, generate seeds, hashes, signatures, proofs of work and blocks.

35 lines (34 loc) 804 B
/** Nano unit. */ export declare enum Unit { /** 10^0 raw in hexadecimal format */ hex = "hex", /** 10^0 raw */ raw = "raw", /** 10^24 raw */ nano = "nano", /** 10^27 raw */ knano = "knano", /** 10^30 raw */ Nano = "Nano", /** 10^30 raw */ NANO = "NANO", /** 10^33 raw */ KNano = "KNano", /** 10^36 raw */ MNano = "MNano" } /** Convert parameters. */ export interface ConvertParams { /** The unit to convert the value from */ from: Unit; /** The unit to convert the value to */ to: Unit; } /** * Convert a value from one Nano unit to another. * * @param value - The value to convert * @param params - Params * @returns Converted number */ export declare function convert(value: string, params: ConvertParams): string;