A WebTransport proxy for sending Solana transactions directly to validator TPUs from browsers.
Bifrost lets browsers send txs directly to Solana validators without RPCs.
# Make a folder for certs
mkdir certs
# Generate a self-signed certificate (valid for 10 days)
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 \
-days 10 -nodes -keyout certs/key.pem -out certs/cert.pem \
-subj "/CN=localhost" \
-addext "subjectAltName=DNS:localhost,IP:127.0.0.1"
Yeah, it's a long command. Just copy-paste it and you're good.
Fire up a test validator in a separate terminal:
solana-test-validator
Let it run. You'll see some logs scroll by - that's normal.
In another terminal:
cargo run
or the way I prefer to run it
RUST_LOG=info cargo run
You should see:
[INFO] Starting Bifrost on [::]:4433
[INFO] Loaded 1 certificate(s) and private key
Cool, Bifrost is listening.
You've got two options:
Option A: Run the Rust example
cargo run --example client
Option B: Test from your browser
Just open test.html
in your browser (Chrome/Edge work best).
Click "Test Connection" then "Send Transaction". You'll see the whole flow happen right in the browser console.
If everything works, you'll see:
Connecting to Bifrost at https://127.0.0.1:4433
Connected to Bifrost successfully
Generated keypair: ...
Requesting airdrop of 2 SOL
Airdrop confirmed!
...
Transaction sent successfully
Boom. Your transaction just went directly to the validator's TPU.
- The client connected to Bifrost over WebTransport (like WebSockets but faster)
- Bifrost received your transaction
- Bifrost forwarded it to the validator's TPU via QUIC
- The validator processed it
No RPC in the middle. Just you → Bifrost → validator.
WebTransport works in:
- Chrome/Edge 97+
- Firefox (behind a flag)
- Safari (not yet)
For Safari users, you'll need to use the Rust client for now, sorry.
"Airdrop timeout"
- Make sure
solana-test-validator
is actually running - Try restarting it with
solana-test-validator --reset
"Failed to establish QUIC connection"
- Check that the validator is running (you should see logs)
- The validator's TPU port is usually 8009 for local testing
"Certificate error"
- Regenerate your certs with the command above
- Make sure they're in the
certs/
directory
For mainnet, you'll need:
- Real TLS certificates (not self-signed)
- Leader schedule tracking (to send to the right validator)
- Proper error handling and retries
But for now, this gets you up and running locally.
Questions? Issues? PRs welcome. Keep it chill. ✌️