Skip to content

chore: bump canton-api-client to 3.6.0-0.1.0#18

Open
scolear wants to merge 2 commits into
mainfrom
chore/bump-canton-api-client-3.6.0
Open

chore: bump canton-api-client to 3.6.0-0.1.0#18
scolear wants to merge 2 commits into
mainfrom
chore/bump-canton-api-client-3.6.0

Conversation

@scolear
Copy link
Copy Markdown
Member

@scolear scolear commented May 15, 2026

Summary

Bumps canton-api-client from 3.3.0-0.1.0 to 3.6.0-0.1.0 (regenerated from the Canton 3.6.0 OpenAPI spec).

This bump skips over 3.4.12, so the diff combines two sets of spec changes:

  • 3.3.0 → 3.4.12: required fields stayed required (so e.g. interface_id/template_id are String, not Option<String>)
  • 3.4.12 → 3.6.0: a number of previously required fields are now optional (booleans, identifier_filter, verbose, offset, create_argument, contract_entry, filters_by_party, …)

Changes

  • crates/common/src/filters.rs — wrap now-Option<bool> fields in Some(...), use .unwrap_or_default() for interface_id/template_id to preserve the existing Option<String> local API.
  • crates/ledger/src/common.rs — same adjustments; also set the new required stream_continuation_token: None field on GetActiveContractsRequest.
  • crates/ledger/src/ledger_end.rs — upstream offset is now Option<i64>. Defaulting to 0 when absent to keep the existing Response.offset: i64 surface; revisit if you want to expose the optionality to callers.
  • crates/ledger/src/active_contracts.rsJsGetActiveContractsResponse.contract_entry is now Option<Box<...>>, skip entries without one; created_event.create_argument flattened from Option<Option<Value>> to Option<Value>.
  • crates/examples/src/list_contracts.rs — same create_argument shape adjustment.

Notes for reviewers

  • interface_id/template_id: the local InterfaceFilterValue / TemplateFilterValue still type these as Option<String> even though Canton requires them. unwrap_or_default() will produce an empty string when None, which probably doesn't match a valid filter in Canton. Consider tightening the local types to String in a follow-up.
  • ledger_end.offset: defaulting None0 is conservative; if you want to surface a "no ledger end yet" state, change Response.offset to Option<i64> (cascades to callers).

Test plan

  • cargo build succeeds for all crates in the workspace
  • Integration tests against a real ledger
  • Tag a new canton-lib release after merge so downstreams (cbtc-lib, dec-party-manager, dlc-attestor-stack) can pick up the new common

Closes #17

Regenerated from the Canton 3.6.0 OpenAPI spec, which makes a number of
previously required fields optional. Adapt the conversion layer:

- common: wrap Option<bool>/Option<Box<...>> fields with Some(...), use
  unwrap_or_default() where the local API kept Option<String> for fields
  the wire format now requires.
- ledger: same adjustments in src/common.rs; set the new
  stream_continuation_token field; ledger_end.offset is now optional
  upstream — defaulting to 0 when absent to preserve the existing
  Response.offset: i64 surface.
- active_contracts: JsGetActiveContractsResponse.contract_entry is now
  Option<Box<...>>, skip entries without one; created_event.create_argument
  flattened from Option<Option<Value>> to Option<Value>.
- examples/list_contracts: match the flattened create_argument shape.

Closes #17
Previously defaulted to 0 when the upstream offset was None, which would
silently look like 'start of ledger' to callers. Return an explicit error
instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade canton-api-client to 3.6.0-0.1.0 (Canton 3.6.0 spec regen)

1 participant