CIP-PR-204: Canton Network Credentials Standard
Contents37 sections
Abstract
Define standard APIs for storing, retrieving, and using credentials on the Canton Network; and use these to solve application discovery, asset discovery, and party metadata discovery on the Canton Network.
Specification
The specification of this CIP consists of three parts:
- Credential Registry APIs: defines standard APIs for storing, retrieving, and using Canton Network credentials.
- Canton Credential Registry: specifies how these APIs are implemented in a decentralized registry run by the SV nodes as part of the Global Synchronizer. This registry serves as the base registry from which application discovery can start.
- Standardized Application and Metadata Discovery: specifies how these APIs and the Canton Credential Registry are used to standardize the discovery of specific kinds of applications on the network and their metadata such as the off-ledger APIs of CIP-0056 asset registries.
We provide details on each of these parts in the following subsections after giving a high-level overview of the roles and interactions involved.
High-Level Overview
This standard is concerned with entities and apps acting in the following roles:
- credential issuers: entities that issue credentials and back their veracity
- credential holders: entities that hold credentials and agree to the credential's claims
- credential registry administrators: entities that store and serve credentials, either published jointly by their issuer and holder or created by registry-internal workflows
- network explorers: entities building apps for exploring Canton Network activity and structure
- app providers: entities that operate apps that retrieve and use credentials in their UIs and/or in their on-ledger workflows
- app users: entities that use apps that use credentials
Entities often act in multiple roles. For example, a CIP-0056 token administrator that self-publishes their off-ledger token registry URLs to the Canton Credential Registry acts both as the credential issuer and the credential holder of the corresponding credential. The claim in the credential associates the property splice.lfdecentralizedtrust.org/registry-urls to the actual URLs. Token Standard wallets are typical apps using credentials with that kind of property. They use them to resolve the admin party-ids encountered in tokens held by a wallet user to the URLs to query to execute transfers and other actions.
The following diagram shows how the APIs defined in this CIP mediate the interaction between the apps in the different roles. Arrows point from clients to servers of APIs.

As we can see, the APIs cover the interaction between the different kinds of apps and credential registries. Standardized APIs are shown in blue and custom APIs are shown in black. Solid arrows show mandatory APIs while dashed arrows show optional APIs. The green labels name the parties that represent the respective apps or entities on-ledger. Credential holders use custom APIs and UIs to interact with credential issuers. App providers can use explorer-specific APIs for richer lookups, see Rich Credential Lookup. App users are not shown in the diagram as they do not directly interact with any of the APIs standardized in this CIP. They rely on the app provider making suitable choices with respect to how to use the standardized APIs to make use of credentials in the apps' UIs and on-ledger workflows.
The diagram does not show the Credential Registry Info API, which is used for extensibility. It allows apps interacting with the registry to figure out what standards the registry supports and what limits it enforces.
Note that there can be many credential registries in the network. One of them is the Canton Credential Registry, which serves as a base credential registry for the network. It is for example used to discover the other credential registries in the network.
Note also that credential registries are not required to support third-party credential issuers. As explained below, the Credential Registry Publication API is optional. This enables a simpler deployment model of Credential Issuer apps where their one app serves the dual purpose of issuing credentials and serving the Credential Registry Query API.
Credential Registry APIs
The APIs are split into three parts, analogous to how the CIP-0056 APIs separate holdings, registry metadata, and transfer instructions:
| API | Kind | Required | Purpose |
|---|---|---|---|
| Credential Record API | Daml | MUST | Data schema of credentials and the Credential interface implemented by credential records |
| Credential Registry Query API | HTTP | SHOULD | Registry info, credential lookup, and bulk credential retrieval |
| Credential Registry Publication API | Daml + HTTP | MAY | Joint publication of credential records by their issuer and holder |
The Credential Record API defines what a credential is, independently of any registry service. The two registry APIs define how a registry serves and accepts credential records.
These APIs are final only once they are published in a Splice release. Small changes are expected until then, as they are only released once implemented and validated in Splice.
Credential Record API
The Credential Record API mediates the on-ledger interactions of apps and wallets with credential records. It consists of the Credential Daml interface, which every credential registry MUST implement for the credential records it stores.
Credential Interface
The data schema of credentials is inspired by the W3C Verifiable Credentials Data Model. Concretely, it is defined by the following Daml code copied from the reference implementation:
-- | A claim that is part of a credential.
data Claim = Claim with
subject : Optional Text
-- ^ The subject of the claim.
--
-- If not set, the holder is the subject of the claim.
-- If set, then the claim pertains to the specified subject.
--
-- Registries MUST enforce that, when the subject is set it:
-- - is not the empty string `""`
-- - is not equal to `partyToText holder`
-- - only contains characters matching the regex `[a-zA-Z0-9 ._~:/?#\[\]@!$&'()*+,;=%-]`
--
-- These are the characters allowed in URIs by RFC 3986, so that any URI (e.g., a URL or a DID)
-- can be used as a subject, plus the space character, which is allowed in Daml party names.
property : Text
-- ^ The property of the claim.
--
-- Properties MUST only contain characters matching the regex `[a-zA-Z0-9._:/-]`.
--
-- All properties MUST be namespaced in the form `namespace/property` to avoid collisions.
-- The namespace `cip-<nr>` is reserved for CIP-defined properties.
-- All other applications MUST use a DNS name for a domain under their control.
-- For example, a property `prop` defined by the domain `example.com` would be `example.com/prop`.
value : Text
-- ^ The value of the claim.
deriving (Eq, Show)
-- | A view of a credential record stored in a credential registry.
data CredentialView = CredentialView with
admin : Party
-- ^ The party that administers this credential registry.
issuer : Party
-- ^ The party that issued the credential.
holder : Party
-- ^ The party that holds the credential.
claims : [Claim]
-- ^ The claims of the credential.
--
-- Claims MUST be unique per `(subject, property)` pair within a credential.
validFrom : Optional Time
-- ^ The time from which this credential is valid.
validUntil : Optional Time
-- ^ The time until which this credential is valid.
createdAt : Optional Time
-- ^ The time at which this credential record was created.
expiresAt : Optional Time
-- ^ The time at which this credential record expires in the registry.
--
-- The registry MAY archive the record after this time.
--
-- Separate from `validUntil`, as the expiry time of the
-- credential record in the registry is determined by the registry policy and
-- may differ from the validity period of the credential itself.
revokableBy : [[Party]]
-- ^ The groups of parties that are allowed to jointly revoke this credential.
--
-- The credential can be revoked by any one of these groups acting together.
-- Wallets are expected to use this field to determine whether their user
-- can call the `Credential_Revoke` choice on their own, i.e., whether
-- one of the groups consists only of the user's party.
meta : Metadata
-- ^ Metadata associated with this credential record. Used for extensibility.
deriving (Eq, Show)
-- | A credential record stored in a credential registry.
interface Credential where
viewtype CredentialView
credential_revokeImpl : ContractId Credential -> Credential_Revoke -> Update Credential_RevokeResult
credential_getImpl : ContractId Credential -> Credential_Get -> Update CredentialView
nonconsuming choice Credential_Revoke : Credential_RevokeResult
-- ^ Revoke this credential record.
--
-- The choice is non-consuming to maximize implementation flexibility.
-- Implementations MUST ensure that the credential is properly revoked according to the registry's policy.
with
actors : [Party]
-- ^ The parties revoking the credential.
--
-- Registries MUST allow any group listed in `revokableBy` to revoke the credential.
-- Registries SHOULD include both the holder and the issuer individually in `revokableBy`.
controller actors
do credential_revokeImpl this self arg
nonconsuming choice Credential_Get : CredentialView
-- ^ Fetch the view of the credential.
--
-- Registries MAY restrict the actor in case the credential is not public.
--
-- Callers SHOULD check that the fetched credential view matches their
-- expectations, e.g., that it has the correct admin, holder and issuer.
with
actors : [Party]
-- ^ The parties fetching the contract.
controller actors
do credential_getImpl this self arg
data Credential_RevokeResult = Credential_RevokeResult with
archivedCredential : CredentialView
-- ^ The view of the revoked credential. It is returned for convenience
-- so that the caller does not need to fetch it ahead of time.
meta : Metadata
-- ^ Additional metadata specific to the revoke operation, used for extensibility.
deriving (Eq, Show)
The Credential interface is specified in Splice/Api/Credential/RecordV1.daml.
Credential registries MAY enforce limits on the credentials they store to avoid operational problems from overly large credentials. The limits are communicated to users via the Credential Registry Info API. See Canton Credential Registry Limits for the concrete limits enforced by the Canton Credential Registry.
Expected App Usage of the Credential Interface
We expect applications that need to fetch credentials as part of their Daml workflows to use Credential_Get.
We also expect wallets to be able to list all credentials held by their user by asking the user's validator node for all active contracts implementing the Credential interface. This covers the credentials from all credential registries at once, see Listing Credentials via the Ledger API. Wallets can let the user revoke an unwanted credential using the Credential_Revoke choice, provided the credential's revokableBy field contains a group consisting only of the user's party. We also expect that wallets can let the user open the credential issuer's custom dApp for managing that credential. We expect them to be able to do so as explained in Standardized Application and Metadata Discovery.
Note that apps and users that want to use credentials from a specific registry in their Daml workflows must vet the DAR files of that credential registry, in addition to the splice-api-credential-record-v1 DAR.
Credential Registry Query API
Credential registries SHOULD serve the read-only Credential Registry Query API. It consists of the endpoints described in the following sections, which are specified in credential-registry-query-v1.yaml.
A registry serves the credential records of one synchronizer, named by the Credential Registry Info API.
Queries are evaluated and ordered by ledger effective time (LET): a query at asOf sees the records created at or before asOf and not archived at or before it.
Registries serve queries only up to publishedUntil, which trails the latest processed record time far enough that no later transaction can have a LET at or before it, see Ordering by Ledger Effective Time.
A query at the same asOf thus returns the same result on every backend, which enables BFT reads.
Credential Registry Info API
The purpose of the credential registry info API is twofold:
- It enables an asynchronous rollout of newer versions of the credential registry APIs.
- It informs clients about the registry's synchronizer and constraints (e.g., limits on the number of claims or results, the event retention window, or how far
asOfmay lag behindpublishedUntil).
A separate endpoint serves the current publishedUntil.
Credential Lookup API
The credential lookup API serves queries of the form (property?, issuer?, holder?, subject?):
- All filters are optional. They MUST be specified in order: a filter MAY only be specified if all filters before it are specified.
propertymatches the whole property of a claim, not a prefix.- Without any filter, the API lists all active records.
It also supports a boolean flag effectiveOnly to return only records whose validity period [validFrom, validUntil) covers asOf, where an unset bound imposes no limit.
The API returns the credential records with matching issuer and holder that contain a claim with matching property and subject.
A subject equal to the holder also matches claims without a subject, as those pertain to the holder.
This is all that is needed for the lookups in Standardized Application and Metadata Discovery, and it keeps the indexing overhead for credential registries small. Richer queries are left to network explorers, see Rich Credential Lookup.
By default the API only returns the CredentialView of a credential. It optionally also includes the underlying contract so that it can be disclosed for usage in a Daml transaction that reads the credential.
The API also supports looking up a single active record by contract id.
Handling Duplicates
The API returns the LET of the transaction that created each credential contract, and orders the results by LET descending, with contract id ascending as the tie-break.
Two claims are duplicates if they have the same key (issuer, holder, subject, property), where issuer and holder are those of the records containing the claims, and an unset subject stands for the holder.
When querying with a fully specified query (property, issuer, holder, subject) and effectiveOnly = true, all returned records contain a claim with the queried key, and the first returned record is the one that should be used for last-write-wins semantics.
For queries that are not fully specified, or that do not set effectiveOnly, clients must implement the last-write-wins semantics themselves.
They can do so by selecting, for each key, the claim with that key from the first record in the returned order that contains such a claim and whose validity period covers asOf.
The API MAY return records whose expiresAt has passed, but which the registry has not yet archived.
Clients SHOULD ignore expiresAt when choosing a record, as it is the validity period given by validFrom and validUntil that determines whether a credential is effective.
Note that a renewal re-creates a record as a new contract with a new LET,
so the renewed record counts as the latest write, even if its createdAt is older than that of a record with a duplicate claim.
Bulk Credential Retrieval API
The purpose of the bulk credential retrieval API is to enable network explorers to ingest all credentials of a registry as they are created, updated, and archived.
The corresponding HTTP endpoint serves pages of create and archive events in ascending LET order, with contract id ascending as the tie-break, up to publishedUntil or an earlier bound set by the client.
An explorer starts from a snapshot: it lists all active records via the Credential Lookup API without filters and without effectiveOnly, reading all pages at the same asOf and thus within the registry's maximum asOf lag. It then reads the events after that asOf.
A registry MAY prune the events of records archived longer ago than its retention window, which it advertises via the Credential Registry Info API. An explorer that falls further behind than that window starts over from a new snapshot.
Registries SHOULD support a minimum retention window of 7 days to ensure that explorers can reliably ingest all credential events.
BFT Reads
Clients read from a registry with n backends as follows, where f = ⌊(n − 1) / 3⌋:
- Fetch
publishedUntilfrom allnbackends, wait for at leastn − fresponses, and take the(f + 1)-th lowest of them. At leastn − 2f ≥ f + 1backends report to have reached it, so at least one honest backend has, and the other honest backends follow, aspublishedUntilnever decreases. Use it asasOf, or for events as the upper bound together with an explicitlimit, and keep it across retries. - Send the request to
2f + 1backends, and to the remaining ones if fewer thanf + 1responses match. - Accept a response once
f + 1backends returned it, comparing as JSON rather than bytes. A 404 counts as a response; any other failure counts as a mismatch. - Otherwise fail with 503, so that the caller retries with the same
asOf.
A lookup by contract id can skip step 1 and compare only the returned credential, which never changes for a contract id; it may then still return a just-archived record.
JSON comparison relies on the single canonical time format that the OpenAPI specifies, so that equal times are equal strings.
Rich Credential Lookup
Network explorers MAY offer richer lookups than the standardized Credential Lookup API, for example by property prefix, by several issuers, or by subject alone. They ingest credentials through the Bulk Credential Retrieval API and build their own indexes. This CIP does not standardize such lookups, and the Canton Credential Registry does not serve them.
Credential Registry Publication API
The purpose of the Credential Registry Publication API is to enable credential issuers and holders to jointly create, update, and archive credentials in a third-party credential registry. Each credential registry MUST document whose authorization it requires to create a credential, and SHOULD require the authorization of both issuer and holder. The Canton Credential Registry requires both, and also the payer when the update names one. The specific workflows for obtaining this authorization and determining the claims of the credential are provided by the issuer and implemented in their credential issuance app.
Implementing this API is optional for credential registries. They MAY decide to only support registry-internal workflows for creating credentials, and not offer third-party issuers the right to publish credentials to that registry.
This API uses the factory pattern pioneered in CIP-0056: the CredentialFactory Daml interface provides a choice CredentialFactory_UpdateCredentials that allows for a bulk update of credentials with the same issuer and holder, executed by the parties in its actors argument. Each element of its newCredentials argument becomes one credential record with its claims, its validity period and, optionally, a requested expiresAt. Registries MUST reject an expiresAt they do not support rather than change it, and MAY charge a fee for one beyond their default, taken through registry-specific entries in the choice's extraArgs; see Extended Expiration Durations for the Canton Credential Registry. A corresponding HTTP API endpoint allows retrieval of the context to call that choice.
The CredentialFactory Daml interface and the HTTP API endpoint are specified in:
Canton Credential Registry
Splice adds a decentralized base credential registry that is run by the SV nodes as part of the Global Synchronizer.
Its admin party is the dso party, and it implements all the APIs defined above, including the optional Credential Registry Publication API.
It sets revokableBy to [[holder], [issuer]] on all its records, so that either the holder or the issuer can revoke a record on their own.
It uses a retention window of 7 days for the events served by the Bulk Credential Retrieval API, and accepts an asOf up to 1 hour behind publishedUntil.
By default, there is no Canton Coin (CC) payment required for creating credential records in the registry.
Instead, the registry expires the records at the end of a free period of 90 days by default (configurable by SV voting),
so that the traffic cost of creating and renewing them covers their storage cost.
This CIP does not define automatic renewal. To keep a record beyond its expiresAt, its issuer and holder
jointly renew it via the CredentialFactory, passing it in oldCredentials of an update that creates it again with a new createdAt,
either without burning CC or by paying for a longer lease, as described in Extended Expiration Durations.
Extended Expiration Durations
The registry supports leases beyond the free period, paid by burning CC.
The default fee is 1.0 USD/year (configurable by SV voting).
A new record expires at its requested CredentialParams.expiresAt or, without one, at createdAt plus the free period, capped at validUntil if that is set.
The registry rejects a record whose resulting expiresAt is not in the future, and a requested expiresAt that is later than validUntil.
The fee of a CredentialFactory_UpdateCredentials is computed over all its records and burned once:
freeUntil = requestedAt + freePeriod
paidDays = sum over new records n of max(0, n.expiresAt - freeUntil)
- sum over archived records o of max(0, o.expiresAt - max(requestedAt, o.createdAt + freePeriod))
feeUsd = max(0, paidDays) / 365 * yearly fee
feeCc = feeUsd / CC price of the ExternalPartyConfigState in the choice context
Durations are in days without rounding. Only the paid lease that an archived record has left is credited, not its free period, so free periods do not add up across renewals.
A paid update names the payer in cip-tbd/extended-expiry-paid-by in extraArgs.meta and passes the payer's CC holdings in cip-tbd/extended-expiry-funding in extraArgs.context.
Its actors are then the issuer, the holder and the payer; the payer can differ from both and gets the change back.
An update without a fee accepts these entries, with the payer among the actors, and burns nothing.
Canton Credential Registry Limits
The Canton Credential Registry rejects records that are too large to index and serve from Scan. It does not validate claim content. Content checks are application-specific and would bind the registry to particular use cases.
A credential record is accepted by the Canton Credential Registry only if all of the following hold:
- it contains at most 32 claims.
- its claims are unique per
(subject, property)pair. - each claim property is at most 255 characters and each claim subject is at most 255 characters, so that a full party-id can appear as subject.
- each claim value is at most 4096 characters.
- if both are set,
validUntilis later thanvalidFrom; and if set,validUntilis later thancreatedAt. Note thatvalidFrommay be earlier thancreatedAt, so that credentials can be registered even within their validity period.
The registry sets createdAt to the requestedAt argument of CredentialFactory_UpdateCredentials, which is checked to be in the past and at most 24 hours old.
The 24 hours leave external parties time to prepare and sign the update before submitting it.
requestedAt must also not be before the createdAt of any record the update archives, so that the credit of their paid lease cannot be inflated.
expiresAt is set as described in Extended Expiration Durations, and is never later than validUntil.
The size limits are advertised via the Credential Registry Info API. Other registries MAY choose different limits.
Standardized Application and Metadata Discovery
Together the APIs defined in this CIP and the Canton Credential Registry enable
defining standard ways to discover applications and metadata about them.
It works by applications using self-published credentials in the Canton Credential Registry to advertise their capabilities and metadata, which can then be discovered by apps by querying the registry.
Clients look up property p of party X with the Credential Lookup API query (p, X, X, X) and effectiveOnly = true,
and use the claim of the first returned record, as described in Handling Duplicates.
The concrete claims to use in these credentials are usually defined in CIPs.
This works without conflicts as we expect that the properties in a credential's claims have the form namespace/property and the namespaces are one of the following:
cip-<nr>: for properties defined in a CIP-0002.<dns-name>: for properties defined by an organization that owns the DNS name<dns-name>. These namespaces can be freely used by organizations to define their own properties in a way that does not conflict with standardized properties from CIPs or properties defined by other organizations.
The following sections show this approach in action. We expect future CIPs to define additional well-known properties for discovering applications and metadata of a particular kind.
Discovering Credential Registries
This CIP defines the property cip-tbd/credential-registry-urls.
It serves to discover the off-ledger credential registry API of a specific credential registry admin party registryAdmin.
It is published by registryAdmin using a self-published credential (issuer = holder = registryAdmin) in the Canton Credential Registry, with the claim's subject unset.
It specifies a comma-separated list of URL prefixes for party registryAdmin. Clients append the paths of the credential registry OpenAPI specs to them, as for the CIP-0056 registry URLs.
Multiple URLs are supported for decentralized registries, so that clients can implement BFT reads.
Data that clients use in a Daml transaction, such as disclosed credential contracts and choice contexts, can be fetched from any one URL, as the transaction validates it on-ledger; clients retry with another URL if the submission fails, as described in CIP-0056.
Data that is only used off-ledger, such as lookup results used for discovery, is read as described in BFT Reads.
Discovering Credential Issuer Applications
This CIP defines the property cip-tbd/credential-issuer-app-url.
It serves to discover the CIP-0103 dApp of a specific credential issuer party issuer. It is self-published by the issuer party (issuer = holder = issuer) in the Canton Credential Registry, with the claim's subject unset. The idea is that the user's wallets read the user's credentials from their node, and then query the Canton Credential Registry using cip-tbd/credential-issuer-app-url to discover the URL for the issuer-specific dApp to manage the user's credentials. We expect the wallet UI to offer a redirect to that dApp. Such redirects may add a credential-cid=<contract-id> query parameter to the URL to focus on a particular credential. Whether to offer such a UI is optional for credential issuers.
Discovering CIP-0056 Registries
The property splice.lfdecentralizedtrust.org/registry-urls is already defined in CIP-0056.
Token registries publish it in a self-published credential (issuer = holder = registry admin, subject unset) in the Canton Credential Registry. This enables wallets and apps to automatically discover the off-ledger API URLs of token registries as outlined in CIP-0056. It replaces the CNS-based lookup described there.
Discovering the Canton Credential Registry and Canton Coin Token Registry
The above properties will be used to make the Canton Credential Registry and the Canton Coin Token Registry discoverable by making the dso party publish a credential in the Canton Credential Registry with issuer = holder = admin = dso and claims
| Subject | Property | Value |
|---|---|---|
| unset | cip-tbd/credential-registry-urls | <scan-url1>,...,<scan-urlN> |
| unset | splice.lfdecentralizedtrust.org/registry-urls | <scan-url1>,...,<scan-urlN> |
The Scan URLs are the ones published per network here: https://canton.foundation/sv-network-status/.
These URLs, or the Scan proxy of a validator node, serve as the bootstrap for discovery: clients use them to query the Canton Credential Registry.
The dso credential above serves to make the Canton Credential Registry discoverable in the same way as any other credential registry.
The SV app takes care of creating and updating this credential as the Scan URLs change over time.
Motivation
There is no standardized way for application discovery on the Canton Network. This is for example becoming a problem for the growing set of token registries on the network, as the approach to their off-ledger API discovery described in CIP-0056 cannot yet be implemented. We also expect this application discovery problem to appear for other types of applications and services on the Canton Network. This CIP solves application and service discovery on the Canton Network.
Furthermore, this CIP provides a foundation for publishing and discovering metadata about parties on the Canton Network, which apps can use to improve how they display actors and counterparties, e.g., using party profiles as proposed in this CIP.
Rationale
Focus on Public Credentials Only
This CIP covers only credentials that can be discovered publicly, as that is all that is required for its motivating use cases: application and metadata discovery. Public credentials also enable explorers to index the network, which is what the Bulk Credential Retrieval API is built for.
Private credentials are left to a future CIP. The Credential_Get choice already allows registries to restrict who can fetch a non-public credential, so that such a CIP can build on the interfaces defined here. Standardizing access control for credentials published to a registry is a non-trivial effort, and is easiest where the credential issuer and the registry are run by the same entity, so that the registry can enforce issuer-specific access rules.
Listing Credentials via the Ledger API
Wallets list their own user's credentials through the Ledger API of the user's validator node, and use the Credential Registry Query API to look up credentials of other parties, for example for discovery. Looking up the user's credentials via the Ledger API has two advantages:
- It also works for private credentials, which are not publicly discoverable through the HTTP APIs.
- It provides a unified view of all credentials of the user, regardless of which registry they are stored in.
Relationship to W3C Verifiable Credentials
The data schema of credentials is inspired by the W3C Verifiable Credentials Data Model,
but is deliberately simpler: claims are flat (subject, property, value) text triples instead of JSON-LD graphs,
and there is no embedded proof section.
This simplification is possible because the Daml ledger provides what proofs provide in the W3C model:
credential records are created with the on-ledger authorization of their issuer and holder
(for registries following the SHOULD in the Credential Registry Publication API),
and their integrity is guaranteed by the ledger.
Flat text triples also keep the lookup and indexing requirements for registries simple and make size limits easy to specify and enforce. Interoperability with full W3C Verifiable Credentials can be standardized in a future CIP if needed.
No Self-Authenticating Credentials
Self-authenticating credentials, where the validity of the credential can be verified solely based on its content and cryptographic proofs, are out of scope for this CIP. Instead, credential records carry on-ledger authorization: they are created with the authorization of both issuer and holder (for registries following the SHOULD in the Credential Registry Publication API), and the ledger guarantees their integrity.
Beyond that, the trust in a credential comes from the reputation and verification processes of the issuing party
and the registry storing it.
This greatly lowers the technical complexity and mirrors the trust model taken for token registries,
whose admin party is trusted to manage the registry and its entries.
Where required, decentralized parties and governance can be used to enhance trust and reduce reliance on a single entity,
as done for example for the Canton Credential Registry.
No Standardized Credential Verification
Whereas the previous section is about verifying the credential artifact itself, this section is about verifying the content of its claims. The standardization of such claim verification (e.g., checking that a party claiming an email address actually controls that email address) is intentionally left out of the scope of this CIP. It may be addressed in future CIPs. The ecosystem can also develop its own verification frameworks, with apps relying on specialized credential issuers that verify the claims they attest to.
Validity Periods
The standard supports credentials with an explicit validity period, given by validFrom and validUntil,
so that they can be published ahead of time and have a limited time-to-live.
Publishing them ahead of time simplifies operational workflows, for example, updating the HTTP server from which
a token registry's off-ledger APIs are served.
Using a limited time-to-live is a security best practice.
The effectiveOnly flag of the Credential Lookup API lets clients
retrieve only credentials whose validity period is currently effective.
The record expiry time expiresAt is deliberately separate from validUntil:
it reflects the registry's storage policy for the record,
whereas the validity period is part of the credential's semantics as agreed between issuer and holder.
This separation allows registries to expire and re-create records (e.g., for renewals)
without changing the meaning of the credential.
Last-Write-Wins Semantics for Duplicates
Registries do not enforce uniqueness of (issuer, holder, subject, property) across credential records.
Enforcing uniqueness on-ledger would introduce contention on credential creation and complicate
workflows that intentionally create duplicates, such as publishing forward-dated credentials.
Instead, duplicates are resolved deterministically at read time using last-write-wins semantics based on LET, as specified in Handling Duplicates. The submitting participant picks the LET, but Canton accepts a transaction only if its LET lies within the synchronizer's ledger time tolerance of its record time, so a writer can reorder its records only if their record times are less than twice that tolerance apart. Explorers ingesting via the Bulk Credential Retrieval API see the same LETs and thus reproduce the order. This keeps writes cheap and contention-free while still giving all clients a consistent view of which record is current.
Ordering by Ledger Effective Time
The query APIs order and evaluate records by LET rather than by record time:
- LET is the time that Daml code observes, so
effectiveOnlyatasOfagrees with the validity checks that Daml code makes on-ledger. - Every create event carries its LET, also when a backend learns a contract from an ACS snapshot, so backends compute the same results however they started.
The price is a publication lag. A transaction's LET may lie up to the synchronizer's ledger time tolerance before its record time, so a backend that has processed all transactions up to record time t can still receive one with a LET before t.
Registries therefore serve results only up to publishedUntil, which trails that record time by a configured bound of at least the synchronizer's ledgerTimeRecordTimeTolerance.
As that tolerance is a dynamic synchronizer parameter, the bound must also cover any value it may be changed to.
New records thus become visible only after that delay, which the discovery use cases of this CIP tolerate.
The APIs are built for registries that serve credential records assigned to a single synchronizer, such as the Canton Credential Registry, which keeps them simple.
Registries that want to support several synchronizers use a separate admin party per synchronizer and duplicate their credentials across the synchronizers, so that consumers can use them without reassignment, which would lead to unwanted contention.
Backwards Compatibility
This CIP is backwards compatible: it only adds functionality.
Reference Implementation
The HTTP and Daml APIs and the Daml code for the Canton Credential Registry are available on this Splice branch.
The Canton Credential Registry is expected to be implemented as follows:
- The Splice Daml code is changed so that there is:
- A template that implements the
Credentialinterface and serves to record credentials in the registry. - An implementation of the
CredentialFactory, so that issuers and holders can jointly publish and renew credentials in the registry, optionally paying for a longer lease by burning CC. - The free period and the yearly fee as optional fields of
AmuletConfigthat default to the values of this CIP, so that SVs can change them by vote.
- A template that implements the
- The Scan app backend running on SV nodes implements the HTTP endpoints of the Credential Registry Query API and the Credential Registry Publication API,
so that any Scan app can be used to interact with the Canton Credential Registry.
The Scan app internally indexes all credentials in its backing Postgres DB, including recently archived ones,
so that it can serve queries at a past
asOfand the events of archived records within the retention window. - The Scan app proxy served by the validator app implements the same HTTP APIs, calling out to multiple Scan apps and comparing the results to implement BFT reads.
Changelog
- 2026-11-27: Ready for review.
Split the APIs into a Credential Record API, a Credential Registry Query API, and a Credential Registry Publication API;
renamed the DSO Credential Registry to Canton Credential Registry;
added BFT reads,
asOfqueries ordered by ledger effective time, and paid lease extensions by burning CC; added rationale for the main design choices. - 2026-11-03: Revised draft
- 2026-01-09: Initial draft
Copyright
This CIP is licensed under CC0-1.0: Creative Commons CC0 1.0 Universal