NFT Transactions API
Description of endpoints used to construct NFT Transactions on the DeSo blockchain
Last updated
Was this helpful?
Description of endpoints used to construct NFT Transactions on the DeSo blockchain
Last updated
Was this helpful?
POST
/api/v0/create-nft
Create a create NFT transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Create NFT transactions mints the post specified by NFTPostHashHex as an NFT.
Endpoint implementation in .
Example usages in frontend: - Make request to - Use CreateNFT to
NFTRoyaltyToCoinBasisPoints*
int
Percentage (specified in basis points) of each sale that should be added to the DeSo locked on the post creator's coin
NFTRoyaltyToCreatorBasisPoints*
int
Percentage (specified in basis points) of each sale that should be taken as a royalty to the creator of the post
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
HasUnlockable*
Boolean
When true, owner must provide unlockable text when selling this NFT
UpdaterPublicKeyBase58Check*
String
Public key of the user creating the NFT
IsForSale*
Boolean
When true, put all serial numbers on sale
MinBidAmountNanos
int
Minimum bid amount allowed for all serial numbers
NFTPostHashHex*
String
Hash of the Post being minted as an NFT
MinFeeRateNanosPerKB*
uint64
Rate per KB
NumCopies*
int
Number of copies to mint
IsBuyNow
Boolean
If IsForSale is false, this field is ignored. If IsBuyNow is true and IsForSale is true, all serial numbers will be put on sale and can be purchased outright at BuyNowPriceNanos. Please note that at this time, you cannot make an NFT contain an unlockable and set IsBuyNow to true.
BuyNowPriceNanos
uint64
The price at which another user can purchase this NFT without requiring an accept NFT bid transaction from the NFT owner
AdditionalDESORoyaltiesMap
map[string]uint64
A map of public key to basis points. Each public key specified will receive a royalty of each sale paid directly to their DeSo wallet. If a public key is mapped to 100 basis points, they will receive 1% of all sales.
AdditionalCoinRoyaltiesMap
map[string]uint64
A map of public key to basis points. Each public key specified will have a percentage of each sale added to the amount of DESO locked in their profile's creator coin. If a public key is mapped to 100 basis points, their creator coin will have 1% of the sale price added to the DESO locked.
POST
/api/v0/update-nft
Create an update NFT transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Update NFT transactions can put a given serial number on sale or take it off sale or update the minimum bid amount.
UpdaterPublicKeyBase58Check*
String
Public key of the user creating the NFT
NFTPostHashHex*
String
Hash of the NFT Post being updated
SerialNumber*
int
serial number to update
IsForSale*
Boolean
When true, put this serial number on sale
MinBidAmountNanos*
int
Minimum bid amount allowed for this serial number
MinFeeRteNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
IsBuyNow
Boolean
If IsForSale is false, this field is ignored. If IsBuyNow is true and IsForSale is true, all serial numbers will be put on sale and can be purchased outright at BuyNowPriceNanos. Please note that at this time, you cannot make an NFT contain an unlockable and set IsBuyNow to true.
BuyNowPriceNanos
uint64
The price at which another user can purchase this NFT without requiring an accept NFT bid transaction from the NFT owner
POST
/api/v0/create-nft-bid
Create an NFT bid transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
NFT Bid transactions submit a bid on an NFT. If the owner of the NFT accepts this bid - by submitting an Accept NFT Bid transaction - the bidder will send the bid amount to the owner and in return receive the NFT.
If you submit a bid on the same serial number NFT post combination, it will overwrite your previous bid. Submitting a bid with 0 as BidAmountNanos will withdraw your bid.
UpdaterPublicKeyBase58Check*
String
Public key of the user submitting the bid
NFTPostHashHex*
String
Hash of the NFT Post being bid on
SerialNumber*
int
serial number to bid on
BidAmountNanos*
int
Amount UpdaterPublicKeyBase58Check is bidding on this serial number
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee]
Array of
objects that define additional outputs that need to be added to this transaction
POST
/api/v0/accept-nft-bid
Create an accept NFT Bid transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Accept NFT Bid transactions accepts a bid, divides the proceeds of the bid amount among the owner, creator, and creator coin based on royalties, and updates the owner of the NFT to be the bidder selected.
Note that if you are selling an NFT that has unlockable content, you must encrypt the unlockable content and provide it.
UpdaterPublicKeyBase58Check*
String
Public key of the current NFT Owner
NFTPostHashHex*
String
Hash of the NFT Post being sold
SerialNumber*
int
serial number to being sold
BidderPublicKeyBase58Check*
String
Public key of the bidder being award the NFT
BidAmountNanos*
int
Bid amount being accepted
EncryptedUnlockableText
String
Text encrypted with a shared secret between the current owner and the bidder Required if NFT has unlockable content
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
POST
/api/v0/transfer-nft
Create a transfer NFT transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Transfer NFT transactions sends an NFT from the sender to the receiver at no cost to the receiver. NFT transfers will be pending until receiver submits an Accept NFT Transfertransaction
SenderPublicKeyBase58Check*
String
Public key of the current NFT Owner
ReceiverPublicKeyBase58Check*
String
Public key of the recipient of the NFT
NFTPostHashHex*
String
Hash of the NFT Post being transferred
SerialNumber*
int
Serial number being transferred
EncryptedUnlockableText
String
Text that encrypted with a shared secret between the current owner and the receiver Required if NFT has unlockable content
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
POST
/api/v0/accept-nft-transfer
Create an accept NFT Transfer transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Accept NFT Transfer transaction changes a transferred NFT status from pending to not pending. Since anybody can send a user an NFT, the recipient needs to accept the transfer before the NFT can appear on their profile in order to prevent users from sending spam NFTs.
UpdaterPublicKeyBase58Check*
String
Public key of the user accepting the NFT transfer
NFTPostHashHex*
String
Hash of the NFT Post for which the transfer is being accepted
SerialNumber*
int
serial number for which the transfer is being accepted
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
POST
/api/v0/burn-nft
Create a Burn NFT transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
NFT Burn transactions burns the NFT, meaning that no user can ever own that Post hash-serial number combination.
Endpoint implementation in backend.
UpdaterPublicKeyBase58Check*
String
Public key of the user burning the NFT transfer
NFTPostHashHex*
String
Hash of the NFT Post that is being burnt
SerialNumber*
int
serial number that is being burnt
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
Endpoint implementation in .
Example usages in frontend: - Make request to - Use UpdateNFT to - Use UpdateNFT to
Endpoint implementation in .
Example usages in frontend: - Make request to - Use CreateNFTBid to
Endpoint implementation in .
Example usages in frontend: - Make request to including encrypting unlockable content if applicable - Use AcceptNFTBid to - Use AcceptNFTBid to
Endpoint implementation in .
Example usages in 's frontend: - Make request to - Use Transfer NFT to
Endpoint implementation in .
Example usages in 's frontend: - Make request to - Use AcceptNFTTransfer to 0/accept-nft-transfer
Example usages in frontend: - Make request to - Use BurnNFT to