Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9c8bf74
feat(wallet-sdk): add multi-synchronizer DvP example (run-17)
jarekr-da Jul 9, 2026
fb7d01e
review: added todo for reassign
jarekr-da Jul 9, 2026
8ba2342
review: added todo for reassign
jarekr-da Jul 9, 2026
2c8215b
review: improved polling code
jarekr-da Jul 9, 2026
744a66a
Update docs/wallet-integration-guide/examples/scripts/17-multi-sync/R…
jarekr-da Jul 9, 2026
2ea6206
review: allocations scanner added
jarekr-da Jul 9, 2026
caa8e0e
review: fixed readme
jarekr-da Jul 9, 2026
2b13181
Update docs/wallet-integration-guide/examples/scripts/17-multi-sync/R…
jarekr-da Jul 9, 2026
f190d7d
review: vat( method renamed
jarekr-da Jul 9, 2026
d6d7a94
review: removed redundant param
jarekr-da Jul 9, 2026
7557e70
review: reassign TODO added
jarekr-da Jul 9, 2026
bbebb08
review: charlie added
jarekr-da Jul 9, 2026
476d9a2
review: removed "namespaces" from example and registry
jarekr-da Jul 9, 2026
aed0393
review: process exit removed
jarekr-da Jul 13, 2026
30624ff
review: switched gitignore
jarekr-da Jul 13, 2026
d20d0f9
review: removed unused method
jarekr-da Jul 13, 2026
f617d0a
review: removed unused method
jarekr-da Jul 13, 2026
3785533
review: removed empty arg
jarekr-da Jul 13, 2026
c5260bb
review: rename
jarekr-da Jul 13, 2026
1ca9342
review: changed type
jarekr-da Jul 13, 2026
0f6b31e
review: syncAlias not exported anymore
jarekr-da Jul 13, 2026
936a150
review: discarded use of acs.read - changed acs-logger
jarekr-da Jul 13, 2026
25935a8
review: ci - style fix
jarekr-da Jul 14, 2026
bfc9c21
Merge branch 'main' into wiktor/multisync-example
jarekr-da Jul 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/actions/setup_localnet/artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ inputs:
splice_version:
description: 'Splice version (required)'
required: true
multi_sync:
description: 'Enable multi-sync profile (default: true)'
required: false
default: 'true'
runs:
using: 'composite'
steps:
Expand All @@ -31,4 +35,4 @@ runs:

- name: Start Localnet
shell: bash
run: yarn start:localnet -- --network=${{ inputs.network }}
run: yarn start:localnet -- --network=${{ inputs.network }} ${{ inputs.multi_sync == 'false' && '--no-multi-sync' || '' }}
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ jobs:
with:
network: ${{ matrix.network }}
splice_version: ${{ matrix.network == 'devnet' && needs.version-config.outputs.devnet_splice_version || needs.version-config.outputs.mainnet_splice_version }}
multi_sync: 'true'

- name: Start remote WK
run: yarn pm2 start ecosystem.ci.config.js --env development
Expand Down Expand Up @@ -459,6 +460,7 @@ jobs:
with:
network: ${{ matrix.network }}
splice_version: ${{ matrix.network == 'devnet' && needs.version-config.outputs.devnet_splice_version || needs.version-config.outputs.mainnet_splice_version }}
multi_sync: 'true'

- uses: ./.github/actions/check_resources

Expand Down Expand Up @@ -509,6 +511,21 @@ jobs:
with:
network: ${{ matrix.network }}
splice_version: ${{ matrix.network == 'devnet' && needs.version-config.outputs.devnet_splice_version || needs.version-config.outputs.mainnet_splice_version }}
multi_sync: 'true'

- name: Restore DPM cache
uses: actions/cache/restore@v5
with:
path: |
~/.dpm
key: dpm-${{ runner.os }}-${{ needs.version-config.outputs.daml_release_version }}

- name: Generate featured DARs
run: yarn script:generate:featured-dars

- name: Rebuild DAML-dependent packages
run: |
yarn workspace @canton-network/core-test-token build

- uses: ./.github/actions/check_resources

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/stress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ jobs:
run: yarn script:test:stress-scripts

- uses: ./.github/actions/check_resources

- name: Stop localnet (${{ github.event.inputs.network || 'devnet' }})
if: always()
run: yarn stop:localnet -- --network=${{ github.event.inputs.network || 'devnet' }}
Expand Down
69 changes: 0 additions & 69 deletions canton/multi-sync/app-synchronizer.sc

This file was deleted.

21 changes: 16 additions & 5 deletions core/ledger-client/src/ledger-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,20 +511,31 @@ export class LedgerClient {
return this.valueOrError(resp)
}

// Retrieve an (arbitrary) synchronizer id from the validator.
// Retrieve the default synchronizer id from the validator.
// Prefers a synchronizer aliased 'global' or 'global-domain' over application-specific ones.
// This synchronizer id is cached for the remainder of this object's life.
public async getSynchronizerId(): Promise<string> {
if (this.synchronizerId) return this.synchronizerId
const response = await this.getWithRetry(
'/v2/state/connected-synchronizers'
)
if (!response.connectedSynchronizers?.[0]) {
const synchronizers = response.connectedSynchronizers
if (!synchronizers?.[0]) {
throw new Error('No connected synchronizers found')
}
const synchronizerId = response.connectedSynchronizers[0].synchronizerId
if (response.connectedSynchronizers.length > 1) {
const defaultEntry =
synchronizers.find((s) => s.synchronizerAlias === 'global') ??
synchronizers.find(
(s) => s.synchronizerAlias === 'global-domain'
) ??
synchronizers.find(
(s) => s.synchronizerAlias !== 'app-synchronizer'
) ??
synchronizers[0]
const synchronizerId = defaultEntry.synchronizerId
if (synchronizers.length > 1) {
this.logger.warn(
`Found ${response.connectedSynchronizers.length} synchronizers, defaulting to ${synchronizerId}`
`Found ${synchronizers.length} synchronizers, defaulting to ${synchronizerId}`
)
}
this.synchronizerId = synchronizerId
Expand Down
19 changes: 19 additions & 0 deletions core/test-token-v1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# @canton-network/core-test-token

A minimal, self-contained test token that implements the Canton Network Token
Standard (CIP-56). It exists so wallet and dApp flows can be exercised end-to-end
against a real registry-backed token without depending on Amulet.

Exports:

- **Main export** - TypeScript codegen bindings for the `splice-test-token-v1`
DAML package (`Splice`, `packageId`) plus small command builders
(`buildCreateTokenRulesCommand`, `buildMintTokenCommand`).
- **`./registry`** - `startTestTokenRegistry()`, an HTTP server that creates the
token's `TokenRules` contracts and serves the four Token Standard off-ledger
registry APIs (metadata, transfer-instruction, allocation-instruction,
allocation). Once started, the token looks like any other CIP-56 token, with an
admin party and a registry URL.
- **`./setup`** - helpers to locate and read the compiled
`splice-test-token-v1` DAR (`TEST_TOKEN_V1_DAR_PATH`, `readTestTokenV1Dar`) so
callers can vet it on their synchronizers.
68 changes: 68 additions & 0 deletions core/test-token-v1/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "@canton-network/core-test-token",
"version": "0.0.1",
"type": "module",
"description": "DAML codegen JS for splice-test-token-v1",
"license": "Apache-2.0",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"browser": "./dist/index.browser.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
},
"./registry": {
"types": "./dist/registry/index.d.ts",
"import": "./dist/registry/index.js",
"require": "./dist/registry/index.cjs",
"default": "./dist/registry/index.js"
},
"./setup": {
"types": "./dist/setup/index.d.ts",
"import": "./dist/setup/index.js",
"require": "./dist/setup/index.cjs",
"default": "./dist/setup/index.js"
}
},
"scripts": {
"build": "yarn clean && rollup -c && yarn clean:types-tmp",
"clean:types-tmp": "rm -rf dist/types",
"clean": "rm -rf dist"
},
"dependencies": {
"@canton-network/core-ledger-client": "workspace:^",
"@canton-network/core-token-standard": "workspace:^",
"@canton-network/core-wallet-auth": "workspace:^",
"@daml/types": "^3.5.0",
"@mojotech/json-type-validation": "^3.1.0",
"express": "^5.2.1",
"pino": "^10.3.1"
},
"devDependencies": {
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-typescript": "^12.3.0",
"@types/express": "^5.0.6",
"rollup": "^4.59.0",
"rollup-plugin-dts": "^6.3.0",
"tslib": "^2.8.1",
"typescript": "^5.9.3"
},
"files": [
"dist/**"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/canton-network/wallet.git",
"directory": "core/test-token-v1"
}
}
Loading