Skip to content

feat: multi sync example#1622

Open
Viktor-Kalashnykov-da wants to merge 25 commits into
mainfrom
wiktor/multisync-example
Open

feat: multi sync example#1622
Viktor-Kalashnykov-da wants to merge 25 commits into
mainfrom
wiktor/multisync-example

Conversation

@Viktor-Kalashnykov-da
Copy link
Copy Markdown

@Viktor-Kalashnykov-da Viktor-Kalashnykov-da commented Apr 14, 2026

Multi-Synchronizer DvP Example - On ledger API - Part 1

Showcaces automatic reassignment of Token from private synchronizer to global one

There are 2 follow up PRs (wip)

Technical limitations:
In this PR we introduce separate tests for multi-sync (otherwise regular tests are flaky on multi-sync) - that split will be removed in a separate PR (above)

New example script:
docs/wallet-integration-guide/examples/scripts/15-multi-sync-trade.ts

Note on explicit reassignment

we experimented with automatic reassignment of contracts - and it basically worked BUT.

It worked as long as Bob is owner of TokenRules contract which seems unrealistic.
We introduced TokenAdmin as additional party that is issuer of Token on app-synchronizer (private one).
But this in fact forces us to use explicit reassignment.

@Viktor-Kalashnykov-da Viktor-Kalashnykov-da requested review from a team as code owners April 14, 2026 19:09
@Viktor-Kalashnykov-da Viktor-Kalashnykov-da marked this pull request as draft April 14, 2026 19:09
Comment thread docs/wallet-integration-guide/examples/scripts/multi-sync/15-multi-sync-trade.ts Outdated
Comment thread docs/wallet-integration-guide/examples/scripts/multi-sync/15-multi-sync-trade.ts Outdated
Comment thread docs/wallet-integration-guide/examples/scripts/15-multi-sync-trade.ts Outdated
Comment thread sdk/wallet-sdk/src/wallet/sdk.ts Fixed
@Viktor-Kalashnykov-da Viktor-Kalashnykov-da changed the title Multi-Sync Example feat(multisync-example): Multi-Sync Example Apr 17, 2026
Comment thread core/token-standard-service/src/token-standard-service.ts Outdated
Comment thread docs/wallet-integration-guide/examples/scripts/utils/synchronizer.ts Outdated
Comment thread docs/wallet-integration-guide/examples/scripts/utils/synchronizer.ts Outdated
Comment thread docs/wallet-integration-guide/examples/scripts/multi-sync/15-multi-sync-trade.ts Outdated
Comment thread docs/wallet-integration-guide/examples/scripts/15-multi-sync-trade.ts Outdated
Comment thread docs/wallet-integration-guide/examples/scripts/multi-sync/15-multi-sync-trade.ts Outdated
Comment thread docs/wallet-integration-guide/examples/scripts/multi-sync/15-multi-sync-trade.ts Outdated
Comment thread docs/wallet-integration-guide/examples/scripts/utils/synchronizer.ts Outdated
Comment thread scripts/src/start-localnet.ts Outdated
Comment thread sdk/wallet-sdk/src/wallet/namespace/contract/client.ts Outdated
Comment thread sdk/wallet-sdk/src/wallet/namespace/ledger/dar/client.ts Outdated
Comment thread .gitignore Outdated
Copy link
Copy Markdown
Contributor

@jarekr-da jarekr-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made first round or review.
Generally that is a scenario we want.
I posted questions and problems to recheck / fix.

@Viktor-Kalashnykov-da Viktor-Kalashnykov-da changed the title feat(multisync-example): Multi-Sync Example feat: multi sync example Apr 21, 2026
Comment thread core/wallet-test-utils/src/wallet-gateway.ts Outdated
Comment thread .vscode/settings.json Outdated
Comment thread api-specs/ledger-api/3.4.12/openapi.yaml
Comment thread core/ledger-client/src/ledger-client.ts Outdated
Viktor-Kalashnykov-da and others added 18 commits May 20, 2026 16:04
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>
…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>
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>
…ple utils

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
- Restore State import and property in LedgerNamespace
- Restore reassign method and ReassignParams in internal ledger namespace
- Restore splice-test-token-v1-1.0.0.dar bundled with the example
- Simplify _setup.ts: only vet TestTokenV1 DAR (trading-app is already
  vetted by Splice on startup and replicated by app-synchronizer.sc)

Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
@jarekr-da jarekr-da force-pushed the wiktor/multisync-example branch from 563df2d to 98dfc85 Compare May 20, 2026 17:18
jarekr-da added 5 commits May 21, 2026 07:38
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 wiktor/multisync-example branch from e3da87a to 51db02f Compare May 21, 2026 11:48
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
@jarekr-da jarekr-da force-pushed the wiktor/multisync-example branch from 289a3a1 to a4ec492 Compare May 21, 2026 12:22
Signed-off-by: jarekr-da <jaroslaw.ratajski@digitalasset.com>
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