The reference covers the runtime, all three API clients, and every utility helper that ships from @fairmint/canton-node-sdk. Pick a starting point below or use the sidebar to drill in.
The shape stays consistent across pages: a short prose intro, a minimal TypeScript example, parameters and return notes, errors and pitfalls, an auth/party note, and a link to the source on GitHub. No autogenerated card grids and no API browser — every page is hand-curated.
Core
The shared runtime, configuration loader, and small types used everywhere else.
Canton— unified entry point that exposesledger,validator, andscanfrom one constructor.CantonConfig— every constructor field in prose.EnvLoader— deriveClientConfigfromCANTON_*environment variables.AuthenticationManager— OAuth2, static bearer, andtokenGeneratorflows.CantonRuntime— HTTP, auth, token plumbing, andfork.BaseClient— shared client base class behindLedgerJsonApiClient,ValidatorApiClient,ScanApiClient.Errors—ApiError,NetworkError,ConfigurationError,ValidationError,AuthenticationError.Branded types—PartyId,ContractId,Offset, and friends.Logging— log redaction andsetLogger.waitForCondition— generic polling helper used by transfer settlement.
Ledger JSON API client — canton.ledger
Every method on LedgerJsonApiClient, plus the waitForCompletion helpers exported alongside it.
Ledger overview → covers commands, parties, packages, ACS reads, updates and transactions, completion helpers, interactive submission, users and rights, identity providers, and version/auth introspection. Common starting points:
- Submit and wait:
submitAndWait,submitAndWaitForTransaction,asyncSubmit. - Streaming:
subscribeToUpdates,subscribeToCompletions. - Reads:
getActiveContracts,getLedgerEnd,getTransactionById. - First call:
getVersion,getAuthenticatedUser.
Validator API client — canton.validator
OAuth-backed validator surface: user onboarding, ANS, scan-proxy reads, token-standard registry, wallet, traffic, and transfer offers.
Validator overview → groups every method by area. Common starting points:
- Identity:
createUser,getUserStatus,getValidatorUserInfo. - Wallet:
getWalletBalance,getAmulets. - Transfers:
createTransferOffer,acceptTransferOffer,createTokenStandardTransfer. - Token-standard registry:
getTransferFactory,getAllocationFactory.
Scan API client — canton.scan
Public read-mostly surface with multi-endpoint rotation across SV-hosted Scan bases. No OAuth required.
Scan overview → explains rotation behavior plus every operation. Common starting points:
- Network info:
getVersion,getHealthStatus,isLive. - DSO and rules:
getDsoInfo,getAmuletRules. - Holdings:
getWalletBalance,getHoldingsStateAt. - Updates:
getUpdateById,getUpdateHistory,getEventHistory.
Utilities
Higher-level helpers built on the raw clients. Use these when you would otherwise stitch together several primitive calls by hand.
- Party —
createParty: allocate, optionally fund, and pre-approve a new party in one call. - Amulet — transfer offers and pre-approved transfers:
createTransferOffer,acceptTransferOffer,preApproveTransfers,transferToPreapproved,getAmuletsForTransfer,getLockedAmuletsForParty,selectLockedAmuletForAmount, and type aliases. - External signing — offline signing for external-key parties:
createExternalParty,prepareExternalTransaction,executeExternalTransaction, and Stellar key helpers. - Mining — round helpers:
getCurrentRoundNumber,getCurrentMiningRoundContext,waitForRoundChange, and the round client/context types. - Traffic — cost estimation:
getTrafficStatus,estimateTrafficCost,calculateTrafficCostInDollars. - Contracts — JS Active contract helpers:
getJsActiveContractItems,findCreatedEventByTemplateId. - Transactions —
transactionBatch,findCreatedEventByTemplateName. - Parsers — fee analysis:
parseFeesFromUpdate,parseFeesFromEventTree,formatFeeAmount,validateFeeAnalysis.
How to read each page
Every method page follows the same structure so they read predictably:
- One-paragraph intro that names the call and what it actually does.
- Setup snippet for
new Canton({ … })if needed. - Minimal TypeScript example — copy-pasteable.
- Parameters, field by field. Required fields are marked.
- Returns — the practical shape, not the exhaustive type dump.
- Errors and pitfalls — failure modes the SDK actually surfaces.
- Auth and party — what acting identity is required.
- Source — direct link to the operation file in
Fairmint/canton-node-sdkon GitHub.
For long-form walkthroughs, see Guides and Examples. For environment setup and a first end-to-end run, start with the Quickstart.