Quickstart

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 .env file at the repo root with SEPOLIA_RPC_URL=... (Alchemy / Infura).

Setup

Clone and install

git clone https://github.com/JingYuan0926/frontier
cd frontier
pnpm install

Set 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
EOF

Fund 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.sh

Defaults 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 validator

What you should see

  1. The CLI prints the derived ETH address and waits for funding (skipped if already funded).
  2. A SigRequested event fires on Solana devnet. Visible on Solscan.
  3. The signer signs the payload off-chain with k256.
  4. A finalize_signature instruction runs secp256k1_recover on-chain and stores the signature.
  5. The signed RLP is broadcast to Sepolia. Etherscan link is printed.
  6. 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

SymptomFix
insufficient fundsFund 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 stackYou enabled on-chain ProjectivePoint ops. v0 keeps derivation off-chain.
Web UI shows blank balanceSet SEPOLIA_RPC_URL in apps/web/.env.local (mirrors repo-root .env).