Skip to content

MocaNetwork/air-examples

Repository files navigation

AIR Examples

Runnable examples demonstrating four canonical credential patterns built with AIR Kit. Each example is a self-contained issuer + verifier pair you can clone and run independently.

Patterns

Pattern Example What It Proves Also Covers
A — Reuse verified identity kyc-passport User completed KYC once; second platform accepts the proof SIM-as-Identity (telco), Background Check (gig)
B — Tier / status portability vip-status-portability User holds a tier at one brand; competitor grants equivalent perks Premium Subscriber (telco), Accredited Investor (fintech), Season Ticket (sports)
C — ZK attribute reveal zk-age-verification User is 18+ without revealing date of birth Student / Military gated offers (retail)
D — Event-triggered issuance fan-attendance User attended an event; partner unlocks a reward Ad Engagement (advertising), Freelancer Work Completion (gig)

Quick Start

Every example follows the same workflow:

# 1. Pick an example and role
cd kyc-passport/issuer

# 2. Install
npm install

# 3. Configure
cp .env.example .env.local
# Fill in your Partner ID, Issuer DID, and keys from the AIR Kit Dashboard

# 4. Run
npm run dev

Then repeat for the verifier/ in the same example (run it on a different port).

Prerequisites

  • Node.js v18+
  • An AIR Kit Sandbox account
  • A Partner ID, Issuer DID, Credential ID, and Verification Program ID from the dashboard
  • An RS256 key pair for Partner JWT signing (see any example's README for generation instructions)

Repository Layout

air-examples/
  kyc-passport/           Pattern A — Fintech KYC reuse
    schema.json           Credential schema
    issuer/               Next.js app — KYC provider
    verifier/             Next.js app — lending platform
  fan-attendance/         Pattern D — Event-triggered issuance
    schema.json
    issuer/               Next.js app — venue check-in
    verifier/             Next.js app — merch store
  vip-status-portability/ Pattern B — Cross-brand tier matching
    schema.json
    issuer/               Next.js app — airline loyalty
    verifier/             Next.js app — hotel chain
  zk-age-verification/    Pattern C — ZK attribute reveal
    schema.json
    issuer/               Next.js app — identity provider
    verifier/             Next.js app — iGaming platform

Adapting to Your Vertical

Each example's schema.json includes a verticalVariants section showing how to swap credential fields for a different industry. The code stays the same — only the schema and branding change.

For example, the KYC Passport schema can become a Telco SIM-as-Identity credential by swapping kycProvidercarrierName and adding planType.

Documentation

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors