Skip to content

Sigilry

Sigilry is a CIP-103 compliant dApp connectivity library for Canton Network. It implements the CIP-103 dApp API as a typed JSON-RPC client/server pair, ships generated Zod schemas for runtime validation, and exposes React Query hooks for fast integration.

Sigilry is built and maintained by Send and used in production by Send’s Canton Network dApps.

  • @sigilry/dapp: Core provider, RPC client and server, message schemas, and transports.
  • @sigilry/react: React Query powered hooks and CantonReactProvider.
  • @sigilry/cli: CLI and programmatic API for generating TypeScript types from DAML DARs.
  • @sigilry/canton-json-api: Generated Canton JSON API v2 types and Zod schemas for typed ledger endpoint contracts.

Start with the Demo App before package internals. It shows the full flow in one place:

  1. DAML templates and choices (TodoList factory + TodoItem contracts)
  2. DAR build and typed codegen via Sigilry CLI
  3. dApp-side React hooks calling a typed window.canton provider
  4. Event-driven wallet/ledger logs plus txChanged updates after approvals

Fastest way to run it from the repo root:

Terminal window
nix develop
yarn install
yarn --cwd examples/demo-app dev

Choose your starting path:

  • Building a real dApp integration against an installed wallet extension: go to Quick Start.
  • Learning the full flow locally without extension setup: go to Demo App.

The wallet extension injects a CIP-103 provider at window.canton. The provider object follows the EIP-1193 shape that CIP-103 itself specifies (request / on / removeListener), routes calls through typed JSON-RPC method names from the CIP-103 OpenRPC schema, and emits accountsChanged and txChanged to signal wallet and ledger state changes. Methods with void params omit the params field. See CIP-103 Conformance for the per-method conformance table, and the @sigilry/dapp and @sigilry/react pages for the full contract.

Use sigilry init to create sigilry.config.ts, then run sigilry codegen to generate TypeScript types. The CLI requires the DAML SDK so dpm is available, and it wraps dpm codegen-alpha-typescript under the hood. See the @sigilry/cli page for the full configuration reference.

async function connect() {
const status = await window.canton.request({ method: "status" });
if (!status.connection.isConnected) {
await window.canton.request({ method: "connect" });
}
const accounts = await window.canton.request({ method: "listAccounts" });
console.log("Accounts:", accounts);
return accounts;
}

ledgerApi requests map directly to Daml JSON Ledger API v2 endpoints. Hooks like useLedgerApi and useActiveContracts call /v2/state/ledger-end and /v2/state/active-contracts to resolve the current offset and fetch active contracts.

await window.canton.request({
method: "ledgerApi",
params: {
requestMethod: "get",
resource: "/v2/state/ledger-end",
},
});
dApp UI
-> window.canton (CIP-103 provider; EIP-1193 object shape)
-> JSON-RPC (CIP-103 OpenRPC schema + Zod validation)
-> WindowTransport (postMessage)
-> Wallet extension (RPC server)
-> Canton Ledger API / DAML
  • Sigilry is a CIP-103-compliant dApp connectivity library for Canton Network.
  • A concise integration summary is available at llms.txt.
  • All examples are copy-paste ready and include explicit CIP-103 method names.
  • See CIP-103 Conformance for the per-method conformance table.
  • Use the package pages for complete API coverage.