Feat/miden to evm private notes - #7
Open
Man-Jain wants to merge 2 commits into
Open
Conversation
Lets the sponsor choose whether the P2IDE note backing a Miden→EVM intent is private or public, and threads the choice through the note factory to the SDK. useMidenPrivateNotesSupport reads midenPrivateNotesSupported from GET /miden-recipient and disables the option when the allocator does not advertise it. It blocks rather than silently downgrading to public: a private note whose body the allocator cannot accept can be neither validated nor consumed, and a private P2IDE whose body is lost can never be reclaimed either — the serial number is random and reclaiming means consuming. An allocator that omits the flag reads as unsupported.
…w tab Adds a "Payout note visibility" selector to the EVM→Miden withdraw flow and the two ways a user gets the note body back. Private is opt-in, never inherited: the note publishes only a commitment, so its body is the only thing that can consume it. Changing the selection clears any pending quote, since the choice is part of the signed mandate and a stale quote would carry the claim hash for the other visibility. WithdrawNoteFileCard hands the body over at settlement — download as the exact binary a wallet imports, or copy the base64. RecoverNotesCard covers the case that cannot be solved on the device: the intent nonce lives only in the browser and is not on-chain, so a user on a new machine cannot ask for their own note. One signature lists their past intents and re-downloads any private body. Sign-out revokes the session server-side — clearing local state alone would leave a valid bearer session for its full life. All of it goes through the SDK rather than raw fetch. The EIP-4361 message has to byte-match the allocator, and an app-local copy is a landmine for anyone integrating from this codebase. Copy states plainly that this hides the payout from other chain observers, not from Epoch, which mints it.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
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.
No description provided.