Path 1: Wallet-only (JavaScript)
ProofPack Path 1 — wallet-only verification in JavaScript
import { IsDelegateAttestationVerifier } from '@zipwire/proofpack-ethereum';
import { PrivateDataPayloadValidator } from '@zipwire/proofpack-ethereum';
// Full config (delegationSchemaUid, acceptedRoots, preferredSubjectSchemas, schemaPayloadValidators) — see ProofPack repo
const config = {
delegationSchemaUid: '0x...', // IsDelegate schema UID
acceptedRoots: [{ schemaUid: '0x...', attesters: ['0xZipwireAttester...'] }],
preferredSubjectSchemas: [{ schemaUid: '0x...', attesters: ['0xZipwire...'] }],
schemaPayloadValidators: new Map([['0x...', new PrivateDataPayloadValidator()]]),
maxDepth: 32
};
const verifier = new IsDelegateAttestationVerifier({ chains: ['base-sepolia', 'base'] }, config);
const result = await verifier.verifyByWallet('0xAgentWallet...');
if (result.isValid) {
console.log('Agent is human-authorized');
} else {
console.log('Agent is not in a valid delegation chain:', result.message);
}Last updated