Skip to content

Kind 17375: Cashu Wallet ​

Overview ​

A Cashu Wallet event (Kind 17375) is a replaceable event that stores encrypted wallet information for a Cashu-based wallet. This event contains the private key used for P2PK ecash transactions and a list of mints that the wallet uses. Cashu wallets allow users to store and manage ecash tokens on Nostr, making them accessible across different applications.

Specification ​

PropertyValue
Kind Number17375
Event RangeReplaceable
Defined inNIP-60

Content Format ​

The content field contains NIP-44 encrypted data with the wallet's private key and associated mints.

Schema ​

json
{
  "content": "<nip44-encrypted-data>"
}

The encrypted data contains:

json
[
  ["privkey", "<hex-private-key>"],
  ["mint", "<mint-url-1>"],
  ["mint", "<mint-url-2>"]
]

Tags ​

This event typically doesn't have tags as the relevant information is encrypted in the content field.

Client Behavior ​

Clients should:

  1. Create a Kind 17375 event when setting up a new Cashu wallet
  2. Encrypt the wallet's private key and mint information using NIP-44
  3. Use a dedicated private key (not associated with the user's Nostr identity) for P2PK ecash operations
  4. Include at least one mint in the encrypted content
  5. When loading a user's wallet, fetch this event and decrypt the content using the user's key
  6. Use the wallet information to manage Cashu tokens (Kind 7375 events)
  7. The private key stored here is used exclusively for receiving Nutzaps as described in NIP-61

Relay Behavior ​

Relays should handle this event like any other replaceable event, storing only the latest version.

Use Cases ​

  • Creating and managing a Cashu wallet across different Nostr clients
  • Storing wallet configuration securely on Nostr
  • Maintaining access to Cashu tokens across different devices
  • Supporting interoperable ecash functionality between Nostr apps
  • Enabling the receipt of NIP-61 Nutzap payments

Example ​

json
{
  "id": "6f1d5452abd772802c98288d3c2f9f3a88f7b881ffc6e1e3161735d5226516a6",
  "pubkey": "79dff8f82963424e0bb02708a22e44b4980893e3a4be0fa3cb60a43b946764e3",
  "created_at": 1684326711,
  "kind": 17375,
  "content": "8cI2MgJ2nSgpYsFNjmXQ3Wvg2+NYW7tjNVE75TYV8RM4OZvLUHf4kx+NSkvl5WJK+KnFxZZy+F0fPbWi0za3xWJkDNKs5F9iVyOk/NWfPhk2+0JT2aZB8Xe6Tv/0R2lPiRZMYG+eXDztsMnC1A+Vvj15jU5rHG3JgBMwUOUgAFG1kqgcVXNL2VJYELdNEwXYsMbvEVyG+tMX+KHI8tMvSUi9lcVoQm5VzaRXcZdUptPLbSPVubF8lTTh4ixPznq1OscQvXc7ULT9ayGTHhHTWqJLh7LhTuTN3NfyO+f5mUv2Klo=?iv=yjCT0gzTuYbOTFM3EbqxaA==",
  "tags": [],
  "sig": "f6d4c37c3b0d26e34af0d40f4c85a24faf79d78349825b0e7ba8fc2abfe690516c9219bef11ad4e6d889ce1b7d659170803a7335e4a77a96676a719d97634af9"
}

When decrypted, the content would reveal:

json
[
  ["privkey", "02eaee8939e3565e48cc62967e2fde9d8e2a4b3ec0081f29eceff5c64ef10ac1ed"],
  ["mint", "https://stablenut.umint.cash"],
  ["mint", "https://cashu.space"]
]

References ​

Notes ​

  • The private key stored in this event MUST NOT be the user's Nostr identity private key
  • This private key is used exclusively for P2PK-locked ecash operations
  • This event forms part of a complete Cashu wallet system along with Kind 7375 (Cashu Token) events and Kind 7376 (spending history) events
  • The wallet information stored in this event makes ecash functionality accessible and consistent across different Nostr clients