Tutorials

Getting Started

This guide walks you through setting up the SDK, connecting a wallet, reserving slots, and rendering data in the dashboard.

1. Install & Initialize

install.sh
npm install @raiku/sdk @solana/web3.js zustand
raiku.ts
import { initRaiku } from '@raiku/sdk'

export const raiku = initRaiku({
  apiKey: process.env.NEXT_PUBLIC_RAIKU_KEY!,
  rpcUrls: [process.env.NEXT_PUBLIC_SOLANA_RPC!],
})

2. Reserve an AOT Slot

reserve-slot.ts
const reservation = await raiku.reserveAOT({
  slotNumber: latestSlot + 50,
  bid: 0.0042,
  transaction,
})

Store the reservationId. You will use it to monitor execution or to cancel if needed.

3. Enable MEV Shield

shield.ts
await raiku.mev.createCommitment({
  reservationId: reservation.reservationId,
  mevPolicy: 'shielded',
  bundleHash,
})

MEV shield commitments guarantee that builders cannot reorder or leak your transactions before the slot executes.