Skip to content

LocalNet testing

Cursor Agent edited this page Aug 13, 2026 · 4 revisions

LocalNet testing

LocalNet lifecycle and shared test helpers live in @fairmint/canton-dev-tools (see its COMPATIBILITY.md). This SDK does not publish a LocalNet CLI or scripts/localnet-cloud.sh.

Ownership (ENG-1635)

@fairmint/canton-dev-tools owns LocalNet (CLI, pins, and shared test helpers). This SDK does not ship a LocalNet engine or canton-localnet binary.

Commands

From a checkout of this repository (@fairmint/canton-dev-tools is an exact-pinned devDependency):

npm install
npm run localnet:start
npm run localnet:readiness   # alias: localnet:smoke
npm run localnet:teardown    # alias: localnet:stop

Or call the Dev Tools CLI directly:

npx @fairmint/canton-dev-tools start
npx @fairmint/canton-dev-tools readiness
npx @fairmint/canton-dev-tools teardown

See package.json for the full localnet:* script map.

Integration helpers

import {
  buildIntegrationTestClientConfig,
  getLocalnetParticipantAdminLedgerClient,
} from '@fairmint/canton-dev-tools/testing';

Domain integration tests under test/integration/localnet/** stay in this repository; only their imports come from Dev Tools.

See docs/package-boundary.md for what the npm package publishes versus CI-only surfaces.

Docker warning

LocalNet mutates Docker state and local volumes. Use the wrapper instead of reusing containers from a different package line, and stop the environment after verification.

Clone this wiki locally