c03rad0r/tollgate_core

1.2.0

Latest
uploaded 13 hours ago
TollGate core component for paid WiFi hotspots with Cashu e-cash payments. Provides session management, per-client DNS/firewall, Cashu token processing, mining payment tracking, beacon price advertising, market scanning, portal template rendering, Stratum protocol parsing, mint health tracking, and upstream TollGate client logic. Platform-agnostic via tollgate_platform_t callbacks for easy integration with any ESP32 firmware (TollGate, NerdQAxePlus, BitAxe, etc.).

changelog

# Changelog

## 1.2.0 (2026-05-23)

- Added `tollgate_core_portal` — HTML template rendering, usage calculation, captive URI detection
- Added `tollgate_core_stratum_client` — Stratum V1 JSON protocol parsing, message building (subscribe, authorize, submit, mining.notify, mining.set_difficulty)
- Added `tollgate_core_mint_health` — mint health state tracking with recovery threshold (3 consecutive successes), reachable/unreachable transitions
- Added `tollgate_core_client` — upstream TollGate discovery JSON parsing (kind 10021), session response parsing (kind 1022), usage string parsing, renewal threshold check, price-per-minute calculation
- Added MIT license for IDF Component Registry compatibility
- 13 compiled source files, 14 headers, full platform abstraction via `tollgate_platform_t`
- 25 host unit tests covering all modules

## 1.1.0 (2026-05-23)

- Added `tollgate_core_beacon` — WiFi vendor IE construction (hash_mint, hash_npub, build_ie)
- Added `tollgate_core_market` — market table logic (parse_ie, find_cheapest, update_ssid)
- Platform-agnostic `tollgate_beacon_config_t` input struct for IE construction
- `tollgate_vendor_ie_t` abstraction decouples market parsing from ESP WiFi types

## 1.0.0 (2026-05-22)

- Initial release
- Session management (time + bytes based)
- Cashu token decode and allotment calculation
- Per-client firewall with sandbox mode
- DNS server with per-client hijack/forward
- Mining payment tracking (nbits→difficulty, hashprice, share→allotment)
- Stratum proxy with job management
- Platform abstraction via `tollgate_platform_t` callbacks

Links

Target

License: MIT

To add this component to your project, run:

idf.py add-dependency "c03rad0r/tollgate_core^1.2.0"

download archive

Stats

  • Archive size
    Archive size ~ 32.00 KB
  • Downloaded in total
    Downloaded in total 0 times
  • Downloaded this version
    This version: 0 times

Badge

c03rad0r/tollgate_core version: 1.2.0
|