Speedstake
Embed Speedstake on your website in minutes
Integrating Speedstake
For the first time ever, stakers can sell their future rewards for SOL via Speedstake by Pye. It lets active stakers delegated to your validator lockup stake for different time durations and sell their future rewards directly from your dedicated site offering a new revenue stream and predictable stake. This guide covers the different integration paths available.
Prerequisites
You'll need four values before you start:
Vote Account
Your validator's vote account address
RPC endpoint
Supabase URL
Supabase Anon Key
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InRmcmlja21ucmZ5amt2amhtdWlrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDM0NDkyMDksImV4cCI6MjA1OTAyNTIwOX0.1wl2FWa5g0tkUn6yRcg1AyF6ixWN7SyoD89cFGxkQKM
Finding your vote account address
Your vote account is the on-chain address that receives staking rewards. It's not your identity account or withdraw authority. Using the wrong one will cause Speedstake to show no stake positions.
Where you can find it:
stakewhiz — search your validator name; the vote account appears on your profile page.
Solana Explorer — search by validator name or identity key.
Solana CLI —
solana validators | grep <your-name>
Configuration
You can configure what mode Speedstake runs in as well as its style theme.
Single-validator mode filters stake positions to only those delegated to your vote account. Universal mode shows positions across all supported validators, enable it by omitting the vote account prop.
Single-validator
Only stake accounts delegated to your validator
Pass voteAccount
Universal
All Pye-compatible stake accounts for the connected wallet
Omit voteAccount
The style defaults to pye-dark. Pass one of the following theme props (React and Next.js) or set the data-theme attribute (CDN).
pye-light
Light background, purple accent
pye-dark
Dark background, purple accent
graphite
Dark background, neutral grey accent
Installation
1. Install packages
bash
Or with pnpm:
bash
Note —
buffer,stream-browserify, andassertare runtime polyfills required by Solana packages in a browser Vite build.
2. Configure Vite
Update vite.config.ts to polyfill the Node.js globals that Solana packages depend on:
typescript
3. Configure TypeScript
If you don't already have a tsconfig.json, create one. Make sure it includes "vite/client" in types — this gives TypeScript the import.meta.env definitions that Vite injects at build time:
If you already have a tsconfig.json, add "types": ["vite/client"] to compilerOptions.
4. Add the Buffer polyfill
Warning — These two lines must be the very first lines of your app entry file (e.g.
src/main.tsx), before any other imports. If they run after Solana packages load, the polyfill won't take effect.
5. Set environment variables
Create .env.local:
bash
6. Render the Speedstake widget
1. Install packages
2. Configure Next.js
Update next.config.ts:
transpilePackages is required because @pyefi/widget ships as an ES module. turbopack: {} is required for Next.js 16+, which uses Turbopack by default — it automatically handles Node.js built-in exclusions for browser bundles so no additional webpack fallback config is needed.
Next.js 15 or earlier: Replace
turbopack: {}with a webpack config instead:
3. Set environment variables
Create .env.local:
4. Render the widget
The component must be in a Client Component (add "use client" at the top):
Universal mode — Omit the
voteAccountprop and theNEXT_PUBLIC_VOTE_ACCOUNTenv variable.
HTML / CDN
No build step required. Add a single <script> tag to any HTML page.
Single-validator
html
Universal
Omit data-vote-account:
html
How it mounts
The script looks for a <div id="pye-widget"> element and mounts into it. If none exists, it creates one and appends it to <body>. All configuration is read from the data-* attributes on the <script> tag itself.
React / Next.js props
rpcUrl
string
yes
—
Solana mainnet RPC endpoint
supabaseUrl
string
yes
—
Supabase project URL
supabaseAnonKey
string
yes
—
Supabase anonymous key
voteAccount
string
no
—
Vote account for single-validator mode
theme
"pye-light" | "pye-dark" | "graphite"
no
"pye-light"
Visual theme
onClose
() => void
no
—
Called when the user closes the widget
CDN data attributes
data-pye-widget
yes
—
Identifies the script tag (no value needed)
data-supabase-url
yes
—
Supabase project URL
data-supabase-anon-key
yes
—
Supabase anonymous key
data-rpc-url
no
https://api.mainnet-beta.solana.com
Solana RPC endpoint
data-vote-account
no
—
Vote account for single-validator mode
data-theme
no
pye-light
Visual theme (pye-light, pye-dark, graphite)
RPC endpoint
Recommended providers:
Last updated