moca-proof
Moca Proof
Purpose
This skill handles program completion and MoCat progression after a credential has been verified as compliant via moca-credential-verifier. It submits the completion payload to moca-proof-api /mocaproof/complete and retrieves MoCat status from /mocaproof/mocat.
This skill starts after credential verification returns a compliant result and the agent has an accessToken from a scoped session.
Provided Scripts
Use the provided scripts first. Do not scaffold a new project or rewrite checksum/request logic from scratch unless the requested action is unsupported. Treat all files in this skill bundle as read-only reference tooling.
Task mapping:
- complete program with checksum ->
scripts/moca-complete-program.mjs - fetch MoCat status ->
scripts/moca-get-mocat.mjs
Before first use, run node <script> --help to inspect supported parameters.
Required Inputs
This skill expects the following from the preceding credential verification step:
accessToken: Bearer token from a scoped session (created bymoca-credential-verifier)programId: the verified program IDuserId: available via.air-wallet-config.jsonor CLI flags
The agent must also already have access to its own P-256 private key.
If partnerId is missing, scripts default to the staging partner ID below.
Staging Defaults
{
"airApiUrl": "https://air.api.staging.air3.com/v2",
"mocaChainApiUrl": "https://api.staging.mocachain.org/v1",
"vpApiUrl": "https://vp.api.staging.moca.network/v1",
"mocaProofApiUrl": "https://proof.api.staging.moca.network/v1",
"partnerId": "7e9becac-db0d-4d52-980e-984bb70c4d30"
}
These are hardcoded as defaults in the scripts. Override via CLI flags, environment variables, or .air-wallet-config.json.
Config Resolution Order
All provided scripts resolve configuration in this order:
- CLI flags
- Environment variables
.air-wallet-config.json- Hardcoded staging defaults
Program Completion Flow
Step 1: Complete Program with Checksum
node scripts/moca-complete-program.mjs --access-token <token> --program-id <programId>
Calls POST {mocaProofApiUrl}/mocaproof/complete with:
programIdtxHashzkpchecksum
Checksum logic:
input = userId + "." + programId + "." + txHash.toLowerCase() + "." + SALT_KEY
checksum = base64(md5(input) as hex-string bytes)
Step 2: Fetch MoCat Status
node scripts/moca-get-mocat.mjs --access-token <token>
Calls GET {mocaProofApiUrl}/mocaproof/mocat with Bearer token to display cat progression.
Terminal Messaging
- After completion succeeds, print the cat progression summary from
/mocaproof/mocat - Display current stage, verifications completed, next stage threshold, rarity, and category breakdown
Non-Negotiable Rules
- Use Bearer
accessTokenfrom the scoped session for all API calls - Never modify files inside this installed skill bundle
- If a custom script is truly required, create it outside the skill directory
Failure Handling
- Missing
accessToken: stop and instruct the agent to create a scoped session viamoca-credential-verifierfirst. - Checksum mismatch: verify that
userId,programId, andtxHashare correct and retry. unknown_response: print the full raw response; do not retry automatically.
More from mocanetwork/air-agentic-wallet-skill
air-agentic-wallet
Operates AIR agentic wallets through AIR's `/v2/wallet/agent-sign` HTTP endpoint and ERC-4337 UserOps. Use when an external agent receives an AIR handoff bundle with `userId`, `walletId`, `privyAppId`, `abstractAccountAddress`, and `airApiAgentSignUrl`, and needs to sign messages, typed data, or control the smart account onchain.
29moca-credential-verifier
Verifies user credentials on Moca chain testnet via AIR agent sessions. Use when a user wants to verify a credential, list available verification programs, or check credential compliance.
16