API Reference
Quick reference for Kaizen Core APIs.
Overview
| Interface | Protocol | Port | Description |
|---|---|---|---|
| JSON-RPC | HTTP | 8546 (proxy) | Query and submit transactions |
| WebSocket | WS | 8546/ws | Real-time subscriptions |
| gRPC | HTTP/2 | 9000 | Node synchronization |
Quick Links
- JSON-RPC Methods - Query methods, write methods, WebSocket subscriptions
- Transaction Types - All transaction payloads and their fields
- Error Codes - Error types and how to handle them
Common Operations
Query Account
curl -X POST http://localhost:8546 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"kaizen_getAccount","params":["0x..."],"id":1}'Subscribe to Theses
const ws = new WebSocket("ws://localhost:8546/ws");
ws.send(
JSON.stringify({
type: "subscribe",
channel: "userTheses",
params: { address: "0x..." },
})
);Send Transaction (SDK)
import { createClient, transfer, parseUSDC } from "@kaizen-core/sdk";
const client = createClient({ rpcUrl: "http://localhost:8546" });
client.connectSigner(privateKey);
await client.sendTransaction(transfer("0x...", parseUSDC("100.00")));Token Addresses
| Token | Address |
|---|---|
| BTC | 0x0000000000000000000000000000000000000001 |
| ETH | 0x0000000000000000000000000000000000000002 |
| SOL | 0x0000000000000000000000000000000000000003 |
| USDT | 0x0000000000000000000000000000000000000100 |
