nostr:nprofile1qqs04xzt6ldm9qhs0ctw0t58kf4z57umjzmjg6jywu0seadwtqqc75spzpmhxue69uhnzdps9enrw73wd9hszynhwden5te0wp6hyurvv4cxzeewv4eszynhwden5te0wfjkccte9enrw73wd9hsxv8qkt am I getting this right?
I believe they are stored as encrypted events on relays.
no, your own proofs are stored as encrypted events the nut zaps are sent unecrypted as pubkey-locked and swapped by the recipient to encrypted events
Where are the encrypted events stored?
relays
so the wallet event specifies that wallet's relays token events are stored on those relays nut zaps are published on relays following the outbox model, since it's a message from sender to receiver so imagine this: you create Wallet A, you designate that wallets relays to be wss://umbrel.local -- only you have access to read/write on that relay I send you a nut zap -- I check your outbox relays, which are some publcly accessible relays I publish the nut zap there, pubkey-locked, unencrypted once you swap it, you encrypt the new token and save it on wss://umbrel.local
That’s what I thought. ✅ No local device or client storage at all. In effect, the relay(s) become a blind custodian(s).
yeah, I think what calle is getting at is that the local device can cache the proofs locally too
Yes, does it store them in the browser's local storage? Highlighter could show you your balance before you even connect to the relays.
yeah, I mean, since they are just nostr events it leverages the same cache adapter I'm using for the rest of the thing, so the balance could definitely show before you're even connected to the relays -- right now I have the wallet configured to skip the cache -- but it shouldn't 🤝 once I remove that explicit "bypass the cache" the balance will load from the same REQ even offline you'll be even able to do private zaps offline with this thing
The use case I am exploring is someone who has zero physical security. They could have their phone confiscated at any moment or have to use someone else’s device. Local storage is great, but a risk in this context. That’s why storing everything as events in relays is so attractive.
yeah, the ecash would still be on your device; but I'm adding the idea of "health checks" so if my wallet is configured to store the tokens in 3 relays and one of them goes offline, or is not returning the tokens it should have, the wallet will either warn the user or automatically rotate one of the relays out and republish all the unspent tokens to the new relay