Add /sign/:id device-flow signing page - #21
Open
0xTitan wants to merge 1 commit into
Open
Conversation
Add the page where a user reviews and signs an agent-proposed register transaction in their own wallet, so the key never leaves the wallet (see the midenname-agent-skills design/device-flow-signing.md). - /sign/:id route: fetch the sign request, deserialize the unsigned tx, and RE-DERIVE the trust-critical fields (payer, payment token, amount) from the transaction bytes themselves — not from the relay-supplied summary - sender pinning: block approval unless the connected wallet is the tx payer - on approve: submit via the existing CustomTransaction path, then PATCH /signed; link to the register note on MidenScan (the wallet returns a UUID, not a tx hash) - consolidate the backend base on VITE_API_BASE (API_BASE now reads it instead of a hardcoded URL; the /sign page reuses it rather than a separate relay var)
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.
Adds the page where a user reviews and signs an agent-proposed register transaction in their own wallet, so the key never leaves the wallet. Part of the device-flow signing feature (see the midenname-agent-skills
design/device-flow-signing.md).What's in here
/sign/:idroute — fetches the sign request, deserializes the unsigned tx, and re-derives the trust-critical fields (payer, payment token, amount) from the transaction bytes themselves — not from the relay-supplied summary.CustomTransactionpath, thenPATCH /signed; links to the register note on MidenScan (the wallet returns a UUID, not a tx hash).Validation
Page rendered + verified headless; full e2e on testnet with a real wallet (deserialize → review → sign → on-chain registration lands).