0xMiden / 0xMiden/wallet-adapter
Private notes sent via wallet adapter are not reliably discoverable/consumable in Miden Wallet
- Langage dominant
- TypeScript
- Étoiles
- 2
- Forks
- 9
- Merge moyen
- 25 min
- PR mergées (30 j)
- 1
Description
### Packages versions
@miden-sdk/miden-wallet-adapter-base: 0.14.3
@miden-sdk/miden-wallet-adapter-react: 0.14.3
@miden-sdk/miden-sdk: 0.14.4
@miden-sdk/react: 0.14.4
@miden-sdk/vite-plugin: 0.14.4
Network: testnet
Wallet: Miden Wallet browser extension
App: React + Vite dApp
### Bug description
I’m building a dApp that sends private reward notes from an organizer wallet to a recipient wallet.
The intended flow is:
1. Organizer sends a private reward note using the wallet adapter.
2. Recipient receives a notification/link outside the app.
3. Recipient opens Miden Wallet.
4. Recipient consumes the private note directly from the wallet.
In testing, private notes are not reliably discoverable or consumable by the recipient wallet.
Observed issues:
- Miden Wallet Activity can remain stuck on `Consuming`.
- Canceling the stuck consume action does not always clear it permanently.
- `requestConsumableNotes()` can show old notes, but newly sent private notes may not appear for several minutes.
- `requestConsume()` can fail with `Transaction expired after being queued too long`.
- Trying to consume a linked/private note by id can fail with `INVALID_PARAMS: Error: Note with id ... not found`.
Expected behavior:
Private notes sent to a recipient wallet should be discoverable and consumable by that wallet without requiring fragile dApp-side workarounds.
Screenshot 1: Consuming a linked private reward note fails because the recipient wallet cannot find the note by id
Screenshot 2: Wallet accepts `requestConsume()`, then the transaction expires after being queued too long
Screenshot 3: Miden Wallet Activity remains stuck on `Consuming` after attempting to claim a private reward
### How can this be reproduced?
1. Connect an organizer wallet on testnet.
2. Connect or create a separate recipient wallet.
3. Send a private note to the recipient using `requestSend()` with:
- `noteType: "private"`
- recipient wallet address
- faucet id
- amount in raw units
4. Open the recipient wallet.
5. Try to consume the received private note from Miden Wallet Activity.
6. Also try scanning from the dApp using `requestConsumableNotes()`.
7. Attempt to consume the note using `requestConsume()`.
Observed results:
- Some consume attempts stay stuck on `Consuming`.
- Some consume attempts expire after being queued too long.
- Some private note consume attempts fail with `Note with id ... not found`.
### Relevant log output
```shell
Could not consume reward. Transaction expired after being queued too long
INVALID_PARAMS: Error: Note with id 0x9029ad972302e27b496ff3bd174bb95d6c4abd3a0581ebc14c048de5669f5905 not found
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
The issue involves the Miden wallet adapter and SDK for sending and consuming private notes. Start by examining the `requestSend()`, `requestConsumableNotes()`, and `requestConsume()` methods in the wallet adapter packages. Look at the network layer and transaction queuing logic. Check the Miden Wallet extension's activity handling and note discovery mechanisms. Reproduce the bug using the provided test steps on testnet to observe the failures and timeouts.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- blockchain, react, typescript, vite
- Domaine
- backend-api-design, blockchain, mobile
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 35/100