nft()
NftBuilder
class instance, which provides methods to build transactions for the NFT Pallet on The Root Network. It expects four parameters:
api
: the trnApi to use for interaction.signer
: the signer to use for signing transactions.walletAddress
: the wallet address to use for interaction. Note: It should be the EOA address for the signer, not the FuturePass address.collectionId
: the Collection ID to target. Optional parameter.nft
method allows developers to mint
, transfer,
burn
, amongst other actions listed below.
mint()
quantity
: the number of NFTs to mint.walletAddress
: the wallet address to mint the NFTs to.transfer()
serialNumbers
: an array of serial numbers of the NFTs to transfer.walletAddress
: the wallet address to mint the NFTs to.burn()
serialNumber
: the serial number of the NFT to burn.createCollection()
name
: the name of the collection.initialIssuance
: the initial issuance of the collection. Optional parameter. The value can be a number, bigint or string. Defaults to null
.maxIssuance
: the maximum issuance of the collection. Optional parameter. The value can be a number, bigint or string. Defaults to null
.tokenOwner
: the owner of the collection.metadataUri
: the metadata URI of the collection.royalties
: the royalties of the collection.crossChain
: the cross chain compatibility of the collection.publicMintOn()
publicMintOn
: value to set public minting to.setCollectionId()
collectionId
: the collection ID to set.setPrice()
token
: the token to update the mint fee for.price
: the price to update to.transferCollection()
newOwner
: the new owner to update to.updateMetadataUri()
uri
: the metadata URI to update to.updateMaxIssuance()
maxIssuance
: the max issuance to update to.updateRoyalties()
royalties
: the royalties to update to.