TriportRPC

getAssetProof

POSThttps://api.triport.io/v1/solana

Returns the Merkle proof for a compressed NFT asset, for on-chain verification.

Solanasol_das**basic+** (no free-tier access); per-tier RPS not yet pinned in this spec revision — see [rate-limits](../../rate-limits-and-tiers.md)

getAssetProof returns the Merkle proof for a single compressed NFT (cNFT), looked up by its Digital Asset Standard (DAS) asset ID. Compressed NFTs are not stored as individual on-chain accounts — they live as leaves in a concurrent Merkle tree, and their authenticity is established by a proof against that tree's root. This method gives you exactly that proof: the leaf, the tree's current root, and the sibling hashes along the path from the leaf to the root.

Use it whenever you need to verify or act on a compressed NFT on-chain — for example, when constructing a Bubblegum transfer, burn, or delegate instruction, which require the proof as input so the program can recompute and check the root. Pair it with getAsset, which returns the asset's metadata and ownership, while getAssetProof returns the cryptographic proof for the same asset.

This method belongs to the sol_das category and requires the basic tier or higher. It is not available on the free tier — a free-tier key will be rejected with an authorization error.

Parameters

The parameter schema for this method is a scaffold in the current spec revision and will be expanded in api.2.2+. The intended call takes a single DAS asset ID.

idstringrequired
The Digital Asset Standard asset ID of the compressed NFT to fetch a proof for.

Response

The result is a Merkle-proof object for the requested asset. The current spec revision declares the result as an open object (additionalProperties: true); the representative shape below will be tightened in api.2.2+.

resultobject
The Merkle-proof record. The exact field set is provisional pending the api.2.2+ schema.
result.rootstring
Base-58 current root of the Merkle tree the asset belongs to.
result.proofstring[]
Ordered list of base-58 sibling node hashes from the leaf up to the root.
result.node_indexinteger
Index of the leaf node within the tree.
result.leafstring
Base-58 hash of the asset's leaf.
result.tree_idstring
Base-58 address of the Merkle tree account holding the asset.

Errors

CodeMeaningWhen it happens
-32602Invalid paramsThe id is missing or malformed.
-32002Tier insufficientKey is below the basic tier (e.g. a free-tier key) for the sol_das category. Returned with HTTP 403.
-32003Rate limitedPer-tier RPS exceeded; retry after backoff. Returned with HTTP 429 and a Retry-After header.
401UnauthorizedMissing, invalid, or revoked API key.

A -32002 envelope carries the upgrade path in error.data:

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32002,
    "message": "Method 'getAssetProof' requires basic tier or higher",
    "data": {
      "current_tier": "free",
      "required_tier": "basic",
      "method": "getAssetProof",
      "category": "sol_das",
      "upgrade_url": "https://triport.io/upgrade/basic"
    }
  }
}

See errors for the full error envelope and shared codes.

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/v1/solana", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getAssetProof",
    params: { id: "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk" },
  }),
});


const { result } = await res.json();
console.log(result.root, result.proof);

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


const proof = await triport.solana.getAssetProof({
  id: "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
});


console.log(proof.root, proof.proof.length);

Python (triport-sdk)

import os
from triport import Triport


triport = Triport(api_key=os.environ["TRIPORT_API_KEY"])


proof = triport.solana.get_asset_proof(
    id="F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
)


print(proof["root"], len(proof["proof"]))

Notes

  • Spec status: scaffold. Params and result will be expanded in api.2.2+ — pin to a spec version in production and re-check this page when the schema is finalized.
  • Tier: requires basic+; there is no free-tier access to sol_das methods.
  • Compressed NFTs only: a proof exists only for assets stored in a Merkle tree (compressed NFTs). Requesting a proof for a regular (uncompressed) asset will not return tree data.
  • Pair with metadata: use getAsset to read the asset's metadata and ownership; use this method to obtain the proof needed to verify or transact with it on-chain.
  • Related DAS methods: getAsset, getAssetsByGroup, getAssetsByOwner.