Quickstart
Run the SODA v0 demo end-to-end: a Solana program signs a real Sepolia transaction. The whole flow takes about 10 seconds once funds are in place.
Just want to use the SDK in your own project? You don’t need to clone
this repo. Run pnpm add @soda-sdk/core and follow the
Sign an Ethereum tx guide. This page is for the
full local demo (validator + Anchor build + signer daemon).
v0 ships with a single dev signing key (no real t-of-n committee yet). That key persists across runs, so the derived ETH address is stable: fund it once on Sepolia, demo many times.
Sepolia / devnet only. Don’t send real ETH (mainnet) or other valuable assets to a SODA-derived address while v0 is the deployed committee. A single-key signer means anyone with the keystore can move every derived balance — fine for a hackathon demo, not for production. See Concepts → Signing committee for the v1 design.
Prerequisites
- WSL (Ubuntu) or Linux.
- Rust 1.95+, Solana CLI 3.1+, Anchor 0.32.1, Node 24+, pnpm 10+.
- A Solana keypair at
~/.config/solana/id.json. - A
.envfile at the repo root withSEPOLIA_RPC_URL=...(Alchemy / Infura).
Setup
Clone and install
git clone https://github.com/JingYuan0926/frontier
cd frontier
pnpm installSet up .env
cat > .env <<EOF
SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY
SOLANA_DEVNET_RPC_URL=https://devnet.helius-rpc.com/?api-key=YOUR_KEY
EOFFund the derived address
The first time you run the demo, it prints the derived Sepolia address (stable
across runs as long as keyshare.dev.json exists). Send around 0.001 ETH of
Sepolia testnet ETH to that address from a faucet.
Run the demo
The CLI is the canonical demo path.
./demo.shDefaults to Solana devnet and a self-transfer of 0.0001 ETH on Sepolia. After a
successful broadcast, demo.sh automatically runs pnpm verify <hash>, which
prints the cryptographic audit trail (six checks tying the Solana SigRequest
PDA to the broadcast Sepolia transaction).
DEMO_RECIPIENT=0xSomeAddress ./demo.sh # send to a specific recipient
SODA_DRY_RUN=1 ./demo.sh # skip Sepolia, verify on-chain only
SOLANA_CLUSTER=local ./demo.sh # against a local validatorWhat you should see
- The CLI prints the derived ETH address and waits for funding (skipped if already funded).
- A
SigRequestedevent fires on Solana devnet. Visible on Solscan. - The signer signs the payload off-chain with
k256. - A
finalize_signatureinstruction runssecp256k1_recoveron-chain and stores the signature. - The signed RLP is broadcast to Sepolia. Etherscan link is printed.
pnpm verify <hash>runs automatically and prints the six audit checks.
Verifying any past run
pnpm verify 0x<sepolia_tx_hash>Reads only public state. Re-derives the ETH address from the on-chain
SigRequest PDA and confirms the broadcast from address matches.
Troubleshooting
| Symptom | Fix |
|---|---|
insufficient funds | Fund the derived address from a Sepolia faucet. |
AlreadyCompleted (custom error 0x1770) | Idempotent: another process (relayer / daemon) already signed. Safe to ignore. |
| Anchor build fails on BPF stack | You enabled on-chain ProjectivePoint ops. v0 keeps derivation off-chain. |
| Web UI shows blank balance | Set SEPOLIA_RPC_URL in apps/web/.env.local (mirrors repo-root .env). |