Releases: DLC-link/canton-lib
v0.6.0
Added
keycloak::login::token_url(host, realm)and
keycloak::login::master_token_url(host)— build OIDC token endpoint URLs
using the Keycloak 17+ (Quarkus distribution) path layout, which omits the
/authcontext root. Use these for default Keycloak 17+ deployments where
realm endpoints are served at/realms/{realm}/.... The existing
client_credentials_url,password_url, andpassword_master_url
helpers are unchanged and continue to emit the legacy/auth/realms/...
paths for backwards compatibility.
Changed
- Bumped
canton-api-clientfrom3.3.0-0.1.0to3.6.0-0.1.0(regenerated from the Canton 3.6.0 OpenAPI spec). Most spec-level changes are absorbed inside the conversion functions incommon::filtersandledger::commonwith no caller-visible API changes; the only behavior change is theledger_end::getnote below. ledger::ledger_end::getandledger::ledger_end::get_with_clientnow returnErr("Ledger end response missing offset")when the upstreamoffsetfield is absent. In Canton 3.6 the field became optional on the wire; treating it as a hard error preserves the previousResponse.offset: i64API surface and surfaces what is almost certainly a server-side bug rather than silently defaulting.
v0.5.0
[0.5.0] - 2026-05-11
Added
ledger::submit::wait_for_transaction(Params)— calls the flatPOST /v2/commands/submit-and-wait-for-transactionJSON Ledger API endpoint and returns the rawJsSubmitAndWaitForTransactionResponsebody ({ "transaction": { "events": [...] } }). WhenSubmission::transaction_formatis unset, builds a defaultTransactionFormat { transactionShape: TRANSACTION_SHAPE_LEDGER_EFFECTS, eventFormat: { verbose: true, filtersByParty: <actAs ∪ readAs> → {} } }to match the behavior the deprecated tree endpoint hardcoded server-side. When set, the caller's value is moved to the top-level request body so it is not double-nested insidecommands.common::consts::TRANSACTION_SHAPE_LEDGER_EFFECTS— JSON Ledger API enum constant used bywait_for_transaction's defaultTransactionFormat.
Deprecated
ledger::submit::wait_for_transaction_tree— still callsPOST /v2/commands/submit-and-wait-for-transaction-treeand returns the tree-shaped response unchanged, but emits a deprecation warning. The endpoint is removed in Canton 3.5.0; migrate towait_for_transactionbefore upgrading. Note the response shape changes from{ "transactionTree": { "eventsById": {...} } }(withCreatedTreeEvent/ExercisedTreeEvent) to{ "transaction": { "events": [...] } }(withCreatedEvent/ExercisedEvent), so downstream parsing must be updated as part of the migration.
Changed
- README "Submit Commands" curl example updated to the flat endpoint and shows the required
transactionFormatblock.
Migration: wait_for_transaction_tree → wait_for_transaction
The tree endpoint is removed in Canton 3.5.0. Both functions take the same
Params { ledger_host, access_token, request: Submission } and return
Result<String, String>, so the call site itself changes only by name — but
the response body shape changes, so downstream JSON parsing must be
updated.
1. Update the call
// Before (deprecated, removed in Canton 3.5.0):
let body = ledger::submit::wait_for_transaction_tree(Params {
ledger_host,
access_token,
request: submission,
}).await?;
// After:
let body = ledger::submit::wait_for_transaction(Params {
ledger_host,
access_token,
request: submission,
}).await?;wait_for_transaction requires Submission.act_as to contain at least one
party when Submission.transaction_format is unset (otherwise the default
filtersByParty would be empty and the server rejects it with an opaque
error). The tree endpoint accepted an empty act_as; if you relied on that,
either populate act_as or set transaction_format explicitly.
2. Update response parsing
Response shape changes from a tree-keyed object map to a flat event array:
// Before — wait_for_transaction_tree response:
{
"transactionTree": {
"eventsById": {
"0": { "CreatedTreeEvent": { /* ... */ } },
"1": { "ExercisedTreeEvent": { /* ... */ } }
}
}
}
// After — wait_for_transaction response:
{
"transaction": {
"events": [
{ "CreatedEvent": { /* ... */ } },
{ "ExercisedEvent": { /* ... */ } }
]
}
}Concretely: replace transactionTree.eventsById lookups with iteration over
transaction.events, and rename CreatedTreeEvent → CreatedEvent and
ExercisedTreeEvent → ExercisedEvent in your deserialization types.
3. (Optional) customize transactionFormat
If Submission::transaction_format is left unset, wait_for_transaction
builds a default equivalent to what the tree endpoint applied server-side:
transactionShape = TRANSACTION_SHAPE_LEDGER_EFFECTS, verbose = true, and
one empty-filter entry in filtersByParty per party in actAs ∪ readAs. To
override (e.g. for ACS_DELTA shape or party-specific template filters),
set Submission::transaction_format before calling.
v0.4.0
What's Changed
Added
DamlDecimalnewtype wrapper for DamlDecimal(Numeric 10) values — enforces ≤10 decimal places at construction time, arithmetic with banker's rounding (HalfEven), custom serde (JSON string format)DamlDecimal::ZEROconstantSumtrait implementation forDamlDecimalCHANGELOG.mdfollowing Keep a Changelog formatrust-toolchain.tomlpinning Rust 1.94.1
Breaking Changes
Transfer::amount:String→DamlDecimalContextValue::Decimal:f64→DamlDecimal- Wallet
mining_roundsfields:String→DamlDecimal(11 fields) andString→Option<DamlDecimal>(2 fields) walletcrate now depends oncommoninstead ofrust_decimal
See CHANGELOG.md for full details and migration guide.
Full Changelog: v0.3.1...v0.4.0
v0.3.1
What's Changed
- fix: extend context-value to handle all potential cases by @scolear in #7
- Fix README and .env.example accuracy by @gyorgybalazsi in #6
New Contributors
- @scolear made their first contribution in #7
- @gyorgybalazsi made their first contribution in #6
Full Changelog: v0.3.0...v0.3.1