Documentation

Solard Documentation

SOLARD is a local-first execution stack for Pump and PumpSwap. Its SOLARD trade app, solard CLI, and typed SDK share one SQLite database, one venue resolver, and one transaction pipeline.

indexerbun run indexer/main.ts
trade appbunx tradjs server
database./solard.db
live gate0 by default

#Quickstart

The actual trade app is two long-running processes. The indexer collects and writes market state; the TradJS server reads that state and serves the browser interface. Run both from the repository root in separate shells.

1 · Clone and install

shell
$ git clone https://github.com/7flash/solard
$ cd solard
$ bun install
$ cp .env.example .env

2 · Configure the minimum

.env
# required for wallet import/decryption
SOLARD_MASTER_KEY=replace-with-a-long-secret

# required for chain operations and indexing
HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=...

# keep live execution disabled while testing
SOLARD_ENABLE_LIVE_TRADES=0

3 · Start the indexer

Leave this process running. Without it, the trade app can render but its indexed market state will not advance.

trade app 1
$ bun run indexer/main.ts

4 · Start the TradJS trade app

Open a second shell in the same repository. Export the port before starting TradJS.

trade app 2
$ export BUN_PORT=3000
$ bunx tradjs server
# open http://localhost:3000
Why two processes? The indexer owns ingestion and local market state. TradJS owns HTTP rendering and browser routes. Starting only the server gives you the interface, but not a running indexer.

5 · Use the CLI separately

The CLI is an operator interface, not the trade-app launcher. Inspect its commands independently:

shell
$ solard help

6 · Make the first simulation

shell
$ solard wallet import <base58_private_key> --name main
$ solard token add <token_ca>
$ solard quote <token_ca> --sol 0.1
$ solard buy <token_ca> --wallet main --sol 0.1 --simulate-only

#Configuration

Runtime configuration uses the SOLARD_ prefix alongside provider-specific variables. Use the names exactly as shown.

variabledefault / statuspurpose
SOLARD_DB_PATH./solard.dbShared SQLite database for CLI, web routes, jobs, portfolio, and indexed state.
SOLARD_MASTER_KEYrequired for walletsEncrypts and decrypts stored wallet secrets.
HELIUS_RPC_URLconfigurePreferred RPC endpoint. RPC_ENDPOINT is accepted for compatibility.
HELIUS_API_KEYoptionalUsed to derive the Helius websocket URL when an override is not supplied.
HELIUS_SENDER_URLoptionalHelius Sender fast-lane endpoint.
HELIUS_TIP_ACCOUNToptionalTip account for Sender submissions.
JITO_BLOCK_ENGINE_URLsender-specificUsed only when the Jito sender is explicitly selected.
SOLARD_ENABLE_LIVE_TRADES0Rejects live buy, sell, and launch requests until explicitly set to 1.
SOLARD_WEB_TOKENoptionalWhen set, browser/API requests send x-solard-web-token.
SOLARD_PUMP_FEED_SOURCEheliusSelects the primary Pump feed source.
PUMP_METADATA_PROVIDERpump-frontendMetadata uploader; pinata requires PINATA_JWT.
SOLARD_LOG_LEVELinfoApplication/measure logging verbosity.
SOLARD_MAX_JOBS100Background job retention limit.
Remote exposure: localhost is the safe default. When binding to a LAN interface, set SOLARD_WEB_TOKEN and prefer a VPN or SSH tunnel over public port forwarding.

#Architecture

market sources ──▶ indexer/main.ts ──▶ solard.db ──▶ TradJS server ──▶ browser trade app · CLI · SDK

Core boundaries

  • Venue registry: resolves one executable market plugin for a token and user.
  • Pump plugin: includes bonding-curve and PumpSwap venue implementations, instruction builders, routing, launch sources, and creator-fee claims.
  • Senders: CLI trade flags expose rpc, helius, and jito.
  • Persistence: the CLI and web console share a local database.
  • Observability: worker supervision uses bgrun and operations are instrumented with measure-fn.

Repository modules

src/venuesmarket plugins and resolver
src/txtransaction composition/sending
src/claimsclaim-source interfaces
src/launcheslaunch source abstractions
src/runnerscript registration/execution
src/solardconsole server, workers, stores

#Workers

A standard start brings up server-worker and helius-logs-v1. Telegram signals joins when SOLARD_TELEGRAM_SIGNALS=1. Additional workers can be enabled for LaserStream, PumpPortal, curve snapshots, holder snapshots, metadata repair, and reconciliation.

worker specroledefault boot?
solard-server-workerSOLARD trade app and API serveryes
solard-helius-logs-v1standard logs subscription ingestionyes
solard-telegram-signalssignal ingestionwhen enabled
solard-helius-live-v2Helius live stream pathregistered spec
solard-helius-laserstream-v1transaction subscription / LaserStream pathregistered spec
solard-pumpportal-live-v2PumpPortal stream pathregistered spec
solard-curve-snapshotsbonding-account snapshotsregistered spec
solard-holder-snapshotslargest-account snapshotsregistered spec
solard-metadata-repairmetadata repair loopregistered spec
solard-reconcilerreconciliation and heartbeatregistered spec
Why this matters: a status screen should not label every registered worker “online” after a default start. The refreshed landing now displays the default boot separately from optional worker specs.

#Web console

The browser trade app is served by TradJS. Start the indexer first with bun run indexer/main.ts, then run export BUN_PORT=3000 and bunx tradjs server in a second shell.

The public /trade route streams token discovery through polling and adds Dexscreener pair metrics as they become available. Wallet and execution routes remain inside the SOLARD console.

#HTTP API

The repository's app/api tree exposes route families for health, status, processes, workers, trade app data, prices, tokens, portfolio, trade, wallet import, groups, watch groups, signals, jobs, launching, and SMA data.

route familyexamples / purpose
health & status/api/health, /api/status, process state
trade appPump feeds, Pump live state, holder data, trade-specific routes
marketprice and SMA routes
portfoliooverview and portfolio routes
executiontrade and launch/pump routes
state changeswallet import, groups, watches, worker ensure
operationsjobs, history, processes, signals
Authentication: when SOLARD_WEB_TOKEN is set, send it through the x-solard-web-token header.

#New-token stream & DEX enrichment

The server starts token discovery when the Bun process starts. An inline bootstrap polls /api/tokens while the page HTML is loading, before the TradJS page client mounts. The page client then replays buffered events and continues scheduled polling.

Source selection

sourcemeaningselection
PumpPortalPump.fun and PumpSwap creation events through subscribeNewToken.Used in auto mode when a PumpPortal key or custom websocket URL is configured.
Solana RPCConfirmed Pump create transactions discovered with logsSubscribe, then resolved with getTransaction.Keyless default in auto mode. Use a dedicated RPC in production.
DEX Screener profilesNewly published DEX Screener profiles, not every on-chain mint.Optional; force with NEW_TOKEN_STREAM_SOURCE=dexscreener.

Pipeline

PumpPortal WS or Solana Pump logs ──▶ server buffer ──▶ /api/tokens polling ──▶ landing · trade app ──▶ DEX Screener enrichment
  1. Discovery begins with the server process, so arrivals can be buffered before a browser opens.
  2. The root-layout bootstrap opens polling automatically; no button, scroll, or other interaction starts the stream.
  3. Each unique mint is returned on the next poll with its creation signature when available.
  4. An enrichment queue batches up to 30 addresses into DEX Screener token requests.
  5. Missing pairs are retried with bounded backoff at 5, 15, 30, 60, and 120 seconds.
  6. When a pair appears, an polling update replaces “pair pending” with price, liquidity, market cap, volume, and transaction counts.
  7. ETags, bounded backoff, and visibility-aware intervals keep polling predictable and easy to debug.

Stream configuration

variabledefaultpurpose
NEW_TOKEN_STREAM_SOURCEautoauto, pumpportal, solana-rpc, or dexscreener.
PUMPPORTAL_API_KEYEnables PumpPortal in auto mode; kept on the server.
PUMPPORTAL_WS_URLofficial endpointOptional credentialed websocket override.
SOLANA_RPC_URLpublic mainnet RPCHTTP endpoint used to resolve create transactions. A dedicated endpoint is recommended.
SOLANA_WS_URLderived/public mainnet WSWebSocket endpoint used for Pump-program logsSubscribe.
DEXSCREENER_PROFILE_WS_URLofficial endpointOptional profile-websocket override for explicit DEX-profile mode.
DEXSCREENER_PROFILE_POLL_MS15000REST catch-up interval used only in DEX-profile mode.

Pair enrichment

New mints appear before a DEX pair exists. Until Dexscreener indexes a usable pair, the interface shows pair pending instead of inventing a price or liquidity value.

variabledefaultpurpose
DEXSCREENER_TOKEN_ADDREpollingSOptional Solana watchlist for the pair-metrics view.
DEXSCREENER_CACHE_MS20000Snapshot cache duration, clamped between 10 and 120 seconds.
DEXSCREENER_API_BASE_URLofficial APIOptional REST proxy or test override.
Production reliability: Solana’s public RPC can throttle WebSocket subscriptions and transaction lookups. Configure your own Helius or other Solana RPC endpoints for a continuously reliable feed.

See the Solana logsSubscribe reference, getTransaction reference, PumpPortal real-time API docs, and DEX Screener API reference.

#CLI reference

Run solard help for the current command list. From a source checkout, the equivalent entrypoint is bun src/cli.ts ….

Wallets and tokens

solard — wallets and tokens
solard import <private_key> [name]
cat key.json | solard import --stdin [name]
solard wallets [--token <token>] [--addresses-only]
solard token <token_ca> [name] [--metadata-json <json>]
solard token set <token|ca> [--pool <address>] [--quote-mint <mint>] [--quote-program <program>]
solard token refresh <token|ca>
solard tokens

Prices and trading

solard — prices and trading
solard quote buy <token|ca> --sol 0.5
solard price <token|ca>
solard price average <token|ca> --period 15m
solard price watch <token|ca...> [--interval 1s] [--period 1m]

solard buy <token|ca> (--wallet <wallet> | --wallets w1,w2 | --group <name>) --sol 0.5 [--sender rpc|helius|jito] [--simulate-only]
solard sell <token|ca> (--wallet <wallet> | --wallets w1,w2 | --group <name>) [--bps 10000] [--sender rpc|helius|jito] [--simulate-only]
solard unwrap-wsol (--wallet <wallet> | --wallets w1,w2 | --group <name>) [--simulate-only]
solard claim <token|ca> --wallet <wallet> [--sender rpc|helius|jito]

Groups, agents, watches, and ALTs

solard — organization
solard group create <name> [description]
solard group add <group> <wallet> [weight_bps]
solard group add-many <group> w1,w2,w3
solard group show <group>
solard group list
solard agent create <name> --wallet <wallet> [--config-json <json>]
solard agent list
solard watch token <token|ca> [label]
solard watch wallet <wallet> [label]
solard watch program <address> [label]
solard watch list
solard history
solard jito tip-accounts [--endpoint <url>]
solard alt add <address> [label]
solard alt list
solard alt create --wallet <wallet>
solard alt extend <address> --wallet <wallet> <account...>

#Venues & senders

The Pump plugin directory contains separate pump-curve-venue.ts and pumpswap-venue.ts implementations plus routing and instruction builders.

Pump curve
  • bonding-curve venue implementation
  • Pump instruction builders
  • creator-fee claim source
  • launch source and launchpad support
PumpSwap
  • AMM venue implementation
  • separate PumpSwap instructions
  • resolved through the venue registry
  • token pool/quote configuration supported by CLI

Senders

flagpathuse
rpcconfigured RPCdefault general-purpose sender
heliusHelius Sender / configured policyfast-lane path when configured
jitoJito block enginegroup buys/sells are documented as bundles of five transactions
Simulation: buy, sell, and unwrap accept --simulate-only. Launching uses its own --live and --skip-simulation controls.

#Launching

The CLI supports metadata upload, direct Pump deployment, coordinated buyer groups, and script-driven launch workflows. Use solard deploy pump for direct deployment or a registered script for multi-step workflows.

metadata
solard metadata upload --image ./logo.png --name "TOKEN" --symbol TKN --description "..." [--provider pump-frontend|pinata]
direct deployment
solard deploy pump --wallet dev --name "TOKEN" --symbol TKN --image ./logo.png --description "..." [--live]
workflow
solard run launch-pump-token --creator dev --metadata token.json [--creator-buy-sol 0.1] [--buyer-group snipers] [--live]
solard run prepare-pump-launch-alt --creator dev --metadata token.json --creator-buy-sol 0.1 [--create --live]

Submit modes

  • after-deploy-processed
  • spam-after-market-ready
  • fast-spam

#SDK, scripts & agents

The package exports the SDK root plus venue, claims, Pump venue, trader preset, launches, launchpads, and runner modules.

solard.config.ts
import { defineSolardConfig } from "solard/runner";

export default defineSolardConfig({
  scripts: {
    snipe: "./scripts/snipe.ts",
    "claim-trade-send": "./scripts/claim-trade-send.ts",
  },
});
script execution
solard scripts
solard run <name-or-path> [script flags...]
solard run snipe --name "EXACT NAME" --group snipers --sol 0.05 --sender jito
solard run claim-trade-send --claim <token> --buy <token> --wallet main --recipient <address>

Agent posture

  • Use dedicated low-balance wallets.
  • Allow read-only quotes and simulations freely.
  • Keep SOLARD_ENABLE_LIVE_TRADES=0 while developing tool calls.
  • Use group weights and agent config as blast-radius controls.
  • Inspect history and activity after every automated run.

#Safety & operations

  • Live gate: shipped as SOLARD_ENABLE_LIVE_TRADES=0.
  • Wallet encryption: CLI help requires SOLARD_MASTER_KEY to import/decrypt stored wallets.
  • Simulation: buy, sell, and unwrap support --simulate-only.
  • Local auth: use SOLARD_WEB_TOKEN when serving beyond localhost.
  • Supervision: bgrun process state, staleness deadlines, optional auto-recovery.
  • Tracing: measure-fn instrumentation is present across the codebase.
Operational rule: never store a production wallet in a development environment you do not fully control. Start with a disposable wallet, a low balance, and simulations.
Not financial advice. SOLARD is execution infrastructure for adversarial markets. Review the source, understand every sender and fee policy, and size for total loss.

#Source reference