import BigNumber from 'bignumber.js'; import { Context, FungibleAsset, Identity, Instruction, NftCollection, TickerReservation } from '../../internal'; import { Asset, CreateAssetWithTickerParams, CreateNftCollectionParams, GlobalMetadataKey, PaginationOptions, ProcedureMethod, RegisterCustomAssetTypeParams, ReserveTickerParams, ResultSet, SubCallback, TickerRegistrationConfig, TransferFundsParams, UnsubCallback } from '../../types'; /** * Handles all Asset related functionality */ export declare class Assets { private readonly context; /** * @hidden */ constructor(context: Context); /** * Reserve a ticker symbol under the ownership of the signing Identity to later use in the creation of an Asset. * The ticker will expire after a set amount of time, after which other users can reserve it */ reserveTicker: ProcedureMethod; /** * Create an Asset * * @note if ticker is already reserved, then required role: * - Ticker Owner */ createAsset: ProcedureMethod; /** * Create an NftCollection * * @note if ticker is already reserved, then required role: * - Ticker Owner */ createNftCollection: ProcedureMethod; /** * Check if a ticker hasn't been reserved * * @param args.ticker - Ticker symbol to check availability for * * @returns Promise that resolves to true if ticker is available, false otherwise */ isTickerAvailable(args: { ticker: string; }): Promise; /** * Check if a ticker hasn't been reserved (with subscription support) * * @param args.ticker - Ticker symbol to check availability for * @param callback - Callback function that receives availability status updates * * @returns Promise that resolves to an unsubscribe function * * @note can be subscribed to, if connected to node using a web socket */ isTickerAvailable(args: { ticker: string; }, callback: SubCallback): Promise; /** * Retrieve all the ticker reservations currently owned by an Identity. This doesn't include tickers already * associated with an Asset * * @param args.owner - The identity whose reservations to return. Defaults to the signing Identity if omitted. * * @returns A list of active `TickerReservation` instances * * @note Reservations with unreadable ticker characters are excluded. */ getTickerReservations(args?: { owner: string | Identity; }): Promise; /** * Retrieve a Ticker Reservation * * @param args.ticker - Asset ticker */ getTickerReservation(args: { ticker: string; }): TickerReservation; /** * Retrieve a FungibleAsset or NftCollection by ticker * * @param args.ticker - Unique ticker of the Asset * * @note `getFungibleAsset` and `getNftCollection` are similar to this method, but return a more specific type */ getAsset(args: { ticker: string; }): Promise; /** * Retrieve a FungibleAsset or NftCollection by Asset ID * * @param args.assetId - Unique identifier of the Asset * * @note `getFungibleAsset` and `getNftCollection` are similar to this method, but return a more specific type */ getAsset(args: { assetId: string; }): Promise; /** * Retrieve all of the Assets owned by an Identity * * @param args.owner - Identity representation or Identity ID as stored in the blockchain * * @note Assets with unreadable characters in their tickers will be left out */ getAssets(args?: { owner: string | Identity; }): Promise; /** * @hidden */ private getIdFromAssetIdAndTicker; /** * Retrieve a FungibleAsset by Asset ID * * @param args.assetId - Unique identifier of the Fungible Asset * @param args.skipExistsCheck - When true, method will not check if Asset exists before returning instance. Defaults to false */ getFungibleAsset(args: { assetId: string; skipExistsCheck?: boolean; }): Promise; /** * Retrieve a FungibleAsset by ticker * * @param args.ticker - Unique ticker of the Fungible Asset * * @note The Asset must exist on chain to be retrieved by ticker */ getFungibleAsset(args: { ticker: string; }): Promise; /** * Retrieve an NftCollection by ticker * * @param args.ticker - Unique ticker of the NftCollection * * @note The NftCollection must exist on chain to be retrieved by ticker */ getNftCollection(args: { ticker: string; }): Promise; /** * Retrieve an NftCollection by Asset ID * * @param args.assetId - Unique identifier of the NftCollection * @param args.skipExistsCheck - When true, method will not check if the NftCollection exists before returning instance. Defaults to false */ getNftCollection(args: { assetId: string; skipExistsCheck?: boolean; }): Promise; /** * Retrieve all the Assets on chain * * @note supports pagination */ get(paginationOpts?: PaginationOptions): Promise>; /** * Retrieve all the Asset Global Metadata on chain. This includes metadata id, name and specs */ getGlobalMetadataKeys(): Promise; /** * Register a custom asset type */ registerCustomAssetType: ProcedureMethod; /** * Gets the next custom Asset type Id */ getNextCustomAssetTypeId(): Promise; /** * Transfer funds between two asset holders (Account or Portfolio), which may be owned by the same or different identities. * * @note When `from` account is of type account and the caller is the subsidizer of `from` account, there should be allowance available for transfer and for each transfer said amount is decremented. * * @note When `from` and `to` belong to different identities, this creates a settlement instruction that is immediately affirmed on behalf of `from`. If the caller's identity doesn't also own `to`, the instruction remains pending until the receiver affirms it (a resolved {@link api/entities/Instruction!Instruction | Instruction} is returned in that case). If both sides are affirmed, the transfer settles immediately and `undefined` is returned. */ transferFunds: ProcedureMethod; /** * Gets the chain-wide rules used to validate ticker registrations */ getTickerRegistrationConfig(): Promise; } //# sourceMappingURL=Assets.d.ts.map