To list a Solana Non-Fungible Token (NFT) on a marketplace, follow these steps:
-
Use the createSignatureToListNFTForSale API to generate the necessary signature to authorize the listing of the NFT. This ensures that the marketplace has permission to list the NFT on behalf of the user.Retrieve a Signature for Listing: -
After obtaining the signature, the frontend application should execute the listing transaction on the Solana blockchain. This step involves:Execute the Listing Transaction on the Frontend:
- Creating a listing account for the NFT.
- Transferring custody or escrow of the NFT to the marketplace, if required.
- Specifying the sale price and conditions.
Ensure the transaction is confirmed on the blockchain.
-
After the transaction is successfully executed, use the submitProofOfApproval API to notify the marketplace that the NFT has been listed and approved for sale. This step involves:Confirm the Listing Submission:
- Submitting proof of the blockchain transaction.
Sample mutations
mutation createSignatureToListNFTForSale($orgId: UUID1!, $nftTokenId: UUID1!, $tokenType: TokenType!, $quantity: Int!, $nftOwnerAddress: String!, $fixedPrice: Float!, $paymentToken: String!, $currencyId: UUID1!, $paymentSettlementAddress: String, $currency: CurrencyCodeFiat) {
createSignatureToListNFTForSale(
orgId: $orgId
nftTokenId: $nftTokenId
tokenType: $tokenType
quantity: $quantity
nftOwnerAddress: $nftOwnerAddress
fixedPrice: $fixedPrice
paymentToken: $paymentToken
currencyId: $currencyId
paymentSettlementAddress: $paymentSettlementAddress
currency: $currency
) {
messageToSign
order {
id
nftTokenId
tokenContract
tokenId
tokenType
quantity
nftOwnerAddress
fixedPrice
paymentToken
orderType
__typename
}
isSigningRequired
isNonEVM
bubblegumListParams {
seller
sellerTokenAccount
mintAccount
systemProgram
tokenProgram
rent
bubblegumProgram
compressionProgram
treeAuthority
leafOwner
previousLeafDelegate
newLeafDelegate
logWrapper
merkleTree
listDiscriminator
metadataId
listingReceipt
bubblegumListArg {
price
isCnft
isVin
dataHash
creatorHash
nonce
index
root
proof
isUpdate
__typename
}
__typename
}
bubblegumMakeOfferParams {
buyer
buyerTokenAccount
offerEscrow
mintAccount
metadataId
offer
systemProgram
tokenProgram
makeOfferDiscriminator
bubblegumMakeOfferArg {
offerAmount
isCnft
__typename
}
__typename
}
__typename
}
}
mutation submitProofOfApproval($orgID: UUID1!, $nftTokenId: UUID1!, $signature: String!, $quantity: Int, $fixedPrice: Float, $paymentToken: String, $currencyId: UUID1, $creatorFee: Float, $listingReceipt: String, $currency: CurrencyCodeFiat) {
submitProofOfApproval(
orgID: $orgID
nftTokenId: $nftTokenId
signature: $signature
quantity: $quantity
fixedPrice: $fixedPrice
paymentToken: $paymentToken
currencyId: $currencyId
creatorFee: $creatorFee
currency: $currency
listingReceipt: $listingReceipt
)
}
Sample variable
{
"orgId": "0db10bbf-85fe-4c87-911b-d18f8568fc07",
"nftTokenId": "021272bc-e41b-412f-8631-f63304a6d3a6",
"tokenType": "NonFungible",
"quantity": 1,
"nftOwnerAddress": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
"fixedPrice": 1,
"paymentToken": "0x0000000000000000000000000000000000000000",
"currencyId": "ef390e4c-3194-44ad-b4d7-14be88ed4ee7"
}
{
"nftTokenId": "021272bc-e41b-412f-8631-f63304a6d3a6",
"signature": "5buz7pUmsjNi8z1iDEuJJCDeMRAicsvqnEak8UNeMj9yLDTiKkek56r7dDJCJUpmtUDifueL6tvA8BNuKBQq9M5k",
"quantity": 1,
"orgID": "0db10bbf-85fe-4c87-911b-d18f8568fc07",
"paymentToken": "0x0000000000000000000000000000000000000000",
"creatorFee": 0.02,
"currencyId": "ef390e4c-3194-44ad-b4d7-14be88ed4ee7",
"fixedPrice": 1,
"listingReceipt": "9JJFzSxGDGaWNBuL5szb26YNTSLuPZNmUFnnpTfnuZeY",
"currency": "USD"
}
Sample response
{
"data": {
"createSignatureToListNFTForSale": {
"messageToSign": "",
"order": {
"id": "bab1a303-9c9d-49cf-a464-4bdd6c1fe618",
"nftTokenId": "021272bc-e41b-412f-8631-f63304a6d3a6",
"tokenContract": "FytWTAobotGfihugTU8TEQzEgjfrttUVNWcRHv1GG2G3",
"tokenId": "7dDe5D6N16tkuM53RKEuKJ7gZDiB7NC6oyQKP2AQJDSc",
"tokenType": "NonFungible",
"quantity": 1,
"nftOwnerAddress": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
"fixedPrice": 1,
"paymentToken": "0x0000000000000000000000000000000000000000",
"orderType": "LISTING",
"__typename": "Order"
},
"isSigningRequired": true,
"isNonEVM": true,
"bubblegumListParams": {
"seller": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
"sellerTokenAccount": "D5RsufniFeb1zEygWM1SZ4kg2oxnFS8A67dvhjtWvToD",
"mintAccount": "FytWTAobotGfihugTU8TEQzEgjfrttUVNWcRHv1GG2G3",
"systemProgram": "11111111111111111111111111111111",
"tokenProgram": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"rent": "SysvarRent111111111111111111111111111111111",
"bubblegumProgram": "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY",
"compressionProgram": "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK",
"treeAuthority": "DnuWkN8zJAk2H5PwaYkEPRyQkVZb3LN7BtoLzXykRQf5",
"leafOwner": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
"previousLeafDelegate": "",
"newLeafDelegate": "4aRpxWDMLu9ZfYYFYPng2PnyUancWcZipkFhVHRxLREY",
"logWrapper": "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV",
"merkleTree": "4iCY74wJcHPfskyoJaYh788Y8nPKY78DagE7Z2X1er2y",
"listDiscriminator": [
88,
221,
93,
166,
63,
220,
106,
232
],
"metadataId": "Zv2vv8roKtLuqQTFT14NpbhhjWVmu3qhqgiwaG8RrpF",
"listingReceipt": "",
"bubblegumListArg": {
"price": 1000000000,
"isCnft": true,
"isVin": true,
"dataHash": "923Pyist1hp5sAQLwTHrJnsDs4eHf2cR3UhuhyagYzUh",
"creatorHash": "E85ZyyjjrrsKAgeGeqBE2RSkfzs94FTdfEtefJpnJHrp",
"nonce": 6,
"index": 6,
"root": "7nuUKzx7PcuwtveaymZH722fiTHCFAQwjH5YyTBKJzvn",
"proof": [
"EVpnpyr76cRj9hsbanRPPHe3Xy68Gs6X2Z2BwAtwWFTn",
"BWJVP3XGfLCUHxWsYV3fJB5VpxgTbDikWX1w5WuFHXqz",
"DUPLo4PDHx9zDwMAkzr5go9PRvAN8kA9B9HejTK62HSm",
"8WkbxHTtzURPaXrj2U57TKmcQLzYk9ubre7co3vkPeBT",
"GSz87YKd3YoZWcEKhnjSsYJwv8o5aWGdBdGGYUphRfTh",
"zLUDhASAn7WA1Aqc724azRpZjKCjMQNATApe74JMg8C",
"ABnEXHmveD6iuMwfw2po7t6TPjn5kYMVwYJMi3fa9K91",
"JDh7eiWiUWtiWn623iybHqjQ6AQ6c2Czz8m6ZxwSCkta",
"BFvmeiEuzAYcMR8YxcuCMGYPDpjcmP5hsNbcswgQ8pMc",
"EvxphsdRErrDMs9nhFfF4nzq8i1C2KSogA7uB96TPpPR",
"HpMJWAzQv9HFgHBqY1o8V1B27sCYPFHJdGivDA658jEL",
"HjnrJn5vBUUzpCxzjjM9ZnCPuXei2cXKJjX468B9yWD7",
"4YCF1CSyTXm1Yi9W9JeYevawupkomdgy2dLxEBHL9euq",
"E3oMtCuPEauftdZLX8EZ8YX7BbFzpBCVRYEiLxwPJLY2",
"7DiCkBhs5HQLPEsKY6EjfNd3oBswnfRk9UAZcHqczL7m",
"FhsNgK6GGU1cRPFbmPhrEZ95Zj8vorjK6GmhFuwmZsUm",
"3e2oBSLfSDVdUdS7jRGFKa8nreJUA9sFPEELrHaQyd4J",
"GCXyEHiFMtRFTNFT5LNHwxiXZfooBpUMGSkjyz7pfcS5",
"752CmMF5k7acEFEmJA7oE3aobbWj7CAZVm3KpDR6HiRV",
"D9GGr1ycBmgRbHJyJzmxMk5aoKZmjdezB4NpxopAcgpP"
],
"isUpdate": false,
"__typename": "bubblegumListArg"
},
"__typename": "bubblegumListInfo"
},
"bubblegumMakeOfferParams": null,
"__typename": "SignatureResponse"
}
}
}
{
"data": {
"submitProofOfApproval": "Signature updated."
}
}
Feilds
The table below provides an explanation of each variable in the respective column.
createSignatureToListNFTForSale:-
Name | Type | Description |
---|---|---|
orgId | UUID1 | The organization ID. |
nftTokenId | UUID1 | The NFT token ID. |
tokenType | Enum | For solana needs to pass NonFungible . |
quantity | Int | Quantity of token by default 1. |
nftOwnerAddress | String | The NFT owner's address. |
fixedPrice | Float | The NFT listing price. |
currencyId | UUID1 | The payment currency ID is fetched from the supported currency API |
paymentToken | String | For solana by default pass `0x0000000000000000000000000000000000000000 |
submitProofOfApproval:-
Name | Type | Description |
---|---|---|
nftTokenId | UUID1 | The NFT token iD. |
signature | String | The Solana listing transaction hash for submission of listing. |
quantity | Int | The quantity of NFT by default is 1 for Solana. |
orgID | UUID1 | The organization ID. |
paymentToken | String | For solana by default pass `0x0000000000000000000000000000000000000000 |
creatorFee | Float | The creator fee is calculated by listing amount estimateTaxAndRoyaltyFee API |
currencyId | UUID1 | The payment currency ID is fetched from the supported currency API. |
fixedPrice | Float | The Listing price. |
listingReceipt | String | The token listing receipt is from Solana's transaction signature. |
currency | Enum | This currency is used to show the currency conversion rate of fiat currency amount. |