Skip to content

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

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

chore: bump canton-api-client to 3.6.0-0.1.0#52
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 the direct canton-api-client dependency from 3.3.0-0.1.0 to 3.6.0-0.1.0.

Blocked on

  • chore: bump canton-api-client to 3.6.0-0.1.0 canton-lib#18canton-lib must publish a new tag with the same bump in its common crate. Otherwise cargo cannot resolve both canton-api-client = "3.6.0-..." here and canton-api-client = "3.3.0-..." pulled in transitively through common from canton-lib v0.5.0.

Once that lands, this PR will need to additionally bump the common/canton-proto-rs/keycloak tag (or switch to a branch) so the workspace can resolve. Holding as draft until then.

Once unblocked

  • Bump common (and siblings from canton-lib) to the new tag
  • Run cargo build and address any remaining 3.6.0 spec deltas (booleans → Option<bool>, contract_entryOption, etc. — see the canton-lib PR for the patterns)
  • Mark ready for review

Closes #51

scolear added 2 commits May 15, 2026 14:43
Note: this PR also requires a new canton-lib tag containing the same
canton-api-client bump in its `common` crate. Blocked on
DLC-link/canton-lib#18 and the follow-up release.
Adapts cbtc-lib to the spec deltas introduced in Canton 3.6.0 — many
previously required fields are now optional, `create_argument` is no
longer double-wrapped (`Option<Option<Value>>` → `Option<Value>`),
`transaction.events` and `package_ids` are now required (no longer
`Option<Vec>`), `created_event_blob` is now `Option<String>`,
`CreatedEvent` gained required `representativePackageId`/`acsDelta`
fields, and `ExercisedEvent` gained `acsDelta`.

Mechanical changes:

- accept/cancel_offers/utils/list_incoming_offers/list_outgoing_offers:
  drop the outer `Some(...)` from `if let Some(Some(create_arg)) = ...`
  patterns on `create_argument`.
- credentials/mint_redeem/models: drop the
  `.and_then(|opt| opt.as_ref())` middle step from the
  `create_argument.as_ref().and_then(...).and_then(|v| v.as_object())`
  chains used to read the create-argument map.
- credentials/mint_redeem/models: `created_event.created_event_blob` is
  now `Option<String>`; `unwrap_or_default()` to preserve the existing
  `String` surface on the local types.
- consolidate/split/transfer/mint_redeem/credentials parsers:
  `transaction.events` is no longer `Option<Vec<Event>>`; drop the
  `.as_ref().ok_or("Failed to find events")?` indirection and iterate
  the Vec directly.
- consolidate/split/transfer parsers: `ExercisedEvent.exercise_result`
  is `Option<Option<Value>>` in 3.6 — match `Some(Some(result))` rather
  than the single-layer pattern that used to compile against 3.3.
- dar_check: `ListPackagesResponse.package_ids` is now a plain
  `Vec<String>`; drop the `.ok_or_else(...)` that handled the previous
  optional wrapping.
- utils test fixtures: include the new required
  `representativePackageId`/`acsDelta` fields on `CreatedEvent`,
  `acsDelta` on `ExercisedEvent`, and always emit `events: []` (rather
  than omitting the field) since `JsTransaction.events` is required.
- parser unit tests for the "missing events" case: update assertions to
  the new error messages each parser returns when given an empty events
  list (the old "Failed to find events" branch no longer exists, since
  the typed model guarantees events is present).

NOTE: this commit temporarily points the four canton-lib deps at the
`chore/bump-canton-api-client-3.6.0` branch so the workspace can
resolve end-to-end against the matching canton-api-client 3.6.0 bump
there. The maintainer should swap these back to a real v0.6.0 tag
before merging.
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