diff options
| author | Your Name <you@example.com> | 2026-05-17 04:21:39 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-17 04:21:39 +0530 |
| commit | 78dd599277b8e8b2ddc39a4ae710ec91d737272e (patch) | |
| tree | 9fbd89695cede00b8ff3b12ce428e96a2aa70e9b /tests/unit/stubs/nucula_wallet.h | |
| parent | b0d7394e089f00a9ffa67a2b33a502e47b778a93 (diff) | |
Phase 4: TollGate client detection + auto-payment
- New tollgate_client.c/h: detect upstream TollGate (kind=10021),
auto-pay via nucula wallet, session monitoring with 20% renewal
- State machine: IDLE→DETECTING→NEEDS_PAY→PAYING→PAID→RENEWING
- Blocking: upstream payment before local services start
- Synchronous wallet init (was async task)
- Client config: enabled, steps_to_buy, renewal_threshold_pct
- Updated PLAN.md with Phases 4-7 (client, payout, bytes, CVM)
- Updated CHECKLIST.md with all new phase items
- 30 new unit tests (all passing), 116 total
Diffstat (limited to 'tests/unit/stubs/nucula_wallet.h')
| -rw-r--r-- | tests/unit/stubs/nucula_wallet.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/stubs/nucula_wallet.h b/tests/unit/stubs/nucula_wallet.h new file mode 100644 index 0000000..260ec35 --- /dev/null +++ b/tests/unit/stubs/nucula_wallet.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #ifndef STUBS_NUCULA_WALLET_H | ||
| 2 | #define STUBS_NUCULA_WALLET_H | ||
| 3 | |||
| 4 | #include "esp_err.h" | ||
| 5 | #include <stdint.h> | ||
| 6 | #include <stddef.h> | ||
| 7 | |||
| 8 | esp_err_t nucula_wallet_init(const char *mint_url); | ||
| 9 | esp_err_t nucula_wallet_receive(const char *token_str); | ||
| 10 | esp_err_t nucula_wallet_send(uint64_t amount_sat, char *token_out, size_t token_out_size); | ||
| 11 | uint64_t nucula_wallet_balance(void); | ||
| 12 | int nucula_wallet_proof_count(void); | ||
| 13 | char *nucula_wallet_proofs_json(void); | ||
| 14 | esp_err_t nucula_wallet_swap_all(void); | ||
| 15 | void nucula_wallet_print_status(void); | ||
| 16 | |||
| 17 | #endif | ||