Why Nostr? What is Njump?
Kind 30818
Author Public Key
npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft
Published at
2024-06-23 12:17:07
Kind type
30818
Event JSON
{ "id": "7230e4ce7b3160093b2c37d9b8e6320188e4f3495b74cd81ef8c67bec2f64afc", "pubkey": "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52", "created_at": 1719137827, "kind": 30818, "tags": [ [ "d", "nip-cashu-wallet" ], [ "client", "wikifreedia", "31990:fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52:1716498133442" ], [ "title", "nip-cashu-wallet" ], [ "c", "Nostr" ], [ "published_at", "1719137827" ] ], "content": "# Cashu Wallet\nA cashu wallet is a wallet which information is stored in relays to make it accessible across applications.\n\nA user can have multiple wallets.\n\n## Cashu relay list\n```js\n{\n \"kind\": 10019,\n \"tags\": [\n [ \"relay\", \"wss://relay1\" ],\n [ \"relay\", \"wss://relay2\" ],\n ]\n}\n```\n\nUsers can list specific relays where their cashu wallets are to be found. If not specified, clients SHOULD use the users [[NIP-65]] relays.\n\n## Wallet Event\n```js\n{\n \"kind\": 37375,\n \"content\": nip44_encrypt([\n [ \"relay\", \"wss://relay1\" ],\n [ \"relay\", \"wss://relay2\" ],\n [ \"proof\", \"event-id-1\" ],\n [ \"proof\", \"event-id-2\" ],\n [ \"description\", \"a wallet for my day-to-day shitposting\" ],\n [ \"balance\", \"100\", \"sats\" ]\n ]),\n \"tags\": [\n [ \"d\", \"my-wallet\" ]\n ]\n}\n```\n\nThe wallet event is paramaterized replaceable event `kind:37375`. `.content` can be empty or a description of the wallet.\nA wallet can specify canonical relays that should be queried for the most up-to-date state of the wallet. If not specified, clients SHOULD use the users [[NIP-65]] relays.\n\nThe content is a [[NIP-44]] encrypted list of tags.\n\n* `balance` is a probable balance of the wallet that can serve as a placeholder while an accurate balance is computed from fetching all the unspent proofs.\n* `proof` is a single event of an unspent proof \n\n## Proofs Event\nAn individual event is \n\n```js\n{\n \"kind\": 7375,\n \"content\": nip44_encrypt([\n {\n \"mint\": \"https://stablenut.umint.cash\",\n \"proofs\": [\n {\n \"id\": \"005c2502034d4f12\",\n \"amount\": 1,\n \"secret\": \"z+zyxAVLRqN9lEjxuNPSyRJzEstbl69Jc1vtimvtkPg=\",\n \"C\": \"0241d98a8197ef238a192d47edf191a9de78b657308937b4f7dd0aa53beae72c46\"\n }\n ]\n ]),\n \"tags\": [\n [ \"a\", \"37375:\u003cpubkey\u003e:my-wallet\" ],\n ]\n}\n```\n\n`.content` is a [[NIP-44]] encrypted payload of the proof.\n\n## Keys Event\n```js\n{\n \"kind\": 37376,\n \"content\": nip44_encrypt(\"\u003ckeys-payload\u003e\"),\n \"tags\": [\n [ \"d\", \"my-wallet\" ],\n [ \"passhprase\", \"\u003cdescription\u003e\" ] // optional tag indicating that an additional passhprase was used to encrypt the payload -- the description is an optional user-provided description that can help the user remember what passphrqase was used\n ]\n}\n```\n\nThis event stores the most recent version of the keys to this wallet. Encryption of this payload *can* include a passphrase to guard the user from accidentally providing access to an application that was granted blanket decryption permissions.\n\n# Flow\n\n## Fetch cashu relay list\nA client that wants to check for user's wallets information starts by fetching `kind:10019` events from the user's relays, if no event is found, it should fall back to using the user's [[NIP-65]] relays.\n\n## Fetch wallet list\nFrom those relays, the client should ", "sig": "46d5f758f0069edad191b091373cbf27ca1e066029fda9b93ed52618b3e61ecf24e23be69e886714e9637162e5e998245a35152c4b07c4d60b98c5ee804308a7" }