chore: bump canton-api-client to 3.6.0-0.1.0#18
Open
scolear wants to merge 2 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps
canton-api-clientfrom3.3.0-0.1.0to3.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:
interface_id/template_idareString, notOption<String>)identifier_filter,verbose,offset,create_argument,contract_entry,filters_by_party, …)Changes
crates/common/src/filters.rs— wrap now-Option<bool>fields inSome(...), use.unwrap_or_default()forinterface_id/template_idto preserve the existingOption<String>local API.crates/ledger/src/common.rs— same adjustments; also set the new requiredstream_continuation_token: Nonefield onGetActiveContractsRequest.crates/ledger/src/ledger_end.rs— upstreamoffsetis nowOption<i64>. Defaulting to0when absent to keep the existingResponse.offset: i64surface; revisit if you want to expose the optionality to callers.crates/ledger/src/active_contracts.rs—JsGetActiveContractsResponse.contract_entryis nowOption<Box<...>>, skip entries without one;created_event.create_argumentflattened fromOption<Option<Value>>toOption<Value>.crates/examples/src/list_contracts.rs— samecreate_argumentshape adjustment.Notes for reviewers
interface_id/template_id: the localInterfaceFilterValue/TemplateFilterValuestill type these asOption<String>even though Canton requires them.unwrap_or_default()will produce an empty string whenNone, which probably doesn't match a valid filter in Canton. Consider tightening the local types toStringin a follow-up.ledger_end.offset: defaultingNone→0is conservative; if you want to surface a "no ledger end yet" state, changeResponse.offsettoOption<i64>(cascades to callers).Test plan
cargo buildsucceeds for all crates in the workspacecanton-librelease after merge so downstreams (cbtc-lib,dec-party-manager,dlc-attestor-stack) can pick up the newcommonCloses #17