How siju-ani/pjt-1 works
This repository combines an ESP32 offline custody ledger and receiver handoff with a Node.js telemetry gateway that authenticates signed serial packets and anchors verified events on Ethereum. A Python client exercises the device’s challenge-and-handoff API. The README is only a title; the map follows the sampled source, and unsampled contract and UI details are limited to their supported roles.
Main entry points: ESP32.c ESP32 Ledger · blockchainService.js Custody Service · Server.py Handoff Simulation · gateway.js Serial Gateway
Components 13
Device Ledger
- ESP32 Ledger
ESP32.c - Hardware Signing
ESP32.c - Flash Ledger
ESP32.c
Telemetry Gateway
- Serial Gateway
gateway.js - Signature Verification
gateway.js - Dashboard UI
public/index.html - Legacy Server
server.js
Blockchain Anchoring
- Custody Service
blockchain/blockchainService.js - Custody Contract
blockChainNetwork/contracts/CustodyLedger.sol - Contract ABI
blockchain/CustodyLedgerABI.json
Handoff Client
- Handoff Simulation
Server.py
Other components
- Receiver
- Ethereum RPC
Connections 13
- Receiver → Handoff Simulation: initiates handoff
Server.py - Handoff Simulation → ESP32 Ledger: requests challenge
Server.py - Handoff Simulation → ESP32 Ledger: posts handoff
Server.py - ESP32 Ledger → Hardware Signing: verifies and signs
ESP32.c - ESP32 Ledger → Flash Ledger: persists entries
ESP32.c - ESP32 Ledger → Handoff Simulation: returns receipt
ESP32.c - Serial Gateway → Signature Verification: verifies packets
gateway.js - Serial Gateway → Dashboard UI: emits socket events
gateway.js - Serial Gateway → Custody Service: records verified events
gateway.js - Custody Service → Contract ABI: loads ABI
blockchain/blockchainService.js - Custody Service → Custody Contract: calls custody method
blockchain/blockchainService.js - Custody Service → Ethereum RPC: submits transaction
blockchain/blockchainService.js - Legacy Server → Custody Service: imports service
server.js