Skip to main content

Send NFT

Sending an NFT allows you to transfer ownership of the unique digital asset to another user. By sending an NFT you grant the new owner full control and possession of the token, including its associated collectible or token value and any other attributes it defines.

Example Code

  1. Instantiate a Wallet, get Alice's Account which was created in the first guide and sync it.
  2. Set nft_id as the first NFT Id in the balance.
sdk/examples/how_tos/nfts/send_nft.rs
loading...
  1. Define the outputs for the transaction as the SendNftParams.
sdk/examples/how_tos/nfts/send_nft.rs
loading...
  1. Send the NFT transaction using the Account.send_nft() function.
sdk/examples/how_tos/nfts/send_nft.rs
loading...

Full Example Code

sdk/examples/how_tos/nfts/send_nft.rs
loading...

Expected Output

Transaction sent: 0x58716bf9c7d3b36276a3ce9b57b43693c03bd6816198a7fe8ee1b814c424dae6
Block included: https://explorer.shimmer.network/testnet/block/0xd7ccfb7922a719dcee7e4bf15eaf3a6983c378b7a4c16adf34a3eb001cfc5773