Skip to main content
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 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 the extend() method. Option 1: Initialize during SDK creation
Option 2: Add token namespace later using extend()

Key changes from v0 to v1

v0 used the tokenStandard controller with implicit party context set via sdk.setPartyId(). v1 uses the token namespace where you:
  • Pass partyId explicitly to each operation
  • Initialize the namespace with configuration
  • Access operations through logical groupings (transfer, utxos, allocation)

This enables thread-safe concurrent operations and clearer code organization.

Transfers

Creating transfers

Accepting, rejecting, or withdrawing transfers

Listing pending transfers

Holdings

Holdings represent the transaction history of token ownership for a party.

You can also specify offsets for pagination:
Transactions by updateId:

UTXOs

UTXOs (Unspent Transaction Outputs) are the actual holding contracts that represent token balances. Listing UTXOs

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:

Allocation

Allocations handle the issuance and distribution of new tokens. Listing pending allocations

The pending method accepts an optional interface ID to filter by allocation type:
Executing, withdrawing or cancelling allocations

Migration reference

See also