import BigNumber from 'bignumber.js'; import { Compliance } from '../../../../api/entities/Asset/Base/Compliance'; import { Documents } from '../../../../api/entities/Asset/Base/Documents'; import { Metadata } from '../../../../api/entities/Asset/Base/Metadata'; import { Permissions } from '../../../../api/entities/Asset/Base/Permissions'; import { Context, Entity, Identity } from '../../../../internal'; import { Asset, AssetDetails, AssetMediatorParams, AuthorizationRequest, LinkTickerToAssetParams, ModifyAssetParams, NoArgsProcedureMethod, ProcedureMethod, SecurityIdentifier, SetVenueFilteringParams, SubCallback, TransferAssetOwnershipParams, UniqueIdentifiers, UnsubCallback, VenueFilteringDetails } from '../../../../types'; /** * Class used to manage functionality common to all assets. * */ export declare class BaseAsset extends Entity { compliance: Compliance; documents: Documents; metadata: Metadata; permissions: Permissions; /** * Unique ID of the Asset in UUID format */ id: string; /** * Unique ID of the Asset in hex format * * @note Although UUID format is the usual representation of asset IDs, generic polkadot/substrate tools usually expect it in hex format */ get rawId(): string; /** * Transfer ownership of the Asset to another Identity. This generates an authorization request that must be accepted * by the recipient * * @note the signing Identity must be an agent of this Asset holding `asset.acceptAssetOwnershipTransfer` * permission — granted by `TxGroup.AdvancedAssetManagement` or `PermissionGroupType.Full`. The chain * checks this when the `target` accepts, against the Identity that created the Authorization Request, * so an offer sent without it can never be accepted * * @note this will create {@link AuthorizationRequest | Authorization Request} which has to be accepted by the `target` Identity. * An {@link api/entities/Account!Account} or {@link Identity} can fetch its pending Authorization Requests by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getReceived | authorizations.getReceived}. * Also, an Account or Identity can directly fetch the details of an Authorization Request by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getOne | authorizations.getOne} */ transferOwnership: ProcedureMethod; /** * Enable/disable venue filtering for this Asset and/or set allowed/disallowed venues */ setVenueFiltering: ProcedureMethod; /** * @hidden * Check if a value is of type {@link UniqueIdentifiers} */ static isUniqueIdentifiers(identifier: unknown): identifier is UniqueIdentifiers; /** * Modify some properties of the Asset * * @throws if the passed values result in no changes being made to the Asset * @throws if the passed assetType is not a known asset type or a custom type that has not been created on the chain * @throws if trying to modify an NftCollection's assetType */ modify: ProcedureMethod; /** * @hidden * * @note It is generally preferable to instantiate `FungibleAsset` or `NftCollection` */ constructor(identifiers: UniqueIdentifiers, context: Context); /** * Freeze transfers of the Asset */ freeze: NoArgsProcedureMethod; /** * Unfreeze transfers of the Asset */ unfreeze: NoArgsProcedureMethod; /** * Add required mediators. Mediators must approve any trades involving the asset */ addRequiredMediators: ProcedureMethod; /** * Remove required mediators */ removeRequiredMediators: ProcedureMethod; /** * Link ticker to the asset * * @note if ticker is already reserved, then required role: * - Ticker Owner */ linkTicker: ProcedureMethod; /** * Unlink ticker from the Asset * * @note Only the ticker owner is allowed to unlink the Asset * * @throws if there is no ticker to unlink */ unlinkTicker: NoArgsProcedureMethod; /** * Retrieve the Asset's identifiers list * * @returns Promise that resolves to the list of security identifiers */ getIdentifiers(): Promise; /** * Retrieve the Asset's identifiers list * * @param callback - Callback function that receives identifier updates * * @note can be subscribed to, if connected to node using a web socket * @returns Promise that resolves to an unsubscribe function */ getIdentifiers(callback?: SubCallback): Promise; /** * Check whether transfers are frozen for the Asset * * @returns Promise that resolves to true if transfers are frozen, false otherwise */ isFrozen(): Promise; /** * Check whether transfers are frozen for the Asset * * @param callback - Callback function that receives frozen status updates * * @note can be subscribed to, if connected to node using a web socket * @returns Promise that resolves to an unsubscribe function */ isFrozen(callback: SubCallback): Promise; /** * Retrieve the Asset's data * * @returns Promise that resolves to the Asset details */ details(): Promise; /** * Retrieve the Asset's data * * @param callback - Callback function that receives Asset details updates * * @note can be subscribed to, if connected to node using a web socket * @returns Promise that resolves to an unsubscribe function */ details(callback: SubCallback): Promise; /** * Get required Asset mediators. These Identities must approve any Instruction involving the asset */ getRequiredMediators(): Promise; /** * Get venue filtering details */ getVenueFilteringDetails(): Promise; /** * Retrieve the Asset's funding round * * @returns Promise that resolves to the current funding round name or null if not set */ currentFundingRound(): Promise; /** * Retrieve the Asset's funding round * * @param callback - Callback function that receives funding round updates * * @note can be subscribed to, if connected to node using a web socket * @returns Promise that resolves to an unsubscribe function */ currentFundingRound(callback: SubCallback): Promise; /** * Retrieve the total amount of the Asset issued in the given funding round * * @param fundingRound - name of the funding round to query */ getIssuedInFundingRound(fundingRound: string): Promise; /** * @hidden */ exists(): Promise; /** * Return the BaseAsset's ID */ toHuman(): string; } //# sourceMappingURL=BaseAsset.d.ts.map