Class: NftCollection
api/entities/Asset/NonFungible/NftCollection.NftCollection
Class used to manage NFT functionality
Hierarchy
-
↳
NftCollection
Properties
assetHolders
• assetHolders: AssetHolders
Defined in
api/entities/Asset/NonFungible/NftCollection.ts:62
compliance
• compliance: Compliance
Inherited from
Defined in
api/entities/Asset/Base/BaseAsset.ts:71
did
• Optional
did: string
Identity ID of the Asset (used for Claims)
Deprecated
this is no longer used from chain 7.x
Inherited from
Defined in
api/entities/Asset/Base/BaseAsset.ts:81
documents
• documents: Documents
Inherited from
Defined in
api/entities/Asset/Base/BaseAsset.ts:72
id
• id: string
Unique ID of the Asset in UUID format
Inherited from
Defined in
api/entities/Asset/Base/BaseAsset.ts:95
metadata
• metadata: Metadata
Inherited from
Defined in
api/entities/Asset/Base/BaseAsset.ts:73
permissions
• permissions: Permissions
Inherited from
Defined in
api/entities/Asset/Base/BaseAsset.ts:74
settlements
• settlements: NonFungibleSettlements
Defined in
api/entities/Asset/NonFungible/NftCollection.ts:63
ticker
• Optional
ticker: string
ticker of the Asset
Since the chain version 7.x, ticker can be optionally associated with an Asset
Deprecated
in favour of ticker
value received from the response of details
method
Inherited from
Defined in
api/entities/Asset/Base/BaseAsset.ts:90
uuid
• uuid: string
Inherited from
Defined in
Accessors
rawId
• get
rawId(): string
Unique ID of the Asset in hex format
Returns
string
Note
Although UUID format is the usual representation of asset IDs, generic polkadot/substrate tools usually expect it in hex format
Inherited from
BaseAsset.rawId
Defined in
api/entities/Asset/Base/BaseAsset.ts:102
Methods
addRequiredMediators
▸ addRequiredMediators(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Add required mediators. Mediators must approve any trades involving the asset
Parameters
Name | Type |
---|---|
args | AssetMediatorParams |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
this method is of type ProcedureMethod, which means you can call addRequiredMediators.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Inherited from
BaseAsset.addRequiredMediators
Defined in
api/entities/Asset/Base/BaseAsset.ts:263
collectionKeys
▸ collectionKeys(): Promise
<CollectionKey
[]>
Retrieve the metadata that defines the NFT collection. Every issue
call for this collection must provide a value for each element returned
Returns
Promise
<CollectionKey
[]>
Note
Each NFT must have an entry for each value, it should comply with the spec. In other words, the SDK only validates the presence of metadata keys, additional validation should be used when issuing
Defined in
api/entities/Asset/NonFungible/NftCollection.ts:172
controllerTransfer
▸ controllerTransfer(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Force a transfer from the origin portfolio to one of the caller's portfolios
Parameters
Name | Type |
---|---|
args | NftControllerTransferParams |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
this method is of type ProcedureMethod, which means you can call controllerTransfer.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Defined in
api/entities/Asset/NonFungible/NftCollection.ts:82
createdAt
▸ createdAt(): Promise
<null
| EventIdentifier
>
Retrieve the identifier data (block number, date and event index) of the event that was emitted when the token was created
Returns
Promise
<null
| EventIdentifier
>
Note
uses the middlewareV2
Note
there is a possibility that the data is not ready by the time it is requested. In that case, null
is returned
Defined in
api/entities/Asset/NonFungible/NftCollection.ts:261
currentFundingRound
▸ currentFundingRound(): Promise
<null
| string
>
Retrieve the Asset's funding round
Returns
Promise
<null
| string
>
Note
can be subscribed to, if connected to node using a web socket
Inherited from
Defined in
api/entities/Asset/Base/BaseAsset.ts:563
▸ currentFundingRound(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
callback | SubCallback <null | string > |
Returns
Promise
<UnsubCallback
>
Inherited from
Defined in
api/entities/Asset/Base/BaseAsset.ts:564
details
▸ details(): Promise
<AssetDetails
>
Retrieve the NftCollection's data
Returns
Promise
<AssetDetails
>
Note
can be subscribed to, if connected to node using a web socket
Overrides
Defined in
api/entities/Asset/NonFungible/NftCollection.ts:122
▸ details(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
callback | SubCallback <AssetDetails > |
Returns
Promise
<UnsubCallback
>
Overrides
Defined in
api/entities/Asset/NonFungible/NftCollection.ts:123
exists
▸ exists(): Promise
<boolean
>
Determine whether this NftCollection exists on chain
Returns
Promise
<boolean
>
Overrides
BaseAsset.exists
Defined in
api/entities/Asset/NonFungible/NftCollection.ts:284
freeze
▸ freeze(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Freeze transfers of the Asset
Parameters
Name | Type |
---|---|
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
this method is of type NoArgsProcedureMethod, which means you can call freeze.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Inherited from
Defined in
api/entities/Asset/Base/BaseAsset.ts:243
getCollectionId
▸ getCollectionId(): Promise
<BigNumber
>
Returns the collection's on chain numeric ID. Used primarily to access NFT specific storage values
Returns
Promise
<BigNumber
>
Defined in
api/entities/Asset/NonFungible/NftCollection.ts:311
getIdentifiers
▸ getIdentifiers(): Promise
<SecurityIdentifier
[]>
Retrieve the Asset's identifiers list
Returns
Promise
<SecurityIdentifier
[]>
Note
can be subscribed to, if connected to node using a web socket