We represent ContractIds as strings. Their exact format of these strings depends on the ledger
the Daml application is running on.
The purpose of the intersection with { [ContractIdBrand]: T } is to
prevent accidental use of a ContractId<T> when a ContractId<U> is
needed (unless T is a subtype of U). This technique is known as
"branding" in the TypeScript community.
The counterpart of Daml's
ContractId T
type.We represent
ContractId
s as strings. Their exact format of these strings depends on the ledger the Daml application is running on.The purpose of the intersection with
{ [ContractIdBrand]: T }
is to prevent accidental use of aContractId<T>
when aContractId<U>
is needed (unlessT
is a subtype ofU
). This technique is known as "branding" in the TypeScript community.