Installation
Install the Kora CLI, TypeScript SDK, and set up your development environment
Installation
Get started with Kora by installing the CLI tool for operating a Kora node or the TypeScript SDK for client applications interacting with a Kora node.
System Requirements
For CLI (Server)
- Rust: Version 1.86 or higher
For TypeScript SDK (Client)
- Node.js: Version LTS or higher
- TypeScript: latest version
Optional Dependencies
- Solana CLI: Helpful for key generation and testing
- Docker: For containerized deployments
Kora CLI
The Kora CLI is the primary way to run and manage Kora nodes. Choose your preferred installation method:
Option 1: Install from Cargo
Install directly from crates.io using Cargo:
cargo install kora-cliOption 2: Build from Source
Clone and build the latest version from source:
git clone https://github.com/solana-foundation/kora.git
cd kora
make installThis will build and install the kora binary to your local Cargo bin directory.
Verify Installation
Verify the Kora CLI is installed correctly:
kora --versionTypeScript SDK
Install the Kora TypeScript SDK for client applications:
pnpm add @solana/koraPeer Dependencies
Kora requires certain Solana dependencies:
pnpm add @solana/kit @solana-program/tokenVerify SDK Installation
Verify your SDK installation with a simple connection test:
import { KoraClient } from '@solana/kora';
async function testConnection() {
const client = new KoraClient('http://localhost:8080'); // Replace with your Kora server URL
try {
const config = await client.getConfig();
console.log('✅ Successfully connected to Kora server');
} catch (error) {
console.error('❌ Connection failed:', error.message);
}
}
testConnection();Troubleshooting
CLI Issues
"kora: command not found": Ensure ~/.cargo/bin is in your PATH:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcBuild fails: Update Rust to the latest stable version:
rustup update stableSDK Issues
Peer dependency warnings: Install the required Solana dependencies listed above.
TypeScript errors: Ensure your TypeScript version is 4.5+ and install type definitions:
pnpm add -D @types/nodeConnection refused: Ensure your Kora server is running and accessible at the specified endpoint.