- Overview
- Tutorials
- Getting started
- Get started with Canton and the JSON Ledger API
- Get Started with Canton, the JSON Ledger API, and TypeScript
- Get started with Canton Network App Dev Quickstart
- Get started with smart contract development
- Basic contracts
- Test templates using Daml scripts
- Build the Daml Archive (.dar) file
- Data types
- Transform contracts using choices
- Add constraints to a contract
- Parties and authority
- Compose choices
- Handle exceptions
- Work with dependencies
- Functional programming 101
- The Daml standard library
- Test Daml contracts
- Next steps
- Application development
- Getting started
- Development how-tos
- Component how-tos
- Explanations
- References
- Application development
- Smart contract development
- Daml language cheat sheet
- Daml language reference
- Daml standard library
- DA.Action.State.Class
- DA.Action.State
- DA.Action
- DA.Assert
- DA.Bifunctor
- DA.Crypto.Text
- DA.Date
- DA.Either
- DA.Exception
- DA.Fail
- DA.Foldable
- DA.Functor
- DA.Internal.Interface.AnyView.Types
- DA.Internal.Interface.AnyView
- DA.List.BuiltinOrder
- DA.List.Total
- DA.List
- DA.Logic
- DA.Map
- DA.Math
- DA.Monoid
- DA.NonEmpty.Types
- DA.NonEmpty
- DA.Numeric
- DA.Optional
- DA.Record
- DA.Semigroup
- DA.Set
- DA.Stack
- DA.Text
- DA.TextMap
- DA.Time
- DA.Traversable
- DA.Tuple
- DA.Validation
- GHC.Show.Text
- GHC.Tuple.Check
- Prelude
- Smart contract upgrading reference
- Glossary of concepts
gRPC Ledger API Migration Guide¶
Migrating from Version 3.2 to Version 3.3¶
Application ID to User ID rename¶
Application ID was already synonymous with the User ID for all Canton deployements supporting authorization. This is pure rename without changing the semantics, except the slightly changed list of accepted characters for the User ID. (Please see both in value.proto)
Message with changed field(s) |
Migration instruction |
---|---|
GetMeteringReportRequest, PrepareSubmissionRequest, ExecuteSubmissionRequest, CompletionStreamRequest, Commands, Completion, ReassignmentCommand |
Field |
‘Domain’ is Renamed to ‘Synchronizer’¶
A simple renaming without changing the semantics.
Changed endpoint |
Migration instruction |
---|---|
GetConnectedDomains |
Endpoint renamed to |
Changed message |
Migration instruction |
---|---|
DomainTime, GetConnectedDomainsRequest, GetConnectedDomainsResponse, ConnectedDomain, Transaction, Metadata, PrepareSubmissionRequest |
Messages renamed: |
Message with changed field(s) |
Migration instruction |
---|---|
DisclosedContract, Commands, Created, Archived, ActiveContract, TransactionTree |
Field |
Completion |
Field |
OffsetCheckpoint |
Field |
ConnectedSynchronizer |
Fields renamed: |
event_id
Field Changes to offset
and node_id
¶
Field event_id
is converted into two fields: offset
and node_id
. These two properties identify the events precisely.
The structural representation of daml transaction trees changed: instead of exposing the root event IDs and the children for exercised events, only the last descendant node ID is exposed.
Changed endpoint |
Migration instruction |
---|---|
GetTransactionTreeByEventId, GetTransactionByEventId |
The |
Message with changed field(s) |
Migration instruction |
---|---|
CreatedEvent, ArchivedEvent, ExercisedEvent |
Field |
ExercisedEvent |
Field |
TransactionTree |
Field Field |
Miscellaneous¶
Message with changed field(s) |
Migration instruction |
---|---|
Completion |
Field |
Interactive submission¶
The interactive submission related proto definitions moved to the interactive folder.
Message with changed field(s) |
Migration instruction |
---|---|
ExecuteSubmissionRequest |
The |
Universal Streams¶
Universal Streams is a new feature introduced in 3.3. It has a broad set of changes that consolidate the flat and tree style formats together. The old API is now deprecated and is replaced by a new API in this release. There are two sets of changes needed:
Required changes to work with 3.3.
Calls to the old API need to use the new API before the next major release where the old API is removed.
Both changes can be done in this release if that is most efficient.
Required Changes in 3.3¶
Changed endpoint |
Migration instruction |
---|---|
SubmitAndWaitForTransaction |
Instead of If no
|
GetEventsByContractId |
In case of no events found, previously a Additionally: if |
GetTransactionByOffset, GetTransactionById |
The behavior of these endpoints changed: instead of returning an empty transaction, a |
Message with changed field(s) |
Migration instruction |
---|---|
Event |
The
|
GetUpdatesResponse |
The update |
Changes Required before the Next Major Release¶
The changes below must be made prior to the next major release because the old APIs will be removed. This includes any related Java language bindings.
A helpful note is included in the source code for those items that will be removed. The protobuf definitions contain documentation markers for the places where an endpoint, a message or a field will be removed in 3.4. Look for the following formulation:
// Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
Deprecated endpoint |
Migrating to |
Migration instruction |
---|---|---|
SubmitAndWaitForTransactionTree |
SubmitAndWaitForTransaction |
To retain the original behavior, the transaction_format field of the SubmitAndWaitForTransactionRequest should be defined with:
|
GetUpdateTrees |
GetUpdates |
To retain the original behavior, the
|
GetTransactionTreeByOffset |
GetUpdateByOffset |
To retain the original behavior, the include_transactions field of the GetUpdateByOffsetRequest should be defined with:
|
GetTransactionTreeById |
GetUpdateById |
To retain the original behavior, the include_transactions field of the GetUpdateByIdRequest should be defined with:
|
GetTransactionByOffset |
GetUpdateByOffset |
To retain the original behavior, the include_transactions field of the GetUpdateByOffsetRequest should be defined with:
|
GetTransactionById |
GetUpdateById |
To retain the original behavior, the include_transactions field of the GetUpdateByIdRequest should be defined with:
|
Deprecated message |
Migration instruction |
---|---|
SubmitAndWaitForTransactionTreeResponse |
|
TreeEvent, TransactionTree, GetUpdateTreesResponse, GetTransactionTreeResponse |
These were used in tree* query/streaming scenarios, which is deprecated. The respective non tree* endpoint should be used with setting transaction_shape to |
TransactionFilter |
|
GetTransactionByOffsetRequest, GetTransactionByIdRequest |
The GetUpdateByOffsetRequest and GetUpdateByIdRequest respectively should be used with setting the |
Message with deprecated field(s) |
Migration instruction |
---|---|
GetEventsByContractIdRequest |
The new To retain the original behavior, event format field should be defined with:
|
GetActiveContractsRequest |
The new To retain the original behavior, the
|
GetUpdatesRequest |
The new To retain the original behavior:
|
Deprecated Java Bindings¶
All java-binding classes that wrap the gRPC Ledger API messages slated for removal in 3.4, will be removed themselves. It will affect:
GetTransactionByIdRequest
GetTransactionByOffsetRequest
GetTransactionResponse
GetUpdateTreesResponse
SubmitAndWaitForTransactionTreeResponse
TransactionFilter
TransactionTree
TransactionTreeUtils
TreeEvent
JSON Ledger API v1 is Deprecated by JSON Ledger API v2¶
There are two JSON Ledger API versions in this release:
JSON Ledger API v1: exists in Daml 3.2. This version is deprecated and will be removed in the next major release.
JSON Ledger API v2: is introduced in this release and will be the supported JSON Ledger API version going forward.
Please refer to JSON Ledger API v2 migration guide for the specifics to migrate from JSON Ledger API v1 to v2. This must be done prior to the next major release.Œ
Identifier Addressing by-package-name¶
As described in value.proto
, the following interface and template identifiers formats are supported in Canton 3.3 for requests to the gRPC Ledger API:
package-name reference format (
#<package-name>:<module>:<entity>
) is supported and is the recommended format to use.package-id reference format (
<package-id>:<module>:<entity>
) is still supported but deprecated. Support is discontinued in Canton 3.4.
Prior to the next major release, all clients using the package-id reference format must switch to using the package-name reference format for all requests.
Migrating from Version 3.3 to Version 3.4¶
Preferred package version endpoints¶
A new set of endpoints supersedes and extends the existing functionality provided by InteractiveSubmissionService.GetPreferredPackageVersion
(gRPC) and interactive-submission/preferred-packages
(JSON). The new endpoints are:
InteractiveSubmissionService.GetPreferredPackages
(gRPC)interactive-submission/preferred-packages
(JSON)
Users must switch to using the new endpoints in Canton 3.4, as the old endpoints will be removed.
Existing users can switch to the new endpoints by adapting the request payload.
For example, in the gRPC version, construct the GetPreferredPackagesRequest
by populating one PackageVettingRequirement
with homonymous fields from the old GetPreferredPackageVersionRequest
.
For more details, refer to the protobuf definitions in interactive_submission_service.proto
.