Build profiles and porting
Compile only what the device needs. A buyer does not carry the seller's code, and the seller profile fits an ESP32-C3.
Add it to an ESP-IDF project#
BoAT MER is an ESP-IDF component. Reference it by git tag — it is not on the component registry.
cd your-esp-idf-project
mkdir -p components
git clone https://github.com/TLAY-IO/boat-mer.git components/boat-merChoose a profile#
idf.py -DBOAT_PROFILE=full build # everything
idf.py -DBOAT_PROFILE=buyer build # buy only
idf.py -DBOAT_PROFILE=seller build # sell only, fits ESP32-C3| Module | full | buyer | seller |
|---|---|---|---|
| Crypto (secp256k1 + Keccak) | ✓ | ✓ | ✓ |
| Ed25519 | ✓ | ✓ | — |
| Nanopayment | ✓ | ✓ | ✓ |
| Attestation | ✓ | ✓ | — |
| x402 pay | ✓ | ✓ | — |
| x402 offer | ✓ | — | ✓ |
| Lightning | ✓ | ✓ | — |
| HashKey Multi-Pay (host builds only) | ✓ | ✓ | — |
Use idf.py -B build-variant … for each profile or target. A stale CMake cache will silently produce a binary configured for a different target than you asked for.
What has run where#
| Target | Platform layer | Status |
|---|---|---|
| ESP32-C3 | pal/esp-idf/ | verified on hardware — buyer and seller profiles |
| ESP32-S3 | pal/esp-idf/ | verified on hardware |
| Linux / macOS | pal/linux/ | verified — host builds and the full test suite |
| Other MCU families | implement boat_pal.h | portable, not verified by us |
It is developed and built against ESP-IDF 5.5.x; older lines are untested rather than known-broken. Host builds link OpenSSL and curl; the ESP-IDF build links neither.
Port to another microcontroller#
Implement boat_pal.h. The core set is small:
- storage read and write — where the keys persist
- random — for key generation and nonces
- time
- SHA-256
- HTTP POST
- logging
The extra entry points (boat_pal_http_post_ext, boat_pal_http_get, boat_pal_http_post_hashkey) are only needed by the modules that use them, so a minimal port does not implement everything. Use pal/esp-idf/ and pal/linux/ as references.
Secure elements and hardware-backed storage strengthen the guarantee that the key cannot be taken. Wire them in through the storage and crypto entry points of your port.