feat(pxe)!: unify sender/secret registration into TaggingSecretSource - #24280
Merged
Conversation
nchamo
commented
Jun 24, 2026
| */ | ||
| export type TaggingSecretSource = | ||
| | { kind: 'sender'; address: AztecAddress } | ||
| | { kind: 'arbitrary-secret'; recipient: AztecAddress; secret: Point }; |
Contributor
Author
There was a problem hiding this comment.
Names are meant to be similar to the ones introduced for the sender in #24040
The idea is we will soon add a way to register interactive handshakes for the recipient this way too
nchamo
marked this pull request as ready for review
June 25, 2026 00:10
vezenovm
approved these changes
Jun 25, 2026
Comment on lines
+208
to
+209
| expect(remaining).not.toContainEqual(senderSource); | ||
| expect(remaining).not.toContainEqual(secretSource); |
Contributor
There was a problem hiding this comment.
Suggested change
| expect(remaining).not.toContainEqual(senderSource); | |
| expect(remaining).not.toContainEqual(secretSource); | |
| expect(remaining).toEqual([]); |
nit: can we not just do this
Contributor
Author
There was a problem hiding this comment.
Sadly no. Only one PXE is shared among all tests (mostly because it's expansive to create one), so we can only test contains/not contains
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.
Motivation
#23708 added
registerSharedSecret/removeSharedSecretalongside the existingregisterSender/getSenders/removeSender. Both feed the same machinery (sources from which PXE derives the app-siloed tagging secrets it scans for to discover incoming private logs), but the PXE API presented them as two unrelated method families, even though they're already backed by one store (TaggingSecretSourcesStore). This unifies the public surface.The change
Replaces the five methods with three over a discriminated union
TaggingSecretSource:registerTaggingSecretSource(source)removeTaggingSecretSource(source)getTaggingSecretSources(), which returns every registered sourceTaggingSecretSourcehas two variants:{ kind: 'sender'; address }: an external address; PXE derives a shared secret via ECDH against every account (present and future). Senders can't be reduced to stored points, so they stay address-anchored.{ kind: 'arbitrary-secret'; recipient; secret }: a directly-provided shared-secret point scoped to a recipient. A futurehandshake-secretvariant slots in here.Scoped to PXE: the
Walletinterface, address book, CLI, and RPC schema are unchanged; the wallet implementations just call the new methods. A migration entry is added tomigration_notes.md.