Getting Started
Install Canton Deploy​
Work from your Daml project root, the directory containing daml.yaml or the multi-package.yaml root.
Add Canton Deploy to components:
components:
- damlc:3.5.2
- daml-script:3.5.2
- oci://ghcr.io/lync-world/canton-deploy:0.1.1
DPM does not allow sdk-version and components: in the same file; use components: and list damlc / daml-script next to Canton Deploy if you need to pin them.
Then install everything the project declares:
dpm install package
On first install, DPM pins the component by digest and rewrites the line to:
oci://ghcr.io/lync-world/canton-deploy:0.1.1@sha256:…
This is expected; leave the pinned reference in place.
You can add and pin the component in one step:
dpm add component ghcr.io/lync-world/canton-deploy:0.1.1
dpm install package
The dpm add component command takes a full registry reference. The short form canton-deploy:0.1.1 resolves against Digital Asset's component registry and will work once Canton Deploy is published there.
Verify the installation:
dpm canton-deploy --help
Start Your LocalNet Participant​
For LocalNet, add canton-open-source to components (for example canton-open-source:3.5.17), run dpm install package, then start the sandbox:
dpm sandbox --ledger-api-port 5001 --admin-api-port 5002 --json-api-port 7575
It takes about 30 seconds and prints Canton sandbox is ready. Leave it running in its own terminal.
The default LocalNet ports are:
| API | Default Port |
|---|---|
| Admin API | 5002 |
| Ledger API | 5001 |
| JSON API | 7575 |
Initialize Canton Deploy​
From the project root, in another terminal:
dpm canton-deploy init
dpm canton-deploy status --network localnet
dpm canton-deploy deploy --network localnet
init asks whether to add a DevNet profile alongside LocalNet and whether to accept the defaults for each. For LocalNet, the defaults are:
- Host:
localhost - Admin:
5002 - Ledger:
5001 - JSON API:
7575 - TLS: disabled
- Authentication: LocalNet HMAC token
- Parties:
Alice,Bob - User:
ledger-api-user
Answer No to any prompt to enter your own values.
The LocalNet HMAC JWT uses an unsafe development secret and is intended only for a local sandbox. Other networks need an explicit JWT.