Headless Orestack mining from your terminal. You sign with a local keypair; the Orestack crank discovers your miner and deploys at the product fee.
orestack-landing repo (packages/mining-sdk). Do not send mainnet
spends unless you mean to — every mutation simulates first, and
--yes is required to broadcast.
orestack-miner creates and operates an Orestack miner without the
website wallet UI. It builds the on-chain accounts, notifies the backend, and
exposes pause / resume / fund / claim / withdraw. Deploy signing stays with the
Orestack crank (product executor).
AI agents should treat the agent skill as the binding contract. This page is the human guide and matches that file.
0600. Pass the path with --keypair / -k. Never paste the secret into chat or shell history./mine and explorers is the Auth PDA. Do not swap them.~/.orestack-miner/ holds miner.json (no secrets) and spend-ledger.json.cd packages/mining-sdk npm install npm run build npx orestack-miner help
| Command | Purpose |
|---|---|
init --strategy lotto|og_sniper --max-per-round <SOL|lamports> |
Create Manager + StrategyDeployer + miner (auth id 0); onboarding notify |
fund <SOL> |
Deposit Autodeploy SOL; deposit notify |
start / stop |
Signed resume / pause |
set-strategy --strategy lotto|og_sniper [--max-per-round …] |
Change product strategy (POC: those two only) |
status |
Print local + on-chain identity (no secrets) |
withdraw <SOL>|all |
Unused Autodeploy balance (usually before claim) |
claim [--kind ore|sol|all] |
Claim rewards; SOL claim also sweeps remaining Auth lamports |
help |
Full flag list |
| Flag | Meaning |
|---|---|
--keypair, -k <path> | Authority keypair JSON (required; never printed) |
--rpc-url <url> | Solana RPC (default mainnet-beta for read/simulate) |
--backend-url <url> | Orestack API base for notify / pause / resume |
--state-dir <path> | Local state (default ~/.orestack-miner) |
--per-command-cap <lam> | Default 50000000 (0.05 SOL) |
--per-day-cap <lam> | Default 250000000 (0.25 SOL) |
--skip-notify | Skip HTTP notify — local fork / offline only |
--yes | Broadcast after a successful simulation (default: simulate only) |
Dry-run every step first (omit --yes). When the simulation looks right, re-run with --yes.
1. init --strategy lotto|og_sniper --max-per-round <SOL|lamports> 2. fund <SOL> 3. start # signed resume (idle-pause was set by onboarding-notify) 4. (crank deploys within ~300s of rediscovery / notify) 5. stop # signed pause 6. withdraw <SOL>|all 7. claim [--kind ore|sol|all]
Example dry-run then send
npx orestack-miner init --strategy lotto --max-per-round 0.05 -k ./pilot.json npx orestack-miner init --strategy lotto --max-per-round 0.05 -k ./pilot.json --yes
--per-command-cap / --per-day-cap (values in lamports). --max-per-round must be nonzero (on-chain 0 means unlimited).--yes, the CLI only reads and simulates.init calls POST /api/onboarding-notify/{manager} (hard-fail — idle-pause must land). Confirmed fund calls POST /api/deposit-notify/{manager} (soft-fail). Use --skip-notify only on a local fork or offline test.
Point the agent at the orestack-landing checkout and tell it to read the agent skill
(packages/mining-sdk/SKILL.md, also on this page) before any CLI work.
Paste a standing instruction like this:
You are operating orestack-miner for me. 1. Read packages/mining-sdk/SKILL.md (or the agent skill on /docs/orestack-miner/) and follow it exactly. 2. Use only a dedicated pilot keypair path I give you. Never cat, log, or paste the key. 3. Strategies allowed: lotto or og_sniper only. Fees and executor are fixed — do not try to override them. 4. Simulate every mutation first. Only add --yes after I confirm the dry-run (or after I explicitly say "send"). 5. Do not raise --per-command-cap or --per-day-cap unless I ask. 6. Prefer Auth PDA when talking about the public miner address; use Manager only for API / CLI state paths. 7. Install with: cd packages/mining-sdk && npm install && npm run build Start with: npx orestack-miner help
Then give the agent the keypair path, the strategy, and the max-per-round amount.
Ask for the full command order as dry-runs before any --yes.
Paste everything between the markers into your Grok chat (this is your Grok assistant, not the Orestack Discord lookup bot). Fill in the keypair path and amounts before sending.
BEGIN PROMPT You are operating the Orestack **orestack-miner** CLI (headless Orestack mining) for me. ## Hard rules 1. Dedicated pilot wallet only. Keypair path I provide — never print, cat, or paste the secret. 2. Read and follow `packages/mining-sdk/SKILL.md` (or https://orestack.app/docs/orestack-miner/SKILL.md). 3. Strategies: `lotto` or `og_sniper` only. Fees are fixed at 50 bps + 250000 lamports. Executor is product Orestack — reject any `--executor` idea. 4. Simulate first. Do not pass `--yes` until I confirm the dry-run (or I say "send"). 5. Default caps stay 0.05 SOL / command and 0.25 SOL / day unless I raise them. 6. `--max-per-round` must be nonzero. Top-up with `fund` only — do not drain other accounts. 7. If anything is ambiguous, stop and ask. Do not invent commands outside `help`. ## Install (monorepo) cd packages/mining-sdk && npm install && npm run build ## Command order (dry-run, then --yes when I approve) 1. init --strategy lotto|og_sniper --max-per-round <amount> -k <keypair-path> 2. fund <SOL> -k <keypair-path> 3. start -k <keypair-path> 4. wait for crank (~300s after notify / rediscovery) 5. stop -k <keypair-path> 6. withdraw <SOL>|all -k <keypair-path> 7. claim [--kind ore|sol|all] -k <keypair-path> ## My settings - Keypair path: PASTE_PATH_HERE - Strategy: lotto | og_sniper - max-per-round: PASTE_AMOUNT - First action: run `npx orestack-miner help`, then dry-run `init` END PROMPT