export declare class CurrencyUtils { /** * Serializes ore as iron with up to 8 decimal places */ static encodeIron(amount: bigint): string; /** * Parses iron into ore */ static decodeIron(amount: string | number): bigint; /** * Deserialize ore back into bigint */ static decode(amount: string): bigint; static decodeTry(amount: string): [bigint, null] | [null, Error]; /** * Serialize ore into a string */ static encode(amount: bigint): string; /** * Parses a value in a major denomination as the minor denomination where possible: * - $IRON is always going to have 8 decimal places. * - If a custom asset, and `decimals` is provided, it will give the value * followed by a digit for each decimal place * - If a custom asset, and `decimals` is not provided, it will assume the * value is already in minor denomination with no decimal places * * Examples: * 1 $IRON = 100000000 * A custom asset with 2 decimal places: 1 = 100 * A custom asset with no decimal places: 1 = 1 */ static tryMajorToMinor(amount: bigint | string, assetId?: string, verifiedAssetMetadata?: { decimals?: number; }): [bigint, null] | [null, Error]; /** * Renders a value in a minor denomination as the major denomination: * - $IRON is always going to have 8 decimal places. * - If a custom asset, and `decimals` is provided, it will give the value * followed by a digit for each decimal place * - If a custom asset, and `decimals` is not provided, it will assume the * value is already in minor denomination with no decimal places * * Examples: * 100000000 = 1 $IRON * A custom asset with 2 decimal places: 100 = 1 * A custom asset with no decimal places: 1 = 1 */ static minorToMajor(amount: bigint, assetId?: string, verifiedAssetMetadata?: { decimals?: number; }): { value: bigint; decimals: number; }; /** * Renders values for human-readable purposes: * - Renders $IRON in the major denomination, with 8 decimal places * - If a custom asset, and `decimals` is provided, it will render the custom * asset in the major denomination with the decimal places * - If a custom asset, and `decimals` is not provided, it will render the * custom asset in the minor denomination with no decimal places */ static render(amount: bigint | string, includeSymbol?: boolean, assetId?: string, verifiedAssetMetadata?: { decimals?: number; symbol?: string; }): string; static renderOre(amount: bigint | string, includeTicker?: boolean, assetId?: string): string; } export declare const ORE_TO_IRON = 100000000; export declare const MINIMUM_ORE_AMOUNT = 0n; export declare const MAXIMUM_ORE_AMOUNT: bigint; export declare function assetMetadataWithDefaults(assetId?: string, verifiedAssetMetadata?: { decimals?: number; symbol?: string; }): { decimals: number; symbol: string; }; //# sourceMappingURL=currency.d.ts.map