Sending a Collectible
Use the following Mutation to send a collectible to a specified wallet address.
In order to be able to send a collectible to a wallet address, the developer wallet needs to own the number of editions they are sending. For example, if you are looking to send 2 editions of a collectible to a player, make sure you have at least 2 editions of this collectible minted to the developer wallet.
Here are a few things to keep in mind when wanting to send editions of a collectible to a wallet address:
collectionId: The collectionId that the collectible was created in.
transactions: A list of all the collectibles you wish to send. Think of it as a list, which will hold all the transfers you wish to make. For each one of these transactions, you will need to define the following information.
quantity: The number of editions you are looking to send over.
recipient: The wallet address you are looking to send the collectibles to.
tokenId: The tokenIds of the collectibles you are looking to send.
The SendToken Mutation allows you to send multiple collectibles, each one to a different wallet address, in one transaction, thus lowering the number of transactions overall. The only thing to keep in mind is that all the collectibles need to be part of the same collection.
Furthermore, apart from sending multiple collectibles (different tokenIds), you can choose to send each one of these to a different wallet address if need be.
In the example of the code above, we have chosen to send 2 different collectibles, both part of the collection with Id KT1SjwraTtii88ZaEs8ReU6wkUreTvM8qfaa
. For the collectible with tokenId 0
we will send 5 editions to the user with wallet address tz1aWZmdKqKvGP331yWJjqgCZakGci3Vewfgd
, and for the collectible with tokenId 6
we will send 18 editions to the user with wallet address tz1aWZmdKqKvGP331yWJjqgCZakGci3VAGfsd
.
Once the transaction has been signed from the developer wallet, the editions of the collectible will leave the developer wallet and be sent to the respective wallet addresses. The hash of the transaction will be provided in order to be able to monitor the successful completion of the transfer.
Last updated