Developer onboarding — concept

From zero to a running ledger
in five minutes.

One install, two commands — and at every step you know what you should be seeing. This page is a working redesign of a typical SDK getting-started flow, demonstrated against a real, public example project.

Before you start ~2 min

Two prerequisites, checked before any project command appears:

1 A JDK, version 17 or newer

java -version

No JDK? Get one from adoptium.net — the SDK runs on the JVM.

2 The SDK, pinned to the version this guide is written against

curl -sSL https://get.daml.com/ | sh -s 2.10.4

Version-pinned on purpose: a guide "for whatever is current" is a guide that silently breaks.

Run something real ~2 min

Not a hello-world: an atomic delivery-versus-payment and a two-leg repo with a pre-commit risk gate, in 348 lines you can read afterwards.

git clone https://github.com/ThomasFelber/daml-two-leg-repo.git
cd daml-two-leg-repo
daml test

What success looks like

Looks wrong, is right #1

ok on the two Rejects… scripts means the rejection happened. They assert with submitMustFail: an ineligible ISIN or a breached haircut must abort before anything commits. The failure is the feature under test.

Looks wrong, is right #2

Six lines, not four (and the order varies). The runner executes every top-level script — including the party-allocation helper and the setup script used by daml start.

See the point, not just the prompt ~2 min

The product's core promise here is need-to-know visibility. Don't assert it — let the reader click it:

daml start    # sandbox + web UI on http://localhost:7500

Log in as each of the three pre-created users and count what they see. The ledger holds 14 active contracts:

Dealer

Collateral provider — think a bank's repo desk: pledges the bond, takes the cash.

10 / 14

Its bonds and cash, the open proposals, the eligibility lists — not the fund's undisclosed cash.

Money Market Fund

Cash provider and DvP bond buyer — the lender earning the minute-priced interest.

11 / 14

Its own holdings plus the same shared workflow contracts — not the dealer's other positions.

Risk Desk

Three roles in one party: policy gate (eligibility & haircut floor), cash issuer, bond registrar.

14 / 14

Everything — not because it is an admin, but because each of those three roles is written into the contracts. Visibility follows role, never configuration.

When it breaks

The three failures a newcomer actually hits — not an FAQ dump:

The web UI's login dropdown is empty
The ledger has parties but no users — interactive tools authenticate via user management. This project's init script creates the three users for you; if you build your own, script createUser or the dropdown stays empty.
java: command not found or a JVM version error
Install a JDK ≥ 17 and re-run. On macOS: brew install temurin.
Address already in use on start
A previous sandbox is still running. Stop it (Ctrl-C in its terminal) or find it with lsof -i :6865.

Ongoing deep dive: from this lab to the token standard ~15 min

The example project ends with five deliberate simplifications. They are not shortcuts — they are the syllabus. Each one is exactly what an institutional registry formalizes, so each limit you just hit hands you one concept of the real token standard:

  1. In the lab: the owner is the only signatory

    In Assets.daml, Cash and Bond are signed by their owner alone — issuance control is explicitly out of scope.

    In the standard: issuer-governed holdings

    A registry makes the issuer/registrar a signatory, so supply, transfer rules and recovery become enforceable workflows instead of conventions.

    Asset workflows →
  2. In the lab: a hand-rolled eligibility gate

    EligibilityCriteria — an ISIN whitelist and a haircut floor — vetoes trades before they commit.

    In the standard: allowlists & instrument rules

    The same pre-commit idea, productized: credential-based allowlists and per-instrument compliance rules enforced natively.

    Allowlist feature →
  3. In the lab: propose-accept settlement

    The DvP moves both legs in one transaction because the proposal carries the signatories' authority into acceptance.

    In the standard: transfer instructions (CIP-56)

    The token standard generalizes exactly this two-step shape so any wallet and registry can settle atomically without trusting each other's code.

    Token standard API →
  4. In the lab: closing the repo

    RepoClose returns principal plus minute-priced interest — assets appear and disappear by contract choice.

    In the standard: mint, burn & redemption

    Supply changes become first-class, attested workflows with an auditable trail — the registry's version of "appear and disappear".

    Redemption tutorial →
  5. In the lab: riskdesk sees 14/14 — through roles

    The risk desk sees everything only because it holds three written-in roles: policy gate, cash issuer, bond registrar.

    In the standard: role architecture

    Registrar, operator, issuer and investor are distinct parties with distinct visibility — the production answer to "who may see what".

    Role architecture →

Suggested reading order from here

  1. Role architecture — the concept layer first (~10 min).
  2. One tutorial arc end-to-end: issuance → transfer → redemption (the role/credential steps repeat — skim them the second and third time).
  3. Token standard (CIP-56) as the reference you keep open while coding.
  4. The primer, last — useful as positioning context once the concepts already sit.

The vocabulary, placed ~5 min

Words stick when they attach to something you did. Every term below is anchored to a moment on this page — and the picture shows where each cluster lives, bottom to top:

Four-layer overview: Canton network, Daml language, this lab, token standard Stacked layers from bottom to top: Canton (network and runtime), Daml (the language), this lab (348 lines), and the token standard and registry. Each layer lists its key terms. An arrow marks the deep-dive edge from the lab to the standard. Token standard & registry — the production layer Registry Instrument Holding Transfer Instruction Allowlist · Blocklist CIP-56 This lab — the runnable anchor Cash · Bond DvP (propose-accept) Two-leg repo EligibilityCriteria YOU ARE HERE Daml — the language Party Template → Contract Signatory · Observer Choice Canton — network & runtime Canton synchronizer Participant node Ledger API · JSON API DAR
One picture, four layers. Glossary clusters 1–3 live on one layer each; cluster 4 is about reading the map itself. The deep-dive section climbs the lemon edge — from the lab to the standard.

The four clusters

1 · Canton — network & runtime

Canton

The network protocol: many participant nodes synchronize privately — there is no global broadcast to subscribe to.

met it: `daml start` booted a one-node "canton sandbox"
Participant

A node that hosts parties and their contracts, and exposes the APIs.

met it: dealer, mmf and riskdesk all lived on your sandbox participant
Ledger API · JSON API

The doors into a participant: gRPC (port 6865) and HTTP (7575).

met it: the 10/11/14 visibility counts came through port 7575
DAR

The compiled, deployable package of Daml code you upload to a participant.

met it: `daml start` built and uploaded `.daml/dist/…dar`

2 · Daml — the language

Party

An actor identity on the ledger; rights and visibility attach to parties, not accounts.

met it: Dealer, MMF, RiskDesk
Template → Contract

Class → instance: a template stamped with data becomes an active contract on the ledger.

met it: `Cash with owner = mmf; amount = 98.0 …`
Signatory · Observer

Who must authorize a contract vs who may see it — visibility is written into the contract itself.

met it: `observer issuer, disclosedTo` — and the 14/14 login
Choice

An operation a template offers; exercising one archives and creates contracts in a single atomic transaction.

met it: `DvpAccept`, `RepoClose`

3 · Registry — the token standard

Registry

The issuer-side system of record for an asset class on Canton — where instruments are defined and governed.

met it: the production layer the deep dive maps into
Instrument

The asset definition — its rules and compliance profile — of which holdings are issued.

met it: your `Bond` template is a hand-rolled instrument
Holding

A party's concrete position in an instrument.

met it: one `Cash` contract = one naive holding
Transfer Instruction

The standard's two-step transfer: propose, then settle atomically — across wallets that don't trust each other's code.

met it: your propose-accept DvP, generalized (CIP-56)
Allowlist · Blocklist

Credential-based pre-commit gates over who may hold or receive an instrument.

met it: `EligibilityCriteria`, productized
CIP

Canton Improvement Proposal — numbered specs the ecosystem builds against.

met it: CIP-56 = token standard; CIP-103 = wallet-based infra route

4 · Reading the docs — the genres

Primer

An explanation genre: orientation and positioning, deliberately without steps. Useful context — read it after the concepts sit, not before.

met it: the registry primer, last stop of the reading order
Quickstart

Should be the shortest path to one verifiable success. If it opens with a commercial agreement, it's an onboarding checklist wearing the wrong name.

met it: the diagnosis in callout 6
Tutorial vs Guide

Learning-oriented walkthrough vs task-oriented recipe — the core distinction of the Diátaxis framework.

met it: registry/tutorials vs registry/guides
Reference

Precise lookup material you keep open while coding — never the place to learn a concept from.

met it: the CIP-56 API pages

The four principles behind this redesign

Prerequisites first

Nothing a reader must install may appear after a command that needs it. Time estimates up front; version pinned.

Show success

Expected output verbatim, and an explanation wherever correct output looks like failure.

Prove the promise

The product's differentiator becomes a two-minute interactive tour, verified against the running system.

Fail with the reader

Troubleshooting covers the failures of this path, discovered by walking it, not imagined in a review meeting.