Install
Installhelius-wallet-kit from npm (Node.js 18+):
react >= 18react-dom >= 18@solana/web3.js ^1.98
next >= 14 is needed for the recommended route-handler setup below.
Setup
The recommended setup keeps your Helius API key server-side — no Helius key ships to the browser. Just testing locally? Jump to the prototyping shortcut.1
Wrap your app in the provider
Add
HeliusWalletProvider near the root of your app in a client component. Omit the API key — the route handler (next step) supplies it server-side. The SDK resolves your project id and key-less Secure RPC URLs automatically.app/providers.tsx
2
Mount the route handler
Add the catch-all route handler at Set
/api/helius/[...path]. It holds HELIUS_API_KEY server-side and proxies the wallet bootstrap, RPC, sends, and registration — so no Helius key ever reaches the browser. This is also what gives you Sender-optimized landing and transaction history.app/api/helius/[...path]/route.ts
HELIUS_API_KEY as a server env var (not NEXT_PUBLIC_); the handler injects it on the forwarded requests.3
Import the styles
Import the SDK stylesheet once, in your root layout:
app/layout.tsx
Prototyping shortcut
Just trying it out locally? Skip the route handler and pass your API key straight to the provider:app/providers.tsx
Next steps
Configuration
Config options and dashboard sign-in methods.
Using the wallet
Read auth state, sign, send, and read history.