function burn(
collection_id: u32,
serial_numbers: Vec<(u32,u128)>
)
createCollection
Create a new collection to group multiple semi-fungible tokens Tokens can be created within the collection by calling create_token
collection_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.
Create additional tokens for an existing collection These tokens act similar to tokens within an ERC1155 contract Each token has individual issuance, max_issuance,
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 owner
collection_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
api.tx.sft.mint
Type
function mint(
collection_id: u32,
serial_numbers: Vec<(u32,u128)>,
token_owner: Option<SeedPrimitivesSignatureAccountId20>
)
setBaseUri
Set the base URI of a collection (MetadataScheme) Caller must be the current collection owner
Namespace
api.tx.sft.setBaseUri
Type
function setBaseUri(
collection_id: u32,
metadata_scheme: Bytes
)
setMaxIssuance
Set the max issuance of a collection Caller must be the current collection owner
Namespace
api.tx.sft.setMaxIssuance
Type
function setMaxIssuance(
token_id: (u32,u32),
max_issuance: u128
)
setMintFee
Namespace
api.tx.sft.setMintFee
Type
function setMintFee(
token_id: (u32,u32),
pricing_details: Option<(u32,u128)>
)
setName
Set the name of a collection Caller must be the current collection owner
Namespace
api.tx.sft.setName
Type
function setName(
collection_id: u32,
collection_name: Bytes
)
setOwner
Set the owner of a collection Caller must be the current collection owner
Namespace
api.tx.sft.setOwner
Type
function setOwner(
collection_id: u32,
new_owner: SeedPrimitivesSignatureAccountId20
)
setRoyaltiesSchedule
Set the royalties schedule of a collection Caller must be the current collection owner
Namespace
api.tx.sft.setRoyaltiesSchedule
Type
function setRoyaltiesSchedule(
collection_id: u32,
royalties_schedule: SeedPrimitivesNftRoyaltiesSchedule
)
togglePublicMint
Namespace
api.tx.sft.togglePublicMint
Type
function togglePublicMint(
token_id: (u32,u32),
enabled: bool
)
transfer
Transfer ownership of an SFT Caller must be the token owner
Namespace
api.tx.sft.transfer
Type
function transfer(
collection_id: u32,
serial_numbers: Vec<(u32,u128)>,
new_owner: SeedPrimitivesSignatureAccountId20
)
Storage
publicMintInfo
Map from collection to its public minting information
Namespace
api.query.sft.publicMintInfo
Type
function publicMintInfo(
(u32,u32)
): Option<SeedPalletCommonUtilsPublicMintInformation>
sftCollectionInfo
Map from collection to its information
Namespace
api.query.sft.sftCollectionInfo
Type
function sftCollectionInfo(
u32
): Option<PalletSftSftCollectionInformation>
tokenInfo
Map from token to its token information, including ownership information
Namespace
api.query.sft.tokenInfo
Type
function tokenInfo(
(u32,u32)
): Option<PalletSftSftTokenInformation>
Events
BaseUriSet
Base URI was set
Namespace
api.events.sft.BaseUriSet
Type
type BaseUriSet = {
collection_id: u32,
metadata_scheme: Bytes
}