const url = `https://rpc.shyft.to/?api_key={api_key}`
const searchAssets = async () => {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'my-id',
method: 'searchAssets',
params: {
ownerAddress: '2k5AXX4guW9XwRQ1AKCpAuUqgWDpQpwFfpVFh3hnm2Ha',
compressed: false,
grouping: ["collection", "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"],
page: 1, // Starts at 1
limit: 1000
},
}),
});
const { result } = await response.json();
console.log("Drip Haus Assets: ", result);
};
searchAssets();