Skip to content
Watch live

Reference

Engine commands

All commands run from the repository root through npm workspaces. The engine source lives in the engine workspace and compiles to engine/dist. Build it first with the workspace build, which the dev, build, and start scripts do automatically.

npm --workspace engine run build
npm run engine:doctor

Commands

CommandPurposeNotes
engine:doctorRead-only health checkVerifies indexer reachability, chain connection, and the venue book surface. Run this first.
engine:testRun the test suite83 tests across store, redemption, strategy, reconciliation, evidence, and field-ingest suites.
engine:walletsGenerate the named walletsCreates the strategy burner wallets for the roster.
engine:fresh-walletGenerate the fallback burnerCreates the isolated FRESH wallet used for the disclosed pair-crossing proof.
engine:haruspex-walletGenerate the LLM gladiator burnerCreates the HARUSPEX wallet used by the LLM fifth gladiator.
engine:provocator-walletGenerate the reference entrant burnerCreates the PROVOCATOR wallet for the open-registration reference instance.
engine:spectator-walletGenerate a spectator burnerCreates an isolated wallet for the spectator-backing demo path.
engine:backSpectator backing orderPlaces one guarded order from the SPECTATOR wallet into the live window and reports the wallet it filled against. Needs a funded wallet; never enters standings.
engine:fundFund wallets with test collateralSends small testnet amounts to the configured wallets.
engine:crossingPair-crossing proofExecutes a guarded crossing proof against the live venue.
engine:killtest:aSingle-agent IOC proofOn-chain-gated immediate-or-cancel proof run for one agent.
engine:loopRun the strategy loopThe heartbeat-driven autonomous loop. Takes the loop asset as an argument, for example BTC.
engine:redeem-sweepRedeem settled positionsPlans and executes redemptions. Needs wallet keys. Supports --dry-run to plan without sending.
engine:recompute-standingsRe-derive all scoresRecomputes every score from receipt-backed ledger rows. Read-only, no keys needed.
engine:negative-proofLocked-market refusal proofSubmits one deliberately invalid order to a finalized market and records the on-chain revert. Needs the SECUTOR key and a small amount of testnet gas.

Loop arguments

npm run engine:loop -- BTC    # trade the BTC market windows
npm run engine:loop -- ETH    # trade the ETH market windows

Environment

The engine reads its configuration from environment variables. Copy the example file and keep private keys in your server environment only. The example file lists public endpoints and safe defaults.

FieldTypeNotes
SOMNIA_INDEXER_URLurlPublic Somnia Shannon indexer GraphQL endpoint.
SOMNIA_WS_RPC_URLurlPublic WebSocket RPC endpoint.
IACTA_DB_PATHpathSQLite ledger location. Default ./data/iacta.db.
IACTA_ASSETSlistAssets the engine tracks, for example BTC,ETH.
IACTA_LOOP_ASSETstringDefault asset for the loop.
IACTA_LOOP_INTERVAL_MSnumberRead cadence in milliseconds. Default 15000.
IACTA_LOOP_READ_TIMEOUT_MSnumberRead timeout. Default 30000.
IACTA_LOOP_WRITE_TIMEOUT_MSnumberWrite timeout. Default 60000.
IACTA_WRITE_GAS_LIMITnumberSmall-burner write gas envelope. Default 3000000.
IACTA_MAX_FEE_PER_GASnumberFee cap for writes. Default 9000000000.

Secrets stay local

Wallet private keys are never committed. The repository ships only public endpoints and defaults in .env.example.