import { NamespaceId } from '../namespace/NamespaceId'; import { UInt64 } from '../UInt64'; import { Mosaic } from './Mosaic'; import { MosaicId } from './MosaicId'; import { UnresolvedMosaicId } from './UnresolvedMosaicId'; /** * An object that knows how to create Mosaics based on the Mosaic Info and Namespace configuration. */ export declare class Currency { /** * Currency for public / Public_test network. * * This represents the per-network currency mosaic. This mosaicId is aliased with namespace name `twix`. * * This simplifies offline operations but general applications should load the currency from the repository factory and network currency service. * * If you are creating a private network and you need offline access, you can create a Currency in memory. * */ static readonly PUBLIC: Currency; /** * The selected unresolved mosaic id used when creating {@link Mosaic}. This could either be the * Namespace or the Mosaic id. */ readonly unresolvedMosaicId: UnresolvedMosaicId; /** * Mosaic id of this currency. This value is optional if the user only wants to provide the mosaic * id. This value will be set if it's loaded by rest. */ readonly mosaicId?: MosaicId; /** * The Namespace id of this currency. This value is option if the user only wants to provide the * namespace id. This value will be set if it's loaded by rest. */ readonly namespaceId?: NamespaceId; /** Divisibility of this currency, required to create Mosaic from relative amounts. */ readonly divisibility: number; /** Is this currency transferable. */ readonly transferable: boolean; /** Is this currency supply mutable. */ readonly supplyMutable: boolean; /** Is this currency restrictable. */ readonly restrictable: boolean; constructor({ unresolvedMosaicId, mosaicId, namespaceId, divisibility, transferable, supplyMutable, restrictable, }: { unresolvedMosaicId?: UnresolvedMosaicId; mosaicId?: MosaicId; namespaceId?: NamespaceId; divisibility: number; transferable: boolean; supplyMutable: boolean; restrictable: boolean; }); /** * Creates a Mosaic from this relative amount. * * @param amount * @returns {Mosaic} */ createRelative(amount: UInt64 | number): Mosaic; /** * Creates a Mosaic from this relative amount. * * @param amount * @returns {Mosaic} */ createAbsolute(amount: UInt64 | number): Mosaic; }