Batch Sending Assets
Learn more about batch sending assets
Batch Sending Assets is a useful mutation if you are planning on sending assets to multiple users through a single transaction.
Using this request will allow you to send an asset to users of your project or request an asset to be transferred from
user A
to user B
The
AdvancedSendAsset
request has one single mutation.Mutation | Usage |
---|---|
AdvancedSendAsset | Send one or more assets in one transaction. |
The
value
property is only applicable in case you are minting FTs as NFTs are assumed to have a value of 1.Use this mutation to send assets from one wallet to another wallet.
mutation {
AdvancedSendAsset(
transfers: [
{
from: "WalletAddress"
to: "WalletAddress"
assetId: "xxxxxxxxxxxxxx"
assetIndex: "xxxxxxxxxxxxxx"
value: "1"
}
{
from: "WalletAddress"
to: "WalletAddress"
assetId: "xxxxxxxxxxxxxx"
assetIndex: "xxxxxxxxxxxxxx"
value: "1"
}
]
) {
transactionId
id
state
value
asset {
name
id
}
user {
name
}
}
}
If all the request parameters are correct, this should be the expected response.
{
"data": {
"AdvancedSendAsset": {
"transactionId": null,
"id": 31369,
"state": "PENDING",
"value": "1",
"asset": {
"name": "New Test Asset",
"id": "788000000000089f"
},
"user": null
}
}
}
After approving the transaction, the tokens should be transferred over to the address once the transaction is completed.
Last modified 10mo ago