This is an essential method for fetching proofs for multiple compressed assets. You can pass up to 1,000 IDs in this request.
const url = `https://mainnet.helius-rpc.com/?api-key=<api_key>`
const getAssetProofBatch = async () => {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'my-id',
method: 'getAssetProofBatch',
params: {
ids: [
'81bxPqYCE8j34nQm7Rooqi8Vt3iMHLzgZJ71rUVbQQuz',
'CWHuz6GPjWYdwt7rTfRHKaorMwZP58Spyd7aqGK7xFbn'
]
},
}),
});
const { result } = await response.json();
console.log("Asset Proofs: ", result);
};
getAssetProofBatch();