canton-network-docs/SDKsWallet SDKUsing the SDKv0 to v1 migration
Ledger Namespace
The ledger namespace is used for preparing, signing, and executing transactions and other Ledger API operations.
Each step in lifecycle is clearer, workflowIds are generated automatically and there is better typesafety at each step.
The below example demonstrates how offline signing works.
Active Contract Set (ACS) queries
No need to manually enter get the ledger end for the offset and there is direct extraction of the activeContracts. However, we still have an
Availability
The ledger namespace is always available as part of the basic SDK interface. It’s initialized automatically when you create an SDK instance and doesn’t require additional configuration viaextend().
Key changes from v0 to v1
v0 used theuserLedger or adminLedger controller with implicit party context set via sdk.setPartyId().
v1 uses the ledger namespace where you:
- Pass
partyIdexplicitly to each operation - Have an explicit lifecycle with
prepare/sign/executechain instead of a single method - Access operations through logical groupings (
external,internal,dar, andacs)
Full example: online and offline signing
See all 164 lines
acs.readRaw method for unfiltered results.
DAR management
Migration reference
See also
- v0 to v1 migration overview
- Migration cheat sheet
- Configuration — SDK configuration
- Preparing and signing a transaction — Transaction lifecycle