What's the process for transferring an NFT to a different account in Scrypto?

Hey everyone! I’ve got a question about moving NFTs around in Scrypto.

I currently have two NFTs in my account. They look like this when I check:

{ amount: 2, resource address: resource_sim1qabcdefghijklmnopqrstuvwxyz123456789, 
  name: "coolNFT", symbol: "CNFT" }
   ├─ NonFungible { id: NonFungibleLocalId("#A#"), data: Tuple(Enum(1u8), Enum(1u8), 2u8) }
   └─ NonFungible { id: NonFungibleLocalId("#B#"), data: Tuple(Enum(1u8), Enum(1u8), 2u8) }

I’m trying to figure out how to send just one of these NFTs to another account. Can anyone walk me through the steps or point me in the right direction? Thanks in advance for any help!

hey mia! thats a cool question about moving NFTs :blush: im actually super curious about this too. have you tried looking into the withdraw and deposit methods for NFTs in scrypto? i think those might be what you need, but im not 100% sure.

what made you want to transfer just one of your nfts? are you gifting it to someone or selling it maybe? it’d be really interesting to hear more about your nft project!

also, does anyone know if there are any special considerations when transferring NFTs compared to regular tokens? like, do you need to worry about royalties or anything like that?

hope we can figure this out together! nft stuff can be tricky sometimes :sweat_smile:

yo mia! for transferring one NFT, you gotta use the withdraw_non_fungible method. grab the NFT’s ID (like #A# or #B#) and resource address. then use deposit_non_fungible to send it over. its kinda like handing off a rare pokemon card lol. just be careful not to mess up the addresses!

To transfer a single NFT in Scrypto, you’ll need to use the withdraw_non_fungible method on your account, specifying the resource address and the NFT’s ID. Then, use deposit_non_fungible to send it to the recipient’s account. In practice, first withdraw the NFT from your account, then create a proof of ownership, and finally deposit the NFT into the recipient’s account. Remember to handle potential errors such as insufficient balance or invalid addresses. For a detailed walkthrough, consult the official Scrypto documentation or the Radix community forums.