api.entities.MetadataEntry - PolymeshAssociation/polymesh-sdk GitHub Wiki
@polymeshassociation/polymesh-sdk / api/entities/MetadataEntry
Defined in: api/entities/MetadataEntry/index.ts:45
Represents an Asset MetadataEntry in the Polymesh blockchain
asset:
BaseAsset
Defined in: api/entities/MetadataEntry/index.ts:49
Asset for which this is the metadata
id:
BigNumber
Defined in: api/entities/MetadataEntry/index.ts:59
identifier number of the MetadataEntry
type:
MetadataType
Defined in: api/entities/MetadataEntry/index.ts:54
Type of metadata represented by this instance
uuid:
string
Defined in: api/entities/Entity.ts:46
clear(
opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/MetadataEntry/index.ts:111
Removes the asset metadata value
| Parameter | Type |
|---|---|
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
- if the Metadata doesn't exists
- if the Metadata value is locked
this method is of type NoArgsProcedureMethod, which means you can call clear.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
details():
Promise<MetadataDetails>
Defined in: api/entities/MetadataEntry/index.ts:129
Retrieve name and specs for this MetadataEntry
Promise<MetadataDetails>
exists():
Promise<boolean>
Defined in: api/entities/MetadataEntry/index.ts:205
Determine whether this MetadataEntry exists on chain
Promise<boolean>
isEqual(
entity):boolean
Defined in: api/entities/Entity.ts:61
Determine whether this Entity is the same as another one
| Parameter | Type |
|---|---|
entity |
Entity<unknown, unknown> |
boolean
isModifiable():
Promise<{canModify:boolean;reason?:PolymeshError; }>
Defined in: api/entities/MetadataEntry/index.ts:238
Check if the MetadataEntry can be modified. A MetadataEntry is modifiable if it exists and is not locked
Promise<{ canModify: boolean; reason?: PolymeshError; }>
remove(
opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/MetadataEntry/index.ts:124
Removes a local Asset Metadata key along with its value
| Parameter | Type |
|---|---|
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
A global Metadata key cannot be deleted
- 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
this method is of type NoArgsProcedureMethod, which means you can call remove.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
set(
args,opts?):Promise<GenericPolymeshTransaction<MetadataEntry,MetadataEntry>>
Defined in: api/entities/MetadataEntry/index.ts:102
Assign new value for the MetadataEntry along with its details or optionally only set the details (expiry + lock status) of any Metadata value
| Parameter | Type |
|---|---|
args |
SetMetadataParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<MetadataEntry, MetadataEntry>>
- Value or the details can only be set if the MetadataEntry is not locked
this method is of type ProcedureMethod, which means you can call set.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
toHuman():
HumanReadable
Defined in: api/entities/MetadataEntry/index.ts:301
Return the MetadataEntry's ID, Asset ticker and Metadata type
value():
Promise<MetadataValue|null>
Defined in: api/entities/MetadataEntry/index.ts:176
Retrieve the value and details (expiry + lock status) for this MetadataEntry
Promise<MetadataValue | null>
- This returns
nullif no value is yet specified for this MetadataEntry
staticgenerateUuid<Identifiers>(identifiers):string
Defined in: api/entities/Entity.ts:14
Generate the Entity's UUID from its identifying properties
| Type Parameter |
|---|
Identifiers |
| Parameter | Type | Description |
|---|---|---|
identifiers |
Identifiers |
- |
string
staticunserialize<Identifiers>(serialized):Identifiers
Defined in: api/entities/Entity.ts:23
Unserialize a UUID into its Unique Identifiers
| Type Parameter |
|---|
Identifiers |
| Parameter | Type | Description |
|---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers
Defined in: api/entities/MetadataEntry/index.ts:36
assetId:
string
Defined in: api/entities/MetadataEntry/index.ts:38
id:
string
Defined in: api/entities/MetadataEntry/index.ts:37
type:
MetadataType
Defined in: api/entities/MetadataEntry/index.ts:39
Defined in: api/entities/MetadataEntry/index.ts:30
assetId:
string
Defined in: api/entities/MetadataEntry/index.ts:33
id:
BigNumber
Defined in: api/entities/MetadataEntry/index.ts:32
type:
MetadataType
Defined in: api/entities/MetadataEntry/index.ts:31