arkade-regtest
Arkade regtest
This skill is used from a fresh project. Pull the stack. It is not already checked out.
git clone --depth 1 https://github.com/ArkLabsHQ/arkade-regtest.git regtest
printf 'AUTOMINE_INTERVAL=0\n' > .env.regtest
node regtest/regtest.mjs start --env .env.regtest --profile ark --profile emulator
arkade-regtest is Docker images plus a Node CLI: Bitcoin Core, mempool (Esplora under /api), arkd, and the emulator. Docker with the compose plugin, and Node 18 or newer. No npm install inside regtest/. Ignore that directory. start initializes the ark client and seeds it with offchain funds.
One-shot stack
node regtest/regtest.mjs start with no profile flag brings up the full stack. A contract test needs ark and the emulator, as in the clone command above.
Stop with node regtest/regtest.mjs stop (volumes stay). Wipe with node regtest/regtest.mjs clean. The SDK repository's pnpm run regtest:* scripts call this same CLI. Use them only when the working tree is that repository.
AUTOMINE_INTERVAL=0 has to be loaded at start, as in the command above. The CLI reads --env <path> when you pass it, and otherwise the clone's parent .env.regtest or regtest/.env. A value already in the environment wins over those files. The default auto-miner (one block every 600 seconds) moves block-denominated expiry and sweeps under a running test. Mine with node regtest/regtest.mjs mine [n].