createCloak finds them
for you.
Read the balance
{ refresh: false } to read what the object already
knows, for example right after a call that you know changed it.
List the notes
Show balances in a UI
- Render
balance()after eachshield,sendorwithdrawresolves. - Respect privacy on screen: offer a “hide balances” toggle; the private balance is the thing users came to protect.
- Poll sparingly. Each refresh reads from the network.
Back up the notes
Notes created as change from the user’s own spends cannot be rebuilt from the chain. Offer an encrypted backup:secret is 32 random bytes, or a passphrase of 12 characters or more. importNotes only adds notes
that belong to this account and are unspent on chain. See Notes and balances.
With the low-level API
The low-level API keeps no state. Track notes yourself (UtxoWallet, or your own table), check them
against the chain with verifyUtxos, and restore them with recoverNotesFromIndex or
scanTransactions using the viewing key. See
Solana wallet adapter.