If you are querying for a specific recipient, filter by the recipient.
Validate
For a Holonym V3 SBT, we always want to verify the circuit ID as well as the action ID and issuer used to generate the ZKP. We want the circuit ID to match whatever circuit we are filtering for. We want the action ID to be the default action ID used for Holonym Sybil resistance proofs. We want the issuer to match whatever Holonym issuer we are filtering for.
See here for the circuit IDs, action ID, and issuers.
// We are using Ethers v5const { ethers } =require("ethers");// Extract attestation data. // This is data.rows[0].data in the API response aboveconst data = "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004230783732396436363065316330326534653431393734356536313764363433663839376135333836373363636631303531653039336262666135386230613132306200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000068080e7f000000000000000000000000ededf460a77928f59c27f37f73d4853fd8a0798400000000000000000000000000000000000000000000000000000000075bcd151cb8413a579d6138d257450bb5209579bde35c885f7a4405e3767a5a5d2ea6df03fae82f38bf01d9799d57fdda64fad4ac44e4c2c2f16c5bf8e1873d0a3e1993";
constdecoded=ethers.utils.defaultAbiCoder.decode(["string","uint256[]"], data);constcircuitId= decoded[0];// Public values of the ZKPconstpublicValues= decoded[1];constactionId= publicValues[2];constissuer= publicValues[4];// Make sure circuitId matches KYC circuit IDif (circuitId !="0x729d660e1c02e4e419745e617d643f897a538673ccf1051e093bbfa58b0a120b") {thrownewError("Invalid circuit ID");}// Validate action IDif (actionId.toString() !="123456789") {thrownewError("Invalid action ID");}// Make sure issuer is the KYC Holonym issuerif (issuer.toHexString() !="0x03fae82f38bf01d9799d57fdda64fad4ac44e4c2c2f16c5bf8e1873d0a3e1993") {thrownewError("Invalid issuer")}