Skip to content

docs(known-predicates): WalletStateAttestation reference predicate takes the issuer token directly - #29

Closed
douglasborthwick-crypto wants to merge 1 commit into
ProjectOpenSea:mainfrom
douglasborthwick-crypto:docs/wallet-state-attestation-proof
Closed

douglasborthwick-crypto wants to merge 1 commit into
ProjectOpenSea:mainfrom
douglasborthwick-crypto:docs/wallet-state-attestation-proof

Conversation

@douglasborthwick-crypto

Copy link
Copy Markdown
Contributor

Motivation

The proof row for the 0x7a111640 kind in known-predicates.md does not match the reference implementation it links to.

Solution

Updates that row. The reference implementation's hasAccess takes the issuer's compact JWT as data, unchanged, and reads the wallet, verdict, condition hash and expiry from its signed payload. The requirement kind, the getRequirements layout and the SDK decoder are unchanged. The advertised conditionHash is the issuer's own 32-byte condition hash, so inspect prints a value an agent can match directly. The same section in ProjectOpenSea/opensea-skill mirrors this file.

Reference: https://github.com/douglasborthwick-crypto/insumer-examples/blob/main/InsumerAccessPredicate.sol

…plementation's proof

The proof row for the 0x7a111640 kind now describes the reference
implementation: hasAccess takes the issuer's compact JWT as data and reads
the wallet, verdict, condition hash and expiry from its signed payload.
@ryanio

ryanio commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Thanks for keeping this in step with the reference predicate. I checked it against InsumerAccessPredicate.sol and IWalletStateAttestation.sol: hasAccess takes the compact JWT and reads sub, pass, conditionHash and exp from the signed payload, and the contract's notes put a check at about 130,000 gas, inside the registry's 200,000 predicate budget. The old intro's Solana/XRPL/Bitcoin example was also off for this implementation, since sub has to equal the EVM account.

We've recreated the change in our internal monorepo, in this file and in the matching copy in opensea-skill, with you credited as co-author. This repo is a read-only mirror, so the update reaches it with the next tool-sdk release or sync.

One small thing: the "Reference implementation" link in this section still points at douglasborthwick-crypto/insumer-examples, which now redirects to insumerapi/insumer-examples. It works as is, and we'll point it at the new path the next time this section changes.

Closing this PR since the change now lives in the monorepo. Thanks again!

@ryanio ryanio closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants