Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

321 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

canton-node-sdk

Low-level TypeScript SDK for Canton Network nodes (Ledger JSON API, Validator API, Scan API).

Developer documentation

The public GitHub wiki is the canonical guide for configuration, API boundaries, external signing, LocalNet, examples, and contribution. The public src/index.ts defines the supported package surface; use the installed declarations and public examples/ and test/ for exact methods, request shapes, and error behavior.

Install

npm install @fairmint/canton-node-sdk
import { Canton } from '@fairmint/canton-node-sdk';

async function main(): Promise<void> {
  const canton = new Canton({ network: 'localnet' });
  const version = await canton.ledger.getVersion();
  console.log(version);
}

main().catch((error: unknown) => {
  console.error(error);
  process.exitCode = 1;
});

Repository setup and checks

git submodule update --init --depth 1 libs/splice
git submodule update --init --recursive libs/cn-quickstart
npm install
npm run fix
npm test
npm run build

LocalNet (owned by @fairmint/canton-dev-tools)

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

npm install   # installs @fairmint/canton-dev-tools as an exact-pinned devDependency
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

Integration helpers:

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

See docs/package-boundary.md for what the npm package publishes versus CI-only surfaces (npm run check:package-artifacts).

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages