@layerzerolabs/common-canton 0.2.105 → 0.2.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,11 +9,44 @@
9
9
  ✅ dpm-3.4.8-openapi-generator-7.21.0
10
10
  🔧 openapi-generator version: 7.21.0
11
11
  $ docker image inspect --format {{.Architecture}} 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
12
- (node:126071) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/configs/vm-tooling/values/docker-image-repo.ts is not specified and it doesn't parse as CommonJS.
12
+ (node:77510) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/configs/vm-tooling/values/docker-image-repo.ts is not specified and it doesn't parse as CommonJS.
13
13
  Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
14
14
  To eliminate this warning, add "type": "module" to /home/runner/work/monorepo-internal/monorepo-internal/package.json.
15
15
  (Use `node --trace-warnings ...` to show where the warning was created)
16
- ✅ Using cached Docker image: 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2 (amd64)
16
+ Error response from daemon: No such image: 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
17
+ 📥 Pulling Docker image from: 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
18
+ $ docker pull 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
19
+ openapi-generator-7.21.0-patch-2: Pulling from layerzerolabs/canton-openapi-tooling
20
+ 17639c486e57: Pulling fs layer
21
+ 051d551be118: Pulling fs layer
22
+ 18a60288e8be: Pulling fs layer
23
+ dfe8d6e6f390: Pulling fs layer
24
+ e41c3f01e557: Pulling fs layer
25
+ fe131d3b296c: Pulling fs layer
26
+ dfe8d6e6f390: Waiting
27
+ e41c3f01e557: Waiting
28
+ fe131d3b296c: Waiting
29
+ 18a60288e8be: Verifying Checksum
30
+ 18a60288e8be: Download complete
31
+ 17639c486e57: Verifying Checksum
32
+ 17639c486e57: Download complete
33
+ dfe8d6e6f390: Verifying Checksum
34
+ dfe8d6e6f390: Download complete
35
+ e41c3f01e557: Download complete
36
+ fe131d3b296c: Verifying Checksum
37
+ fe131d3b296c: Download complete
38
+ 17639c486e57: Pull complete
39
+ 051d551be118: Verifying Checksum
40
+ 051d551be118: Download complete
41
+ 051d551be118: Pull complete
42
+ 18a60288e8be: Pull complete
43
+ dfe8d6e6f390: Pull complete
44
+ e41c3f01e557: Pull complete
45
+ fe131d3b296c: Pull complete
46
+ Digest: sha256:9f4b76e7e635939d8107dbe5cf56b881ece20ecb08873f25e5e9d66b2955b5cb
47
+ Status: Downloaded newer image for 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
48
+ 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
49
+ ✅ Successfully pulled: 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
17
50
  👤 Running container as UID:GID 1001:1001
18
51
  📜 Executing custom script: set -euo pipefail && rm -rf "src/open-api" && canton-openapi-generator generate -g typescript-fetch -o "src/open-api" --additional-properties=importFileExtension=.js
19
52
  $ docker run --rm --add-host=host.docker.internal:host-gateway -e LOCAL_UID=1001 -e LOCAL_GID=1001 -v /home/runner/work/monorepo-internal/monorepo-internal:/workspace -w /workspace/packages/vms/canton/common-canton 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2 bash -c $'set -euo pipefail && rm -rf "src/open-api" && canton-openapi-generator generate -g typescript-fetch -o "src/open-api" --additional-properties=importFileExtension=.js'
@@ -695,28 +728,30 @@ $ docker run --rm --add-host=host.docker.internal:host-gateway -e LOCAL_UID=1001
695
728
  # We appreciate your support! Please consider donation to help us maintain this project. #
696
729
  # https://opencollective.com/openapi_generator/donate #
697
730
  ############################################################################################
698
- ⏳ bash -c set -euo pipefail && rm -rf "src/open-api" && canton-openapi-generator generate -g typescript-fetch -o "src/open-api" --additional-properties=importFileExtension=.js: 7.971s
731
+ ⏳ bash -c set -euo pipefail && rm -rf "src/open-api" && canton-openapi-generator generate -g typescript-fetch -o "src/open-api" --additional-properties=importFileExtension=.js: 3.493s
699
732
  Testing types with tsc and vue-tsc is an experimental feature.
700
733
  Breaking changes might not follow SemVer, please pin Vitest's version when using it.
701
734
 
702
735
   RUN  v3.2.4 /home/runner/work/monorepo-internal/monorepo-internal/packages/vms/canton/common-canton
703
736
 
704
- ✓ test/auth/local-token-provider.test.ts (5 tests) 28ms
705
- ✓ test/auth/client-credentials-token-provider.test.ts (7 tests) 23ms
737
+ ✓ test/auth/client-credentials-token-provider.test.ts (7 tests) 11ms
738
+ ✓ test/provider.test.ts (5 tests) 24ms
739
+ ✓ test/auth/local-token-provider.test.ts (5 tests) 9ms
706
740
  stderr | test/sdk.test.ts > Error Handling (Unhappy Paths) > should handle double archive error
707
741
  Mock miss: GET /v2/state/connected-synchronizers
708
742
 
709
743
  stderr | test/sdk.test.ts > Error Handling (Unhappy Paths) > should handle unauthorized party error
710
744
  Mock miss: GET /v2/state/connected-synchronizers
711
745
 
712
- ✓ test/sdk.test.ts (18 tests) 44ms
746
+ ✓ test/sdk.test.ts (18 tests) 25ms
713
747
  ✓  TS  test/sdk.test.ts (18 tests)
714
748
  ✓  TS  test/auth/client-credentials-token-provider.test.ts (7 tests)
715
749
  ✓  TS  test/auth/local-token-provider.test.ts (5 tests)
750
+ ✓  TS  test/provider.test.ts (5 tests)
716
751
 
717
-  Test Files  6 passed (6)
718
-  Tests  60 passed (60)
752
+  Test Files  8 passed (8)
753
+  Tests  70 passed (70)
719
754
  Type Errors  no errors
720
-  Start at  21:13:56
721
-  Duration  7.40s (transform 2.32s, setup 0ms, collect 3.45s, tests 95ms, environment 1ms, prepare 952ms, typecheck 6.69s)
755
+  Start at  01:07:43
756
+  Duration  4.82s (transform 1.81s, setup 0ms, collect 3.03s, tests 69ms, environment 1ms, prepare 553ms, typecheck 4.48s)
722
757
 
@@ -17,6 +17,12 @@ function parseCantonUri(uri) {
17
17
  if (!walletUrl) {
18
18
  throw new Error('Canton provider URI missing required "wallet-url" query parameter');
19
19
  }
20
+ const sequencerUrl = url.searchParams.get("sequencer-url");
21
+ if (!sequencerUrl) {
22
+ throw new Error('Canton provider URI missing required "sequencer-url" query parameter');
23
+ }
24
+ const sequencerValidatorsParam = url.searchParams.get("sequencer-validators");
25
+ const sequencerQuorumParam = url.searchParams.get("sequencer-quorum");
20
26
  const tokenUrl = url.searchParams.get("token-url") ?? void 0;
21
27
  const clientId = url.searchParams.get("client-id") ?? void 0;
22
28
  const clientSecret = url.searchParams.get("client-secret") ?? void 0;
@@ -26,6 +32,9 @@ function parseCantonUri(uri) {
26
32
  "admin-api",
27
33
  "user-id",
28
34
  "wallet-url",
35
+ "sequencer-url",
36
+ "sequencer-validators",
37
+ "sequencer-quorum",
29
38
  "token-url",
30
39
  "client-id",
31
40
  "client-secret",
@@ -34,6 +43,31 @@ function parseCantonUri(uri) {
34
43
  ]) {
35
44
  url.searchParams.delete(key);
36
45
  }
46
+ let sequencerCommittee;
47
+ if (sequencerValidatorsParam !== null && sequencerQuorumParam !== null) {
48
+ const publicKeys = sequencerValidatorsParam.split(",").map((s) => s.trim().toLowerCase()).filter((s) => s.length > 0);
49
+ if (publicKeys.length === 0) {
50
+ throw new Error("Canton provider URI sequencer-validators must contain at least one pubkey");
51
+ }
52
+ for (const publicKey of publicKeys) {
53
+ if (!publicKey.startsWith("0x")) {
54
+ throw new Error(`Canton provider URI sequencer-validators pubkey must start with 0x, got: ${publicKey.slice(0, 10)}...`);
55
+ }
56
+ }
57
+ const quorum = Number(sequencerQuorumParam);
58
+ if (!Number.isInteger(quorum) || quorum < 1) {
59
+ throw new Error(`Canton provider URI sequencer-quorum must be a positive integer, got: ${sequencerQuorumParam}`);
60
+ }
61
+ if (quorum > publicKeys.length) {
62
+ throw new Error(`Canton provider URI sequencer-quorum=${quorum} exceeds committee size ${publicKeys.length}`);
63
+ }
64
+ sequencerCommittee = {
65
+ publicKeys,
66
+ quorum
67
+ };
68
+ } else if (sequencerValidatorsParam !== null || sequencerQuorumParam !== null) {
69
+ throw new Error("Canton provider URI must set both sequencer-validators and sequencer-quorum together");
70
+ }
37
71
  const jsonApiUrl = url.toString().replace(/\/$/, "");
38
72
  const oauth2 = tokenUrl && clientId && clientSecret ? {
39
73
  tokenUrl,
@@ -47,6 +81,8 @@ function parseCantonUri(uri) {
47
81
  adminApiHost,
48
82
  userId,
49
83
  walletUrl,
84
+ sequencerUrl,
85
+ sequencerCommittee,
50
86
  oauth2
51
87
  };
52
88
  }
@@ -67,7 +103,9 @@ function createCantonProvider({ uri, isLocal }) {
67
103
  client,
68
104
  grpcClient,
69
105
  tokenProvider,
70
- walletUrl: params.walletUrl
106
+ walletUrl: params.walletUrl,
107
+ sequencerUrl: params.sequencerUrl,
108
+ sequencerCommittee: params.sequencerCommittee
71
109
  };
72
110
  }
73
111
  __name(createCantonProvider, "createCantonProvider");
@@ -87,5 +125,5 @@ function createTokenProvider(params, isLocal) {
87
125
  __name(createTokenProvider, "createTokenProvider");
88
126
 
89
127
  export { createCantonProvider, parseCantonUri };
90
- //# sourceMappingURL=MDLCDBAQ.js.map
91
- //# sourceMappingURL=MDLCDBAQ.js.map
128
+ //# sourceMappingURL=HNZRSDTR.js.map
129
+ //# sourceMappingURL=HNZRSDTR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/provider.ts"],"names":["parseCantonUri","uri","url","URL","adminApiHost","searchParams","get","Error","userId","walletUrl","sequencerUrl","sequencerValidatorsParam","sequencerQuorumParam","tokenUrl","undefined","clientId","clientSecret","scope","audience","key","delete","sequencerCommittee","publicKeys","split","map","s","trim","toLowerCase","filter","length","publicKey","startsWith","slice","quorum","Number","isInteger","jsonApiUrl","toString","replace","oauth2","createCantonProvider","isLocal","params","tokenProvider","createTokenProvider","configuration","Configuration","basePath","accessToken","getToken","client","CantonClient","grpcClient","CantonGrpcClient","host","LocalTokenProvider","actAs","admin","ClientCredentialsTokenProvider"],"mappings":";;;;;;;;AA2EO,SAASA,eAAeC,GAAAA,EAAW;AACtC,EAAA,MAAMC,GAAAA,GAAM,IAAIC,GAAAA,CAAIF,GAAAA,CAAAA;AAEpB,EAAA,MAAMG,YAAAA,GAAeF,GAAAA,CAAIG,YAAAA,CAAaC,GAAAA,CAAI,WAAA,CAAA;AAC1C,EAAA,IAAI,CAACF,YAAAA,EAAc;AACf,IAAA,MAAM,IAAIG,MAAM,kEAAA,CAAA;AACpB,EAAA;AAEA,EAAA,MAAMC,MAAAA,GAASN,GAAAA,CAAIG,YAAAA,CAAaC,GAAAA,CAAI,SAAA,CAAA,IAAc,mBAAA;AAClD,EAAA,MAAMG,SAAAA,GAAYP,GAAAA,CAAIG,YAAAA,CAAaC,GAAAA,CAAI,YAAA,CAAA;AACvC,EAAA,IAAI,CAACG,SAAAA,EAAW;AACZ,IAAA,MAAM,IAAIF,MAAM,mEAAA,CAAA;AACpB,EAAA;AACA,EAAA,MAAMG,YAAAA,GAAeR,GAAAA,CAAIG,YAAAA,CAAaC,GAAAA,CAAI,eAAA,CAAA;AAC1C,EAAA,IAAI,CAACI,YAAAA,EAAc;AACf,IAAA,MAAM,IAAIH,MAAM,sEAAA,CAAA;AACpB,EAAA;AACA,EAAA,MAAMI,wBAAAA,GAA2BT,GAAAA,CAAIG,YAAAA,CAAaC,GAAAA,CAAI,sBAAA,CAAA;AACtD,EAAA,MAAMM,oBAAAA,GAAu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AAAA,CAAAA,oBAAAA,EAAAA,sBAAAA,CAAAA;AA+BhB,SAASI,mBAAAA,CAAoBF,QAAyBD,OAAAA,EAAgB;AAClE,EAAA,IAAIA,OAAAA,EAAS;AACT,IAAA,OAAO,IAAIc,kBAAAA,CAAmB;AAC1B/C,MAAAA,MAAAA,EAAQkC,MAAAA,CAAOlC,MAAAA;AACfgD,MAAAA,KAAAA,EAAO,EAAA;MACPC,KAAAA,EAAO;KACX,CAAA;AACJ,EAAA;AAGA,EAAA,IAAI,CAACf,OAAOH,MAAAA,EAAQ;AAChB,IAAA,MAAM,IAAIhC,MACN,uGAAA,CAAA;AAER,EAAA;AAEA,EAAA,OAAO,IAAImD,8BAAAA,CAA+BhB,MAAAA,CAAOH,MAAM,CAAA;AAC3D;AAjBSK,MAAAA,CAAAA,mBAAAA,EAAAA,qBAAAA,CAAAA","file":"HNZRSDTR.js","sourcesContent":["import {\n ClientCredentialsTokenProvider,\n type ClientCredentialsTokenProviderConfig,\n} from './auth/client-credentials-token-provider';\nimport { LocalTokenProvider } from './auth/local-token-provider';\nimport type { TokenProvider } from './auth/token-provider';\nimport { CantonClient } from './client/canton-client';\nimport { CantonGrpcClient } from './client/grpc';\nimport type { ICantonClient } from './client/interface';\nimport { Configuration } from './open-api/runtime';\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Provider Type\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Composite provider for Canton — bundles both transport layers and shared auth.\n *\n * - {@link client} — JSON Ledger API (commands, queries, updates)\n * - {@link grpcClient} — gRPC Admin API (topology transactions, namespace queries)\n * - {@link tokenProvider} — Shared Bearer-token source used by both transports\n */\nexport type CantonProvider = {\n client: ICantonClient;\n grpcClient: CantonGrpcClient;\n tokenProvider: TokenProvider;\n /** Validator wallet URL for scan-proxy CIP-56 endpoints. Required. */\n walletUrl: string;\n /** LayerZero sequencer base URL (e.g. \"http://localhost:8080\"); vApp JSON-RPC at `/vapp`. Required. */\n sequencerUrl: string;\n /** Sequencer validator pubkeys plus quorum for verifying signed read responses. */\n sequencerCommittee?: SequencerCommittee;\n};\n\n/**\n * Client-side committee config for secp256k1 sequencer read verification.\n * Pubkeys must be hex-encoded with `0x` prefix in the same format returned by\n * `recoverSecp256k1PublicKey`.\n */\nexport type SequencerCommittee = {\n publicKeys: `0x${string}`[];\n quorum: number;\n};\n\n// ─────────────────────────────────────────────────────────────────────────────\n// URI Parsing\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport type CantonUriParams = {\n /** Base URL of the JSON Ledger API (e.g. \"http://localhost:5975\") */\n jsonApiUrl: string;\n /** Host:port of the gRPC Admin API (e.g. \"localhost:5076\") */\n adminApiHost: string;\n /** Ledger API user ID (default: \"participant_admin\") */\n userId: string;\n /** Validator wallet URL for scan-proxy CIP-56 endpoints (e.g. \"http://localhost:7201\"). Required. */\n walletUrl: string;\n /** LayerZero sequencer base URL (e.g. \"http://localhost:8080\"); vApp JSON-RPC at `/vapp`. Required. */\n sequencerUrl: string;\n /** Sequencer committee config parsed from the provider URI. */\n sequencerCommittee?: SequencerCommittee;\n /** OAuth2 client credentials config — present only for non-local environments */\n oauth2?: ClientCredentialsTokenProviderConfig;\n};\n\n/**\n * Parse a Canton provider URI into its constituent parts.\n *\n * URI format:\n * `<json-api-base>?admin-api=<host:port>&user-id=<id>[&token-url=...&client-id=...&client-secret=...&scope=...&audience=...]`\n *\n * The base URL (everything before the query string) is the JSON Ledger API endpoint.\n * Canton-specific params are extracted and removed; any remaining query params are\n * preserved on the JSON API URL.\n */\nexport function parseCantonUri(uri: string): CantonUriParams {\n const url = new URL(uri);\n\n const adminApiHost = url.searchParams.get('admin-api');\n if (!adminApiHost) {\n throw new Error('Canton provider URI missing required \"admin-api\" query parameter');\n }\n\n const userId = url.searchParams.get('user-id') ?? 'participant_admin';\n const walletUrl = url.searchParams.get('wallet-url');\n if (!walletUrl) {\n throw new Error('Canton provider URI missing required \"wallet-url\" query parameter');\n }\n const sequencerUrl = url.searchParams.get('sequencer-url');\n if (!sequencerUrl) {\n throw new Error('Canton provider URI missing required \"sequencer-url\" query parameter');\n }\n const sequencerValidatorsParam = url.searchParams.get('sequencer-validators');\n const sequencerQuorumParam = url.searchParams.get('sequencer-quorum');\n const tokenUrl = url.searchParams.get('token-url') ?? undefined;\n const clientId = url.searchParams.get('client-id') ?? undefined;\n const clientSecret = url.searchParams.get('client-secret') ?? undefined;\n const scope = url.searchParams.get('scope') ?? undefined;\n const audience = url.searchParams.get('audience') ?? undefined;\n\n // Remove Canton params to get clean JSON API URL\n for (const key of [\n 'admin-api',\n 'user-id',\n 'wallet-url',\n 'sequencer-url',\n 'sequencer-validators',\n 'sequencer-quorum',\n 'token-url',\n 'client-id',\n 'client-secret',\n 'scope',\n 'audience',\n ]) {\n url.searchParams.delete(key);\n }\n\n let sequencerCommittee: SequencerCommittee | undefined;\n if (sequencerValidatorsParam !== null && sequencerQuorumParam !== null) {\n const publicKeys = sequencerValidatorsParam\n .split(',')\n .map((s) => s.trim().toLowerCase())\n .filter((s) => s.length > 0);\n if (publicKeys.length === 0) {\n throw new Error(\n 'Canton provider URI sequencer-validators must contain at least one pubkey',\n );\n }\n for (const publicKey of publicKeys) {\n if (!publicKey.startsWith('0x')) {\n throw new Error(\n `Canton provider URI sequencer-validators pubkey must start with 0x, got: ${publicKey.slice(0, 10)}...`,\n );\n }\n }\n\n const quorum = Number(sequencerQuorumParam);\n if (!Number.isInteger(quorum) || quorum < 1) {\n throw new Error(\n `Canton provider URI sequencer-quorum must be a positive integer, got: ${sequencerQuorumParam}`,\n );\n }\n if (quorum > publicKeys.length) {\n throw new Error(\n `Canton provider URI sequencer-quorum=${quorum} exceeds committee size ${publicKeys.length}`,\n );\n }\n sequencerCommittee = {\n publicKeys: publicKeys as `0x${string}`[],\n quorum,\n };\n } else if (sequencerValidatorsParam !== null || sequencerQuorumParam !== null) {\n throw new Error(\n 'Canton provider URI must set both sequencer-validators and sequencer-quorum together',\n );\n }\n\n const jsonApiUrl = url.toString().replace(/\\/$/, '');\n\n const oauth2 =\n tokenUrl && clientId && clientSecret\n ? { tokenUrl, clientId, clientSecret, scope, audience }\n : undefined;\n\n return {\n jsonApiUrl,\n adminApiHost,\n userId,\n walletUrl,\n sequencerUrl,\n sequencerCommittee,\n oauth2,\n };\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Provider Factory\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport type CreateCantonProviderOptions = {\n /** Raw provider URI (from provider config) */\n uri: string;\n /** When true, uses LocalTokenProvider (self-signed JWTs) instead of OAuth2 */\n isLocal: boolean;\n};\n\n/**\n * Create a {@link CantonProvider} from a provider URI.\n *\n * - **isLocal=true**: Uses {@link LocalTokenProvider} with admin-level access (self-signed JWTs).\n * - **isLocal=false**: Uses {@link ClientCredentialsTokenProvider} with OAuth2 client\n * credentials extracted from the URI query parameters.\n */\nexport function createCantonProvider({\n uri,\n isLocal,\n}: CreateCantonProviderOptions): CantonProvider {\n const params = parseCantonUri(uri);\n\n const tokenProvider = createTokenProvider(params, isLocal);\n\n // ── JSON Ledger API Client ──────────────────────────────────────────\n const configuration = new Configuration({\n basePath: params.jsonApiUrl,\n accessToken: () => tokenProvider.getToken(),\n });\n const client = new CantonClient(configuration, params.userId);\n\n // ── gRPC Admin API Client ───────────────────────────────────────────\n const grpcClient = new CantonGrpcClient({\n host: params.adminApiHost,\n tokenProvider,\n });\n\n return {\n client,\n grpcClient,\n tokenProvider,\n walletUrl: params.walletUrl,\n sequencerUrl: params.sequencerUrl,\n sequencerCommittee: params.sequencerCommittee,\n };\n}\n\nfunction createTokenProvider(params: CantonUriParams, isLocal: boolean): TokenProvider {\n if (isLocal) {\n return new LocalTokenProvider({\n userId: params.userId,\n actAs: [],\n admin: true,\n });\n }\n\n // TODO(canton): add other prod auth methods (direct JWT passthrough, etc.).\n if (!params.oauth2) {\n throw new Error(\n 'Canton provider requires OAuth2 credentials (token-url, client-id, client-secret) in the provider URI',\n );\n }\n\n return new ClientCredentialsTokenProvider(params.oauth2);\n}\n"]}
@@ -0,0 +1,97 @@
1
+ import { cantonTransactionSchema } from './3YCNHEVD.js';
2
+ import { __name } from './VUOMXK5T.js';
3
+ import { buildTransactionWithResultSchema } from '@layerzerolabs/common-chain-model';
4
+ import { NonRetryableError } from '@layerzerolabs/common-error-utils';
5
+
6
+ var cantonTxWithResultSchema = buildTransactionWithResultSchema(cantonTransactionSchema);
7
+ var REQUEST_ARCHIVAL_POLL_INTERVAL_MS = 2e3;
8
+ var REQUEST_ARCHIVAL_MAX_ATTEMPTS = 60;
9
+ var IREQUEST_ACCEPT_CHOICE = "IRequest_Accept";
10
+ var IREQUEST_REJECT_CHOICE = "IRequest_Reject";
11
+ var REQUEST_TEMPLATE_QUALIFIED_NAME = "Request:Request";
12
+ var fetchCreatedEvents = /* @__PURE__ */ __name(async (client, updateId, parties) => {
13
+ const cantonTx = await client.fetchTransactionByUpdateId(updateId, parties);
14
+ return cantonTx.events?.filter((event) => "CreatedEvent" in event).map((event) => event.CreatedEvent) ?? [];
15
+ }, "fetchCreatedEvents");
16
+ var findMatchingCreatedEvent = /* @__PURE__ */ __name((createdEvents, expectedTemplateId, expectedSignatories) => {
17
+ const expectedSet = new Set(expectedSignatories);
18
+ return createdEvents.find((event) => {
19
+ if (event.templateId !== expectedTemplateId) return false;
20
+ const signatories = event.signatories ?? [];
21
+ return signatories.length > 0 && signatories.every((s) => expectedSet.has(s));
22
+ });
23
+ }, "findMatchingCreatedEvent");
24
+ var findMatchingCreatedEventFromTx = /* @__PURE__ */ __name(async (client, tx) => {
25
+ if (!tx) return null;
26
+ const parsed = cantonTxWithResultSchema.safeParse(tx);
27
+ if (!parsed.success) return null;
28
+ if (parsed.data.result.type !== "success") return null;
29
+ const { commands, actAs } = parsed.data.populatedTransaction;
30
+ const updateId = parsed.data.result.minedTxHash;
31
+ if (!updateId || !actAs.length) return null;
32
+ const createCommand = commands[0];
33
+ if (!createCommand || !("createCommand" in createCommand)) return null;
34
+ const createdEvents = await fetchCreatedEvents(client, updateId, actAs);
35
+ return findMatchingCreatedEvent(createdEvents, createCommand.createCommand.templateId, actAs) ?? null;
36
+ }, "findMatchingCreatedEventFromTx");
37
+ var cantonDeploymentSucceeded = /* @__PURE__ */ __name(async (client, txWithResult) => {
38
+ return await findMatchingCreatedEventFromTx(client, txWithResult) != null;
39
+ }, "cantonDeploymentSucceeded");
40
+ var cantonRegisterSucceeded = /* @__PURE__ */ __name(async (client, txWithResult) => {
41
+ const parsed = cantonTxWithResultSchema.safeParse(txWithResult);
42
+ if (!parsed.success || parsed.data.result.type !== "success") return false;
43
+ const updateId = parsed.data.result.minedTxHash;
44
+ if (!updateId) return false;
45
+ const { actAs } = parsed.data.populatedTransaction;
46
+ const parties = actAs.length ? actAs : await client.listUserParties();
47
+ if (!parties.length) return false;
48
+ const createdEvents = await fetchCreatedEvents(client, updateId, parties);
49
+ const requestEvent = createdEvents.find((event) => event.templateId?.includes(REQUEST_TEMPLATE_QUALIFIED_NAME));
50
+ if (!requestEvent) return false;
51
+ try {
52
+ await waitForRequestArchival(client, requestEvent.contractId, parties);
53
+ return true;
54
+ } catch {
55
+ return false;
56
+ }
57
+ }, "cantonRegisterSucceeded");
58
+ var waitForRequestArchival = /* @__PURE__ */ __name(async (client, requestContractId, parties) => {
59
+ for (let attempt = 1; attempt <= REQUEST_ARCHIVAL_MAX_ATTEMPTS; attempt++) {
60
+ const { archived } = await client.fetchEventsByContractId(requestContractId, parties);
61
+ if (archived) {
62
+ const transaction = await client.fetchTransactionByOffset(archived.offset, parties);
63
+ let interfaceChoice;
64
+ let interfaceArg;
65
+ let consumingChoice;
66
+ for (const event of transaction.events ?? []) {
67
+ if (!("ExercisedEvent" in event)) continue;
68
+ const ex = event.ExercisedEvent;
69
+ if (ex.contractId !== requestContractId) continue;
70
+ if (ex.choice === IREQUEST_ACCEPT_CHOICE || ex.choice === IREQUEST_REJECT_CHOICE) {
71
+ interfaceChoice = ex.choice;
72
+ interfaceArg = ex.choiceArgument;
73
+ }
74
+ if (ex.consuming) {
75
+ consumingChoice = ex.choice;
76
+ }
77
+ }
78
+ if (interfaceChoice === IREQUEST_ACCEPT_CHOICE) {
79
+ return interfaceArg;
80
+ }
81
+ if (interfaceChoice === IREQUEST_REJECT_CHOICE) {
82
+ const rejectContext = typeof interfaceArg === "object" && interfaceArg !== null && "rejectContext" in interfaceArg ? interfaceArg.rejectContext : void 0;
83
+ const reason = rejectContext ? JSON.stringify(rejectContext).slice(0, 500) : "unknown";
84
+ throw new NonRetryableError(`Request rejected \u2014 rejectContext: ${reason}`);
85
+ }
86
+ throw new NonRetryableError(`Request ${requestContractId} archived via unexpected choice ${consumingChoice ?? "<none>"}`);
87
+ }
88
+ if (attempt < REQUEST_ARCHIVAL_MAX_ATTEMPTS) {
89
+ await new Promise((resolve) => setTimeout(resolve, REQUEST_ARCHIVAL_POLL_INTERVAL_MS));
90
+ }
91
+ }
92
+ throw new NonRetryableError(`Request archival timeout (${REQUEST_ARCHIVAL_MAX_ATTEMPTS} attempts) for ${requestContractId}`);
93
+ }, "waitForRequestArchival");
94
+
95
+ export { cantonDeploymentSucceeded, cantonRegisterSucceeded, fetchCreatedEvents, findMatchingCreatedEvent, findMatchingCreatedEventFromTx, waitForRequestArchival };
96
+ //# sourceMappingURL=NO5PBPQH.js.map
97
+ //# sourceMappingURL=NO5PBPQH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/events.ts"],"names":["cantonTxWithResultSchema","buildTransactionWithResultSchema","cantonTransactionSchema","REQUEST_ARCHIVAL_POLL_INTERVAL_MS","REQUEST_ARCHIVAL_MAX_ATTEMPTS","IREQUEST_ACCEPT_CHOICE","IREQUEST_REJECT_CHOICE","REQUEST_TEMPLATE_QUALIFIED_NAME","fetchCreatedEvents","client","updateId","parties","cantonTx","fetchTransactionByUpdateId","events","filter","event","map","CreatedEvent","findMatchingCreatedEvent","createdEvents","expectedTemplateId","expectedSignatories","expectedSet","Set","find","templateId","signatories","length","every","s","has","findMatchingCreatedEventFromTx","tx","parsed","safeParse","success","data","result","type","commands","actAs","populatedTransaction","minedTxHash","createCommand","cantonDeploymentSucceeded","txWithResult","cantonRegisterSucceeded","listUserParties","requestEvent","includes","waitForRequestArchival","contractId","requestContractId","attempt","archived","fetchEventsByContractId","transaction","fetchTransactionByOffset","offset","interfaceChoice","interfaceArg","consumingChoice","ex","ExercisedEvent","choice","choiceArgument","consuming","rejectContext","undefined","reason","JSON","stringify","slice","NonRetryableError","Promise","resolve","setTimeout"],"mappings":";;;;;AAOA,IAAMA,wBAAAA,GAA2BC,iCAAiCC,uBAAAA,CAAAA;AAGlE,IAAMC,iCAAAA,GAAoC,GAAA;AAC1C,IAAMC,6BAAAA,GAAgC,EAAA;AAGtC,IAAMC,sBAAAA,GAAyB,iBAAA;AAC/B,IAAMC,sBAAAA,GAAyB,iBAAA;AAE/B,IAAMC,+BAAAA,GAAkC,iBAAA;AAKjC,IAAMC,kBAAAA,mBAAqB,MAAA,CAAA,OAC9BC,MAAAA,EACAC,QAAAA,EACAC,OAAAA,KAAAA;AAEA,EAAA,MAAMC,QAAAA,GAAW,MAAMH,MAAAA,CAAOI,0BAAAA,CAA2BH,UAAUC,OAAAA,CAAAA;AACnE,EAAA,OACIC,QAAAA,CAASE,MAAAA,EACHC,MAAAA,CAAO,CAACC,UAAmD,cAAA,IAAkBA,KAAAA,CAAAA,CAC9EC,GAAAA,CAAI,CAACD,KAAAA,KAAUA,KAAAA,CAAME,YAAY,KAAK,EAAA;AAEnD,CAAA,EAXkC,oBAAA;AAiB3B,IAAMC,wBAAAA,mBAA2B,MAAA,CAAA,CACpCC,aAAAA,EACAC,kBAAAA,EACAC,mBAAAA,KAAAA;AAEA,EAAA,MAAMC,WAAAA,GAAc,IAAIC,GAAAA,CAAIF,mBAAAA,CAAAA;AAC5B,EAAA,OAAOF,aAAAA,CAAcK,IAAAA,CAAK,CAACT,KAAAA,KAAAA;AACvB,IAAA,IAAIA,KAAAA,CAAMU,UAAAA,KAAeL,kBAAAA,EAAoB,O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A,eAAAA,GAAkBC,EAAAA,CAAGE,MAAAA;AACzB,QAAA;AACJ,MAAA;AACA,MAAA,IAAIL,oBAAoBvD,sBAAAA,EAAwB;AAC5C,QAAA,OAAOwD,YAAAA;AACX,MAAA;AACA,MAAA,IAAID,oBAAoBtD,sBAAAA,EAAwB;AAC5C,QAAA,MAAM8D,aAAAA,GACF,OAAOP,YAAAA,KAAiB,QAAA,IACxBA,iBAAiB,IAAA,IACjB,eAAA,IAAmBA,YAAAA,GACbA,YAAAA,CAAaO,aAAAA,GACbC,MAAAA;AACV,QAAA,MAAMC,MAAAA,GAASF,gBACTG,IAAAA,CAAKC,SAAAA,CAAUJ,aAAAA,CAAAA,CAAeK,KAAAA,CAAM,CAAA,EAAG,GAAA,CAAA,GACvC,SAAA;AACN,QAAA,MAAM,IAAIC,iBAAAA,CAAkB,CAAA,uCAAA,EAAqCJ,MAAAA,CAAAA,CAAQ,CAAA;AAC7E,MAAA;AAKA,MAAA,MAAM,IAAII,iBAAAA,CACN,CAAA,QAAA,EAAWrB,iBAAAA,CAAAA,gCAAAA,EAAoDS,eAAAA,IAAmB,QAAA,CAAA,CAAU,CAAA;AAEpG,IAAA;AAGA,IAAA,IAAIR,UAAUlD,6BAAAA,EAA+B;AACzC,MAAA,MAAM,IAAIuE,OAAAA,CAAQ,CAACC,YAAYC,UAAAA,CAAWD,OAAAA,EAASzE,iCAAAA,CAAAA,CAAAA;AACvD,IAAA;AACJ,EAAA;AACA,EAAA,MAAM,IAAIuE,iBAAAA,CACN,CAAA,0BAAA,EAA6BtE,6BAAAA,CAAAA,eAAAA,EAA+CiD,iBAAAA,CAAAA,CAAmB,CAAA;AAEvG,CAAA,EAlEsC,wBAAA","file":"NO5PBPQH.js","sourcesContent":["import { buildTransactionWithResultSchema } from '@layerzerolabs/common-chain-model';\nimport { NonRetryableError } from '@layerzerolabs/common-error-utils';\n\nimport type { ICantonClient } from './client';\nimport type { CreatedEvent } from './open-api/models';\nimport { cantonTransactionSchema } from './transaction';\n\nconst cantonTxWithResultSchema = buildTransactionWithResultSchema(cantonTransactionSchema);\n\n// TODO(canton): confirm these poll values are enough to wait for archival across environments.\nconst REQUEST_ARCHIVAL_POLL_INTERVAL_MS = 2000;\nconst REQUEST_ARCHIVAL_MAX_ATTEMPTS = 60;\n\n// IRequest interface choices that consume the Request contract via `archive reqCid` in their impls.\nconst IREQUEST_ACCEPT_CHOICE = 'IRequest_Accept';\nconst IREQUEST_REJECT_CHOICE = 'IRequest_Reject';\n\nconst REQUEST_TEMPLATE_QUALIFIED_NAME = 'Request:Request';\n\n/**\n * Fetches a transaction by updateId and returns all CreatedEvents.\n */\nexport const fetchCreatedEvents = async (\n client: ICantonClient,\n updateId: string,\n parties: string[],\n): Promise<CreatedEvent[]> => {\n const cantonTx = await client.fetchTransactionByUpdateId(updateId, parties);\n return (\n cantonTx.events\n ?.filter((event): event is { CreatedEvent: CreatedEvent } => 'CreatedEvent' in event)\n .map((event) => event.CreatedEvent) ?? []\n );\n};\n\n/**\n * Finds a CreatedEvent matching the expected templateId whose signatories\n * are a subset of the provided actAs parties.\n */\nexport const findMatchingCreatedEvent = (\n createdEvents: CreatedEvent[],\n expectedTemplateId: string,\n expectedSignatories: string[],\n): CreatedEvent | undefined => {\n const expectedSet = new Set(expectedSignatories);\n return createdEvents.find((event) => {\n if (event.templateId !== expectedTemplateId) return false;\n const signatories = event.signatories ?? [];\n return signatories.length > 0 && signatories.every((s) => expectedSet.has(s));\n });\n};\n\n/**\n * Parses a Canton transaction-with-result, fetches the created events from the ledger,\n * and returns the first CreatedEvent matching the submitted command's templateId and actAs\n * signatories. Returns null if the transaction is falsy, not successful, or has no match.\n */\nexport const findMatchingCreatedEventFromTx = async (\n client: ICantonClient,\n tx: unknown,\n): Promise<CreatedEvent | null> => {\n if (!tx) return null;\n\n const parsed = cantonTxWithResultSchema.safeParse(tx);\n if (!parsed.success) return null;\n if (parsed.data.result.type !== 'success') return null;\n\n const { commands, actAs } = parsed.data.populatedTransaction;\n const updateId = parsed.data.result.minedTxHash;\n\n if (!updateId || !actAs.length) return null;\n\n const createCommand = commands[0];\n if (!createCommand || !('createCommand' in createCommand)) return null;\n\n const createdEvents = await fetchCreatedEvents(client, updateId, actAs);\n return (\n findMatchingCreatedEvent(createdEvents, createCommand.createCommand.templateId, actAs) ??\n null\n );\n};\n\n/**\n * Checks that a Canton deploy transaction resulted in a CreatedEvent\n * matching the submitted command's templateId and actAs signatories.\n */\nexport const cantonDeploymentSucceeded = async (\n client: ICantonClient,\n txWithResult: unknown,\n): Promise<boolean> => {\n return (await findMatchingCreatedEventFromTx(client, txWithResult)) != null;\n};\n\n/**\n * Success check for register-style deploys (an exercise on Uln302 that creates a\n * Request, which the validator then accepts or rejects in a later transaction).\n *\n * Positively confirms acceptance: locate the Request created by this submission,\n * then delegate to waitForRequestArchival, which waits for the Request to be\n * archived and verifies the IRequest_Accept choice ran (throwing on reject,\n * unexpected archival, or timeout). This is a positive accept check rather than\n * inferring success from the absence of a rejection event.\n */\nexport const cantonRegisterSucceeded = async (\n client: ICantonClient,\n txWithResult: unknown,\n): Promise<boolean> => {\n const parsed = cantonTxWithResultSchema.safeParse(txWithResult);\n if (!parsed.success || parsed.data.result.type !== 'success') return false;\n\n const updateId = parsed.data.result.minedTxHash;\n if (!updateId) return false;\n\n // Deferred-sender register payloads build with empty actAs (the sender is\n // resolved at sign time), so fall back to the parties this user can read as.\n const { actAs } = parsed.data.populatedTransaction;\n const parties = actAs.length ? actAs : await client.listUserParties();\n if (!parties.length) return false;\n\n const createdEvents = await fetchCreatedEvents(client, updateId, parties);\n const requestEvent = createdEvents.find((event) =>\n event.templateId?.includes(REQUEST_TEMPLATE_QUALIFIED_NAME),\n );\n if (!requestEvent) return false;\n\n try {\n await waitForRequestArchival(client, requestEvent.contractId, parties);\n return true;\n } catch {\n return false;\n }\n};\n\n/**\n * Wait for a Request contract to be archived AND determine accept vs reject\n * by inspecting which IRequest choice ran on it.\n *\n * IRequest_Accept and IRequest_Reject are nonconsuming choices that both end\n * with `archive reqCid` in their implementations. We can't tell accept from\n * reject from the archive alone — must look at the ExercisedEvent in the\n * archive transaction tree.\n *\n * On accept, returns the IRequest_Accept choice argument (the accept call\n * context, including `acceptContext`) so callers can extract the validator's\n * internal address from it.\n *\n * Throws NonRetryableError on rejection, on archival via a non-Accept/Reject\n * path (unexpected), or on timeout.\n */\nexport const waitForRequestArchival = async (\n client: ICantonClient,\n requestContractId: string,\n parties: string[],\n): Promise<unknown> => {\n for (let attempt = 1; attempt <= REQUEST_ARCHIVAL_MAX_ATTEMPTS; attempt++) {\n const { archived } = await client.fetchEventsByContractId(requestContractId, parties);\n if (archived) {\n const transaction = await client.fetchTransactionByOffset(archived.offset, parties);\n // IRequest_Accept and IRequest_Reject are *nonconsuming* interface\n // choices on IRequest. Their template impls (Request.daml's\n // request_AcceptImpl / request_RejectImpl) end with `archive reqCid`,\n // which Canton records as a consuming exercise of the implicit\n // `Archive` choice. So in the transaction tree we see TWO exercises\n // on the Request contract:\n // - a non-consuming `IRequest_Accept` (or `IRequest_Reject`)\n // - a consuming `Archive` (the actual archival)\n // Scan for any IRequest_Accept/Reject exercise on it in the\n // tree to determine the outcome, regardless of which one consumed.\n let interfaceChoice: string | undefined;\n let interfaceArg: unknown;\n let consumingChoice: string | undefined;\n for (const event of transaction.events ?? []) {\n if (!('ExercisedEvent' in event)) continue;\n const ex = event.ExercisedEvent;\n if (ex.contractId !== requestContractId) continue;\n if (ex.choice === IREQUEST_ACCEPT_CHOICE || ex.choice === IREQUEST_REJECT_CHOICE) {\n interfaceChoice = ex.choice;\n interfaceArg = ex.choiceArgument;\n }\n if (ex.consuming) {\n consumingChoice = ex.choice;\n }\n }\n if (interfaceChoice === IREQUEST_ACCEPT_CHOICE) {\n return interfaceArg;\n }\n if (interfaceChoice === IREQUEST_REJECT_CHOICE) {\n const rejectContext =\n typeof interfaceArg === 'object' &&\n interfaceArg !== null &&\n 'rejectContext' in interfaceArg\n ? interfaceArg.rejectContext\n : undefined;\n const reason = rejectContext\n ? JSON.stringify(rejectContext).slice(0, 500)\n : 'unknown';\n throw new NonRetryableError(`Request rejected — rejectContext: ${reason}`);\n }\n // No IRequest_Accept/Reject ran on this Request — it was archived\n // via some other path (default `Archive`, or another consuming\n // choice). That's unexpected for register-style flows — treat as\n // failure so we don't silently call this a success.\n throw new NonRetryableError(\n `Request ${requestContractId} archived via unexpected choice ${consumingChoice ?? '<none>'}`,\n );\n }\n // Skip the sleep on the final attempt — there's no next iteration to\n // wait for, so it would only delay the timeout error pointlessly.\n if (attempt < REQUEST_ARCHIVAL_MAX_ATTEMPTS) {\n await new Promise((resolve) => setTimeout(resolve, REQUEST_ARCHIVAL_POLL_INTERVAL_MS));\n }\n }\n throw new NonRetryableError(\n `Request archival timeout (${REQUEST_ARCHIVAL_MAX_ATTEMPTS} attempts) for ${requestContractId}`,\n );\n};\n"]}
package/dist/events.d.ts CHANGED
@@ -20,4 +20,32 @@ export declare const findMatchingCreatedEventFromTx: (client: ICantonClient, tx:
20
20
  * matching the submitted command's templateId and actAs signatories.
21
21
  */
22
22
  export declare const cantonDeploymentSucceeded: (client: ICantonClient, txWithResult: unknown) => Promise<boolean>;
23
+ /**
24
+ * Success check for register-style deploys (an exercise on Uln302 that creates a
25
+ * Request, which the validator then accepts or rejects in a later transaction).
26
+ *
27
+ * Positively confirms acceptance: locate the Request created by this submission,
28
+ * then delegate to waitForRequestArchival, which waits for the Request to be
29
+ * archived and verifies the IRequest_Accept choice ran (throwing on reject,
30
+ * unexpected archival, or timeout). This is a positive accept check rather than
31
+ * inferring success from the absence of a rejection event.
32
+ */
33
+ export declare const cantonRegisterSucceeded: (client: ICantonClient, txWithResult: unknown) => Promise<boolean>;
34
+ /**
35
+ * Wait for a Request contract to be archived AND determine accept vs reject
36
+ * by inspecting which IRequest choice ran on it.
37
+ *
38
+ * IRequest_Accept and IRequest_Reject are nonconsuming choices that both end
39
+ * with `archive reqCid` in their implementations. We can't tell accept from
40
+ * reject from the archive alone — must look at the ExercisedEvent in the
41
+ * archive transaction tree.
42
+ *
43
+ * On accept, returns the IRequest_Accept choice argument (the accept call
44
+ * context, including `acceptContext`) so callers can extract the validator's
45
+ * internal address from it.
46
+ *
47
+ * Throws NonRetryableError on rejection, on archival via a non-Accept/Reject
48
+ * path (unexpected), or on timeout.
49
+ */
50
+ export declare const waitForRequestArchival: (client: ICantonClient, requestContractId: string, parties: string[]) => Promise<unknown>;
23
51
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtD;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC3B,QAAQ,aAAa,EACrB,UAAU,MAAM,EAChB,SAAS,MAAM,EAAE,KAClB,OAAO,CAAC,YAAY,EAAE,CAOxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GACjC,eAAe,YAAY,EAAE,EAC7B,oBAAoB,MAAM,EAC1B,qBAAqB,MAAM,EAAE,KAC9B,YAAY,GAAG,SAOjB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GACvC,QAAQ,aAAa,EACrB,IAAI,OAAO,KACZ,OAAO,CAAC,YAAY,GAAG,IAAI,CAoB7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GAClC,QAAQ,aAAa,EACrB,cAAc,OAAO,KACtB,OAAO,CAAC,OAAO,CAEjB,CAAC"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAetD;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC3B,QAAQ,aAAa,EACrB,UAAU,MAAM,EAChB,SAAS,MAAM,EAAE,KAClB,OAAO,CAAC,YAAY,EAAE,CAOxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GACjC,eAAe,YAAY,EAAE,EAC7B,oBAAoB,MAAM,EAC1B,qBAAqB,MAAM,EAAE,KAC9B,YAAY,GAAG,SAOjB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GACvC,QAAQ,aAAa,EACrB,IAAI,OAAO,KACZ,OAAO,CAAC,YAAY,GAAG,IAAI,CAoB7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GAClC,QAAQ,aAAa,EACrB,cAAc,OAAO,KACtB,OAAO,CAAC,OAAO,CAEjB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GAChC,QAAQ,aAAa,EACrB,cAAc,OAAO,KACtB,OAAO,CAAC,OAAO,CAyBjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,GAC/B,QAAQ,aAAa,EACrB,mBAAmB,MAAM,EACzB,SAAS,MAAM,EAAE,KAClB,OAAO,CAAC,OAAO,CA8DjB,CAAC"}
package/dist/events.js CHANGED
@@ -1,4 +1,4 @@
1
- export { cantonDeploymentSucceeded, fetchCreatedEvents, findMatchingCreatedEvent, findMatchingCreatedEventFromTx } from './623CCK2L.js';
1
+ export { cantonDeploymentSucceeded, cantonRegisterSucceeded, fetchCreatedEvents, findMatchingCreatedEvent, findMatchingCreatedEventFromTx, waitForRequestArchival } from './NO5PBPQH.js';
2
2
  import './3YCNHEVD.js';
3
3
  import './VUOMXK5T.js';
4
4
  //# sourceMappingURL=events.js.map
package/dist/index.js CHANGED
@@ -5,8 +5,8 @@ import './RSV7WS7X.js';
5
5
  import './DYPWWRBK.js';
6
6
  import './IIWYAFUO.js';
7
7
  export { computeCantonFingerprint, extractTransactions } from './QHEXOE3Y.js';
8
- export { cantonDeploymentSucceeded, fetchCreatedEvents, findMatchingCreatedEvent, findMatchingCreatedEventFromTx } from './623CCK2L.js';
9
- export { createCantonProvider, parseCantonUri } from './MDLCDBAQ.js';
8
+ export { cantonDeploymentSucceeded, cantonRegisterSucceeded, fetchCreatedEvents, findMatchingCreatedEvent, findMatchingCreatedEventFromTx, waitForRequestArchival } from './NO5PBPQH.js';
9
+ export { createCantonProvider, parseCantonUri } from './HNZRSDTR.js';
10
10
  export { LocalTokenProvider } from './SCEF7TLZ.js';
11
11
  export { CantonClient } from './JV2DWUBW.js';
12
12
  import './EIXIZULE.js';
@@ -13,9 +13,21 @@ export type CantonProvider = {
13
13
  client: ICantonClient;
14
14
  grpcClient: CantonGrpcClient;
15
15
  tokenProvider: TokenProvider;
16
- /** Validator wallet URL for scan-proxy CIP-56 endpoints. Required — amulet fee
17
- * payment needs it on every Canton transaction; enforced in {@link parseCantonUri}. */
16
+ /** Validator wallet URL for scan-proxy CIP-56 endpoints. Required. */
18
17
  walletUrl: string;
18
+ /** LayerZero sequencer base URL (e.g. "http://localhost:8080"); vApp JSON-RPC at `/vapp`. Required. */
19
+ sequencerUrl: string;
20
+ /** Sequencer validator pubkeys plus quorum for verifying signed read responses. */
21
+ sequencerCommittee?: SequencerCommittee;
22
+ };
23
+ /**
24
+ * Client-side committee config for secp256k1 sequencer read verification.
25
+ * Pubkeys must be hex-encoded with `0x` prefix in the same format returned by
26
+ * `recoverSecp256k1PublicKey`.
27
+ */
28
+ export type SequencerCommittee = {
29
+ publicKeys: `0x${string}`[];
30
+ quorum: number;
19
31
  };
20
32
  export type CantonUriParams = {
21
33
  /** Base URL of the JSON Ledger API (e.g. "http://localhost:5975") */
@@ -24,8 +36,12 @@ export type CantonUriParams = {
24
36
  adminApiHost: string;
25
37
  /** Ledger API user ID (default: "participant_admin") */
26
38
  userId: string;
27
- /** Validator wallet URL for scan-proxy CIP-56 endpoints (e.g. "http://localhost:7201") */
39
+ /** Validator wallet URL for scan-proxy CIP-56 endpoints (e.g. "http://localhost:7201"). Required. */
28
40
  walletUrl: string;
41
+ /** LayerZero sequencer base URL (e.g. "http://localhost:8080"); vApp JSON-RPC at `/vapp`. Required. */
42
+ sequencerUrl: string;
43
+ /** Sequencer committee config parsed from the provider URI. */
44
+ sequencerCommittee?: SequencerCommittee;
29
45
  /** OAuth2 client credentials config — present only for non-local environments */
30
46
  oauth2?: ClientCredentialsTokenProviderConfig;
31
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,oCAAoC,EAC5C,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAOxD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,aAAa,EAAE,aAAa,CAAC;IAC7B;4FACwF;IACxF,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAMF,MAAM,MAAM,eAAe,GAAG;IAC1B,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,SAAS,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,MAAM,CAAC,EAAE,oCAAoC,CAAC;CACjD,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CA8C3D;AAMD,MAAM,MAAM,2BAA2B,GAAG;IACtC,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,8E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AC,EAAE,oCAAoC,CAAC;CACjD,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAkG3D;AAMD,MAAM,MAAM,2BAA2B,GAAG;IACtC,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EACjC,GAAG,EACH,OAAO,GACV,EAAE,2BAA2B,GAAG,cAAc,CA0B9C"}
package/dist/provider.js CHANGED
@@ -1,4 +1,4 @@
1
- export { createCantonProvider, parseCantonUri } from './MDLCDBAQ.js';
1
+ export { createCantonProvider, parseCantonUri } from './HNZRSDTR.js';
2
2
  import './SCEF7TLZ.js';
3
3
  import './JV2DWUBW.js';
4
4
  import './EIXIZULE.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerzerolabs/common-canton",
3
- "version": "0.2.105",
3
+ "version": "0.2.106",
4
4
  "private": false,
5
5
  "description": "Canton VM client and utilities",
6
6
  "license": "MIT",
@@ -21,8 +21,9 @@
21
21
  "@protobuf-ts/grpc-transport": "^2.9.4",
22
22
  "es-toolkit": "^1.39.10",
23
23
  "zod": "4.3.5",
24
- "@layerzerolabs/typescript-utils": "0.2.105",
25
- "@layerzerolabs/common-chain-model": "0.2.105"
24
+ "@layerzerolabs/common-chain-model": "0.2.106",
25
+ "@layerzerolabs/typescript-utils": "0.2.106",
26
+ "@layerzerolabs/common-error-utils": "0.2.106"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@types/node": "^22.18.6",
@@ -31,12 +32,12 @@
31
32
  "tsup": "^8.4.0",
32
33
  "typescript": "^5.8.2",
33
34
  "vitest": "^3.2.3",
34
- "@layerzerolabs/typescript-configuration": "0.2.105",
35
- "@layerzerolabs/tsup-configuration": "0.2.105",
36
- "@layerzerolabs/eslint-configuration": "^0.2.105",
37
- "@layerzerolabs/ver-signer-adapter": "0.2.105",
38
- "@layerzerolabs/vitest-configuration": "0.2.105",
39
- "@layerzerolabs/vm-tooling-canton": "0.2.105"
35
+ "@layerzerolabs/eslint-configuration": "^0.2.106",
36
+ "@layerzerolabs/tsup-configuration": "0.2.106",
37
+ "@layerzerolabs/typescript-configuration": "0.2.106",
38
+ "@layerzerolabs/ver-signer-adapter": "0.2.106",
39
+ "@layerzerolabs/vitest-configuration": "0.2.106",
40
+ "@layerzerolabs/vm-tooling-canton": "0.2.106"
40
41
  },
41
42
  "publishConfig": {
42
43
  "access": "restricted",