canton-network-docs/SDKsWallet SDKUsing the SDKv0 to v1 migration
Token Namespace
The token namespace provides methods to manage token operations including transfers, holdings, UTXOs, and allocations on the Canton Network. In v1, the token namespace replaces the
Option 2: Add token namespace later using extend()
This enables thread-safe concurrent operations and clearer code organization.
Accepting, rejecting, or withdrawing transfers
Listing pending transfers
You can also specify offsets for pagination:
Transactions by updateId:
You can specify additional parameters for pagination and limits:
Merging UTXOs
Merging consolidates multiple small UTXOs into larger ones to improve performance.
The merge operation groups UTXOs by instrument and creates self-transfers to consolidate them. You can optionally provide specific UTXOs to merge:
The
Executing, withdrawing or cancelling allocations
tokenStandard controller from v0.
Availability and extensibility
The token namespace is an extended namespace that requires configuration. You can initialize it either during SDK creation or later using theextend() method.
Option 1: Initialize during SDK creation
Key changes from v0 to v1
v0 used thetokenStandard controller with implicit party context set via sdk.setPartyId().
v1 uses the token namespace where you:
- Pass
partyIdexplicitly to each operation - Initialize the namespace with configuration
- Access operations through logical groupings (
transfer,utxos,allocation)
Transfers
Creating transfersHoldings
Holdings represent the transaction history of token ownership for a party.UTXOs
UTXOs (Unspent Transaction Outputs) are the actual holding contracts that represent token balances. Listing UTXOsAllocation
Allocations handle the issuance and distribution of new tokens. Listing pending allocationspending method accepts an optional interface ID to filter by allocation type:
Migration reference
See also
- v0 to v1 migration overview
- Migration cheat sheet
- Configuration — SDK configuration
- Preparing and signing a transaction — Transaction lifecycle