Solard

Quick start

Install Solard, set RPC, then use the SDK or CLI.

Install

shell
bun add @solard/sdk
bun add -g solard-cli

RPC

dotenv
RPC_ENDPOINT=https://your-rpc.example
SOLANA_WS_URL=wss://your-ws.example

RPC_ENDPOINT handles reads and transactions. SOLANA_WS_URL is optional and used by long-lived subscriptions.

SDK

ts
import { createSolard } from "@solard/sdk";

const slrd = createSolard({
  rpcUrl: process.env.RPC_ENDPOINT,
  dbPath: ".solard/app.sqlite",
});

try {
  const wallet = slrd.createWallet("main");
  const token = await slrd.addToken("TOKEN_MINT", "token");
  const price = await slrd.samplePrice(token.mint);
  console.log(wallet, price);
} finally {
  slrd.close();
}

Use Client for durable operations and Subscriptions for live launches, migrations, and trades.

CLI

shell
slrd setup --status
slrd wallet create main
slrd balances --wallet main
slrd --help

Signing

Interactive CLI commands can prompt for the wallet password. Automation can set SLRD_MASTER_KEY. Public APIs sign through wallet operations; they do not expose raw private keys.

Live writes

Execution rules differ by command. buy, sell, and transfer execute unless simulation is requested. Guarded command families such as Meteora and Raydium require --live, and their live paths also require SOLARD_ENABLE_LIVE_TRADES=1.

See Execution & safety.