Getting Started
Transfer an NFT
Transfer NFT ownership between wallets on Solana.
Transfer an NFT
In the following section you can find a full code example and the parameters that you might need to change. You can learn more about transferring NFTs in the Core documentation.
1import { createUmi } from '@metaplex-foundation/umi-bundle-defaults'
2import { transfer } from '@metaplex-foundation/mpl-core'
3import { mplCore } from '@metaplex-foundation/mpl-core'
4import { publicKey } from '@metaplex-foundation/umi'
5
6// Initialize UMI
7const umi = createUmi('https://api.devnet.solana.com')
8 .use(mplCore())
9
10// Transfer an existing NFT asset to a new owner
11const result = await transfer(umi, {
12 asset: publicKey('AssetAddressHere...'),
13 newOwner: publicKey('RecipientAddressHere...'),
14}).sendAndConfirm(umi)
15
16console.log('Asset transferred:', result.signature)
Parameters
Customize these parameters for your transfer:
| Parameter | Description |
|---|---|
assetAddress | The public key of the NFT to transfer |
newOwner | The wallet address of the recipient |
How It Works
The transfer process involves three steps:
- Verify ownership - You must be the current owner of the NFT
- Specify recipient - Provide the new owner's wallet address
- Execute transfer - The NFT ownership is transferred immediately
NFT Transfers
Unlike SPL/fungible tokens, Core NFTs don't require the recipient to create a token account first. The ownership is recorded directly in the NFT, making transfers simpler and cheaper.
