The Canton Name Service (CNS) maps human-readable names to party identifiers on Canton Network. It serves a similar function to DNS on the internet: instead of sharing a long, opaque party ID likeDocumentation Index
Fetch the complete documentation index at: https://docs.canton.network/llms.txt
Use this file to discover all available pages before exploring further.
auth0_007c675a429eaf831f0991308d85::12201abe669f..., you can share a name like alice.unverified.cns.
CNS is implemented as a set of Daml contracts on the Global Synchronizer, governed by the DSO party. The underlying code is called the Amulet Name Service (ANS) in the Splice codebase.
Name Format
CNS entry names follow the pattern<chosen-name>.unverified.cns. The suffix .unverified.cns is appended to all user-registered names. The unverified label indicates that no identity verification has been performed on the registrant — anyone with a wallet and sufficient Canton Coin can register a name.
The DSO itself holds a special entry, dso.cns, which has no expiration and no contract ID (it is provided directly by the DSO rather than through the standard registration flow).
How Registration Works
Registering a CNS entry is a multi-step process built on the Daml subscription payment model:- The user calls the POST
/v0/entry/createendpoint on the Validator App’s ANS API, providing aname,url, anddescription. - The Validator App exercises the
AnsRules_RequestEntrychoice, which creates anAnsEntryContextcontract and aSubscriptionRequestcontract. - The user accepts the subscription request through their wallet, which triggers an initial payment in Canton Coin.
- The DSO automation collects the initial payment (
AnsEntryContext_CollectInitialEntryPayment), burns the Canton Coin transferred to the DSO, and creates theAnsEntrycontract.
AnsRulesConfig on the AnsRules contract. The payment goes to the DSO party and is burned — it is not redistributed.
Renewal
CNS entries expire. Each entry has anexpiresAt timestamp, and the owner must renew before that time to keep the name.
Renewal uses the same subscription payment mechanism. When a renewal payment comes due, the wallet automation can process it automatically if the user has sufficient Canton Coin and has enabled auto-renewal. The DSO automation then exercises AnsEntryContext_CollectEntryRenewalPayment, which burns the payment and extends expiresAt by the configured entryLifetime interval.
If an entry is not renewed before expiration, any signatory can archive it by exercising AnsEntry_Expire.
Name Resolution
CNS supports resolution in both directions — name to party, and party to name (similar to forward and reverse DNS). The Scan API provides three public endpoints for lookups:- GET
/v0/ans-entries/by-name/{name}— resolves an exact name to its entry, including the owning party ID - GET
/v0/ans-entries/by-party/{party}— resolves a party ID to its CNS entry - GET
/v0/ans-entries?name_prefix=<prefix>&page_size=<n>— searches entries by name prefix
alice.unverified.cns instead of the full party ID.
These same endpoints are available through the Validator App’s Scan Proxy API (under /v0/scan-proxy/ans-entries/*), which provides BFT verification by querying multiple Super Validator nodes and returning the consensus result.
Storage on the Global Synchronizer
CNS state lives entirely on the Global Synchronizer as Daml contracts in thesplice-amulet-name-service package. The key contract types are:
AnsRules— singleton contract holding the configuration (entry fee, lifetime, renewal duration). Signed by the DSO party.AnsEntryContext— tracks the relationship between a CNS entry and its subscription. Signed by both the DSO and the entry owner.AnsEntry— the actual name record, containing the name, owner party, URL, description, and expiration time. Signed by both the DSO and the entry owner.
API Reference
CNS functionality is split across two APIs exposed by the Validator App: ANS API (entry management) — see the ans-external.yaml OpenAPI spec:- POST
/v0/entry/create— request creation of a new entry - GET
/v0/entry/all— list all entries owned by the authenticated user
- GET
/v0/ans-entries— list entries by name prefix - GET
/v0/ans-entries/by-name/{name}— look up an entry by exact name - GET
/v0/ans-entries/by-party/{party}— look up an entry by party ID - POST
/v0/ans-rules— retrieve the current ANS rules configuration