demo: wallet-state attestations (InsumerAPI) in ACK#112
demo: wallet-state attestations (InsumerAPI) in ACK#112douglasborthwick-crypto wants to merge 2 commits into
Conversation
Adds demos/insumer-wallet-state, mirroring demos/skyfire-kya: consume an InsumerAPI wallet-state attestation (a signed boolean over on-chain conditions) and gate access on it. Verifies against the public JWKS via insumer-verify; maps into an ACK Verifiable Credential with the original ES256 signature preserved. No re-signing, no fork.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds a new ChangesInsumer Wallet-State Demo
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@demos/insumer-wallet-state/sample-attestation.json`:
- Around line 2-4: The sample JWT in the fixture has an expiration timestamp
(exp=1781559981) set to June 15, 2026 in the future, which contradicts the _note
field claiming the attestation "will read as expired." To make the fixture
deterministically expired regardless of when the demo runs, either replace the
jwt value with one containing a past expiration timestamp (update the exp claim
to a timestamp before the current time), or update the _note field to accurately
document the exact expiry time (June 15, 2026, 21:46:21 UTC) instead of implying
it is already expired.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2d2eabb6-2c01-4157-a175-04382978959b
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
demos/insumer-wallet-state/README.mddemos/insumer-wallet-state/package.jsondemos/insumer-wallet-state/sample-attestation.jsondemos/insumer-wallet-state/src/index.tsdemos/insumer-wallet-state/src/insumer-ack-id.tsdemos/insumer-wallet-state/tsconfig.jsondemos/insumer-wallet-state/vitest.config.ts
What
Adds
demos/insumer-wallet-state, mirroringdemos/skyfire-kya: a worked example of consuming an InsumerAPI wallet-state attestation inside ACK.Why
ACK-ID attests who an agent is, and ACK-Pay confirms a payment cleared — but nothing checks the paying wallet's on-chain state before settlement: no balance, holdings, or compliance condition on the payer. InsumerAPI fills that gap: read a wallet against a condition (token balance / NFT / EAS) across 37 chains, return an ES256-signed boolean, verifiable offline against a public JWKS — the same envelope shape the
skyfire-kyatoken rides.What it shows
insumer-verifySDK — signature, condition-hash binding, expiry.WalletStateCredential(W3C VC) with the original ES256 signature preserved as a detached JWS.trustedIssuers. No re-signing, no fork.pnpm demo; a free key is onecurl— see the README). In production today gating settlement for a Circle Alliance member building payments for the agentic economy.The README documents a native path (publishing a
did:webissuer + emitting VC-shaped output so it flows throughverifyParsedCredential) as a follow-on, and is explicit about the bearer / presenter-binding boundary.AI usage disclosure
Built with AI assistance (Claude Code); reviewed and verified end-to-end against the live API, and type-checked in-tree.
Summary by CodeRabbit
insumer-wallet-statedemo for consuming InsumerAPI wallet-state attestations to drive access-control gating.grantedvalue means, and end-to-end run/mint/verify steps.