How stk2chain/stk2eth works
Project type and purpose
• This is a multi‐component, blockchain‐and‐telecom system (“STK2ETH”) that lets a Java Card SIM Toolkit Applet relay Ethereum transactions over USSD (no internet).
• Key subsystems:
• Java Card Applet (eSTK) running on the SIM
• USSD-to-Ethereum Gateway (“ussdgeth”) written in Rust
• Ethereum Account Abstraction smart contracts (Solidity, foundry)
• CLI and test tools (ethclient, ussdclient, Python tests)
File structure
• Top‐level modules:
• contracts/ – Solidity smart contracts, scripts, tests, Foundry config
• ethclient/ – Rust Ethereum JSON-RPC client CLI
• ussdclient/ – Rust USSD client CLI (for testing)
• ussdgeth/ – Rust USSD-ETH gateway service
• tests/ – end‐to‐end Python test of STK flow
• doc/ – formal SPECs for applet, gateway, contracts
• ussdgeth/src: layered architecture
• controller/ – HTTP or USSD inbound routing
• ussdframework/ – session, request/response parsing, service logic
• data/menu.json – menu definitions
README for additional insights
• System Schematic image links outline three zones: eSIM Applet, USSD Gateway (4337#), on-chain AA contracts.
• Specs describe protocol messages, encoding, and flows.