diff options
| author | Your Name <you@example.com> | 2026-05-16 23:55:05 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-16 23:55:05 +0530 |
| commit | 4c47ae188b288e7d24bd9566ab3e6a6805d9484f (patch) | |
| tree | 33b74b2090b4f3b7597841734a56a4006a86d73f /components/nucula_lib/nucula_wallet.h | |
| parent | 133e40c82afb4d7659758b1fa57925ac57af4621 (diff) | |
Phase 3: Nostr identity derivation + wifistr service discovery
- Add identity.c/h: HMAC-SHA512 derivation from nsec → npub, STA/AP MAC, SSID, AP IP
- Add nostr_event.c/h: NIP-01 event serialization + Schnorr signing (BIP-340)
- Add geohash.c/h: lat/lon to geohash encoding
- Add wifistr.c/h: kind 38787 event builder + WebSocket publish to Nostr relays
- Update config.c/h: nsec-based identity, Nostr relay/geo config, remove static SSID/IP
- Replace custom mbedTLS wallet with nucula library (libsecp256k1)
- Remove wallet.c/h, wallet_persist.c/h (replaced by nucula_lib component)
- Verified on Board A: derived SSID, captive portal, payment, wallet, wifistr publish
Diffstat (limited to 'components/nucula_lib/nucula_wallet.h')
| -rw-r--r-- | components/nucula_lib/nucula_wallet.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/components/nucula_lib/nucula_wallet.h b/components/nucula_lib/nucula_wallet.h new file mode 100644 index 0000000..64b7c24 --- /dev/null +++ b/components/nucula_lib/nucula_wallet.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #ifndef NUCULA_WALLET_H | ||
| 2 | #define NUCULA_WALLET_H | ||
| 3 | |||
| 4 | #include "esp_err.h" | ||
| 5 | #include <stdint.h> | ||
| 6 | |||
| 7 | #ifdef __cplusplus | ||
| 8 | extern "C" { | ||
| 9 | #endif | ||
| 10 | |||
| 11 | esp_err_t nucula_wallet_init(const char *mint_url); | ||
| 12 | |||
| 13 | esp_err_t nucula_wallet_receive(const char *token_str); | ||
| 14 | |||
| 15 | esp_err_t nucula_wallet_send(uint64_t amount_sat, char *token_out, size_t token_out_size); | ||
| 16 | |||
| 17 | uint64_t nucula_wallet_balance(void); | ||
| 18 | |||
| 19 | int nucula_wallet_proof_count(void); | ||
| 20 | |||
| 21 | char *nucula_wallet_proofs_json(void); | ||
| 22 | |||
| 23 | esp_err_t nucula_wallet_swap_all(void); | ||
| 24 | |||
| 25 | void nucula_wallet_print_status(void); | ||
| 26 | |||
| 27 | #ifdef __cplusplus | ||
| 28 | } | ||
| 29 | #endif | ||
| 30 | |||
| 31 | #endif | ||