Cancel an NFT previously listed for Sale
Cancel an already listed NFT for sale on the Aventus network.
This page is kept simple to show the function signature and how it can be used. To understand the various variable names and their constraints, HERE is an explainer. For a further deep-dive into how the Aventus Network supports NFTs, check this out.
await API.send.cancelFiatNftListing(avnRelayerAddress, nftId);
This operation uses a relayer account that the sender authorizes to submit the transfer transaction.
Contact us here to request a relayer address.
Example
const AVN_API = require("avn-api");
//Replace the endpoint_url with the url received from Aventus.
const AVN_GATEWAY_URL = "<endpoint_url>";
const API = new AVN_API(AVN_GATEWAY_URL);
//Please, request the address or public key from Aventus.
const AVN_RELAYER = "5Fb...yTh";
// replace with the nftID of the NFT you're trying to cancel.
const NFT_ID = "0xcd591...72f6";
async function main() {
await API.init();
let result = await API.send.cancelFiatNftListing(
AVN_RELAYER,
NFT_ID
);
// Returns a request id
console.log(result);
}
(async () => {
await main();
})();
You have now successfully submitted a transaction to the AVN to cancel your NFT listing.
Example Result
f1710fe7-141f-43c1-b1bb-6ec33d9b3e9a
You can check the status of your transaction here using the returned request id.
JSON-RPC
Cancels a listing for an NFT previously open for sale in fiat.
REQUEST
POST https://AVN-API-URL/send
HEADERS
Content-Type: application/json
Authorization': bearer <awtToken>
REQUEST PARAMS
- relayer [required] - a string representing the relayer's SS58 address.
- user [required] - a string representing the user's SS58 address.
- payer [required] - a string representing the payer's SS58 address.
- nftId [required] - a string representing the NFT ID (32 bytes) to check for nonce.
- proxySignature [required] - a proof signed by the user allowing the transaction to be proxied.
- feePaymentSignature [required] - a proof signed by the user allowing the relayer fees to be paid.
- paymentNonce [required] - string integer value of the current account payment nonce.
JSON-RPC Example
curl https://AVN-API-URL/send \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: bearer <awtToken>" \
-d '{"jsonrpc":"2.0", "method":"proxyCancelListFiatNft", "params":{"relayer":"5F...aryTh", "user":"5DAgx...DdMr", "payer":"5DAgx...DdMr", "nftId":"0x899...11dcf35", "proxySignature":"0x7e8fb895d9c33fbfd2b0122a586d2d29a6c606ee2ca485c8eb69163be8ef7a6ddd2a52e6802f40720e192d4ca407d657cdfa703a8ce502e9c4f0feedfc3e5e8b", "feePaymentSignature":"0xaae7983775fc1a5bc04b500af156dcba343f1d305549737821b7e31a12f6ce430941856c1259d520759548281afd465b3d66b7e48e72fc2c8c0a3a5bb9f8fa87", "paymentNonce":"209"}, "id":1}'
result 👇🏽 - a request ID that can be queried for the transaction's status
Example Output
{
"jsonrpc": "2.0",
"id": 1,
"result": "b043df72-5636-49a6-999c-aad1fa574bc5"
}