feat(sdk): trustless MemWal.verify() + verify-a-memory guide#335
Draft
DrVelvetFog wants to merge 1 commit into
Draft
feat(sdk): trustless MemWal.verify() + verify-a-memory guide#335DrVelvetFog wants to merge 1 commit into
DrVelvetFog wants to merge 1 commit into
Conversation
Adds verifyMemory(blobId, opts) and a thin MemWal.verify static that confirm a memory's provenance from public inputs only (on-chain Blob metadata + delegate-key binding + public Walrus aggregator), with no private key and no relayer. @mysten/sui is loaded dynamically so the default entry stays dependency-light. Docs: docs/sdk/verify-a-memory.md. Implements the verify() helper green-lit in MystenLabs#315. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the
verify()helper green-lit in #315.What this adds
verifyMemory(blobId, opts)+ a thinMemWal.verify(blobId, opts)static that confirm a memory's provenance from public inputs only — no private key, no relayer:…::blob::Bloband read itsmemwal_*metadata,memwal_agent_idis one of the account's registeredDelegateKeypubkeys,docs/sdk/verify-a-memory.md— guide (SDK call + by-hand recipe + metadata-privacy caveat), wired into the docs nav.minorchangeset.Design note
@mysten/suiis loaded dynamically (mirroringaccount.ts), soverifyexports from the default dependency-light entry point without pulling@mysten/suiinto it.@mysten/suiv2.6.0+ callers can injectopts.suiClient.Opening as a draft — three alignment questions (from #315)
The on-chain reads are written defensively and flagged
ALIGN-Q1/ALIGN-Q3; I'd like to tighten them to the canonical schema:blobId→ SuiBlobobject. I implemented both anopts.objectIdshort-circuit and a scan of the account's ownedBlobs matchingblob_id. What's the canonical ownership model — account-owned, delegate-owned, or a dynamic field?DelegateKeypubkeys from the account's content and sweep its dynamic fields. Where do they canonically live onMemWalAccount?report.contentAddressedis typed but leftundefined— should the Walrus-id recompute land here now (adds an encoding dep) or as a follow-up?Verification
pnpm --filter @mysten-incubation/memwal typecheckandbuildboth clean.200,memwal_agent_id== a registered DelegateKey pubkey).🤖 Generated with Claude Code