Kora Quick Reference
🚧 Development Documentation - Use with CautionThis reference covers experimental Kora integration features. Do not use in production applications without thorough testing.
Kora is a Solana relayer that enables gasless transactions where users pay fees in SPL tokens instead of SOL.
Key Impact: Users never need SOL - they can transact entirely using USDC, BONK, or any supported token.
How It Works
- User creates transaction with your app instruction
- Kora adds fee payment instruction in the selected SPL token
- User signs the complete transaction
- Kora signs as fee payer and submits to Solana
- Result: SPL tokens go to Kora operator, SOL fees paid by Kora
Installation
npm install @kora/sdk
Basic Methods
Setup Client
import { KoraClient } from '@kora/sdk';
const kora = new KoraClient({
rpcUrl: process.env.REACT_APP_KORA_RPC_URL,
});
Get Payer Address
const { signer_address } = await kora.getPayerSigner();
Sign Transaction
const signedTx = await kora.signTransaction({
transaction: transaction.serialize(),
});
Sign and Send
const signature = await kora.signAndSendTransaction({
transaction: transaction.serialize(),
});
Basic Hook
export function useKora() {
const [kora] = useState(() => new KoraClient({
rpcUrl: process.env.REACT_APP_KORA_RPC_URL!
}));
return {
getPayerAddress: () => kora.getPayerSigner(),
signTransaction: (tx) => kora.signTransaction({ transaction: tx.serialize() }),
signAndSend: (tx) => kora.signAndSendTransaction({ transaction: tx.serialize() }),
};
}
Environment Setup
REACT_APP_KORA_RPC_URL=your-kora-server-url
REACT_APP_KORA_API_KEY=your-api-key
Official Resources
- Kora Repository - Official Kora implementation
- Kora Documentation - Complete setup and configuration guides
- Kora CLI - Rust crate for running Kora nodes
Complete Integration
For full LazorKit + Kora integration, see the complete guides in this documentation.