What's the process for transferring an NFT between accounts in Scrypto?

I’ve got a couple of NFTs in my account and I’m trying to figure out how to move one of them to a different account. Here’s what I’m working with:

account_balance = {
  quantity: 2,
  asset_address: resource_sim1qabcdefghijklmnopqrstuvwxyz0123456789,
  asset_name: "customNFT",
  asset_symbol: "CNFT"
}

NFT_details = [
  { id: NonFungibleLocalId("#0#"), info: Tuple(Enum(0u8), Enum(0u8), 1u8) },
  { id: NonFungibleLocalId("#1#"), info: Tuple(Enum(0u8), Enum(0u8), 1u8) }
]

Can someone walk me through the steps to send just one of these NFTs to another account? I’m new to this and could use some help. Thanks!

To transfer an NFT between accounts in Scrypto, you’ll need to use the ‘withdraw’ and ‘deposit’ methods. Here’s a general process:

  1. Withdraw the specific NFT from your account using its NonFungibleLocalId.
  2. Create a proof of ownership for the withdrawn NFT.
  3. Use the ‘deposit’ method to send the NFT to the recipient’s account.

You’ll need to implement this in a transaction manifest. Remember to include necessary imports and set up your component correctly. Also, ensure you have the required permissions to perform these operations.

Keep in mind that the exact implementation might vary depending on your specific setup and the version of Scrypto you’re using. If you need more detailed help, consider sharing your component code or the specific Scrypto version you’re working with.

hey there dancingcloud! im curious about ur nfts, they look pretty cool. have u tried using the transfer_non_fungibles method? it might be easier than withdrawing and depositing separately. what kinda nfts are they anyway? id love to hear more about em.

also, im wondering if youve considered using a transaction manifest for this? it could make the whole process smoother. let me know if you want any tips on setting that up!

oh and btw, have u checked out the scrypto docs? they’ve got some great examples that might help. just a thought!

hey dancingcloud, to move ur nft you gotta:

  1. use withdraw_non_fungible to take the nft from ur account
  2. make a bucket with that nft
  3. deposit it to the other account with deposit_batch

just be careful with the ids and make sure u got permissions. good luck!