React SDK
LazorkitProvider
API reference for the LazorkitProvider component.
LazorkitProvider
The LazorkitProvider handles all the initialization logic for the SDK. It wraps your app to provide the wallet context everywhere.
Import
import { LazorkitProvider } from '@lazorkit/wallet';Usage
function App() {
return (
<LazorkitProvider
rpcUrl="https://api.devnet.solana.com"
portalUrl="https://portal.lazor.sh"
paymasterConfig={{
paymasterUrl: "https://kora.devnet.lazorkit.com"
}}
>
<YourApplication />
</LazorkitProvider>
);
}Props
rpcUrl (required)
- Type:
string - Description: The full URL to your Solana RPC node (e.g., Helius, QuickNode, or standard Devnet).
portalUrl (optional)
- Type:
string - Default:
'https://portal.lazor.sh' - Description: The URL for the LazorKit authentication portal. You generally don't need to change this unless you're self-hosting the portal.
paymasterConfig (optional)
- Type:
{ paymasterUrl: string, apiKey?: string } - Description: Settings for the Paymaster service, which handles gas sponsorship.
paymasterUrl: The API endpoint for the paymaster.apiKey: Your API key if the service requires one.
children
- Type:
ReactNode - Description: Your application components