Calls
burn
Burn a token 🔥 Caller must be the token owner NamespacecreateCollection
Create a new collection to group multiple semi-fungible tokens Tokens can be created within the collection by calling create_tokencollection_name
- the name of the collection collection_owner
- the collection owner, defaults to the caller metadata_scheme
- The off-chain metadata referencing scheme for tokens in this royalties_schedule
- defacto royalties plan for secondary sales, this will apply to all tokens in the collection by default.
The collectionUuid used to store the SFT CollectionInfo is retrieved from the NFT pallet. This is so that CollectionUuids are unique across all collections, regardless of if they are SFT or NFT collections.
Namespace
createToken
Create additional tokens for an existing collection These tokens act similar to tokens within an ERC1155 contract Each token has individual issuance, max_issuance, NamespacecreateTokenWithAdditionalData
Create additional tokens for an existing collection with additional data. These tokens act similar to tokens within an ERC1155 contract. Each token has individual issuance, max_issuance, and additional data. Namespacemint
Mints some balances into some serial numbers for an account This acts as a batch mint function and allows for multiple serial numbers and quantities to be passed in simultaneously. Must be called by the collection ownercollection_id
- the SFT collection to mint into serial_numbers
- A list of serial numbers to mint into quantities
- A list of quantities to mint into each serial number token_owner
- The owner of the tokens, defaults to the caller
Namespace
setBaseUri
Set the base URI of a collection (MetadataScheme) Caller must be the current collection owner NamespacesetMaxIssuance
Set the max issuance of a collection Caller must be the current collection owner NamespacesetMintFee
NamespacesetName
Set the name of a collection Caller must be the current collection owner NamespacesetOwner
Set the owner of a collection Caller must be the current collection owner NamespacesetRoyaltiesSchedule
Set the royalties schedule of a collection Caller must be the current collection owner NamespacetogglePublicMint
NamespacesetTokenName
Namespacetransfer
Transfer ownership of an SFT Caller must be the token owner NamespacesetUtilityFlags
Set utility flags of a collection. This allows restricting certain operations on a collection such as transfer, burn or mint. Caller must be the collection owner.- collection_id - The id of the collection
- utility_flags - An object containing the utility flags.
setTokenTransferableFlag
Set transferable flag on a token, allowing or disallowing transfers. Caller must be the collection owner. NamespacesetTokenBurnAuthority
Set burn authority on a token. This value will be immutable once set. Caller must be the collection owner.- token_id -. The token id
- burn_authority - The token burn authority. This value will dictate which
account is allowed to burn the token.
api.tx.sft.setTokenBurnAuthority
Type
setAdditionalData
Set additional data for a token. This allows collection owners or token owners to store custom data associated with specific tokens.token_id
- The token id to set additional data foradditional_data
- Custom data to associate with the token
burnAsCollectionOwner
Burn a token as the collection owner. The burn authority must have already been set and set to either the collection owner or both.- token_owner - The account id of the token owner
- collection_id - The collection id
- serial_numbers - Array of serial number and the amount of tokens to burn
issueSoulbound
Issue soulbound tokens. The issuance will be pending until the token owner accepts the issuance. The burn authority for the specified tokens must already have been set prior to attempting to issue the tokens.- token_owner - Account id of the token owner. The tokens will be burned for this account.
- collection_id - The collection id to issue the tokens for
- serial_numbers - List of token ids and the amount to issue
acceptSoulboundIssuance
Accept the issuance of a soulbound tokens- collection_id - The collection id
- issuance_id - The issuance id. An issuance id is created and emitted on issuance. All pending issuances for an account can be retrieved by querying the collection’s pending issuances.