Transfer NFTs
Transferring an NFT sends the entire charm, unchanged, to a new output. This is a simple transfer, so it needs no app binary or contract proof — just asset preservation.
The spell
Section titled “The spell”{ "version": 15, "tx": { "ins": ["<source_txid>:<vout>"], "outs": [{ "0": { "ticker": "CHARMIX", "name": "Panoramix #1" } }], "coins": [{ "amount": 1000, "dest": "<destination_hex>" }] }, "app_public_inputs": { "n/<app_id>/<app_vk>": null }}| Field | Meaning |
|---|---|
version | 15. |
app_public_inputs | The NFT app(s) involved; null for a simple transfer. |
tx.ins | Source UTXO(s) (txid:vout). |
tx.outs | Destination charms, keyed by app index ("0", "1", …). |
tx.coins | Native outputs (amount, hex dest from charms util dest). |
The NFT content fields (ticker, name, description, image, image_hash,
url, …) follow
CHIP-0420. To
send multiple NFTs, add their apps to app_public_inputs, their inputs to
tx.ins, and the NFTs to tx.outs.
- Read the NFT’s content from the source UTXO (Display charms).
- Build the spell
txandapp_public_inputs(Spell structure). - Derive
coins[].destfrom the destination address withcharms util dest --addr <address>. - Prove by calling the Prover API.
- Sign and broadcast the returned transaction.