Skip to content

stk2chain/stk2eth

 
 

Repository files navigation


CI/CD Pipeline Deploy to DigitalOcean codecov License: MIT Rust Version

Mobile-ETH

Problem:

tl;dr: Feature phones (no internet) need secure Ethereum access.

Users in areas with limited internet infrastracture (No internet) need secure access to decentralized finance and Web3 services.

Solution:

An Account Abstraction eSIM ToolKit (eSTK) and USSD Wallet that enables offline User Transaction relays over USSD. (No internet required).

Account Abstraction eSIM Wallet -: USSD → Ethereum → SMS (No internet required)


Demo: Mobile ETH USSD Simulator (Try without setup.)


Setup

  1. Install SpacetimeDB CLI

    curl -sSf https://install.spacetimedb.com | sh
  2. Start SpacetimeDB

    spacetime start

Deployment

  1. Clone the repository

    git clone https://github.com/stk2chain/stk2eth.git  
    cd stk2eth
  2. Build and deploy middleware module on SpacetimeDB

    spacetime publish -c --server local --project-path middleware gateway2

    (You may replace gateway2 with any valid URL-safe name.)

  3. Start USSD client

    cd ../ussdclient
    python ussdclient.py
  4. Start ETH client

    cd ../ethclient
    python ethclient.py
  5. Start SMS client

    cd ../client
    python smsclient.py
  6. Deploy smart contracts (local)

    cd ../pyethclient/contracts
    anvil &  # Start local Ethereum node
    ape run deploy

Ngrok Callback URL (For Sandbox Testing)

  1. Start ngrok to expose ussdclient's HTTP Port
    ngrok http 5000
  2. Copy the ngrok URL and configure it in your USSD provider (e.g., Africa's Talking):
    Service Code: *384*6086#	
    Callback URL: https://abc123xyz.ngrok-free.app/ussdeth
    
  3. Launch the Simulator and test the flow

Components

Component Purpose Technology Status
middleware Manages USSD sessions, stores state, and processes transactions Rust/WASM/SpacetimeDB ✅ Active
ussdclient Connects USSD gateways to SpacetimeDB and relays response via HTTP/Websocket Rust/Axum ✅ Active
ethclient Sends and manages On Chain transactions Rust ✅ Active
smsclient Sends transaction notifications via SMS Rust/WASM 🚧 In Development
contracts Smart contracts for eSIM registry and account abstraction Solidity/Ape ✅ Active
eSTK eSIM JavaCard Applet Wallet over USSD JavaCard 🚧 In Development

About

A GSM-Based Protocol for Expanding Blockchain Accessibility.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 44.5%
  • Python 38.9%
  • Shell 7.6%
  • Solidity 4.3%
  • Makefile 3.2%
  • Dockerfile 1.5%