Pause, start, and change strategy for a miner you already created in the Orestack app. Private keys stay on your machine. Orestack keeps cranking deploys.
| Action | How | Notes |
|---|---|---|
| Pause | POST /api/v1/mining/{manager}/pause |
Off-chain challenge signature — no SOL fee |
| Start (resume) | POST /api/v1/mining/{manager}/resume |
Same auth; crank can deploy again next eligible round |
| Change strategy | POST /api/v1/mining/{manager}/strategy then on-chain tx |
API validates; your bot signs updateStratDeployer on your RPC |
| Config / state | GET .../config, GET .../{manager}/state |
Public reads (state is rate-limited) |
https://orestack.app
OpenAPI: https://orestack.app/api/v1/mining/openapi.json.
{manager} is the Manager account pubkey./mine is the Auth PDA — do not use it as the path param.Manager.authority (the wallet that created the miner).
Mutations require an on-chain StrategyDeployer whose
deploy_authority is the Orestack executor. Otherwise the API returns
403 not_orestack_miner.
POST /api/v1/mining/auth/challenge with { pubkey, manager, action }{ signature, message, pubkey }| Action | Message |
|---|---|
| pause / resume | {action}:{manager}:{nonce} |
| set-strategy | set-strategy:{manager}:{nonce}:{strategy_type}:{strategy_data_hash}:{expected_bps_fee}:{expected_flat_fee}:{max_per_round} |
strategy_data_hash is hex(sha256) of the exact 64-byte
strategy_data blob. Fee ceilings in the message must match the
request body. The old JSON-hash-only form is rejected (#609).
Official package @orestack/mining. It loads a local keypair, handles
challenges, and submits strategy transactions on your RPC.
import { OrestackMining, KeypairSigner } from '@orestack/mining'
const api = new OrestackMining({
backendUrl: process.env.ORESTACK_API!,
rpcUrl: process.env.RPC_URL!,
signer: KeypairSigner.fromFile(process.env.AUTHORITY_KEYPAIR!),
manager: process.env.MANAGER_PUBKEY!,
})
await api.pause()
await api.resume()
// await api.setStrategy(...) — validates via HTTP, then signs on-chain
| Variable | Purpose |
|---|---|
ORESTACK_API | Backend base URL |
RPC_URL | Your Solana RPC (strategy txs only) |
AUTHORITY_KEYPAIR | Path to Solana JSON keypair file (mode 0600) |
MANAGER_PUBKEY | Manager account — not Auth PDA |
@orestack/mining/api/pause-mining/{manager}, /api/resume-mining/{manager}