Skip to content

HelixLabsDev/helix-labs-canton-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

canton-tools

Open-source tooling for Canton Network applications.

What's included

  • packages/common: shared Canton JSON API client, logger, scheduler, health server, and env helpers
  • packages/protocol-automation: scheduled choice execution service for Canton contracts
  • packages/earnings-indexer: external-event indexer that matches source data to ledger contracts and exercises update choices

Why these exist

Canton applications usually need off-ledger service code for routine operations:

  • Canton has no on-chain cron, so scheduled maintenance choices need an external worker.
  • Canton applications often need derived state from external systems, and there is no single canonical earnings field you can rely on across deployments.
  • Teams routinely need a production-grade Canton JSON API v2 client reference with Keycloak OIDC, package resolution, active-contract queries, and choice exercise flow.

This repository packages those patterns as small Node.js services with a shared client layer and concrete example jobs based on Helix contracts.

Prerequisites

  • Node.js 18+
  • A Canton JSON API v2 participant endpoint
  • A Keycloak OIDC client that can use client-credentials flow
  • An act-as party with permission to query and exercise the target contracts

Quick start

Protocol automation

cd packages/protocol-automation
npm install
cp .env.example .env
node --env-file=.env src/index.js

Earnings indexer

cd packages/earnings-indexer
npm install
cp .env.example .env
node --env-file=.env src/index.js

To run the smoke test in mock mode:

cd packages/earnings-indexer
bash smoke-test.sh

Project structure

canton-tools/
├── README.md
├── LICENSE
└── packages/
    ├── common/
    ├── protocol-automation/
    └── earnings-indexer/

Notes on the example jobs

The protocol and indexer packages intentionally keep Helix template names, choice names, and payload field references in the example job files. The goal is readability: developers can see a concrete Canton service implementation, then adapt the example to their own contracts.

Built by Helix Labs

Built by Helix Labs for the Canton Network.

License

Apache 2.0. See LICENSE.

About

Open-source Canton Network developer tooling — off-chain automation, JSON API v2 client with Keycloak OIDC, and earnings indexer.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors