Skip to main content
Version: 0.5

Transfer a single NFT

Transfer ownership of an NFT purchased in FIAT to another account 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.transferFiatNft(avnRelayerAddress, recipientAvnAddress, nftId);
info

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 AvnApi = require("avn-api");
const GATEWAY = "<endpoint_url>"; //Replace the endpoint_url with the url received from Aventus.
const api = new AvnApi(GATEWAY);

const avnRelayerAddress = "5Fb...yTh"; //Please, request from Aventus.
const nftId =
"0xcd59127245d3ae2706e4f3bace05de3fd16c50bb6b844d3f422b283a3b5f72f6"; // replace with the nftID of the NFT you're trying to list.
const recipientAvnAddress = "5Fb...yTh";

async function main() {
await api.init();

const result = await api.send.transferFiatNft(
avnRelayerAddress,
recipientAvnAddress,
nftId
);
// Returns a request id
console.log(result);
}

(async () => {
await main();
})();

You have now successfully submitted a transaction to the AVN to transfer NFT.

Example Output

f1710fe7-141f-43c1-b1bb-6ec33d9b3e9a
tip

You can check the status of your transaction here using the returned request id.

JSON-RPC

Transfers an NFT that is currently listed for sale in fiat over HTTPS POST.

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
signer [required] - a string representing the sender's SS58 address
nftId [required] - a string representing the NFT ID (32 bytes) to check for nonce
recipient [required] - a hex string representing the recipient's public key
proxySignature [required] - a proof signed by the sender/signer account allowing the transaction to be proxied
feePaymentSignature [required] - a proof signed by the sender/signer account allowing the relayer fees to be paid
paymentNonce [required] - string integer value of the current account payment nonce

Example

curl https://AVN-API-URL/send \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: bearer <awtToken>" \
-d '{"jsonrpc":"2.0", "method":"proxyTransferFiatNft", "params":{"relayer":"5FbUQ2kJWLoqHuSTSNNqBwKwdQnBVe4HF3TeGyu6UoZaryTh", "signer":"5DAgxVxKmnJ7hfhDEB9UetZm4jR2MPjGZGrmJZjirSVJDdMr", "nftId":"0x3044598a96da039d27802b300ba6197d6a023752efaccf598e62516f6ee7587c", "recipient":"5FgyNN84CzQfwHBUJWvQkr36hiQYEXjDhcUYVx9tCTdgqosF", "proxySignature":"0xaa3b454549de3a941e19293c0da9e47e83b920df232d5db56d5912f83b1e0c43083b1103f9655c52290221bf590facd9e99a839cafc383c30567055a56c97c8a", "feePaymentSignature":"0x500da1ab75346f2b4459cc2b958a3eb690a4b8c50cc1e6f3d49fe786cb6acd0be0ca93da71bbe55d11f8df8f64f3b99c2c47a053495bf6eb842ecc4fbfad6b87", "paymentNonce":"212"}, "id":1}'

result 👇🏽 - a request ID that can be queried for the transaction's status

Example Result

{
"jsonrpc": "2.0",
"id": 1,
"result": "5415c92b-57a5-46f7-ba79-57176afb2510"
}

Production Example

Multiple NFTs have changed ownership on the AVN, and HERE is a link to the AVN Explorer that provides more detail on a transferred NFT. Click on the Advanced tab on the page to view more details on the transaction.