Open hardwareCashu ecashLightning

Freedom to transact.

Nucula is a small, open-source hardware wallet for Cashu ecash. It runs on an ESP32, receives payments with an NFC tap, and doesn't mind being offline.

XIAO ESP32-C6/PN7160 NFC/128×64 OLED/3×4 keypad
01The idea

Digital cash that behaves like cash.

Cashu is an ecash protocol built on top of Bitcoin's Lightning Network. A mint issues tokens against Lightning payments, using blind signatures — so it signs them without ever seeing them. Whoever holds the tokens can spend them. There is no account and no balance sitting on a server; the tokens themselves are the money.

Nucula keeps those tokens on a small circuit board you can carry around. Paying someone works like handing over coins: the tokens move from one device to the other, and that's the whole transaction.

a

Pay a Lightning invoice

Any Lightning wallet can top up a Nucula. The mint takes the payment…

b

The mint issues tokens

…and hands back blind-signed ecash tokens. The mint can't tell who ends up holding them.

c

Tokens live on the device

Not in an account, not on a server. If you hold the device, you hold the money.

d

Tap to pass them on

Spending is handing tokens to someone else — over NFC, or back out through Lightning.

02In practice
NFC01

Receive with a tap

Nucula asks for a payment and emits the request over NFC — the PN7160 makes the board show up like a contactless card. The payer taps with any Cashu wallet on a phone, and the tokens land on the device.

OFFLINE02

Doesn't need to be online

Tokens received while offline are stashed on the device and redeemed automatically the next time WiFi comes back. No connection, no problem — the payment already happened.

LIGHTNING03

Lightning in and out

Top the wallet up by paying a Lightning invoice — the mint issues fresh tokens for it. Spend back out by melting tokens to settle any invoice. Nucula speaks BOLT11 both directions.

03Hardware

Four chips and a bus.

The reference board is a carrier for parts you can actually buy: a Seeed XIAO module, an NFC controller, a small OLED and a keypad. Everything hangs off a single I²C bus — and every peripheral is optional. The firmware probes the bus and runs with whatever it finds.

MCU
Seeed XIAO ESP32-C6
WiFi + BLE, RISC-V
NFC
NXP PN7160
card emulation · i2c 0x28
DISPLAY
SSD1309 OLED
128 × 64 px · i2c 0x3c
INPUT
3×4 keypad
via PCF8574 · i2c 0x20
BUS
One shared I²C bus
four wires, that's it
nucula board v0.1 · rev 01layers

Rendered from the project's actual KiCad files — toggle the layers.

04Protocol

Speaks standard Cashu.

Under the hood, Nucula implements the Cashu NUTs — the shared specifications that keep mints and wallets compatible. Any wallet that talks Cashu can pay a Nucula, and a Nucula can pay it right back.

Wallet secrets are derived from a BIP-39 seed, so the ecash is recoverable from a plain twelve-word backup.

  • NUT-00
    Notation & blind signatures
  • NUT-02
    Keysets & fees
  • NUT-03
    Swapping tokens
  • NUT-04
    Minting
  • NUT-05
    Melting
  • NUT-10
    Spending conditions
  • NUT-11
    Pay-to-pubkey
  • NUT-12
    DLEQ proofs
  • NUT-13
    Deterministic secrets
  • NUT-18
    Payment requests
  • NUT-23
    BOLT11 payments
  • ···
    more to come
05Build one

There's nothing to buy.

Nucula isn't a product — it's a repository. With a XIAO ESP32-C6, the ESP-IDF toolchain and a few parts from the drawer, you can put a wallet together at your desk. The board files are plain KiCad, ready for any fab.

  • ToolchainESP-IDF v5.x — the standard Espressif SDK.
  • WiFiCredentials live in main/wifi_config.h.
  • UpdatesRe-flashing preserves wallet storage — your tokens survive firmware updates. Only the first flash starts fresh.
quickstart
$ git clone https://github.com/zeugmaster/nucula.git
$ cd nucula
# set your WiFi credentials
$ $EDITOR main/wifi_config.h
$ idf.py build flash monitor
flashing takes a minute — the wallet boots straight to its balance