UNPKG

@aeternity/aepp-sdk

Version:

SDK for the æternity blockchain

56 lines (55 loc) 1.81 kB
import BigNumber from 'bignumber.js'; /** * @deprecated no replacement implemented yet * @category utils */ export declare enum AE_AMOUNT_FORMATS { AE = "ae", MILI_AE = "miliAE", MICRO_AE = "microAE", NANO_AE = "nanoAE", PICO_AE = "picoAE", FEMTO_AE = "femtoAE", AETTOS = "aettos" } /** * Convert amount from one to other denomination * @deprecated no replacement implemented yet * @category utils * @param value - amount to convert * @param options - options * @param options.denomination - denomination of amount, can be ['ae', 'aettos'] * @param options.targetDenomination - target denomination, * can be ['ae', 'aettos'] */ export declare const formatAmount: (value: string | number | bigint | BigNumber, { denomination, targetDenomination, }: { denomination?: AE_AMOUNT_FORMATS; targetDenomination?: AE_AMOUNT_FORMATS; }) => string; /** * Convert amount to AE * @deprecated no replacement implemented yet * @category utils * @param value - amount to convert * @param options - options * @param options.denomination - denomination of amount, can be ['ae', 'aettos'] */ export declare const toAe: (value: string | number | BigNumber, { denomination }?: { denomination?: AE_AMOUNT_FORMATS; }) => string; /** * Convert amount to aettos * @deprecated no replacement implemented yet * @category utils * @param value - amount to convert * @param options - options * @param options.denomination - denomination of amount, can be ['ae', 'aettos'] */ export declare const toAettos: (value: string | number | BigNumber, { denomination }?: { denomination?: AE_AMOUNT_FORMATS; }) => string; /** * @deprecated no replacement implemented yet * @category utils */ export declare const prefixedAmount: (rawValue: string | number | BigNumber) => string;