Skip to main content
NFT transfer is an operation specified in TEP 0062. Its implementation must comply with this standard, and NFT item contracts must support the logic described there. The NFT transfer message is also specified and must comply with the corresponding TL-B scheme. This scheme involves, among other things,
  • forward_amount: the amount of nanotons to be sent to the destination address;
  • forward_payload: optional custom data that should be sent to the destination address.
If forward_amount > 0, then forward_payload must comply with one of the standard formats. First, you can use your wallet app with NFTs, just follow the corresponding guides (see Tonkeeper for an instance). Or you can do it manually. Below there is an illustrative example:
import { WalletContractV5R1, TonClient, Address, toNano } from "@ton/ton";

import { mnemonicToPrivateKey } from "@ton/crypto";

import { AssetsSDK, createApi } from "@ton-community/assets-sdk";

async function main() {
    const client = new TonClient({
        endpoint: "https://toncenter.com/api/v2/jsonRPC",
    });

    const your_mnemonic = "put your mnemonic here, ...";
    const keyPair = await mnemonicToPrivateKey(your_mnemonic.split(" "));

    const wallet = WalletContractV5R1.create({
        workchain: 0,
        publicKey: keyPair.publicKey,
    });

    const provider = client.provider(wallet.address);
    const sender = wallet.sender(provider, keyPair.secretKey);

    const NETWORK = "testnet";
    const api = await createApi(NETWORK);

    const sdk = AssetsSDK.create({
        api,
        sender,
    });

    const NFT_ADDRESS = Address.parse("put your NFT item address");
    const nftItem = await sdk.openNftItem(NFT_ADDRESS);

    const RECEIVER_ADDRESS = Address.parse("put receiver address");
    await nftItem.send(sender, RECEIVER_ADDRESS, { value: toNano(10) });
}

void main();
I