Nostrduino
|
A nostr-tools inspired library for Arduino (and others).
This was created using arduino-nostr as starting point, most of the code was rewritten and the library was expanded to include more features.
This library is compatible with esp32 based boards out of the box. But it can be ported to other boards by reimplementing the platform specific code in the src/esp32
.
This library is built with a DIY philosophy in mind, similar to nostr-tools, this library provides helpers to create, sign and verify messages and to use some of the NIPs features (see the src/Nip*
files).
In addition to that, the library provides some "managed" services (in src/services
folder) that you can use in your sketches without worrying about the details and complexity of the nostr protocol.
Check the platformio registry page for instructions.
This library depends on the following additional libraries for the esp32 platform:
See the example scripts in examples/
for simple examples of how to use this library.
Edit examples/ESP32TestNip01/ESP32TestNip01.cpp
and set the WIFI_SSID
, WIFI_PASS
and WIFI_CHANNEL
.
Then compile with:
Compile with:
Edit examples/ESP32TestNWC/ESP32TestNWC.cpp
and set the WIFI_SSID
, WIFI_PASS
, WIFI_CHANNEL
and NWC_URL
. NB: you can get a nwc url from https://nwc.getalby.com/ or https://app.mutinywallet.com/settings/connections.
Then compile with:
You can upload the compiled tests to your ESP32 with:
or use an emulator like wokwi.