Skip to main content

Overview

Compressed NFTs live as leaves in a concurrent Merkle tree, not in their own accounts. To transfer, burn, delegate or update one, the transaction must prove the leaf is in the tree. getAssetProof returns that proof: the current root, the sibling hashes from the leaf up to the root, and the leaf hash.
If you also need the asset itself (for owner, delegate and hashes), use getAssetWithProof to get both in one call.

Parameters

string
required
The compressed asset ID (base-58).

Response

object

Code Examples

Request

Response

TypeScript

Pass the proof to a Bubblegum instruction as remaining accounts:

Notes

  • A proof is valid only until the tree changes. Fetch it right before you build the transaction, and refetch if the transaction fails with a root mismatch.
  • Trees with a canopy store the top levels on chain, so you can drop that many nodes from the end of proof to save transaction space.

Common Errors