You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow wallets to discover notes created in a PXE call #12649
(requirement brought to us by @spalladino after discussing product ideas with developers)
It is currently up to contracts to determine how to deliver notes to their recipients: they may choose to constrain encryption and/or delivery and rely on the recipient processing the logs, or they may e.g. store the payload in a capsule for later retrieval by the app via some top-level unconstrained function. This is however missing one use-case: a wallet choosing to assist in this process, regardless of the decisions made by the contract/app.
An example would be a wallet that wishes to provide improved user experience by proactively finding newly created notes, backing them up in some external storage, etc., regardless of how the contract behaves. This would be difficult currently because even if the wallet was able to somehow get ahold of the note content, it'd be unable to add it to PXE (since as of #12171 only contracts add notes).
A possible solution for this would be to extend the notify_created_note oracle to also receive a 'note payload' that contains the information required to find a note (the same that'd be encrypted in a log), and to make the tx note cache available to the wallet for a given tx created by PXE. The wallet would then be able to store the information from this note cache and feed it into the contract's 'process message' method (which would need to be standardized).
Sounds like a good use case.
Do we just want to give notes to wallets, or should we actually want to gobble up all simulation data, format it up nicely, and return it to wallets (as long as a user agrees to leaking this info to a wallet)?
Things like notes, nullifiers (if used for state in future), newly-deployed contracts, event logs, etc etc could all be useful to a proactive wallet.
as long as a user agrees to leaking this info to a wallet
The user chose to run the wallet, and the wallet can do whatever it wants. It could choose to use a fork of PXE etc. It is not PXE's job to ask the user if they trust the wallet, nor can it do this.
Things like notes, nullifiers (if used for state in future), newly-deployed contracts, event logs, etc etc could all be useful to a proactive wallet.
Possibly, yes. I brought up notes because this was their immediate need, so it made sense to start there. What seems unfortunate is that such a feature requires support from the contract, so it's not something we can add after the fact.
Activity
iAmMichaelConnor commentedon Mar 11, 2025
Sounds like a good use case.
Do we just want to give notes to wallets, or should we actually want to gobble up all simulation data, format it up nicely, and return it to wallets (as long as a user agrees to leaking this info to a wallet)?
Things like notes, nullifiers (if used for state in future), newly-deployed contracts, event logs, etc etc could all be useful to a proactive wallet.
nventuro commentedon Mar 11, 2025
The user chose to run the wallet, and the wallet can do whatever it wants. It could choose to use a fork of PXE etc. It is not PXE's job to ask the user if they trust the wallet, nor can it do this.
Possibly, yes. I brought up notes because this was their immediate need, so it made sense to start there. What seems unfortunate is that such a feature requires support from the contract, so it's not something we can add after the fact.