Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Awesome Daml Awesome

Curated resources for learning Daml the smart contract language behind the Canton Network and for finding your way around the Canton developer ecosystem.

Daml is a strongly-typed, Haskell-derived language for multi-party workflows. Instead of a global shared state, every contract carries an explicit set of signatories and observers, so who is allowed to see and do what is part of the type-checked model rather than an afterthought. That model is what Canton executes and synchronizes across independently-operated participant nodes.

Which docs site should I start with?

The official documentation site is docs.canton.network. It covers Daml 3.x, Canton 3.5, and the current tooling.

This document also links to older documentation sites (docs.daml.com and docs.digitalasset.com), whenever they still provide somewhat relevant and useful learning material.

Contents

Start Here

Coming from Ethereum?

  • Canton for Blockchain Developers: written for people arriving from EVM/Solidity. Focus on the privacy and authorization sections.
  • Concept Translation Tables: mapping the terminology and the concepts between the two.
  • Canton + Daml Auditor Bootcamp: aimed at auditors arriving from EVM or Move, organized around twenty recurring Daml vulnerability patterns with code for each. Also the fastest way for a non-auditor to learn what bad Daml looks like.

Learning the Language

Language Reference

  • Daml Cheat Sheet: one page, syntax and stdlib. (source)
  • Daml Language Reference: the syntax and semantics, authoritative.
  • Daml Standard Library: DA.List, DA.Map, DA.Text, DA.Time and the rest, module by module.
  • Prelude: what's in scope without importing anything.
  • Daml.Script: the API you write tests and ledger-initialization scripts against.
  • Daml-LF Reference: the intermediate representation Daml compiles to. Relevant once you care about package identity and upgrade compatibility.
  • Error Codes: searchable list, useful when the ledger rejects a submission and you want the actual reason.

The Ledger Model

The formal model is worth reading properly, especially the authorization and privacy parts.

Tooling

Check the official Canton developer tooling site first. Developer tools, SDKs, APIs, and AI Infrastructure for Building on Canton Network. To get your projects included, their repo is open to PRs.

  • dpm: the CLI: scaffolding, builds, tests, codegen, SDK version management. Replaces the daml assistant from SDK 3.5 on. (repo)
  • Daml SDK: compiler, Daml Script runner, and sandbox, installed via dpm.
  • Daml Studio: the VS Code extension. Type checking, inline script results, go-to-definition.
  • IDE Setup: getting the editor tooling actually working, which is not always automatic.
  • Development Tools Overview: what each tool in the box is for.
  • PQS (Participant Query Store): streams ledger state into PostgreSQL so you can query contracts with SQL. (repo, SQL reference)
  • Canton Console: Scala REPL against a node, for topology and admin work.
  • Debugging Tools and Debugging with lnav: for when the logs are the only evidence you have.
  • Troubleshooting Cheat Sheet: symptom-to-cause table. Pairs with the common issues FAQ.
  • Seaport: hosted environment for building and deploying Daml without a local toolchain.
  • daml-lint: OpenZeppelin's static analyser, doing for Daml roughly what Slither does for Solidity: unguarded division, unbounded decimals, missing ensure clauses. Explicitly experimental.
  • daml.nvim: Neovim support with LSP, inline script results, and Tree-sitter highlighting. The only serious alternative to the VS Code extension.
  • CantonTrace: local debugging UI: ACS inspector, transaction tree with per-party privacy analysis, and step-through of the Daml engine. Fills a genuine gap in the official toolchain.
  • daml-fuzz-canton: property-based fuzzer. You declare the invariants; it generates multi-party transaction sequences trying to break them, covering authorization, privacy, and value conservation. Proof of concept, and the invariant categories are a useful checklist even if you don't run it.
  • Mewt: mutation testing with Daml support, including mutants that swap controllers and signatories. Reach for it when Daml's choice-level coverage says 100% and you want to know what that is worth. (announcement)
  • daml-security-framework: proof-of-concept static scanner and a vulnerability taxonomy with worked examples, such as non-consuming choices with side effects. Early; the taxonomy currently carries more value than the scanner.
  • Decentralization Manager: runs a decentralized party across multiple participants: threshold governance, coordinated onboarding, DAR deployment with multi-party signing, and membership votes. For when a single operator holding the party's keys is not acceptable.

SDKs and Bindings

  • JSON Ledger API: plain HTTP against the ledger. (tutorial)
  • gRPC Ledger API: the full API, including event streaming.
  • Wallet SDK: TypeScript, for party management, transfers, and transaction signing.
  • Wallet Gateway: dApp-side SDK and OpenRPC spec for talking to Canton wallets from a frontend.
  • PartyLayer: CIP-0103 wallet abstraction. One integration covers Console, Loop, Cantor8, Nightly and the rest, with React hooks and a signed registry so wallet identities can't be spoofed. MIT. (docs)
  • dazl: Python Ledger API client. (PyPI)
  • go-daml: Go client with a type-safe code generator that reads .dar files.
  • c7_ledger: actively maintained drop-in replacements for @daml/ledger and @daml/react.
  • Contracts and Transactions in Java: working with generated Java codegen output.

Libraries

  • Daml Finance: instruments, holdings, settlement, and lifecycling. Don't model a financial asset from scratch before reading this. (docs)
  • daml-ctl: small control-flow helpers ported from Haskell.
  • Canton Token Template: Starting point for a CIP-56 compliant token registry, by OpenZeppelin.
  • canton-stablecoin: extends the token template above with a CDP vault system: overcollateralization, minting, liquidation, stability fees, plus tests for the security invariants. Explicitly experimental.
  • daml-tokenization-toolkit: tokenization and settlement built on Daml Finance, by ASX Operations.
  • account-hierarchy: custody and account-hierarchy modelling for solving the nested-ownership problem.
  • daml-nft: small NFT library.
  • Catalyx Package Manager: community marketplace for reusable Daml packages.

Example Applications

  • cn-quickstart: the reference full-stack app: Daml models, backend, frontend, and a LocalNet to run it against.
  • daml-finance-app: larger demo built on Daml Finance.
  • ex-java-bindings: the same example client written three ways, for comparing the abstraction levels.
  • ex-java-bindings-with-opentelemetry: adds tracing to the above client.
  • splice: the Global Synchronizer's own applications: Canton Coin, Scan, validator, and SV apps. For reviewing what the production-quality Daml looks like.
  • example-insurance-claim: an insurance claim as a multi-party workflow example.
  • canton-erc20: ERC-20 bridge between Ethereum and CIP-56 tokens, by ChainSafe. (Go middleware)
  • data-streams-canton: Chainlink Data Streams on Canton. The reference for getting external price data onto the ledger.
  • hemera: Daml-to-Ethereum integration over the Java bindings. Unmaintained since 2023, but the same pattern of offchain integrations still works.
  • daml-on-sawtooth: Daml's runtime on Hyperledger Sawtooth. Unmaintained, but works as an example of Daml being a ledger-agnostic language.

Running Code Locally

Upgrades and Production

Daml packages are immutable and content-addressed, which complicates the upgrades.

The Canton Ecosystem

Data and Explorers

  • Scan API: read-only network data: mining rounds, Canton Coin (CC) supply, DSO state.
  • Validator API: per-node REST API for wallet ops, traffic, and party onboarding.
  • Noves Canton Data API: hosted API over publicly observable network data.
  • CCView: explorer with a public indexing API. (API docs)
  • Lighthouse: alternative community explorer.
  • CC Space: explorer with analytics, alerting, and validator monitoring.

Agentic Development

Whitepapers etc

Academic Research

Community articles

Community Forums

Contributing

Pull requests welcome. One link per entry, a description that says what the thing is and when you'd reach for it, and no marketing copy. Dead links get removed without ceremony.

License

CC0-1.0.

About

A comprehensive collection of Daml (the smart contract language on Canton Network)-related developer resources, including libraries, projects, tutorials, papers, articles and more.

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors