canton-daml-templates
Installation
SKILL.md
Canton Daml Templates
Overview
A template is a type of contract that can be created — it defines the data a contract holds, who can see/act on it, and (with choices) what actions are possible. A contract is an instance of a template. Contracts are immutable: they are only ever created or archived.
Structure: template / with / where
template Token
with
owner : Party -- create arguments (the contract's data)
where
signatory owner -- whose authority creates/archives it
template Tokenstarts the definition (Daml is whitespace/layout-sensitive).- The
withblock lists fields and types (:reads "of type"); these are in scope in the body. - The
whereblock holds the template body: signatories, observers,ensure, keys, and choices.
Signatories (required)
signatory names the parties whose authority is required to create or archive the contract — every template needs at least one. Daml guarantees signatories see all transactions that create or archive the contract.