Querying Attestations
Querying for an Attestation
NPM SDK
import { IndexService } from "@ethsign/sp-sdk";
async function queryAttestations() {
const indexService = new IndexService("testnet");
const attId = `onchain_evm_${chainId}_${attestationId}`;
const res = await indexService.queryAttestationList({
schemaId: "onchain_evm_84532_0x34", // Your full schema's ID
attester: "0x...", // Alice's address
page: 1,
mode: "onchain", // Data storage location
indexingValue: "0x...".toLowerCase(), // Bob's address
});
return {
success: true,
attestations: response.rows,
};
}REST API
Last updated
Was this helpful?
