-
Notifications
You must be signed in to change notification settings - Fork 11
api.entities.Asset.NonFungible.NftCollection.NftCollection
api/entities/Asset/NonFungible/NftCollection.NftCollection
Class used to manage NFT functionality
-
↳
NftCollection
- addRequiredMediators
- collectionKeys
- controllerTransfer
- createdAt
- currentFundingRound
- details
- exists
- freeze
- getCollectionId
- getIdentifiers
- getNft
- getRequiredMediators
- getTransactionHistory
- getVenueFilteringDetails
- investorCount
- isEqual
- isFrozen
- issue
- modify
- removeRequiredMediators
- setVenueFiltering
- toHuman
- transferOwnership
- unfreeze
- generateUuid
- unserialize
• assetHolders: AssetHolders
api/entities/Asset/NonFungible/NftCollection.ts:61
• compliance: Compliance
api/entities/Asset/Base/BaseAsset.ts:66
• did: string
Identity ID of the Asset (used for Claims)
api/entities/Asset/Base/BaseAsset.ts:74
• documents: Documents
api/entities/Asset/Base/BaseAsset.ts:67
• metadata: Metadata
api/entities/Asset/Base/BaseAsset.ts:68
• permissions: Permissions
api/entities/Asset/Base/BaseAsset.ts:69
• settlements: NonFungibleSettlements
api/entities/Asset/NonFungible/NftCollection.ts:62
• ticker: string
ticker of the Asset
api/entities/Asset/Base/BaseAsset.ts:79
• uuid: string
▸ addRequiredMediators(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Add required mediators. Mediators must approve any trades involving the asset
Name | Type |
---|---|
args |
AssetMediatorParams |
opts? |
ProcedureOpts |
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
BaseAsset.addRequiredMediators
api/entities/Asset/Base/BaseAsset.ts:218
▸ 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
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
api/entities/Asset/NonFungible/NftCollection.ts:178
▸ controllerTransfer(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Force a transfer from the origin portfolio to one of the caller's portfolios
Name | Type |
---|---|
args |
NftControllerTransferParams |
opts? |
ProcedureOpts |
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
api/entities/Asset/NonFungible/NftCollection.ts:81
▸ 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
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
api/entities/Asset/NonFungible/NftCollection.ts:266
▸ currentFundingRound(): Promise
<null
| string
>
Retrieve the Asset's funding round
Promise
<null
| string
>
Note
can be subscribed to, if connected to node using a web socket
api/entities/Asset/Base/BaseAsset.ts:457
▸ currentFundingRound(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <null | string > |
Promise
<UnsubCallback
>
api/entities/Asset/Base/BaseAsset.ts:458
▸ details(): Promise
<AssetDetails
>
Retrieve the NftCollection's data
Promise
<AssetDetails
>
Note
can be subscribed to, if connected to node using a web socket
api/entities/Asset/NonFungible/NftCollection.ts:127
▸ details(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <AssetDetails > |
Promise
<UnsubCallback
>
api/entities/Asset/NonFungible/NftCollection.ts:128
▸ exists(): Promise
<boolean
>
Determine whether this NftCollection exists on chain
Promise
<boolean
>
BaseAsset.exists
api/entities/Asset/NonFungible/NftCollection.ts:287
▸ freeze(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Freeze transfers of the Asset
Name | Type |
---|---|
opts? |
ProcedureOpts |
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
api/entities/Asset/Base/BaseAsset.ts:198
▸ getCollectionId(): Promise
<BigNumber
>
Returns the collection's on chain numeric ID. Used primarily to access NFT specific storage values
Promise
<BigNumber
>
api/entities/Asset/NonFungible/NftCollection.ts:300
▸ getIdentifiers(): Promise
<SecurityIdentifier
[]>
Retrieve the Asset's identifiers list
Promise
<SecurityIdentifier
[]>
Note
can be subscribed to, if connected to node using a web socket
api/entities/Asset/Base/BaseAsset.ts:237
▸ getIdentifiers(callback?
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback? |
SubCallback <SecurityIdentifier []> |
Promise
<UnsubCallback
>
api/entities/Asset/Base/BaseAsset.ts:238
▸ getNft(args
): Promise
<Nft
>
Get an NFT belonging to this collection
Name | Type |
---|---|
args |
Object |
args.id |
BigNumber |
Promise
<Nft
>
Throws
if the given NFT does not exist
api/entities/Asset/NonFungible/NftCollection.ts:242
▸ getRequiredMediators(): Promise
<Identity
[]>
Get required Asset mediators. These Identities must approve any Instruction involving the asset
Promise
<Identity
[]>
BaseAsset.getRequiredMediators
api/entities/Asset/Base/BaseAsset.ts:403
▸ getTransactionHistory(opts
): Promise
<ResultSet
<HistoricNftTransaction
>>
Retrieve this Collection's transaction history
Name | Type |
---|---|
opts |
Object |
opts.size? |
BigNumber |
opts.start? |
BigNumber |
Promise
<ResultSet
<HistoricNftTransaction
>>
Note
uses the middlewareV2
api/entities/Asset/NonFungible/NftCollection.ts:326
▸ getVenueFilteringDetails(): Promise
<VenueFilteringDetails
>
Get venue filtering details
Promise
<VenueFilteringDetails
>
BaseAsset.getVenueFilteringDetails
api/entities/Asset/Base/BaseAsset.ts:422
▸ investorCount(): Promise
<BigNumber
>
Retrieve the amount of unique investors that hold this Nft
Promise
<BigNumber
>
api/entities/Asset/NonFungible/NftCollection.ts:219
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Name | Type |
---|---|
entity |
Entity <unknown , unknown > |
boolean
▸ isFrozen(): Promise
<boolean
>
Check whether transfers are frozen for the Asset
Promise
<boolean
>
Note
can be subscribed to, if connected to node using a web socket
api/entities/Asset/Base/BaseAsset.ts:274
▸ isFrozen(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <boolean > |
Promise
<UnsubCallback
>
api/entities/Asset/Base/BaseAsset.ts:275
▸ issue(args
, opts?
): Promise
<GenericPolymeshTransaction
<Nft
, Nft
>>
Issues a new NFT for the collection
Name | Type |
---|---|
args |
IssueNftParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<Nft
, Nft
>>
Note
Each NFT requires metadata for each value returned by collectionKeys
. The SDK and chain only validate the presence of these fields. Additional validation may be needed to ensure each value complies with the specification.
Note
this method is of type ProcedureMethod, which means you can call issue.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
api/entities/Asset/NonFungible/NftCollection.ts:71
▸ modify(args
, opts?
): Promise
<GenericPolymeshTransaction
<Asset
, Asset
>>
Modify some properties of the Asset
Name | Type |
---|---|
args |
ModifyAssetParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<Asset
, Asset
>>
Throws
if the passed values result in no changes being made to the Asset
Note
this method is of type ProcedureMethod, which means you can call modify.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
api/entities/Asset/Base/BaseAsset.ts:124
▸ removeRequiredMediators(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Remove required mediators
Name | Type |
---|---|
args |
AssetMediatorParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
this method is of type ProcedureMethod, which means you can call removeRequiredMediators.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
BaseAsset.removeRequiredMediators
api/entities/Asset/Base/BaseAsset.ts:228
▸ setVenueFiltering(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Enable/disable venue filtering for this Asset and/or set allowed/disallowed venues
Name | Type |
---|---|
args |
SetVenueFilteringParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
this method is of type ProcedureMethod, which means you can call setVenueFiltering.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
api/entities/Asset/Base/BaseAsset.ts:102
▸ toHuman(): string
Return the NftCollection's ticker
string
api/entities/Asset/Base/BaseAsset.ts:514
▸ transferOwnership(args
, opts?
): Promise
<GenericPolymeshTransaction
<AuthorizationRequest
, AuthorizationRequest
>>
Transfer ownership of the Asset to another Identity. This generates an authorization request that must be accepted by the recipient
Name | Type |
---|---|
args |
TransferAssetOwnershipParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<AuthorizationRequest
, AuthorizationRequest
>>
Note
this will create Authorization Request which has to be accepted by the target
Identity.
An Account or Identity can fetch its pending Authorization Requests by calling authorizations.getReceived.
Also, an Account or Identity can directly fetch the details of an Authorization Request by calling authorizations.getOne
Note
this method is of type ProcedureMethod, which means you can call transferOwnership.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
api/entities/Asset/Base/BaseAsset.ts:92
▸ unfreeze(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Unfreeze transfers of the Asset
Name | Type |
---|---|
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
this method is of type NoArgsProcedureMethod, which means you can call unfreeze.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
api/entities/Asset/Base/BaseAsset.ts:208
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Name |
---|
Identifiers |
Name | Type |
---|---|
identifiers |
Identifiers |
string
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Name |
---|
Identifiers |
Name | Type | Description |
---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers
Entities
- Account
- Asset
- Authorization Request
- Checkpoint
- Checkpoint Schedule
- Corporate Action
- Corporate Action Base
- Custom Permission Group
- Default Portfolio
- Default Trusted Claim Issuer
- Dividend Distribution
- Entity
- Identity
- Instruction
- Known Permission Group
- Metadata Entry
- Multi Sig Proposal
- Numbered Portfolio
- Offering
- Permission Group
- Portfolio
- Subsidies
- Subsidy
- Ticker Reservation
- Venue
- Authorizations
- Types