On your host
Node process, API keys, credential assembly, middleware gates, optional .affix/proofs.json and .affix/offline-queue.json.
Developer documentation
Install and integrate @affix-io/sdk 2.3.0 on Node.js 18+. Prove and verify Noir attestation circuits against the AffixIO API, wire Express, Fastify, Next.js, NestJS, Hono, BullMQ workers, or agent tool gates. The SDK is a thin ESM client with zero runtime npm dependencies.
Add @affix-io/sdk in a Node.js 18+ project.
Set AFFIX_API_KEY and optional AFFIX_API_BASE.
Run npx affix-sdk health or await sdk.isOnline().
Call AffixSDK.prove with a credential and defaultContext.
Call verify, or use proveAndVerify for a single gate.
Minimal script
import { AffixSDK, defaultContext } from "@affix-io/sdk";
const sdk = new AffixSDK({ apiKey: process.env.AFFIX_API_KEY! });
const ok = await sdk.isOnline();
if (!ok) throw new Error("api_down");
const result = await sdk.prove({
circuitId: "attested_boolean",
credential: {
schema_id: "demo_v1",
issuer_id: "issuer",
issuer_pubkey_hash: "0x1",
credential_id: "0x2",
claim_value: "approved",
valid_from: 1700000000,
valid_until: 1900000000,
},
context: defaultContext({ required_claim_hash: "approved" }),
});
console.log(result.proof_id, result.decision);
AffixIO is verification infrastructure. Your service asks a policy question, receives a zero-knowledge proof string, optionally verifies it, and optionally anchors Merkle audit evidence. You do not operate a proving cluster. You do not embed API keys in browsers.
Node process, API keys, credential assembly, middleware gates, optional .affix/proofs.json and .affix/offline-queue.json.
Witness preparation, prove, verify, Merkle root and audit at https://api.affix-io.com unless you override AFFIX_API_BASE.
Stack placement
Your service AffixIO API
┌──────────────────────────┐ ┌─────────────────────────┐
│ Express / Fastify / Nest │ HTTPS │ POST /v1/witness/prepare│
│ Next.js route / worker │ ─────► │ POST /v1/circuits/:id/… │
│ BullMQ / agent tools │ │ GET /v1/circuits │
│ AffixSDK client │ ◄───── │ GET /v1/merkle/root │
└────────────┬─────────────┘ │ POST /v1/merkle/audit │
│ optional local └─────────────────────────┘
▼
.affix/proofs.json
.affix/offline-queue.json
Source: github.com/AffixIO/SDK. OpenAPI: /openapi.json. Evaluation path: /evaluate.
Requires Node.js 18 or later. Published package is ESM. Zero runtime npm dependencies in 2.3.0.
npm
npm install @affix-io/sdk
pnpm / yarn / bun
pnpm add @affix-io/sdk yarn add @affix-io/sdk bun add @affix-io/sdk
From GitHub
git clone https://github.com/AffixIO/SDK.git cd SDK npm install npm run build cp .env.example .env npx affix-sdk health
dist/index.d.ts. No separate @types package.Circuit templates are served by the AffixIO API. List them with npx affix-sdk circuits or GET /v1/circuits. The SDK client does not run a local proving cluster.
Copy .env.example from the SDK repo or set the same variables in your secrets store.
| SdkConfig field | Env fallback | Default |
|---|---|---|
apiKey | AFFIX_API_KEY | required |
apiBase | AFFIX_API_BASE | https://api.affix-io.com |
requestAttestation | constructor only | optional ML-DSA-65 on responses |
sector | constructor only | optional routing metadata |
offlineQueuePath | constructor only | .affix/offline-queue.json |
proofStorePath | constructor only | .affix/proofs.json |
timeoutMs | constructor only | 120000 |
import { AffixSDK } from "@affix-io/sdk";
const sdk = new AffixSDK({
apiKey: process.env.AFFIX_API_KEY!,
apiBase: process.env.AFFIX_API_BASE ?? "https://api.affix-io.com",
requestAttestation: true,
timeoutMs: 60_000,
sector: "production",
});
AFFIX_API_KEY authenticates every SDK HTTP call. The public-tier key in .env.example suits smoke tests at roughly 6 requests per second per IP. Production workloads need a commercial key via Contact.
Use the example key locally. Rate limits apply. Do not commit real production keys.
Separate key per environment. Rotate on engineer offboarding.
Inject via KMS, vault, or platform secrets. One AffixSDK instance per process is typical.
CLI overrides: --api-key and --api-base on any command.
Shortest live API checks before middleware wiring.
npx affix-sdk health npx affix-sdk circuits npx affix-sdk prove --circuit yesno --claim approved npx affix-sdk prove --circuit simple_yesno --claim approved npx affix-sdk verify <proof-id-from-list>
const { prove, verify } = await sdk.proveAndVerify({
circuitId: "attested_boolean",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
console.log(prove.proof_id, verify.verified, verify.decision);
Structured claim the API normalises to BN254 field elements before witness preparation.
Prepared circuit inputs from buildWitness or POST /v1/witness/prepare.
Opaque SNARK string plus proof_id, proof_digest, and optional decision yes|no.
Optional ML-DSA-65 signature over response digests when requestAttestation is true.
Default request timeout is 120 seconds. Health checks use GET /api/health and expect status: ok.
Defined in src/types.ts. Passed to prove() and buildWitness().
| Field | Required | Description |
|---|---|---|
schema_id | yes | Credential schema label, e.g. eligibility_v1. |
issuer_id | yes | Issuer identifier string. |
issuer_pubkey_hash | yes | BN254 field hash of issuer public key. |
issuer_public_key_hex | no | Optional raw issuer key hex for advanced flows. |
credential_id | yes | Unique credential identifier as field hex. |
claim_value | yes | Primary claim string or number. |
valid_from | yes | Unix seconds start of validity. |
valid_until | yes | Unix seconds end of validity. |
fields | no | Extra claim map (yesno uses claim_a, claim_b, claim_c). |
attestation | no | Optional ML-DSA-65 attestation on the credential object. |
defaultContext(partial) merges your partial map with SDK defaults before prove or witness calls.
| Field | Purpose |
|---|---|
secret | Shared secret field element for witness binding. |
context_id | Stable context identifier hashed into the proof request. |
as_of_timestamp | Unix seconds for time-bound eligibility checks. |
threshold | Numeric threshold for range-style circuits. |
region_hash | Hashed region or jurisdiction constraint. |
required_coverage_hash | Coverage or policy bundle hash. |
required_claim_hash | Expected claim value hash for boolean templates. |
group_hash | Group or cohort membership hash. |
min_value | Inclusive minimum for range proofs. |
max_value | Inclusive maximum for range proofs. |
min_remaining | Remaining allowance floor. |
reference_hash | External reference anchor. |
expected_hash | Expected outcome hash. |
claim_b | Secondary claim for composite yesno circuits. |
claim_c | Tertiary claim for composite yesno circuits. |
required_a_hash | Required hash for claim A in yesno. |
required_b_hash | Required hash for claim B in yesno. |
required_c_hash | Required hash for claim C in yesno. |
logic_mode | AND/OR selector for multi-claim yesno (0 = AND). |
decision_hash | Decision policy hash for composite circuits. |
rules_hash | Rules bundle hash. |
expected_decision_hash | Expected decision outcome hash. |
expected_rules_hash | Expected rules bundle hash. |
merkle_leaf | Merkle leaf for batch proofs. |
merkle_sibling0 | Merkle sibling path element 0. |
merkle_sibling1 | Merkle sibling path element 1. |
merkle_sibling2 | Merkle sibling path element 2. |
merkle_index | Leaf index in the Merkle tree. |
merkle_root | Expected Merkle root. |
import { defaultContext } from "@affix-io/sdk";
const ctx = defaultContext({
required_claim_hash: "approved",
as_of_timestamp: Math.floor(Date.now() / 1000),
region_hash: "uk",
});
AffixSDK exposes prove, verify, queue management, and re-exports defaultContext, prepareWitness, randomFieldHex, witnessFromInputs, AffixApiClient, and env helpers (loadEnv, maskApiKey, envStatus).
Health probe before batch jobs or cron. Calls GET /api/health and returns true when status is ok.
Signature
async isOnline(): Promise
Parameters
None.
Returns
Promise resolving to boolean.
Example
const ok = await sdk.isOnline();
if (!ok) {
console.warn("AffixIO API unreachable");
}
Prepare circuit inputs via POST /v1/witness/prepare without proving yet.
Signature
async buildWitness(circuitId: string, credential: AffixCredential, context?: Partial): Promise
Parameters
circuitId: template name. credential: AffixCredential. context: optional partial WitnessContext merged through defaultContext().
Returns
WitnessPackage with circuit_id and inputs map.
Example
const witness = await sdk.buildWitness(
"kyc",
credential,
defaultContext({ required_claim_hash: "verified" }),
);
console.log(witness.inputs);
Generate a SNARK proof for a circuit. Accepts credential+context, witness, or fields.
Signature
async prove(input: ProveInput): Promise
Parameters
ProveInput: circuitId (required), plus one of credential, witness, fields. Optional sector, requestAttestation, queueOnFailure.
Returns
ProveResult with proof string, proof_id, valid, decision, proof_digest, optional attestation and Merkle fields.
Example
const result = await sdk.prove({
circuitId: "attested_boolean",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
requestAttestation: true,
});
Verify a proof string without resending the credential.
Signature
async verify(circuitId: string, proof: string, requestAttestation?: boolean): Promise
Parameters
circuitId, opaque proof string, optional requestAttestation (default true).
Returns
VerifyResult with verified, decision yes|no, proof_digest.
Example
const check = await sdk.verify("attested_boolean", proofString, true);
if (!check.verified || check.decision === "no") throw new Error("denied");
Single-call gate: prove then verify the returned proof.
Signature
async proveAndVerify(input: ProveInput): Promise<{ prove: ProveResult; verify: VerifyResult }>
Parameters
Same ProveInput as prove().
Returns
Object with prove and verify results.
Example
const { prove, verify } = await sdk.proveAndVerify({
circuitId: "attested_boolean",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
if (!verify.verified) throw new Error("gate_failed");
Replay jobs from .affix/offline-queue.json.
Signature
async flushOfflineQueue(): Promise
Parameters
None.
Returns
Array of successful ProveResult objects from this flush run.
Example
const results = await sdk.flushOfflineQueue();
console.log(`flushed ${results.length} proofs`);
Inspect pending offline jobs synchronously.
Signature
listQueuedJobs(): QueuedProveJob[]
Parameters
None.
Returns
Array of QueuedProveJob with id, circuit_id, body, created_at, attempts.
Example
const pending = sdk.listQueuedJobs();
for (const job of pending) {
console.log(job.circuit_id, job.attempts);
}
Inspect local proof history (last 500).
Signature
listStoredProofs(): StoredProof[]
Parameters
None.
Returns
StoredProof array with proof_id, circuit_id, proof, proof_digest, synced flag.
Example
const stored = sdk.listStoredProofs();
const latest = stored[stored.length - 1];
prove() accepts exactly one of credential+context, witness, or fields. Otherwise it throws prove_requires_witness_or_credential_or_fields.
await sdk.prove({
circuitId: "attested_boolean",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
const witness = await sdk.buildWitness(circuitId, credential, context);
await sdk.prove({ circuitId, witness });
await sdk.prove({
circuitId: "merkle_batch",
fields: {
leaf: "0x...",
sibling0: "0x...",
sibling1: "0x...",
sibling2: "0x...",
index: "0",
expected_root: "0x...",
},
});
queueOnFailure is not false. Credential bodies are redacted to witness-only before disk write.Downstream services can verify with only the proof string and circuit ID.
const check = await sdk.verify("attested_boolean", proofString, true);
if (!check.verified || check.decision === "no") {
throw new Error("denied");
}
CLI resolution order: stored proof_id, file JSON with circuit_id, raw proof with --circuit.
Set requestAttestation: true on prove, verify, or in SdkConfig. Responses may include:
type Attestation = {
signed_at: string;
payload_digest: string;
mldsa_signature_b64: string;
algorithm: "ML-DSA-65";
};
ML-DSA-65 aligns with FIPS 204 module-lattice signatures. Store attestation alongside audit logs when regulators expect PQC-backed evidence chains.
When prove() fails and queueOnFailure is not false:
claim_value is not persisted.flushOfflineQueue() replays jobs when the API is reachable.@affix-io/sdk-witness. Otherwise the SDK throws offline_witness_unavailable.await sdk.prove({ ...input, queueOnFailure: true });
console.log(sdk.listQueuedJobs());
const flushed = await sdk.flushOfflineQueue();
Successful proofs append to .affix/proofs.json (last 500 entries). Override with proofStorePath.
const stored = sdk.listStoredProofs();
const latest = stored[stored.length - 1];
// npx affix-sdk verify <latest.proof_id>
Each StoredProof includes proof_id, circuit_id, proof_digest, synced, and optional merkle_root.
Binary: affix-sdk. Commands implemented in src/cli.ts:
npx affix-sdk health npx affix-sdk prove [--circuit <id>] [--claim <value>] [--region <value>] [--schema <label>] npx affix-sdk verify <proof-id-or-path> [--circuit <id>] npx affix-sdk circuits npx affix-sdk list npx affix-sdk flush
prove defaults to circuit yesno with a demo credential. Use --circuit simple_yesno for single-claim smoke tests.
config subcommand in 2.3.0. Use environment variables or constructor options.115+ attested Noir templates on the API. Live list: npx affix-sdk circuits or GET /v1/circuits.
| Domain | Circuit IDs |
|---|---|
| Identity / KYC | kyc, attested_boolean, attested_membership, attested_composite, cross_biometric_match, consent_verification, cross_data_consent, cross_mfa_verification, eligibility, simple_yesno, yesno |
| Age / health | health_age, health_age_verification, health_vaccination_status, health_clinical_trial_eligibility, health_consent_verification, health_insurance_eligibility, health_organ_donor_eligibility, health_prescription_auth, health_allergy_check, health_score_threshold, health_blood_type_compatibility, cross_age_range, hosp_checkin_age, ticket_age_entry, ent_age_restriction, edu_age_admission |
| Residency / travel | ticket_local_resident, travel_visa_eligibility, travel_residency_proof, travel_passport_validity, travel_vaccination_req, travel_restriction_check, travel_insurance_coverage, travel_group_eligibility, travel_booking_age, travel_frequent_flyer, travel_hotel_loyalty, govt_residency_duration, govt_immigration_status, cross_address_proof |
| Education | edu_attendance_threshold, edu_enrollment_verification, edu_alumni_status, edu_degree_completion, edu_library_access, edu_prerequisites_met, edu_research_grant, edu_academic_eligibility, edu_financial_aid |
| Fintech / motor | mortgage_engine, motor_finance_eligibility, cross_credit_score_range, cross_income_bracket, govt_tax_bracket, motor_insurance_proof, motor_inspection_valid, motor_license_validity, motor_ownership_verification, motor_parking_permit, motor_clean_driving_record, motor_emissions_compliance, motor_mileage_verification, motor_rental_age_check, token_validation |
| Government | govt_voting_eligibility, govt_security_clearance, govt_criminal_record, govt_benefit_entitlement, govt_military_service, govt_professional_license, govt_property_ownership, zk_voting |
| Merkle / audit | merkle_batch, audit_proof, quantum_safe_token, proof_aggregation, offline_validation |
| Agents / hospitality / tickets | govt_security_clearance, hosp_agent_credentials, hosp_corporate_rate, hosp_group_booking, hosp_longstay_resident, hosp_loyalty_tier, hosp_casino_player, hosp_referral_program, hosp_resort_pass, hosp_wedding_package, ticket_disability_access, ticket_group_booking, ticket_presale_access, ticket_resale_auth, ticket_season_holder, ticket_student_discount, ticket_senior_discount, ticket_vip_access, ent_beta_access, ent_account_standing, ent_creator_verification, ent_device_license, ent_family_plan, ent_geo_content_rights, ent_parental_override, ent_premium_membership, ent_tournament_eligibility |
Before writing to disk, redactProveBodyForQueue strips credential and context so queued jobs are witness-only or fields-based. Credential-based queueing without @affix-io/sdk-witness fails with offline_witness_unavailable.
attested_boolean, ent_beta_access, govt_criminal_record, govt_security_clearance, simple_yesno, travel_insurance_coverage, travel_restriction_check
cross_biometric_match
attested_composite, composite, consent_verification, cross_data_consent, cross_mfa_verification, eligibility, ent_account_standing, ent_parental_override, health_clinical_trial_eligibility, health_consent_verification, health_insurance_eligibility, health_organ_donor_eligibility, health_prescription_auth, kyc, mortgage_engine, motor_finance_eligibility, offline_validation, proof_aggregation, travel_visa_eligibility, yesno, zk_voting
attested_date_validity, health_vaccination_status, motor_insurance_proof, motor_inspection_valid, motor_license_validity, quantum_safe_token, token_validation, travel_passport_validity, travel_vaccination_req
attested_membership, cross_address_proof, cross_employment_status, cross_relationship_verification, edu_alumni_status, edu_degree_completion, edu_enrollment_verification, edu_library_access, edu_prerequisites_met, edu_research_grant, ent_creator_verification, ent_geo_content_rights, ent_tournament_eligibility, govt_benefit_entitlement, govt_immigration_status, govt_military_service, govt_professional_license, govt_property_ownership, govt_residency_duration, govt_voting_eligibility, health_allergy_check, hosp_agent_credentials, hosp_corporate_rate, hosp_group_booking, hosp_longstay_resident, hosp_referral_program, hosp_resort_pass, hosp_wedding_package, motor_ownership_verification, motor_parking_permit, ticket_disability_access, ticket_group_booking, ticket_presale_access, ticket_resale_auth, ticket_local_resident, ticket_season_holder, ticket_student_discount, travel_group_eligibility, travel_residency_proof
attested_range, cross_age_range, cross_credit_score_range, cross_income_bracket, cross_timestamp_proof, edu_academic_eligibility, edu_age_admission, edu_attendance_threshold, edu_financial_aid, ent_age_restriction, ent_device_license, ent_family_plan, ent_premium_membership, govt_tax_bracket, health_blood_type_compatibility, health_score_threshold, hosp_casino_player, hosp_checkin_age, hosp_loyalty_tier, motor_clean_driving_record, motor_emissions_compliance, motor_mileage_verification, motor_rental_age_check, ticket_age_entry, ticket_senior_discount, ticket_vip_access, travel_booking_age, travel_frequent_flyer, travel_hotel_loyalty
audit_proof
merkle_batch
health_age, health_age_verification
Each entry lists the domain catalogue, witness template (if any), and a minimal integration note. Always confirm availability with npx affix-sdk circuits.
kycCatalogue domain: Identity / KYC. Witness template: composite.
Pass circuitId: "kyc" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on kyc, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "kyc",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
attested_booleanCatalogue domain: Identity / KYC. Witness template: boolean.
Pass circuitId: "attested_boolean" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on attested_boolean, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "attested_boolean",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
attested_membershipCatalogue domain: Identity / KYC. Witness template: membership.
Pass circuitId: "attested_membership" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on attested_membership, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "attested_membership",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
attested_compositeCatalogue domain: Identity / KYC. Witness template: composite.
Pass circuitId: "attested_composite" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on attested_composite, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "attested_composite",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
cross_biometric_matchCatalogue domain: Identity / KYC. Witness template: boolean_hash.
Pass circuitId: "cross_biometric_match" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on cross_biometric_match, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "cross_biometric_match",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
consent_verificationCatalogue domain: Identity / KYC. Witness template: composite.
Pass circuitId: "consent_verification" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on consent_verification, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "consent_verification",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
cross_data_consentCatalogue domain: Identity / KYC. Witness template: composite.
Pass circuitId: "cross_data_consent" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on cross_data_consent, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "cross_data_consent",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
cross_mfa_verificationCatalogue domain: Identity / KYC. Witness template: composite.
Pass circuitId: "cross_mfa_verification" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on cross_mfa_verification, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "cross_mfa_verification",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
eligibilityCatalogue domain: Identity / KYC. Witness template: composite.
Pass circuitId: "eligibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on eligibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "eligibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
simple_yesnoCatalogue domain: Identity / KYC. Witness template: boolean.
Pass circuitId: "simple_yesno" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on simple_yesno, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "simple_yesno",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
yesnoCatalogue domain: Identity / KYC. Witness template: composite.
Pass circuitId: "yesno" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on yesno, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "yesno",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_ageCatalogue domain: Age / health. Witness template: health_age.
Pass circuitId: "health_age" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_age, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_age",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_age_verificationCatalogue domain: Age / health. Witness template: health_age.
Pass circuitId: "health_age_verification" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_age_verification, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_age_verification",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_vaccination_statusCatalogue domain: Age / health. Witness template: date.
Pass circuitId: "health_vaccination_status" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_vaccination_status, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_vaccination_status",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_clinical_trial_eligibilityCatalogue domain: Age / health. Witness template: composite.
Pass circuitId: "health_clinical_trial_eligibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_clinical_trial_eligibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_clinical_trial_eligibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_consent_verificationCatalogue domain: Age / health. Witness template: composite.
Pass circuitId: "health_consent_verification" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_consent_verification, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_consent_verification",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_insurance_eligibilityCatalogue domain: Age / health. Witness template: composite.
Pass circuitId: "health_insurance_eligibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_insurance_eligibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_insurance_eligibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_organ_donor_eligibilityCatalogue domain: Age / health. Witness template: composite.
Pass circuitId: "health_organ_donor_eligibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_organ_donor_eligibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_organ_donor_eligibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_prescription_authCatalogue domain: Age / health. Witness template: composite.
Pass circuitId: "health_prescription_auth" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_prescription_auth, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_prescription_auth",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_allergy_checkCatalogue domain: Age / health. Witness template: membership.
Pass circuitId: "health_allergy_check" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_allergy_check, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_allergy_check",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_score_thresholdCatalogue domain: Age / health. Witness template: range.
Pass circuitId: "health_score_threshold" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_score_threshold, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_score_threshold",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
health_blood_type_compatibilityCatalogue domain: Age / health. Witness template: range.
Pass circuitId: "health_blood_type_compatibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on health_blood_type_compatibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "health_blood_type_compatibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
cross_age_rangeCatalogue domain: Age / health. Witness template: range.
Pass circuitId: "cross_age_range" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on cross_age_range, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "cross_age_range",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
hosp_checkin_ageCatalogue domain: Age / health. Witness template: range.
Pass circuitId: "hosp_checkin_age" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on hosp_checkin_age, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "hosp_checkin_age",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ticket_age_entryCatalogue domain: Age / health. Witness template: range.
Pass circuitId: "ticket_age_entry" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ticket_age_entry, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ticket_age_entry",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ent_age_restrictionCatalogue domain: Age / health. Witness template: range.
Pass circuitId: "ent_age_restriction" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ent_age_restriction, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ent_age_restriction",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
edu_age_admissionCatalogue domain: Age / health. Witness template: range.
Pass circuitId: "edu_age_admission" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on edu_age_admission, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "edu_age_admission",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ticket_local_residentCatalogue domain: Residency / travel. Witness template: membership.
Pass circuitId: "ticket_local_resident" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ticket_local_resident, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ticket_local_resident",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
travel_visa_eligibilityCatalogue domain: Residency / travel. Witness template: composite.
Pass circuitId: "travel_visa_eligibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on travel_visa_eligibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "travel_visa_eligibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
travel_residency_proofCatalogue domain: Residency / travel. Witness template: membership.
Pass circuitId: "travel_residency_proof" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on travel_residency_proof, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "travel_residency_proof",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
travel_passport_validityCatalogue domain: Residency / travel. Witness template: date.
Pass circuitId: "travel_passport_validity" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on travel_passport_validity, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "travel_passport_validity",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
travel_vaccination_reqCatalogue domain: Residency / travel. Witness template: date.
Pass circuitId: "travel_vaccination_req" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on travel_vaccination_req, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "travel_vaccination_req",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
travel_restriction_checkCatalogue domain: Residency / travel. Witness template: boolean.
Pass circuitId: "travel_restriction_check" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on travel_restriction_check, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "travel_restriction_check",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
travel_insurance_coverageCatalogue domain: Residency / travel. Witness template: boolean.
Pass circuitId: "travel_insurance_coverage" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on travel_insurance_coverage, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "travel_insurance_coverage",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
travel_group_eligibilityCatalogue domain: Residency / travel. Witness template: membership.
Pass circuitId: "travel_group_eligibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on travel_group_eligibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "travel_group_eligibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
travel_booking_ageCatalogue domain: Residency / travel. Witness template: range.
Pass circuitId: "travel_booking_age" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on travel_booking_age, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "travel_booking_age",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
travel_frequent_flyerCatalogue domain: Residency / travel. Witness template: range.
Pass circuitId: "travel_frequent_flyer" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on travel_frequent_flyer, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "travel_frequent_flyer",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
travel_hotel_loyaltyCatalogue domain: Residency / travel. Witness template: range.
Pass circuitId: "travel_hotel_loyalty" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on travel_hotel_loyalty, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "travel_hotel_loyalty",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
govt_residency_durationCatalogue domain: Residency / travel. Witness template: membership.
Pass circuitId: "govt_residency_duration" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on govt_residency_duration, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "govt_residency_duration",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
govt_immigration_statusCatalogue domain: Residency / travel. Witness template: membership.
Pass circuitId: "govt_immigration_status" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on govt_immigration_status, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "govt_immigration_status",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
cross_address_proofCatalogue domain: Residency / travel. Witness template: membership.
Pass circuitId: "cross_address_proof" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on cross_address_proof, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "cross_address_proof",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
edu_attendance_thresholdCatalogue domain: Education. Witness template: range.
Pass circuitId: "edu_attendance_threshold" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on edu_attendance_threshold, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "edu_attendance_threshold",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
edu_enrollment_verificationCatalogue domain: Education. Witness template: membership.
Pass circuitId: "edu_enrollment_verification" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on edu_enrollment_verification, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "edu_enrollment_verification",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
edu_alumni_statusCatalogue domain: Education. Witness template: membership.
Pass circuitId: "edu_alumni_status" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on edu_alumni_status, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "edu_alumni_status",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
edu_degree_completionCatalogue domain: Education. Witness template: membership.
Pass circuitId: "edu_degree_completion" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on edu_degree_completion, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "edu_degree_completion",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
edu_library_accessCatalogue domain: Education. Witness template: membership.
Pass circuitId: "edu_library_access" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on edu_library_access, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "edu_library_access",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
edu_prerequisites_metCatalogue domain: Education. Witness template: membership.
Pass circuitId: "edu_prerequisites_met" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on edu_prerequisites_met, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "edu_prerequisites_met",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
edu_research_grantCatalogue domain: Education. Witness template: membership.
Pass circuitId: "edu_research_grant" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on edu_research_grant, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "edu_research_grant",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
edu_academic_eligibilityCatalogue domain: Education. Witness template: range.
Pass circuitId: "edu_academic_eligibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on edu_academic_eligibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "edu_academic_eligibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
edu_financial_aidCatalogue domain: Education. Witness template: range.
Pass circuitId: "edu_financial_aid" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on edu_financial_aid, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "edu_financial_aid",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
mortgage_engineCatalogue domain: Fintech / motor. Witness template: composite.
Pass circuitId: "mortgage_engine" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on mortgage_engine, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "mortgage_engine",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
motor_finance_eligibilityCatalogue domain: Fintech / motor. Witness template: composite.
Pass circuitId: "motor_finance_eligibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on motor_finance_eligibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "motor_finance_eligibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
cross_credit_score_rangeCatalogue domain: Fintech / motor. Witness template: range.
Pass circuitId: "cross_credit_score_range" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on cross_credit_score_range, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "cross_credit_score_range",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
cross_income_bracketCatalogue domain: Fintech / motor. Witness template: range.
Pass circuitId: "cross_income_bracket" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on cross_income_bracket, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "cross_income_bracket",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
govt_tax_bracketCatalogue domain: Fintech / motor. Witness template: range.
Pass circuitId: "govt_tax_bracket" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on govt_tax_bracket, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "govt_tax_bracket",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
motor_insurance_proofCatalogue domain: Fintech / motor. Witness template: date.
Pass circuitId: "motor_insurance_proof" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on motor_insurance_proof, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "motor_insurance_proof",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
motor_inspection_validCatalogue domain: Fintech / motor. Witness template: date.
Pass circuitId: "motor_inspection_valid" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on motor_inspection_valid, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "motor_inspection_valid",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
motor_license_validityCatalogue domain: Fintech / motor. Witness template: date.
Pass circuitId: "motor_license_validity" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on motor_license_validity, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "motor_license_validity",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
motor_ownership_verificationCatalogue domain: Fintech / motor. Witness template: membership.
Pass circuitId: "motor_ownership_verification" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on motor_ownership_verification, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "motor_ownership_verification",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
motor_parking_permitCatalogue domain: Fintech / motor. Witness template: membership.
Pass circuitId: "motor_parking_permit" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on motor_parking_permit, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "motor_parking_permit",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
motor_clean_driving_recordCatalogue domain: Fintech / motor. Witness template: range.
Pass circuitId: "motor_clean_driving_record" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on motor_clean_driving_record, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "motor_clean_driving_record",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
motor_emissions_complianceCatalogue domain: Fintech / motor. Witness template: range.
Pass circuitId: "motor_emissions_compliance" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on motor_emissions_compliance, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "motor_emissions_compliance",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
motor_mileage_verificationCatalogue domain: Fintech / motor. Witness template: range.
Pass circuitId: "motor_mileage_verification" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on motor_mileage_verification, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "motor_mileage_verification",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
motor_rental_age_checkCatalogue domain: Fintech / motor. Witness template: range.
Pass circuitId: "motor_rental_age_check" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on motor_rental_age_check, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "motor_rental_age_check",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
token_validationCatalogue domain: Fintech / motor. Witness template: date.
Pass circuitId: "token_validation" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on token_validation, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "token_validation",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
govt_voting_eligibilityCatalogue domain: Government. Witness template: membership.
Pass circuitId: "govt_voting_eligibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on govt_voting_eligibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "govt_voting_eligibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
govt_security_clearanceCatalogue domain: Government. Witness template: boolean.
Pass circuitId: "govt_security_clearance" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on govt_security_clearance, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "govt_security_clearance",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
govt_criminal_recordCatalogue domain: Government. Witness template: boolean.
Pass circuitId: "govt_criminal_record" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on govt_criminal_record, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "govt_criminal_record",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
govt_benefit_entitlementCatalogue domain: Government. Witness template: membership.
Pass circuitId: "govt_benefit_entitlement" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on govt_benefit_entitlement, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "govt_benefit_entitlement",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
govt_military_serviceCatalogue domain: Government. Witness template: membership.
Pass circuitId: "govt_military_service" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on govt_military_service, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "govt_military_service",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
govt_professional_licenseCatalogue domain: Government. Witness template: membership.
Pass circuitId: "govt_professional_license" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on govt_professional_license, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "govt_professional_license",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
govt_property_ownershipCatalogue domain: Government. Witness template: membership.
Pass circuitId: "govt_property_ownership" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on govt_property_ownership, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "govt_property_ownership",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
zk_votingCatalogue domain: Government. Witness template: composite.
Pass circuitId: "zk_voting" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on zk_voting, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "zk_voting",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
merkle_batchCatalogue domain: Merkle / audit. Witness template: merkle.
Pass circuitId: "merkle_batch" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on merkle_batch, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "merkle_batch",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
audit_proofCatalogue domain: Merkle / audit. Witness template: audit.
Pass circuitId: "audit_proof" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on audit_proof, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "audit_proof",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
quantum_safe_tokenCatalogue domain: Merkle / audit. Witness template: date.
Pass circuitId: "quantum_safe_token" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on quantum_safe_token, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "quantum_safe_token",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
proof_aggregationCatalogue domain: Merkle / audit. Witness template: composite.
Pass circuitId: "proof_aggregation" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on proof_aggregation, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "proof_aggregation",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
offline_validationCatalogue domain: Merkle / audit. Witness template: composite.
Pass circuitId: "offline_validation" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on offline_validation, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "offline_validation",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
hosp_agent_credentialsCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "hosp_agent_credentials" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on hosp_agent_credentials, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "hosp_agent_credentials",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
hosp_corporate_rateCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "hosp_corporate_rate" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on hosp_corporate_rate, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "hosp_corporate_rate",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
hosp_group_bookingCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "hosp_group_booking" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on hosp_group_booking, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "hosp_group_booking",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
hosp_longstay_residentCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "hosp_longstay_resident" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on hosp_longstay_resident, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "hosp_longstay_resident",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
hosp_loyalty_tierCatalogue domain: Agents / hospitality / tickets. Witness template: range.
Pass circuitId: "hosp_loyalty_tier" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on hosp_loyalty_tier, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "hosp_loyalty_tier",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
hosp_casino_playerCatalogue domain: Agents / hospitality / tickets. Witness template: range.
Pass circuitId: "hosp_casino_player" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on hosp_casino_player, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "hosp_casino_player",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
hosp_referral_programCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "hosp_referral_program" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on hosp_referral_program, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "hosp_referral_program",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
hosp_resort_passCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "hosp_resort_pass" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on hosp_resort_pass, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "hosp_resort_pass",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
hosp_wedding_packageCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "hosp_wedding_package" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on hosp_wedding_package, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "hosp_wedding_package",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ticket_disability_accessCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "ticket_disability_access" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ticket_disability_access, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ticket_disability_access",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ticket_group_bookingCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "ticket_group_booking" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ticket_group_booking, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ticket_group_booking",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ticket_presale_accessCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "ticket_presale_access" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ticket_presale_access, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ticket_presale_access",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ticket_resale_authCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "ticket_resale_auth" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ticket_resale_auth, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ticket_resale_auth",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ticket_season_holderCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "ticket_season_holder" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ticket_season_holder, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ticket_season_holder",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ticket_student_discountCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "ticket_student_discount" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ticket_student_discount, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ticket_student_discount",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ticket_senior_discountCatalogue domain: Agents / hospitality / tickets. Witness template: range.
Pass circuitId: "ticket_senior_discount" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ticket_senior_discount, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ticket_senior_discount",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ticket_vip_accessCatalogue domain: Agents / hospitality / tickets. Witness template: range.
Pass circuitId: "ticket_vip_access" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ticket_vip_access, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ticket_vip_access",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ent_beta_accessCatalogue domain: Agents / hospitality / tickets. Witness template: boolean.
Pass circuitId: "ent_beta_access" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ent_beta_access, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ent_beta_access",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ent_account_standingCatalogue domain: Agents / hospitality / tickets. Witness template: composite.
Pass circuitId: "ent_account_standing" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ent_account_standing, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ent_account_standing",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ent_creator_verificationCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "ent_creator_verification" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ent_creator_verification, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ent_creator_verification",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ent_device_licenseCatalogue domain: Agents / hospitality / tickets. Witness template: range.
Pass circuitId: "ent_device_license" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ent_device_license, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ent_device_license",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ent_family_planCatalogue domain: Agents / hospitality / tickets. Witness template: range.
Pass circuitId: "ent_family_plan" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ent_family_plan, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ent_family_plan",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ent_geo_content_rightsCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "ent_geo_content_rights" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ent_geo_content_rights, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ent_geo_content_rights",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ent_parental_overrideCatalogue domain: Agents / hospitality / tickets. Witness template: composite.
Pass circuitId: "ent_parental_override" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ent_parental_override, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ent_parental_override",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ent_premium_membershipCatalogue domain: Agents / hospitality / tickets. Witness template: range.
Pass circuitId: "ent_premium_membership" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ent_premium_membership, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ent_premium_membership",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
ent_tournament_eligibilityCatalogue domain: Agents / hospitality / tickets. Witness template: membership.
Pass circuitId: "ent_tournament_eligibility" to prove(), buildWitness(), or the CLI --circuit flag when your policy maps to this template.
When you standardise on ent_tournament_eligibility, document the expected claim shape in your internal runbook and keep circuit IDs out of client bundles. Gate failures should return HTTP 403 with proof_id for correlation.
Integration tests can call this ID against the sandbox key, then assert decision === "yes" for happy paths. For deny paths, mismatch required_claim_hash in defaultContext and expect decision === "no".
Programmatic smoke pattern
const result = await sdk.prove({
circuitId: "ent_tournament_eligibility",
credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
| Endpoint | SDK usage |
|---|---|
GET /api/health | isOnline(), CLI health |
GET /v1/circuits | CLI circuits |
POST /v1/witness/prepare | buildWitness() |
POST /v1/circuits/:id/prove | prove() |
POST /v1/circuits/:id/verify | verify() |
GET /v1/merkle/root | via AffixApiClient |
POST /v1/merkle/audit | audit integrations |
Sandbox UI: /sandbox/. OpenAPI: /openapi.json.
Instantiate one AffixSDK per process. Call prove or proveAndVerify before sensitive actions.
import express from "express";
import { AffixSDK, defaultContext } from "@affix-io/sdk";
const app = express();
app.use(express.json());
const sdk = new AffixSDK({ apiKey: process.env.AFFIX_API_KEY! });
app.post("/export", async (req, res) => {
try {
const result = await sdk.proveAndVerify({
circuitId: "attested_boolean",
credential: req.body.credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
if (!result.verify.verified || result.prove.decision === "no") {
return res.status(403).json({ error: "denied", proof_id: result.prove.proof_id });
}
res.json({ ok: true, proof_id: result.prove.proof_id });
} catch (err) {
res.status(502).json({ error: "affix_unreachable" });
}
});
app.listen(3000);
import Fastify from "fastify";
import { AffixSDK, defaultContext } from "@affix-io/sdk";
const app = Fastify();
const sdk = new AffixSDK();
app.post("/payout", async (request, reply) => {
const out = await sdk.prove({
circuitId: "attested_boolean",
credential: request.body.credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
if (!out.valid || out.decision === "no") {
return reply.code(403).send({ error: "denied", proof_id: out.proof_id });
}
return { ok: true, proof_id: out.proof_id };
});
await app.listen({ port: 3000 });
// app/api/gate/route.ts
import { AffixSDK, defaultContext } from "@affix-io/sdk";
import { NextResponse } from "next/server";
const sdk = new AffixSDK();
export async function POST(req: Request) {
const body = await req.json();
const result = await sdk.proveAndVerify({
circuitId: "attested_boolean",
credential: body.credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
if (!result.verify.verified) {
return NextResponse.json({ error: "denied" }, { status: 403 });
}
return NextResponse.json({ ok: true, proof_id: result.prove.proof_id });
}
import { CanActivate, ExecutionContext, Injectable, ForbiddenException } from "@nestjs/common";
import { AffixSDK, defaultContext } from "@affix-io/sdk";
@Injectable()
export class AffixGateGuard implements CanActivate {
private sdk = new AffixSDK({ apiKey: process.env.AFFIX_API_KEY! });
async canActivate(ctx: ExecutionContext): Promise<boolean> {
const req = ctx.switchToHttp().getRequest();
const { verify } = await this.sdk.proveAndVerify({
circuitId: "attested_boolean",
credential: req.body.credential,
context: defaultContext({ required_claim_hash: "approved" }),
});
if (!verify.verified) throw new ForbiddenException("denied");
req.affixProofId = verify.proof_id;
return true;
}
}
import { Hono } from "hono";
import { AffixSDK, defaultContext } from "@affix-io/sdk";
const app = new Hono();
const sdk = new AffixSDK();
app.post("/gate", async (c) => {
const body = await c.req.json();
const out = await sdk.prove({
circuitId: "kyc",
credential: body.credential,
context: defaultContext({ required_claim_hash: "verified" }),
});
if (!out.valid || out.decision === "no") {
return c.json({ error: "denied" }, 403);
}
return c.json({ proof_id: out.proof_id });
});
export default app;
import { Worker } from "bullmq";
import { AffixSDK, defaultContext } from "@affix-io/sdk";
const sdk = new AffixSDK();
new Worker("eligibility", async (job) => {
if (!(await sdk.isOnline())) {
await sdk.prove({ ...job.data.input, queueOnFailure: true });
return { queued: true };
}
const result = await sdk.prove(job.data.input);
return { proof_id: result.proof_id };
});
// Cron: await sdk.flushOfflineQueue();
nodejs_compat). File-backed offline queue paths are awkward on Workers. Prefer a dedicated Node container or worker for prove latency and queue persistence.Run prove before tool execution. Log proof_id, never credential contents in model context.
import { AffixSDK, defaultContext } from "@affix-io/sdk";
const sdk = new AffixSDK();
export async function gateTool(credential: unknown, circuitId: string) {
const { valid, proof_id, decision } = await sdk.prove({
circuitId,
credential,
context: defaultContext({ required_claim_hash: "cleared" }),
});
if (!valid || decision === "no") throw new Error("tool_access_denied");
return proof_id;
}
For long-running agents, combine with flushOfflineQueue() when connectivity returns.
Integration tests should hit the sandbox API with a dedicated key. Mock AffixApiClient only for unit tests of your own glue code.
import { describe, it, expect } from "vitest";
import { AffixSDK, defaultContext } from "@affix-io/sdk";
describe("affix gate", () => {
it("denies bad claim", async () => {
const sdk = new AffixSDK({ apiKey: process.env.AFFIX_API_KEY! });
const result = await sdk.prove({
circuitId: "simple_yesno",
credential: demoCredential("rejected"),
context: defaultContext({ required_claim_hash: "approved" }),
});
expect(result.decision).toBe("no");
});
});
CI should run npx affix-sdk health before integration suites.
FROM node:20-bookworm-slim WORKDIR /app COPY package*.json ./ RUN npm ci --omit=dev COPY . . ENV AFFIX_API_BASE=https://api.affix-io.com CMD ["node", "dist/server.js"]
GitHub Actions snippet
- name: Affix smoke
env:
AFFIX_API_KEY: ${{ secrets.AFFIX_API_KEY }}
run: |
npx affix-sdk health
npx affix-sdk prove --circuit simple_yesno --claim approved
| Code / symptom | Cause | Fix |
|---|---|---|
prove_requires_witness_or_credential_or_fields | prove() called without witness, credential, or fields. | Pass one input mode. See Prove modes section. |
witness_prepare_empty | POST /v1/witness/prepare returned no inputs. | Check circuit ID and credential shape. Confirm API health. |
offline_witness_unavailable | Credential-based offline queue without @affix-io/sdk-witness. | Prove online, pass a pre-built witness or fields, or install the commercial witness add-on. |
witness_export_missing | Witness export path missing for offline redaction. | Retry with buildWitness online, or queue fields/witness bodies only. |
verify_needs_stored_proof_id_path_or_circuit | CLI verify target not resolved. | Pass stored proof_id, JSON file with circuit_id, or raw proof with --circuit. |
verify_path_needs_circuit_or_json_with_circuit_id | File path given without circuit metadata. | Add --circuit or use JSON with circuit_id and proof. |
Network timeout | Default timeoutMs is 120000. | Increase timeoutMs or retry with queueOnFailure. |
401 / 403 from API | Invalid or missing AFFIX_API_KEY. | Set key server-side only. Check env in process manager. |
429 rate limit | Public tier exceeded (~6 rps per IP). | Backoff, batch off-peak, or request commercial key. |
proof_id for audit correlation.requestAttestation when PQC evidence is required.listQueuedJobs() and schedule flushOfflineQueue().timeoutMs above p99 prove latency for your circuits.Trust boundaries: your service holds credentials and API keys. AffixIO holds proving keys and circuit bytecode. Verifiers receive proof strings, not underlying claims.
API keys, credential sources, queue files on disk, access to .affix/ directories.
Proving integrity, circuit correctness, API authentication, rate limits.
| Term | Definition |
|---|---|
AffixCredential | Structured claim object with schema_id, issuer fields, claim_value, validity window, optional fields map. |
WitnessContext | Public parameters for prove: required_claim_hash, thresholds, Merkle helpers, composite claim hashes. |
WitnessPackage | Prepared circuit inputs returned by buildWitness or prepareWitness. |
ProveResult | proof_id, circuit_id, proof string, valid flag, optional decision yes|no, proof_digest, optional attestation. |
VerifyResult | verified flag, decision, proof_digest, optional Merkle fields and attestation. |
Circuit ID | API template name such as attested_boolean or kyc. List live IDs with npx affix-sdk circuits. |
ML-DSA-65 | Module-Lattice-Based Digital Signature Algorithm at security level 65 (FIPS 204). Used for optional response attestation. |
Merkle audit | POST /v1/merkle/audit anchors proof digests into an audit log. GET /v1/merkle/root returns the current root. |
Offline queue | .affix/offline-queue.json holds failed prove jobs for flushOfflineQueue(). |
Proof store | .affix/proofs.json holds the last 500 proofs for CLI verify by proof_id. |
Barretenberg | Proving backend used by AffixIO for Noir SNARK generation (remote on API). |
Noir | Domain-specific language for ZK circuits. AffixIO ships 115+ attested templates on the API. |
BN254 | Field used when normalising credential identifiers to circuit field elements. |
queueOnFailure | When true (default), failed prove() calls enqueue a redacted job instead of only throwing. |
sector | Optional SdkConfig sector string forwarded on API requests for routing or billing metadata. |
No. @affix-io/sdk targets Node.js 18+ ESM. Keep API keys and prove calls in a server process, background worker, or CLI. Do not bundle the key into client-side JavaScript or mobile binaries.
Proving and witness preparation run on the AffixIO API (default https://api.affix-io.com). The SDK is a client: it sends credentials, witnesses, or field maps and receives proof strings back.
Create one AffixSDK instance per process. Call prove or proveAndVerify inside middleware or a route handler before the sensitive action. Return 403 on deny and attach proof_id to logs or Merkle audit.
prove() generates a proof. proveAndVerify() calls prove() then verify() on the returned proof string in one helper. Use proveAndVerify when your gate needs both generation and independent verification in the same request.
Partially. When prove() fails and queueOnFailure is not false, jobs queue under .affix/offline-queue.json. flushOfflineQueue() replays them when the API is reachable. Witness preparation still requires network unless you pass a pre-built witness or raw fields.
Proving runs through the AffixIO API. The public npm package ships compiled JavaScript under dist/, the CLI, and TypeScript types. Circuit templates live on the API catalogue (npx affix-sdk circuits).
Set requestAttestation: true on prove(), verify(), or in SdkConfig. Responses may include attestation with algorithm ML-DSA-65 (FIPS 204) and mldsa_signature_b64.
Credential-based requests are converted to witness-only bodies before writing to disk. Raw claim_value is not persisted. Witness-only or fields-based bodies are stored as-is.
Credential-based offline queueing requires the private @affix-io/sdk-witness add-on. Without it, queueing throws offline_witness_unavailable. Witness-only or fields-based bodies can still queue for flushOfflineQueue().
The proof store keeps the last 500 successful proofs in .affix/proofs.json by default. Override with proofStorePath in SdkConfig.
No. The SDK is verification infrastructure for developers. Clinical systems of record remain your responsibility.
The public-tier key in .env.example allows about 6 requests per second per IP. Commercial keys raise throughput. Contact AffixIO for production keys.
Only where Node.js 18+ compatibility is available (nodejs_compat). Prefer a dedicated Node worker or container for prove latency and file-backed offline queue paths.
Apache-2.0. Source: https://github.com/AffixIO/SDK