Get Asset Proof

Gets Merkle tree proof for a compressed asset

Overview

This method return the merkle tree proof information for a compressed asset.

getAssetProof() function supported in Shyft SDK for easy access.

Example

const url = `https://rpc.shyft.to/?api_key={api_key}`

const getAssetProof = async () => {
  const response = await fetch(url, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: 'rpc-id',
      method: 'getAssetProof',
      params: {
        id: 'HDNQf23h3DfZiRHquDgQjjbwjL16JhMTDDB7vqgFXJsH'
      },
    }),
  });
  const { result } = await response.json();
  console.log("Asset Proof: ", result);
};
getAssetProof(); 

Last updated