Skip to main content

SolanaLaser API

SolanaLaser exposes server-side Solana execution endpoints for managed-wallet workflows. You do not sign transactions locally and do not need your own RPC: you call an endpoint with your API key, SolanaLaser signs with your managed wallet, simulates, submits, and returns the transaction signature.

Every endpoint uses the same base URL and a SolanaLaser API key.

const API_URL = "https://your-solanalaser-host"; // your deployment URL
const API_KEY = "pb_your_key";

async function solanaLaser(path: string, body?: unknown, method?: string) {
const response = await fetch(`${API_URL}${path}`, {
method: method ?? (body === undefined ? "GET" : "POST"),
headers: {
"content-type": "application/json",
"x-api-key": API_KEY,
},
body: body === undefined ? undefined : JSON.stringify(body),
});

const data = await response.json().catch(() => null);
if (!response.ok) {
throw new Error(data?.detail ?? `HTTP ${response.status}`);
}
return data;
}

All examples in these docs use this helper.

Endpoints

EndpointPurpose
POST /v1/laser/setupOne-call onboarding: account + API key + default managed wallet.
POST /v1/walletsCreate a server-managed encrypted wallet.
POST /v1/wallets/importImport a private key into managed wallet storage.
GET /v1/walletsList managed wallet public metadata.
PUT /v1/wallets/{public_key}/defaultSet account default managed wallet.
DELETE /v1/wallets/{public_key}Delink a wallet and remove its stored secret and local history.
POST /v1/trades/executeExecute a Pump/PumpSwap buy or sell with auto venue routing.
POST /v1/laser/createLaunch a new Pump token from a managed wallet.
POST /v1/laser/bundleBuild, server-sign, and submit an atomic Jito bundle.
POST /v1/sol/split/executeSplit SOL from one managed wallet to up to five destinations.
POST /v1/sol/consolidate/executeConsolidate SOL from many managed wallets into one destination.
POST /v1/cashback/checkCheck Pump cashback claimable for wallets.
POST /v1/cashback/claim/executeClaim Pump/PumpSwap cashback from a managed wallet.

Conventions

  • execute means SolanaLaser signs and submits the transaction.
  • No endpoint requires client-side transaction signing.
  • No endpoint requires you to call Solana RPC directly.
  • confirm: true waits for on-chain confirmation before responding.
  • Managed wallet private keys are stored encrypted and decrypted only in memory at signing time.
  • Errors always include { "code": "...", "detail": "..." } — see Errors.

Where to Start

  1. Call POST /v1/laser/setup to get an API key and a managed wallet.
  2. Fund the wallet with SOL.
  3. Trade or create a token.