import BigNumber from 'bignumber.js'; import { MetadataDetails, MetadataType, MetadataValue } from '../../../api/entities/MetadataEntry/types'; import { BaseAsset, Context, Entity, PolymeshError } from '../../../internal'; import { NoArgsProcedureMethod, ProcedureMethod, SetMetadataParams } from '../../../types'; export interface UniqueIdentifiers { type: MetadataType; id: BigNumber; assetId: string; } export interface HumanReadable { id: string; assetId: string; type: MetadataType; } /** * Represents an Asset MetadataEntry in the Polymesh blockchain */ export declare class MetadataEntry extends Entity { /** * Asset for which this is the metadata */ asset: BaseAsset; /** * Type of metadata represented by this instance */ type: MetadataType; /** * identifier number of the MetadataEntry */ id: BigNumber; /** * @hidden * Check if a value is of type {@link UniqueIdentifiers} */ static isUniqueIdentifiers(identifier: unknown): identifier is UniqueIdentifiers; /** * @hidden */ constructor(identifiers: UniqueIdentifiers, context: Context); /** * Assign new value for the MetadataEntry along with its details or optionally only set the details (expiry + lock status) of any Metadata value * * @note - Value or the details can only be set if the MetadataEntry is not locked */ set: ProcedureMethod; /** * Removes the asset metadata value * * @throws * - if the Metadata doesn't exists * - if the Metadata value is locked */ clear: NoArgsProcedureMethod; /** * Removes a local Asset Metadata key along with its value * * @note A global Metadata key cannot be deleted * * @throws * - if the Metadata type is global * - if the Metadata doesn't exists * - if the Metadata value is locked * - if the Metadata is a mandatory key for any NFT Collection */ remove: NoArgsProcedureMethod; /** * Retrieve name and specs for this MetadataEntry */ details(): Promise; /** * Retrieve the value and details (expiry + lock status) for this MetadataEntry * * @note - This returns `null` if no value is yet specified for this MetadataEntry */ value(): Promise; /** * Determine whether this MetadataEntry exists on chain */ exists(): Promise; /** * Check if the MetadataEntry can be modified. * A MetadataEntry is modifiable if it exists and is not locked */ isModifiable(): Promise<{ canModify: boolean; reason?: PolymeshError; }>; /** * Return the MetadataEntry's ID, Asset ticker and Metadata type */ toHuman(): HumanReadable; } //# sourceMappingURL=index.d.ts.map