Proposal: WalletStateCredential — verifiable claims about on-chain wallet state #61
douglasborthwick-crypto
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Context
ACK-ID currently supports
did:pkhfor identifying blockchain wallets and CAIP-19 for identifying on-chain assets.ControllerCredentialestablishes who controls a wallet — but there's no credential type for making verifiable claims about what a wallet holds.The ACK-ID future directions doc explicitly calls out "agent reputation, reliability metrics, and ethical compliance attestations" as areas where the VC framework should extend. The overall roadmap references "advanced privacy-preserving techniques" and "agent reputation systems based on cryptographically verifiable interaction history." A wallet-state credential fits squarely in this gap.
Proposal:
WalletStateCredentialA new W3C VC type that attests to on-chain conditions — token balances, NFT ownership, EAS attestations — without exposing raw balances or requiring the verifier to query the chain.
Credential structure
Following the existing
createCredential()pattern in@agentcommercekit/vc:Key design choices:
met: true/falseper condition, never raw balances. The verifier learns "wallet holds >= 1000 USDC" without learning the actual balance.conditionHash(SHA-256 of the canonical JSON ofevaluatedCondition), so verifiers can confirm exactly what was checked.blockNumberandblockTimestamppin each result to a specific chain state. For XRPL conditions,ledgerIndexserves the same role.did:pkhwith CAIP-2 chain IDs (eip155:1,solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp). Asset identification can use CAIP-19 (eip155:1/erc20:0xA0b8...eB48), though the reference implementation uses flatcontractAddress+chainIdfields.ClaimVerifier
Following the
getControllerClaimVerifier()pattern:The verifier validates the VC signature against the issuer's JWKS endpoint and checks expiration. It does NOT re-query the chain — the point is that the credential is a portable, offline-verifiable proof of on-chain state at a specific block height.
Use cases in ACK
WalletStateCredentialproving the agent's wallet holds sufficient funds before issuing a payment request. Prevents failed transactions.ControllerCredential+WalletStateCredentialtogether prove "this agent is controlled by entity X, and entity X's wallet meets conditions Y" — a complete identity + authorization chain.Reference implementation
InsumerAPI already issues wallet-state attestations in this shape —
POST /v1/attestwithformat: "jwt"returns an ES256-signed JWT containingpass,results(with per-conditionmet,evaluatedCondition,conditionHash,blockNumber,blockTimestamp), and standard claims (iss,sub,jti,iat,exp). The signing key is published at a JWKS endpoint (kid: insumer-attest-v1, ES256/P-256). This could serve as a reference issuer for aWalletStateCredentialimplementation.Wrapping the existing attestation response into
createCredential()format would be straightforward — the claim shape maps directly.Open questions
token_balance,nft_ownership,eas_attestation,farcaster_id) be an open enum, or defined in a schema?asset_namespace:asset_reference. Worth defining a CAIP-19 extension or keeping chain-specific fields?BitstringStatusList(already in@agentcommercekit/vc) could work, but short TTLs may make explicit revocation unnecessary for most wallet-state claims.Happy to contribute a PR with the credential type, schema, and claim verifier if there's interest.
Beta Was this translation helpful? Give feedback.
All reactions