Bifrost
WebTransport proxy for sending Solana transactions directly to validator TPUs from browsers
Install / Use
/learn @Ozodimgba/BifrostREADME
Bifrost
A WebTransport proxy for sending Solana transactions directly to validator TPUs from browsers.
What's This?
Bifrost lets browsers send txs directly to Solana validators without RPCs.
Quick Start
1. Generate Certificates
# 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.
2. Start a Local Validator
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.
3. Run Bifrost
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.
4. Test It
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.
What Just Happened?
- 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.
Browser Support
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.
Troubleshooting
"Airdrop timeout"
- Make sure
solana-test-validatoris 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
Using in Production
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.
License
Questions? Issues? PRs welcome. Keep it chill. ✌️
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
