Skip to content

Removed default synchronizer #1740

Draft
jarekr-da wants to merge 30 commits into
wiktor/multisync-examplefrom
jarekr/sdk_synchronizers
Draft

Removed default synchronizer #1740
jarekr-da wants to merge 30 commits into
wiktor/multisync-examplefrom
jarekr/sdk_synchronizers

Conversation

@jarekr-da
Copy link
Copy Markdown
Contributor

@jarekr-da jarekr-da commented May 13, 2026

  1. No automatic selection of synchonizer in wallet sdk code - if synchronizer is not explicitly provided by caller - we rely on canon ledger choice of synchronizer. There is no extra logic of choosing synchonizer in wallet sdk
  2. All tests run against multi-sync setup
  3. Some tests code changed to explicitly set synchronizer

Signed-off-by: vkalashnykov <viktor.kalashnykov@digitalasset.com>
… from docs/wallet-integration-guide/examples/package.json

Signed-off-by: vkalashnykov <viktor.kalashnykov@digitalasset.com>
Signed-off-by: vkalashnykov <viktor.kalashnykov@digitalasset.com>
…nRules Contract to usage of 2 contracts of the same type but on different synchronizers

Signed-off-by: vkalashnykov <viktor.kalashnykov@digitalasset.com>
Signed-off-by: Viktor-Kalashnykov-da <viktor.kalashnykov@digitalasset.com>
Signed-off-by: Viktor-Kalashnykov-da <viktor.kalashnykov@digitalasset.com>
…edBefore and validUntil fields

Signed-off-by: vkalashnykov <viktor.kalashnykov@digitalasset.com>
…r in the final step

Signed-off-by: vkalashnykov <viktor.kalashnykov@digitalasset.com>
…ntation for example #15

Signed-off-by: vkalashnykov <viktor.kalashnykov@digitalasset.com>
Signed-off-by: vkalashnykov <viktor.kalashnykov@digitalasset.com>
…mespace/state/client (and utility type as well)

Signed-off-by: vkalashnykov <viktor.kalashnykov@digitalasset.com>
@jarekr-da jarekr-da changed the title All tests use multi-sync Removed default synchronizer Id May 18, 2026
@jarekr-da jarekr-da changed the title Removed default synchronizer Id Removed default synchronizer May 18, 2026
jarekr-da added 16 commits May 20, 2026 10:09
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
…rated dar files

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
…ple utils

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
…licitly

- Remove SDKContext.defaultSynchronizerId / globalSynchronizerId and the
  associated startup API call (GET /v2/state/connected-synchronizers)
- LedgerClient.getSynchronizerId() now prefers the synchronizer aliased
  'global' over the arbitrary first entry (still used by wallet-gateway)
- internal.submit() and internal.prepare() omit synchronizerId when not
  given so canton routes by the contracts involved (ledger-api default)
- Callers that wrap ledger-API calls pass synchronizerId through as-is
  using conditional spread to satisfy exactOptionalPropertyTypes
- Amulet operations that embed synchronizerId in DAML choice args or
  disclosed contracts (traffic.buy/status, featuredApp.grant,
  preapproval.renew, external party allocation) throw a clear error when
  the caller does not supply it — canton cannot choose it for those

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
- Delete getSynchronizerId() from LedgerClient — auto-selecting a
  synchronizer is no longer the SDK's responsibility
- wallet-gateway callers now use network.synchronizerId / this.synchronizerId
  directly; throw with a clear message when not configured
- Internal party allocation uses conditional spread so synchronizerId is
  absent from the POST /v2/parties body when not set (exactOptionalPropertyTypes)

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
…y.external.create()

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
…) and sub-scripts

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
… internally

The SDK now decides everything with regard to synchronizers.
- Remove State.globalSynchronizerId() from the public API
- Add internal resolveGlobalSynchronizerId(ledgerProvider) helper used
  by SDK operations that need the global synchronizer (traffic, preapproval,
  featuredApp.grant, party.external.create/allocate, mergeDelegation)
- Remove findGlobalSynchronizer() from ExternalPartyNamespace (duplicate logic)
- Remove synchronizerId param from TrafficNamespace.status/buy,
  PreapprovalNamespace.renew, GrantFeaturedAppRightsOptions,
  and MergeDelegationNamespace.setup/approve/execute
- Drop getGlobalSynchronizerId() helper from example utils/index.ts
- Update all example scripts to stop passing synchronizerId to SDK calls
- 15-multi-sync/_setup.ts retains explicit synchronizer lookup (appropriate:
  it is test setup that needs both global + app IDs by alias)

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
jarekr-da added 3 commits May 20, 2026 15:48
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
@jarekr-da jarekr-da force-pushed the jarekr/sdk_synchronizers branch from 97545e9 to 3ae7ca0 Compare May 20, 2026 13:51
@jarekr-da jarekr-da force-pushed the wiktor/multisync-example branch from 563df2d to 98dfc85 Compare May 20, 2026 17:18
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.

2 participants