@layerzerolabs/common-canton 0.2.114 → 0.2.116
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.
- package/.turbo/turbo-build.log +632 -631
- package/.turbo/turbo-test.log +51 -15
- package/LICENSE +23 -0
- package/dist/{CJ2WHLYC.js → EZIA6KIP.js} +3 -10
- package/dist/EZIA6KIP.js.map +1 -0
- package/dist/PQI7CWCR.js +19 -0
- package/dist/PQI7CWCR.js.map +1 -0
- package/dist/daml-serde.d.ts +1 -8
- package/dist/daml-serde.d.ts.map +1 -1
- package/dist/daml-serde.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/package.json +21 -15
- package/src/daml-serde.ts +1 -12
- package/src/index.ts +2 -0
- package/src/types.ts +13 -0
- package/test/daml-serde.test.ts +1 -1
- package/dist/CJ2WHLYC.js.map +0 -1
- package/dist/EYZBXTU6.js +0 -13
- package/dist/EYZBXTU6.js.map +0 -1
- package/test/mocks/scripts/capture-disclosure.ts +0 -252
- package/test/mocks/scripts/capture-external-requests.ts +0 -184
- package/test/mocks/scripts/capture-internal-requests.ts +0 -122
- package/test/mocks/scripts/capture-unhappy-paths.ts +0 -263
- package/test/mocks/scripts/capture-utils.ts +0 -215
package/.turbo/turbo-test.log
CHANGED
|
@@ -8,22 +8,58 @@
|
|
|
8
8
|
|
|
9
9
|
✅ dpm-3.4.8-openapi-generator-7.21.0
|
|
10
10
|
🔧 openapi-generator version: 7.21.0
|
|
11
|
-
📦 Using mini workspace: /tmp/lz-mini-workspace-
|
|
12
|
-
📦 Copied
|
|
11
|
+
📦 Using mini workspace: /tmp/lz-mini-workspace-uLMXb4
|
|
12
|
+
📦 Copied 13 workspace package source(s)
|
|
13
13
|
📦 No mini-workspace pruner configured; using unpruned package-level source copy fallback.
|
|
14
|
-
(node:
|
|
14
|
+
(node:84517) [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.
|
|
15
15
|
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
|
|
16
16
|
To eliminate this warning, add "type": "module" to /home/runner/work/monorepo-internal/monorepo-internal/package.json.
|
|
17
17
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
18
18
|
📦 Docker volumes:
|
|
19
|
-
-v /tmp/lz-mini-workspace-
|
|
19
|
+
-v /tmp/lz-mini-workspace-uLMXb4:/workspace
|
|
20
20
|
-v /home/runner/work/monorepo-internal/monorepo-internal/packages/vms/canton/common:/workspace/packages/vms/canton/common
|
|
21
21
|
-v /home/runner/work/monorepo-internal/monorepo-internal/node_modules/.pnpm:/workspace/node_modules/.pnpm:ro
|
|
22
22
|
$ docker image inspect --format {{.Architecture}} 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
|
|
23
|
-
|
|
23
|
+
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
|
|
24
|
+
📥 Pulling Docker image from: 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
|
|
25
|
+
$ docker pull 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
|
|
26
|
+
openapi-generator-7.21.0-patch-2: Pulling from layerzerolabs/canton-openapi-tooling
|
|
27
|
+
17639c486e57: Pulling fs layer
|
|
28
|
+
051d551be118: Pulling fs layer
|
|
29
|
+
18a60288e8be: Pulling fs layer
|
|
30
|
+
dfe8d6e6f390: Pulling fs layer
|
|
31
|
+
e41c3f01e557: Pulling fs layer
|
|
32
|
+
fe131d3b296c: Pulling fs layer
|
|
33
|
+
dfe8d6e6f390: Waiting
|
|
34
|
+
e41c3f01e557: Waiting
|
|
35
|
+
051d551be118: Waiting
|
|
36
|
+
fe131d3b296c: Waiting
|
|
37
|
+
18a60288e8be: Waiting
|
|
38
|
+
17639c486e57: Verifying Checksum
|
|
39
|
+
17639c486e57: Download complete
|
|
40
|
+
18a60288e8be: Verifying Checksum
|
|
41
|
+
18a60288e8be: Download complete
|
|
42
|
+
051d551be118: Verifying Checksum
|
|
43
|
+
051d551be118: Download complete
|
|
44
|
+
e41c3f01e557: Verifying Checksum
|
|
45
|
+
e41c3f01e557: Download complete
|
|
46
|
+
17639c486e57: Pull complete
|
|
47
|
+
fe131d3b296c: Verifying Checksum
|
|
48
|
+
fe131d3b296c: Download complete
|
|
49
|
+
dfe8d6e6f390: Verifying Checksum
|
|
50
|
+
dfe8d6e6f390: Download complete
|
|
51
|
+
051d551be118: Pull complete
|
|
52
|
+
18a60288e8be: Pull complete
|
|
53
|
+
dfe8d6e6f390: Pull complete
|
|
54
|
+
e41c3f01e557: Pull complete
|
|
55
|
+
fe131d3b296c: Pull complete
|
|
56
|
+
Digest: sha256:9f4b76e7e635939d8107dbe5cf56b881ece20ecb08873f25e5e9d66b2955b5cb
|
|
57
|
+
Status: Downloaded newer image for 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
|
|
58
|
+
438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
|
|
59
|
+
✅ Successfully pulled: 438003944538.dkr.ecr.us-east-1.amazonaws.com/layerzerolabs/canton-openapi-tooling:openapi-generator-7.21.0-patch-2
|
|
24
60
|
👤 Running container as UID:GID 1001:1001
|
|
25
61
|
📜 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
|
|
26
|
-
$ docker run --rm --add-host=host.docker.internal:host-gateway -e LOCAL_UID=1001 -e LOCAL_GID=1001 -v /tmp/lz-mini-workspace-
|
|
62
|
+
$ docker run --rm --add-host=host.docker.internal:host-gateway -e LOCAL_UID=1001 -e LOCAL_GID=1001 -v /tmp/lz-mini-workspace-uLMXb4:/workspace -v /home/runner/work/monorepo-internal/monorepo-internal/packages/vms/canton/common:/workspace/packages/vms/canton/common -v /home/runner/work/monorepo-internal/monorepo-internal/node_modules/.pnpm:/workspace/node_modules/.pnpm:ro -w /workspace/packages/vms/canton/common 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'
|
|
27
63
|
[main] INFO o.o.codegen.DefaultGenerator - Generating with dryRun=false
|
|
28
64
|
[main] INFO o.o.c.ignore.CodegenIgnoreProcessor - Output directory (/workspace/packages/vms/canton/common/src/open-api) does not exist, or is inaccessible. No file (.openapi-generator-ignore) will be evaluated.
|
|
29
65
|
[main] INFO o.o.codegen.DefaultGenerator - OpenAPI Generator: typescript-fetch (client)
|
|
@@ -702,24 +738,24 @@ $ docker run --rm --add-host=host.docker.internal:host-gateway -e LOCAL_UID=1001
|
|
|
702
738
|
# We appreciate your support! Please consider donation to help us maintain this project. #
|
|
703
739
|
# https://opencollective.com/openapi_generator/donate #
|
|
704
740
|
############################################################################################
|
|
705
|
-
⏳ 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:
|
|
741
|
+
⏳ 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: 4.723s
|
|
706
742
|
[33mTesting types with tsc and vue-tsc is an experimental feature.
|
|
707
743
|
Breaking changes might not follow SemVer, please pin Vitest's version when using it.[39m
|
|
708
744
|
|
|
709
745
|
[1m[46m RUN [49m[22m [36mv3.2.6 [39m[90m/home/runner/work/monorepo-internal/monorepo-internal/packages/vms/canton/common[39m
|
|
710
746
|
|
|
711
|
-
[32m✓[39m test/
|
|
712
|
-
[32m✓[39m test/auth/local-token-provider.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
713
|
-
[32m✓[39m test/provider.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m
|
|
714
|
-
[32m✓[39m test/crypto.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
715
|
-
[32m✓[39m test/daml-serde.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m
|
|
747
|
+
[32m✓[39m test/provider.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 38[2mms[22m[39m
|
|
748
|
+
[32m✓[39m test/auth/local-token-provider.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 15[2mms[22m[39m
|
|
749
|
+
[32m✓[39m test/auth/client-credentials-token-provider.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 20[2mms[22m[39m
|
|
750
|
+
[32m✓[39m test/crypto.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
751
|
+
[32m✓[39m test/daml-serde.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
716
752
|
[90mstderr[2m | test/sdk.test.ts[2m > [22m[2mError Handling (Unhappy Paths)[2m > [22m[2mshould handle double archive error
|
|
717
753
|
[22m[39mMock miss: GET /v2/state/connected-synchronizers
|
|
718
754
|
|
|
719
755
|
[90mstderr[2m | test/sdk.test.ts[2m > [22m[2mError Handling (Unhappy Paths)[2m > [22m[2mshould handle unauthorized party error
|
|
720
756
|
[22m[39mMock miss: GET /v2/state/connected-synchronizers
|
|
721
757
|
|
|
722
|
-
[32m✓[39m test/sdk.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m
|
|
758
|
+
[32m✓[39m test/sdk.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 30[2mms[22m[39m
|
|
723
759
|
[32m✓[39m [44m[1m TS [22m[49m test/sdk.test.ts [2m([22m[2m18 tests[22m[2m)[22m
|
|
724
760
|
[32m✓[39m [44m[1m TS [22m[49m test/auth/client-credentials-token-provider.test.ts [2m([22m[2m7 tests[22m[2m)[22m
|
|
725
761
|
[32m✓[39m [44m[1m TS [22m[49m test/daml-serde.test.ts [2m([22m[2m19 tests[22m[2m)[22m
|
|
@@ -730,6 +766,6 @@ Breaking changes might not follow SemVer, please pin Vitest's version when using
|
|
|
730
766
|
[2m Test Files [22m [1m[32m12 passed[39m[22m[90m (12)[39m
|
|
731
767
|
[2m Tests [22m [1m[32m124 passed[39m[22m[90m (124)[39m
|
|
732
768
|
[2mType Errors [22m [2mno errors[22m
|
|
733
|
-
[2m Start at [22m
|
|
734
|
-
[2m Duration [22m 4.
|
|
769
|
+
[2m Start at [22m 00:12:50
|
|
770
|
+
[2m Duration [22m 4.83s[2m (transform 1.56s, setup 0ms, collect 2.55s, tests 124ms, environment 1ms, prepare 1.35s, typecheck 4.38s)[22m
|
|
735
771
|
|
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Copyright (c) 2026 - LayerZero Labs Ltd.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any
|
|
4
|
+
person obtaining a copy of this software and associated
|
|
5
|
+
documentation files (the "Software"), to deal in the
|
|
6
|
+
Software without restriction, including without
|
|
7
|
+
limitation the rights to use, copy, modify, merge,
|
|
8
|
+
publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software
|
|
10
|
+
is furnished to do so, subject to the following
|
|
11
|
+
conditions:
|
|
12
|
+
The above copyright notice and this permission notice
|
|
13
|
+
shall be included in all copies or substantial portions
|
|
14
|
+
of the Software.
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
16
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
17
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
18
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
19
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
22
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
23
|
+
DEALINGS IN THE SOFTWARE.
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { __name } from './VUOMXK5T.js';
|
|
2
2
|
import { keccak_256 } from '@noble/hashes/sha3';
|
|
3
|
-
import { z } from 'zod';
|
|
4
3
|
import { trim0x, bigIntToHex, bytesToHex, hexToBytes } from '@layerzerolabs/common-encoding-utils';
|
|
5
4
|
|
|
6
|
-
var IntLikeSchema = z.union([
|
|
7
|
-
z.bigint(),
|
|
8
|
-
z.number()
|
|
9
|
-
]).refine((value) => typeof value === "bigint" || Number.isSafeInteger(value), {
|
|
10
|
-
message: "number must be a safe integer; pass a bigint for values beyond MAX_SAFE_INTEGER"
|
|
11
|
-
});
|
|
12
5
|
var HEX_DIGITS = /^[0-9a-fA-F]*$/;
|
|
13
6
|
function toBigInt(value, label = "value") {
|
|
14
7
|
if (typeof value === "bigint") return value;
|
|
@@ -111,6 +104,6 @@ function keccak256Hex(h) {
|
|
|
111
104
|
}
|
|
112
105
|
__name(keccak256Hex, "keccak256Hex");
|
|
113
106
|
|
|
114
|
-
export {
|
|
115
|
-
//# sourceMappingURL=
|
|
116
|
-
//# sourceMappingURL=
|
|
107
|
+
export { assertHexLength, codePointLength, formatDamlDecimal, intToHex, keccak256Hex, padLeft, showBool, showInt, textToHex, timeToUnixSeconds, toBigInt };
|
|
108
|
+
//# sourceMappingURL=EZIA6KIP.js.map
|
|
109
|
+
//# sourceMappingURL=EZIA6KIP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/daml-serde.ts"],"names":["HEX_DIGITS","toBigInt","value","label","Number","isSafeInteger","Error","BigInt","codePointLength","count","_","showInt","toString","showBool","formatDamlDecimal","raw","numberToPlainString","trim","negative","body","startsWith","slice","intPartRaw","fracPartRaw","rest","split","length","test","intPart","replace","fracPart","isZero","isFinite","asString","textToHex","out","char","cp","codePointAt","padStart","intToHex","trim0x","bigIntToHex","padLeft","targetLen","assertHexLength","expectedLen","stripped","toLowerCase","timeToUnixSeconds","time","Math","floor","getTime","keccak256Hex","h","bytesToHex","keccak_256","hexToBytes"],"mappings":";;;;AAeA,IAAMA,UAAAA,GAAa,gBAAA;AAGZ,SAASC,QAAAA,CAASC,KAAAA,EAAgBC,KAAAA,GAAQ,OAAA,EAAO;AACpD,EAAA,IAAI,OAAOD,KAAAA,KAAU,QAAA,EAAU,OAAOA,KAAAA;AAItC,EAAA,IAAI,CAACE,MAAAA,CAAOC,aAAAA,CAAcH,KAAAA,CAAAA,EAAQ;AAC9B,IAAA,MAAM,IAAII,KAAAA,CACN,CAAA,EAAGH,KAAAA,CAAAA,sFAAAA,EAA8FD,KAAAA,CAAAA,CAAO,CAAA;AAEhH,EAAA;AACA,EAAA,OAAOK,OAAOL,KAAAA,CAAAA;AAClB;AAXgBD,MAAAA,CAAAA,QAAAA,EAAAA,UAAAA,CAAAA;AAmBT,SAASO,gBAAgBN,KAAAA,EAAa;AACzC,EAAA,IAAIO,KAAAA,GAAQ,CAAA;AACZ,EAAA,KAAA,MAAWC,KAAKR,KAAAA,EAAOO,KAAAA,EAAAA;AACvB,EAAA,OAAOA,KAAAA;AACX;AAJgBD,MAAAA,CAAAA,eAAAA,EAAAA,iBAAAA,CAAAA;AAOT,SAASG,QAAQT,KAAAA,EAAc;AAClC,EAAA,OAAOD,QAAAA,CAASC,KAAA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AM,IAAIzC,KAAAA,CAAM,CAAA,oBAAA,EAAuBJ,KAAAA,CAAAA,CAAO,CAAA;AAClD,EAAA;AACA,EAAA,IAAI6C,QAAAA,CAASrB,WAAWoB,WAAAA,EAAa;AACjC,IAAA,MAAM,IAAIxC,KAAAA,CAAM,CAAA,SAAA,EAAYwC,WAAAA,CAAAA,gBAAAA,EAA8BC,QAAAA,CAASrB,MAAM,CAAA,CAAE,CAAA;AAC/E,EAAA;AACA,EAAA,OAAOqB,SAASC,WAAAA,EAAW;AAC/B;AATgBH,MAAAA,CAAAA,eAAAA,EAAAA,iBAAAA,CAAAA;AAYT,SAASI,kBAAkBC,IAAAA,EAAU;AACxC,EAAA,OAAO3C,OAAO4C,IAAAA,CAAKC,KAAAA,CAAMF,KAAKG,OAAAA,EAAO,GAAK,GAAA,CAAA,CAAA;AAC9C;AAFgBJ,MAAAA,CAAAA,iBAAAA,EAAAA,mBAAAA,CAAAA;AAUT,SAASK,aAAaC,CAAAA,EAAS;AAClC,EAAA,MAAMR,QAAAA,GAAWN,OAAOc,CAAAA,CAAAA;AACxB,EAAA,IAAIR,QAAAA,CAASrB,SAAS,CAAA,KAAM,CAAA,IAAK,CAAC1B,UAAAA,CAAW2B,IAAAA,CAAKoB,QAAAA,CAAAA,EAAW;AACzD,IAAA,MAAM,IAAIzC,KAAAA,CAAM,CAAA,gDAAA,EAAmDiD,CAAAA,CAAAA,CAAG,CAAA;AAC1E,EAAA;AACA,EAAA,OAAOC,UAAAA,CAAWC,UAAAA,CAAWC,UAAAA,CAAWX,QAAAA,CAAAA,CAAAA,CAAAA;AAC5C;AANgBO,MAAAA,CAAAA,YAAAA,EAAAA,cAAAA,CAAAA","file":"EZIA6KIP.js","sourcesContent":["/**\n * Low-level serialization helpers that are byte-for-byte mirrors of the DAML\n * `Serde.Serde` module and the relevant `show` instances. Everything here operates\n * on **hex-encoded byte strings** (lowercase, no `0x` prefix) or DAML primitive\n * renderings, so an off-chain encoder produces the exact bytes the ledger verifies.\n *\n * Kept dependency-light (no ledger client) so encoding/signing SDKs can reuse it.\n */\n\nimport { keccak_256 } from '@noble/hashes/sha3';\n\nimport { bigIntToHex, bytesToHex, hexToBytes, trim0x } from '@layerzerolabs/common-encoding-utils';\n\nimport type { IntLike } from './types';\n\nconst HEX_DIGITS = /^[0-9a-fA-F]*$/;\n\n/** Convert an {@link IntLike} to a `bigint`, rejecting unsafe-integer `number`s. */\nexport function toBigInt(value: IntLike, label = 'value'): bigint {\n if (typeof value === 'bigint') return value;\n // `number` only represents integers exactly up to MAX_SAFE_INTEGER; a larger\n // value has already lost precision as a float, so reject it and require a\n // bigint rather than encoding a silently-rounded oneSigId / nonce / Int.\n if (!Number.isSafeInteger(value)) {\n throw new Error(\n `${label} must be a safe integer; pass a bigint for values beyond Number.MAX_SAFE_INTEGER, got ${value}`,\n );\n }\n return BigInt(value);\n}\n\n/**\n * Unicode code-point count of a string — the measure DAML's `T.length` uses for\n * `lengthPrefix`. For the ASCII values encoded here this equals the byte count,\n * but we count code points (not UTF-16 units) so astral characters are measured\n * the same way DAML measures them.\n */\nexport function codePointLength(value: string): number {\n let count = 0;\n for (const _ of value) count++;\n return count;\n}\n\n/** DAML `show` of an `Int`: a base-10 string, negatives prefixed with `-`. */\nexport function showInt(value: IntLike): string {\n return toBigInt(value, 'int').toString(10);\n}\n\n/** DAML `show` of a `Bool`: `True` / `False` (capitalized). */\nexport function showBool(value: boolean): string {\n return value ? 'True' : 'False';\n}\n\n/**\n * DAML `show` of a `Decimal` (Numeric 10): a fixed-point decimal with trailing\n * zeros stripped but always at least one fractional digit (`1.0`, `2.5`, `100.0`).\n * Accepts a string (recommended, exact) or a JS number. Rejects scientific\n * notation and more than 10 fractional digits (DAML Decimal scale).\n */\nexport function formatDamlDecimal(value: string | number): string {\n const raw = (typeof value === 'number' ? numberToPlainString(value) : value).trim();\n\n let negative = false;\n let body = raw;\n if (body.startsWith('-')) {\n negative = true;\n body = body.slice(1);\n } else if (body.startsWith('+')) {\n body = body.slice(1);\n }\n\n const [intPartRaw, fracPartRaw = '', ...rest] = body.split('.');\n if (rest.length > 0 || !/^\\d*$/.test(intPartRaw) || !/^\\d*$/.test(fracPartRaw)) {\n throw new Error(`Invalid decimal: ${raw}`);\n }\n if (fracPartRaw.length > 10) {\n throw new Error(`Decimal exceeds 10 fractional digits (DAML Decimal scale): ${raw}`);\n }\n\n const intPart = intPartRaw.replace(/^0+(?=\\d)/, '') || '0';\n const fracPart = fracPartRaw.replace(/0+$/, '') || '0';\n const isZero = intPart === '0' && fracPart === '0';\n return `${negative && !isZero ? '-' : ''}${intPart}.${fracPart}`;\n}\n\nfunction numberToPlainString(value: number): string {\n if (!Number.isFinite(value)) throw new Error(`Decimal must be finite, got ${value}`);\n // Reject exponential notation rather than guessing the intended scale.\n const asString = value.toString();\n if (/e/i.test(asString)) {\n throw new Error(`Pass decimals with many digits as strings, not numbers: ${asString}`);\n }\n return asString;\n}\n\n/**\n * Hex-encode strict-ASCII text, two lowercase hex digits per character. Rejects\n * code points >= 128: DAML encodes them as one byte while UTF-8 uses two, which\n * would produce different hashes, so non-ASCII is rejected rather than encoded\n * ambiguously (mirrors DAML `textToHex`).\n */\nexport function textToHex(value: string): string {\n let out = '';\n for (const char of value) {\n const cp = char.codePointAt(0)!;\n if (cp >= 128) {\n throw new Error(`Non-ASCII character (code point ${cp}) cannot be encoded`);\n }\n out += cp.toString(16).padStart(2, '0');\n }\n return out;\n}\n\n/**\n * Minimal (unpadded) lowercase hex of a non-negative integer: `0` for zero, no\n * leading zeros otherwise. Use `padLeft` on top when a fixed width is needed\n * (mirrors DAML `intToHex`).\n */\nexport function intToHex(value: IntLike): string {\n // `bigIntToHex` yields minimal `0x`-hex and rejects negatives; drop the prefix.\n return trim0x(bigIntToHex(toBigInt(value, 'intToHex')));\n}\n\n/**\n * Left-pad a hex string with `0` to `targetLen` characters (right-aligned, e.g.\n * uint256). Throws if `value` is already longer than `targetLen`: an oversize\n * value must be rejected, never silently kept full-length, so fixed-width fields\n * stay positionally unambiguous (mirrors DAML `padLeft`).\n */\nexport function padLeft(targetLen: number, value: string): string {\n if (value.length > targetLen) {\n throw new Error(`Value of length ${value.length} exceeds pad width ${targetLen}`);\n }\n return value.padStart(targetLen, '0');\n}\n\n/**\n * Assert that `value` is valid hex of exactly `expectedLen` characters (after\n * stripping an optional `0x`), returning the stripped lowercase hex. Unlike\n * padding, an off-length value is rejected rather than reshaped (mirrors DAML\n * `assertHexLength`).\n */\nexport function assertHexLength(expectedLen: number, value: string): string {\n const stripped = trim0x(value);\n if (stripped.length % 2 !== 0 || stripped.length === 0 || !HEX_DIGITS.test(stripped)) {\n throw new Error(`Invalid hex string: ${value}`);\n }\n if (stripped.length !== expectedLen) {\n throw new Error(`Expected ${expectedLen} hex chars, got ${stripped.length}`);\n }\n return stripped.toLowerCase();\n}\n\n/** Whole seconds since the unix epoch for a `Date` (DAML `Time` → uint256 expiry). */\nexport function timeToUnixSeconds(time: Date): bigint {\n return BigInt(Math.floor(time.getTime() / 1000));\n}\n\n/**\n * keccak256 of the bytes denoted by hex string `h`, returned as 64 lowercase hex\n * chars (no `0x`). `h` must be a valid hex byte string (even length, `[0-9a-fA-F]`):\n * a malformed input is rejected, never hashed as raw text, matching DAML's\n * `keccak256 : BytesHex -> BytesHex` (which aborts on a malformed encoding).\n */\nexport function keccak256Hex(h: string): string {\n const stripped = trim0x(h);\n if (stripped.length % 2 !== 0 || !HEX_DIGITS.test(stripped)) {\n throw new Error(`keccak256 input is not a valid hex byte string: ${h}`);\n }\n return bytesToHex(keccak_256(hexToBytes(stripped)));\n}\n"]}
|
package/dist/PQI7CWCR.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { __name } from './VUOMXK5T.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
var IntLikeSchema = z.union([
|
|
5
|
+
z.bigint(),
|
|
6
|
+
z.number()
|
|
7
|
+
]).refine((value) => typeof value === "bigint" || Number.isSafeInteger(value), {
|
|
8
|
+
message: "number must be a safe integer; pass a bigint for values beyond MAX_SAFE_INTEGER"
|
|
9
|
+
});
|
|
10
|
+
var buildTemplateId = /* @__PURE__ */ __name((packageId, modulePath) => `${packageId}:${modulePath}`, "buildTemplateId");
|
|
11
|
+
var CommandStatus = {
|
|
12
|
+
Accepted: "accepted",
|
|
13
|
+
Rejected: "rejected",
|
|
14
|
+
Timeout: "timeout"
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { CommandStatus, IntLikeSchema, buildTemplateId };
|
|
18
|
+
//# sourceMappingURL=PQI7CWCR.js.map
|
|
19
|
+
//# sourceMappingURL=PQI7CWCR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"names":["IntLikeSchema","z","union","bigint","number","refine","value","Number","isSafeInteger","message","buildTemplateId","packageId","modulePath","CommandStatus","Accepted","Rejected","Timeout"],"mappings":";;;AAQO,IAAMA,aAAAA,GAAgBC,EACxBC,KAAAA,CAAM;AAACD,EAAAA,CAAAA,CAAEE,MAAAA,EAAM;AAAIF,EAAAA,CAAAA,CAAEG,MAAAA;CAAS,CAAA,CAC9BC,MAAAA,CAAO,CAACC,KAAAA,KAAU,OAAOA,UAAU,QAAA,IAAYC,MAAAA,CAAOC,aAAAA,CAAcF,KAAAA,CAAAA,EAAQ;EACzEG,OAAAA,EAAS;AACb,CAAA;AAcG,IAAMC,eAAAA,2BAAmBC,SAAAA,EAAmBC,UAAAA,KAC/C,GAAGD,SAAAA,CAAAA,CAAAA,EAAaC,UAAAA,CAAAA,CAAAA,EADW,iBAAA;AAyBxB,IAAMC,aAAAA,GAAgB;EACzBC,QAAAA,EAAU,UAAA;EACVC,QAAAA,EAAU,UAAA;EACVC,OAAAA,EAAS;AACb","file":"PQI7CWCR.js","sourcesContent":["import type { ContractId, Party } from '@daml/types';\nimport { z } from 'zod';\n\n/**\n * A 64-bit integer field (oneSigId / nonce / threshold / count / signed `Int`).\n * A `number` must be a safe integer — larger values have already lost precision as\n * a float, so a bigint is required (mirrors the {@link toBigInt} runtime guard).\n */\nexport const IntLikeSchema = z\n .union([z.bigint(), z.number()])\n .refine((value) => typeof value === 'bigint' || Number.isSafeInteger(value), {\n message: 'number must be a safe integer; pass a bigint for values beyond MAX_SAFE_INTEGER',\n });\nexport type IntLike = z.infer<typeof IntLikeSchema>;\n\n/**\n * Core Types\n */\nexport type TemplateId = string;\n\n/**\n * Build a Canton template ID from a package ID and module path.\n *\n * @example buildTemplateId('abc123', 'RequestFactory:RequestFactory')\n * // => 'abc123:RequestFactory:RequestFactory'\n */\nexport const buildTemplateId = (packageId: string, modulePath: string): TemplateId =>\n `${packageId}:${modulePath}`;\n\nexport type Contract<T extends object> = {\n templateId: TemplateId;\n contractId: ContractId<T>;\n payload: T;\n};\n\n/**\n * Submission Types\n */\nexport type SubmitActors = {\n actAs: Party[];\n readAs?: Party[];\n};\n\nexport type SubmitResult = {\n commandId: string;\n completionOffset: number;\n};\n\n/**\n * Wait / Reconciliation Types\n */\nexport const CommandStatus = {\n Accepted: 'accepted',\n Rejected: 'rejected',\n Timeout: 'timeout',\n} as const;\n\nexport type CommandStatus = (typeof CommandStatus)[keyof typeof CommandStatus];\n\nexport type WaitAccepted = {\n status: typeof CommandStatus.Accepted;\n commandId: string;\n updateId: string;\n offset: number;\n};\nexport type WaitRejected = {\n status: typeof CommandStatus.Rejected;\n commandId: string;\n offset: number;\n error: { code?: number; message: string; details?: unknown };\n};\ntype WaitTimeout = {\n status: typeof CommandStatus.Timeout;\n commandId: string;\n lastCheckedOffset?: number;\n};\n\nexport type WaitResult = WaitAccepted | WaitRejected | WaitTimeout;\n\nexport type WaitOptions = {\n parties: Party[];\n beginExclusive?: number;\n timeoutMs?: number;\n poll?: {\n limit?: number;\n streamIdleTimeoutMs?: number;\n backoffMs?: { initial: number; max: number };\n };\n};\n\n/**\n * External Party / Interactive Submission Types\n */\n\n/**\n * A prepared transaction ready for external signing.\n */\nexport type PreparedTransaction = {\n /** The transaction blob to sign */\n preparedTransaction: string;\n /** Hash of the transaction (sign this) */\n preparedTransactionHash: string;\n /** Hashing scheme version used */\n hashingSchemeVersion: 'HASHING_SCHEME_VERSION_UNSPECIFIED' | 'HASHING_SCHEME_VERSION_V2';\n /** Command ID for tracking */\n commandId: string;\n};\n\nexport type ExternalSignature = {\n /** The party that signed */\n party: Party;\n /** The signature bytes (base64 or hex) */\n signature: string;\n /** Fingerprint/ID of the signing key */\n signedBy: string;\n /** Signature format (e.g., 'Raw') */\n format: string;\n /** Signing algorithm (e.g., 'Ed25519') */\n signingAlgorithmSpec: string;\n};\n\n/**\n * A right granted to a Canton user, as returned by `/v2/users/{userId}/rights`.\n *\n * The `kind` is a discriminated union — only one variant is set per right:\n * - `CanActAs.value.party`: user can submit transactions as that party\n * - `CanReadAs.value.party`: user can read events visible to that party\n * - `ParticipantAdmin`: user has admin rights on the participant\n * - `IdentityProviderAdmin`: user can administer its identity provider\n * - `CanReadAsAnyParty`: user can read as any party\n * - `CanExecuteAsAnyParty`: user can submit as any party\n *\n * Hand-rolled because the OpenAPI generator's `Kind` converter is broken\n * (`instanceOfKindOneOf` checks lowercase `canActAs`, but `KindOneOfFromJSON`\n * reads uppercase `CanActAs`), so the typed client strips all party data.\n *\n * The four nullary variants carry `value: unknown` because Canton's wire\n * format for them is literally `{ \"value\": {} }` (see\n * https://docs.digitalasset.com/build/3.4/explanations/json-api/) and we\n * never read into that payload — only the presence of the variant matters.\n */\nexport type UserRightKind = {\n CanActAs?: { value: { party: string } };\n CanReadAs?: { value: { party: string } };\n ParticipantAdmin?: { value: unknown };\n IdentityProviderAdmin?: { value: unknown };\n CanReadAsAnyParty?: { value: unknown };\n CanExecuteAsAnyParty?: { value: unknown };\n};\n\nexport type UserRight = {\n kind: UserRightKind;\n};\n\n/** Normalized active contract (flat shape derived from JsActiveContract). */\nexport type NormalizedActiveContract = {\n contractId: string;\n templateId: string;\n payload: unknown;\n synchronizerId: string;\n};\n"]}
|
package/dist/daml-serde.d.ts
CHANGED
|
@@ -6,14 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Kept dependency-light (no ledger client) so encoding/signing SDKs can reuse it.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
/**
|
|
11
|
-
* A 64-bit integer field (oneSigId / nonce / threshold / count / signed `Int`).
|
|
12
|
-
* A `number` must be a safe integer — larger values have already lost precision as
|
|
13
|
-
* a float, so a bigint is required (mirrors the {@link toBigInt} runtime guard).
|
|
14
|
-
*/
|
|
15
|
-
export declare const IntLikeSchema: z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber]>;
|
|
16
|
-
export type IntLike = z.infer<typeof IntLikeSchema>;
|
|
9
|
+
import type { IntLike } from './types';
|
|
17
10
|
/** Convert an {@link IntLike} to a `bigint`, rejecting unsafe-integer `number`s. */
|
|
18
11
|
export declare function toBigInt(value: IntLike, label?: string): bigint;
|
|
19
12
|
/**
|
package/dist/daml-serde.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daml-serde.d.ts","sourceRoot":"","sources":["../src/daml-serde.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"daml-serde.d.ts","sourceRoot":"","sources":["../src/daml-serde.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIvC,oFAAoF;AACpF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAU,GAAG,MAAM,CAWhE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED,8EAA8E;AAC9E,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE9C;AAED,+DAA+D;AAC/D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAwBhE;AAYD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU/C;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAG/C;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKhE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAS1E;AAED,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAM9C"}
|
package/dist/daml-serde.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { assertHexLength, codePointLength, formatDamlDecimal, intToHex, keccak256Hex, padLeft, showBool, showInt, textToHex, timeToUnixSeconds, toBigInt } from './EZIA6KIP.js';
|
|
2
2
|
import './VUOMXK5T.js';
|
|
3
3
|
//# sourceMappingURL=daml-serde.js.map
|
|
4
4
|
//# sourceMappingURL=daml-serde.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export * from './deferredValue';
|
|
|
6
6
|
export * from './events';
|
|
7
7
|
export * from './provider';
|
|
8
8
|
export * from './transaction';
|
|
9
|
-
export { buildTemplateId, CommandStatus, type Contract, type ExternalSignature, type PreparedTransaction, type SubmitActors, type SubmitResult, type TemplateId, type UserRight, type UserRightKind, type WaitAccepted, type WaitOptions, type WaitRejected, type WaitResult, } from './types';
|
|
9
|
+
export { buildTemplateId, CommandStatus, type Contract, type ExternalSignature, type IntLike, IntLikeSchema, type PreparedTransaction, type SubmitActors, type SubmitResult, type TemplateId, type UserRight, type UserRightKind, type WaitAccepted, type WaitOptions, type WaitRejected, type WaitResult, } from './types';
|
|
10
10
|
export { CantonError, CantonProtocolError, CantonTransportError } from './errors';
|
|
11
11
|
export { CantonClient, type CantonEvent, CantonGrpcClient, type CantonGrpcClientOptions, type CantonTransaction, type CantonUpdate, type CantonUpdateResponse, computeCantonFingerprint, extractTransactions, type ICantonClient, type TlsOptions, } from './client';
|
|
12
12
|
export { CantonSdk, type NormalizedActiveContract } from './sdk/index';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAG9B,OAAO,EACH,eAAe,EACf,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,UAAU,GAClB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGlF,OAAO,EACH,YAAY,EACZ,KAAK,WAAW,EAChB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,UAAU,GAClB,MAAM,UAAU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ACR,aAAa,EACb,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,KAAK,EACL,gBAAgB,EAChB,aAAa,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ import './IIWYAFUO.js';
|
|
|
3
3
|
export { computeCantonFingerprint, extractTransactions } from './F42TZTWJ.js';
|
|
4
4
|
import './5GUYLHA7.js';
|
|
5
5
|
export { CantonSdk } from './SLTAV2JF.js';
|
|
6
|
-
export { CommandStatus, buildTemplateId } from './
|
|
6
|
+
export { CommandStatus, IntLikeSchema, buildTemplateId } from './PQI7CWCR.js';
|
|
7
7
|
import './35ELVFTS.js';
|
|
8
8
|
import './RSV7WS7X.js';
|
|
9
9
|
export { parseAmuletAmount, parseAmuletDecimal } from './CXTOAS7N.js';
|
|
10
10
|
export { SECP256K1_SPKI_DER_HEADER, SECP256K1_SPKI_DER_HEADER_HEX, derEncodeSignature, publicKeyToSpkiDer } from './CMDFOA7C.js';
|
|
11
|
-
export {
|
|
11
|
+
export { assertHexLength, codePointLength, formatDamlDecimal, intToHex, keccak256Hex, padLeft, showBool, showInt, textToHex, timeToUnixSeconds, toBigInt } from './EZIA6KIP.js';
|
|
12
12
|
export { cantonActiveContractIdRef, cantonActiveContractIdsRef, cantonAmuletContextRef, cantonAmuletRulesCidRef, cantonDeferredValueSchema, cantonRefreshPartyFilterSchema, cantonSenderPartyRef, encodeCantonDeferredValue, isCantonPlaceholder, parseCantonDeferredValue } from './5PRNJEPB.js';
|
|
13
13
|
export { cantonDeploymentSucceeded, fetchCreatedEvents, findMatchingCreatedEvent, findMatchingCreatedEventFromTx, getExercisedEvent, waitForArchival } from './FPRRDKT5.js';
|
|
14
14
|
export { buildCantonTransaction, cantonAssignedTransactionSchema, cantonCommandSchema, cantonDisclosedContractSchema, cantonMinedTransactionSchema, cantonSignedTransactionSchema, cantonTransactionSchema, cantonTransactionWithResultSchema } from './EYLCZMM4.js';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { ContractId, Party } from '@daml/types';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/**
|
|
4
|
+
* A 64-bit integer field (oneSigId / nonce / threshold / count / signed `Int`).
|
|
5
|
+
* A `number` must be a safe integer — larger values have already lost precision as
|
|
6
|
+
* a float, so a bigint is required (mirrors the {@link toBigInt} runtime guard).
|
|
7
|
+
*/
|
|
8
|
+
export declare const IntLikeSchema: z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber]>;
|
|
9
|
+
export type IntLike = z.infer<typeof IntLikeSchema>;
|
|
2
10
|
/**
|
|
3
11
|
* Core Types
|
|
4
12
|
*/
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,aAAa,iDAIpB,CAAC;AACP,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,WAAW,MAAM,EAAE,YAAY,MAAM,KAAG,UACxC,CAAC;AAEjC,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI;IACrC,UAAU,EAAE,UAAU,CAAC;IAC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iB,CAAC,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;IACvC,oBAAoB,CAAC,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,6EAA6E;AAC7E,MAAM,MAAM,wBAAwB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/common-canton",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.116",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Canton VM client and utilities",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./types": {
|
|
15
|
+
"types": "./dist/types.d.ts",
|
|
16
|
+
"import": "./dist/types.js",
|
|
17
|
+
"default": "./dist/types.js"
|
|
18
|
+
}
|
|
12
19
|
},
|
|
13
20
|
"main": "./dist/index.js",
|
|
14
21
|
"module": "./dist/index.js",
|
|
@@ -23,10 +30,10 @@
|
|
|
23
30
|
"@protobuf-ts/grpc-transport": "^2.9.4",
|
|
24
31
|
"es-toolkit": "^1.39.10",
|
|
25
32
|
"zod": "4.3.5",
|
|
26
|
-
"@layerzerolabs/common-
|
|
27
|
-
"@layerzerolabs/common-
|
|
28
|
-
"@layerzerolabs/common-error-utils": "0.2.
|
|
29
|
-
"@layerzerolabs/typescript-utils": "0.2.
|
|
33
|
+
"@layerzerolabs/common-encoding-utils": "0.2.116",
|
|
34
|
+
"@layerzerolabs/common-chain-model": "0.2.116",
|
|
35
|
+
"@layerzerolabs/common-error-utils": "0.2.116",
|
|
36
|
+
"@layerzerolabs/typescript-utils": "0.2.116"
|
|
30
37
|
},
|
|
31
38
|
"devDependencies": {
|
|
32
39
|
"@types/node": "^22.18.6",
|
|
@@ -35,15 +42,14 @@
|
|
|
35
42
|
"tsup": "^8.4.0",
|
|
36
43
|
"typescript": "^5.8.2",
|
|
37
44
|
"vitest": "^3.2.6",
|
|
38
|
-
"@layerzerolabs/eslint-configuration": "^0.2.
|
|
39
|
-
"@layerzerolabs/tsup-configuration": "0.2.
|
|
40
|
-
"@layerzerolabs/typescript-configuration": "0.2.
|
|
41
|
-
"@layerzerolabs/
|
|
42
|
-
"@layerzerolabs/vitest-configuration": "0.2.
|
|
43
|
-
"@layerzerolabs/vm-tooling-canton": "0.2.114"
|
|
45
|
+
"@layerzerolabs/eslint-configuration": "^0.2.116",
|
|
46
|
+
"@layerzerolabs/tsup-configuration": "0.2.116",
|
|
47
|
+
"@layerzerolabs/typescript-configuration": "0.2.116",
|
|
48
|
+
"@layerzerolabs/vm-tooling-canton": "0.2.116",
|
|
49
|
+
"@layerzerolabs/vitest-configuration": "0.2.116"
|
|
44
50
|
},
|
|
45
51
|
"publishConfig": {
|
|
46
|
-
"access": "
|
|
52
|
+
"access": "public",
|
|
47
53
|
"registry": "https://registry.npmjs.org/"
|
|
48
54
|
},
|
|
49
55
|
"externalRepoConfig": {
|
package/src/daml-serde.ts
CHANGED
|
@@ -8,21 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { keccak_256 } from '@noble/hashes/sha3';
|
|
11
|
-
import { z } from 'zod';
|
|
12
11
|
|
|
13
12
|
import { bigIntToHex, bytesToHex, hexToBytes, trim0x } from '@layerzerolabs/common-encoding-utils';
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
* A 64-bit integer field (oneSigId / nonce / threshold / count / signed `Int`).
|
|
17
|
-
* A `number` must be a safe integer — larger values have already lost precision as
|
|
18
|
-
* a float, so a bigint is required (mirrors the {@link toBigInt} runtime guard).
|
|
19
|
-
*/
|
|
20
|
-
export const IntLikeSchema = z
|
|
21
|
-
.union([z.bigint(), z.number()])
|
|
22
|
-
.refine((value) => typeof value === 'bigint' || Number.isSafeInteger(value), {
|
|
23
|
-
message: 'number must be a safe integer; pass a bigint for values beyond MAX_SAFE_INTEGER',
|
|
24
|
-
});
|
|
25
|
-
export type IntLike = z.infer<typeof IntLikeSchema>;
|
|
14
|
+
import type { IntLike } from './types';
|
|
26
15
|
|
|
27
16
|
const HEX_DIGITS = /^[0-9a-fA-F]*$/;
|
|
28
17
|
|
package/src/index.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import type { ContractId, Party } from '@daml/types';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A 64-bit integer field (oneSigId / nonce / threshold / count / signed `Int`).
|
|
6
|
+
* A `number` must be a safe integer — larger values have already lost precision as
|
|
7
|
+
* a float, so a bigint is required (mirrors the {@link toBigInt} runtime guard).
|
|
8
|
+
*/
|
|
9
|
+
export const IntLikeSchema = z
|
|
10
|
+
.union([z.bigint(), z.number()])
|
|
11
|
+
.refine((value) => typeof value === 'bigint' || Number.isSafeInteger(value), {
|
|
12
|
+
message: 'number must be a safe integer; pass a bigint for values beyond MAX_SAFE_INTEGER',
|
|
13
|
+
});
|
|
14
|
+
export type IntLike = z.infer<typeof IntLikeSchema>;
|
|
2
15
|
|
|
3
16
|
/**
|
|
4
17
|
* Core Types
|
package/test/daml-serde.test.ts
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
assertHexLength,
|
|
5
5
|
codePointLength,
|
|
6
6
|
formatDamlDecimal,
|
|
7
|
-
IntLikeSchema,
|
|
8
7
|
intToHex,
|
|
9
8
|
keccak256Hex,
|
|
10
9
|
padLeft,
|
|
@@ -14,6 +13,7 @@ import {
|
|
|
14
13
|
timeToUnixSeconds,
|
|
15
14
|
toBigInt,
|
|
16
15
|
} from '../src/daml-serde';
|
|
16
|
+
import { IntLikeSchema } from '../src/types';
|
|
17
17
|
|
|
18
18
|
describe('toBigInt', () => {
|
|
19
19
|
it('passes through bigints and converts safe-integer numbers', () => {
|
package/dist/CJ2WHLYC.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/daml-serde.ts"],"names":["IntLikeSchema","z","union","bigint","number","refine","value","Number","isSafeInteger","message","HEX_DIGITS","toBigInt","label","Error","BigInt","codePointLength","count","_","showInt","toString","showBool","formatDamlDecimal","raw","numberToPlainString","trim","negative","body","startsWith","slice","intPartRaw","fracPartRaw","rest","split","length","test","intPart","replace","fracPart","isZero","isFinite","asString","textToHex","out","char","cp","codePointAt","padStart","intToHex","trim0x","bigIntToHex","padLeft","targetLen","assertHexLength","expectedLen","stripped","toLowerCase","timeToUnixSeconds","time","Math","floor","getTime","keccak256Hex","h","bytesToHex","keccak_256","hexToBytes"],"mappings":";;;;;AAmBO,IAAMA,aAAAA,GAAgBC,EACxBC,KAAAA,CAAM;AAACD,EAAAA,CAAAA,CAAEE,MAAAA,EAAM;AAAIF,EAAAA,CAAAA,CAAEG,MAAAA;CAAS,CAAA,CAC9BC,MAAAA,CAAO,CAACC,KAAAA,KAAU,OAAOA,UAAU,QAAA,IAAYC,MAAAA,CAAOC,aAAAA,CAAcF,KAAAA,CAAAA,EAAQ;EACzEG,OAAAA,EAAS;AACb,CAAA;AAGJ,IAAMC,UAAAA,GAAa,gBAAA;AAGZ,SAASC,QAAAA,CAASL,KAAAA,EAAgBM,KAAAA,GAAQ,OAAA,EAAO;AACpD,EAAA,IAAI,OAAON,KAAAA,KAAU,QAAA,EAAU,OAAOA,KAAAA;AAItC,EA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Oc,CAAAA,CAAAA;AACxB,EAAA,IAAIR,QAAAA,CAASrB,SAAS,CAAA,KAAM,CAAA,IAAK,CAACvB,UAAAA,CAAWwB,IAAAA,CAAKoB,QAAAA,CAAAA,EAAW;AACzD,IAAA,MAAM,IAAIzC,KAAAA,CAAM,CAAA,gDAAA,EAAmDiD,CAAAA,CAAAA,CAAG,CAAA;AAC1E,EAAA;AACA,EAAA,OAAOC,UAAAA,CAAWC,UAAAA,CAAWC,UAAAA,CAAWX,QAAAA,CAAAA,CAAAA,CAAAA;AAC5C;AANgBO,MAAAA,CAAAA,YAAAA,EAAAA,cAAAA,CAAAA","file":"CJ2WHLYC.js","sourcesContent":["/**\n * Low-level serialization helpers that are byte-for-byte mirrors of the DAML\n * `Serde.Serde` module and the relevant `show` instances. Everything here operates\n * on **hex-encoded byte strings** (lowercase, no `0x` prefix) or DAML primitive\n * renderings, so an off-chain encoder produces the exact bytes the ledger verifies.\n *\n * Kept dependency-light (no ledger client) so encoding/signing SDKs can reuse it.\n */\n\nimport { keccak_256 } from '@noble/hashes/sha3';\nimport { z } from 'zod';\n\nimport { bigIntToHex, bytesToHex, hexToBytes, trim0x } from '@layerzerolabs/common-encoding-utils';\n\n/**\n * A 64-bit integer field (oneSigId / nonce / threshold / count / signed `Int`).\n * A `number` must be a safe integer — larger values have already lost precision as\n * a float, so a bigint is required (mirrors the {@link toBigInt} runtime guard).\n */\nexport const IntLikeSchema = z\n .union([z.bigint(), z.number()])\n .refine((value) => typeof value === 'bigint' || Number.isSafeInteger(value), {\n message: 'number must be a safe integer; pass a bigint for values beyond MAX_SAFE_INTEGER',\n });\nexport type IntLike = z.infer<typeof IntLikeSchema>;\n\nconst HEX_DIGITS = /^[0-9a-fA-F]*$/;\n\n/** Convert an {@link IntLike} to a `bigint`, rejecting unsafe-integer `number`s. */\nexport function toBigInt(value: IntLike, label = 'value'): bigint {\n if (typeof value === 'bigint') return value;\n // `number` only represents integers exactly up to MAX_SAFE_INTEGER; a larger\n // value has already lost precision as a float, so reject it and require a\n // bigint rather than encoding a silently-rounded oneSigId / nonce / Int.\n if (!Number.isSafeInteger(value)) {\n throw new Error(\n `${label} must be a safe integer; pass a bigint for values beyond Number.MAX_SAFE_INTEGER, got ${value}`,\n );\n }\n return BigInt(value);\n}\n\n/**\n * Unicode code-point count of a string — the measure DAML's `T.length` uses for\n * `lengthPrefix`. For the ASCII values encoded here this equals the byte count,\n * but we count code points (not UTF-16 units) so astral characters are measured\n * the same way DAML measures them.\n */\nexport function codePointLength(value: string): number {\n let count = 0;\n for (const _ of value) count++;\n return count;\n}\n\n/** DAML `show` of an `Int`: a base-10 string, negatives prefixed with `-`. */\nexport function showInt(value: IntLike): string {\n return toBigInt(value, 'int').toString(10);\n}\n\n/** DAML `show` of a `Bool`: `True` / `False` (capitalized). */\nexport function showBool(value: boolean): string {\n return value ? 'True' : 'False';\n}\n\n/**\n * DAML `show` of a `Decimal` (Numeric 10): a fixed-point decimal with trailing\n * zeros stripped but always at least one fractional digit (`1.0`, `2.5`, `100.0`).\n * Accepts a string (recommended, exact) or a JS number. Rejects scientific\n * notation and more than 10 fractional digits (DAML Decimal scale).\n */\nexport function formatDamlDecimal(value: string | number): string {\n const raw = (typeof value === 'number' ? numberToPlainString(value) : value).trim();\n\n let negative = false;\n let body = raw;\n if (body.startsWith('-')) {\n negative = true;\n body = body.slice(1);\n } else if (body.startsWith('+')) {\n body = body.slice(1);\n }\n\n const [intPartRaw, fracPartRaw = '', ...rest] = body.split('.');\n if (rest.length > 0 || !/^\\d*$/.test(intPartRaw) || !/^\\d*$/.test(fracPartRaw)) {\n throw new Error(`Invalid decimal: ${raw}`);\n }\n if (fracPartRaw.length > 10) {\n throw new Error(`Decimal exceeds 10 fractional digits (DAML Decimal scale): ${raw}`);\n }\n\n const intPart = intPartRaw.replace(/^0+(?=\\d)/, '') || '0';\n const fracPart = fracPartRaw.replace(/0+$/, '') || '0';\n const isZero = intPart === '0' && fracPart === '0';\n return `${negative && !isZero ? '-' : ''}${intPart}.${fracPart}`;\n}\n\nfunction numberToPlainString(value: number): string {\n if (!Number.isFinite(value)) throw new Error(`Decimal must be finite, got ${value}`);\n // Reject exponential notation rather than guessing the intended scale.\n const asString = value.toString();\n if (/e/i.test(asString)) {\n throw new Error(`Pass decimals with many digits as strings, not numbers: ${asString}`);\n }\n return asString;\n}\n\n/**\n * Hex-encode strict-ASCII text, two lowercase hex digits per character. Rejects\n * code points >= 128: DAML encodes them as one byte while UTF-8 uses two, which\n * would produce different hashes, so non-ASCII is rejected rather than encoded\n * ambiguously (mirrors DAML `textToHex`).\n */\nexport function textToHex(value: string): string {\n let out = '';\n for (const char of value) {\n const cp = char.codePointAt(0)!;\n if (cp >= 128) {\n throw new Error(`Non-ASCII character (code point ${cp}) cannot be encoded`);\n }\n out += cp.toString(16).padStart(2, '0');\n }\n return out;\n}\n\n/**\n * Minimal (unpadded) lowercase hex of a non-negative integer: `0` for zero, no\n * leading zeros otherwise. Use `padLeft` on top when a fixed width is needed\n * (mirrors DAML `intToHex`).\n */\nexport function intToHex(value: IntLike): string {\n // `bigIntToHex` yields minimal `0x`-hex and rejects negatives; drop the prefix.\n return trim0x(bigIntToHex(toBigInt(value, 'intToHex')));\n}\n\n/**\n * Left-pad a hex string with `0` to `targetLen` characters (right-aligned, e.g.\n * uint256). Throws if `value` is already longer than `targetLen`: an oversize\n * value must be rejected, never silently kept full-length, so fixed-width fields\n * stay positionally unambiguous (mirrors DAML `padLeft`).\n */\nexport function padLeft(targetLen: number, value: string): string {\n if (value.length > targetLen) {\n throw new Error(`Value of length ${value.length} exceeds pad width ${targetLen}`);\n }\n return value.padStart(targetLen, '0');\n}\n\n/**\n * Assert that `value` is valid hex of exactly `expectedLen` characters (after\n * stripping an optional `0x`), returning the stripped lowercase hex. Unlike\n * padding, an off-length value is rejected rather than reshaped (mirrors DAML\n * `assertHexLength`).\n */\nexport function assertHexLength(expectedLen: number, value: string): string {\n const stripped = trim0x(value);\n if (stripped.length % 2 !== 0 || stripped.length === 0 || !HEX_DIGITS.test(stripped)) {\n throw new Error(`Invalid hex string: ${value}`);\n }\n if (stripped.length !== expectedLen) {\n throw new Error(`Expected ${expectedLen} hex chars, got ${stripped.length}`);\n }\n return stripped.toLowerCase();\n}\n\n/** Whole seconds since the unix epoch for a `Date` (DAML `Time` → uint256 expiry). */\nexport function timeToUnixSeconds(time: Date): bigint {\n return BigInt(Math.floor(time.getTime() / 1000));\n}\n\n/**\n * keccak256 of the bytes denoted by hex string `h`, returned as 64 lowercase hex\n * chars (no `0x`). `h` must be a valid hex byte string (even length, `[0-9a-fA-F]`):\n * a malformed input is rejected, never hashed as raw text, matching DAML's\n * `keccak256 : BytesHex -> BytesHex` (which aborts on a malformed encoding).\n */\nexport function keccak256Hex(h: string): string {\n const stripped = trim0x(h);\n if (stripped.length % 2 !== 0 || !HEX_DIGITS.test(stripped)) {\n throw new Error(`keccak256 input is not a valid hex byte string: ${h}`);\n }\n return bytesToHex(keccak_256(hexToBytes(stripped)));\n}\n"]}
|
package/dist/EYZBXTU6.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { __name } from './VUOMXK5T.js';
|
|
2
|
-
|
|
3
|
-
// src/types.ts
|
|
4
|
-
var buildTemplateId = /* @__PURE__ */ __name((packageId, modulePath) => `${packageId}:${modulePath}`, "buildTemplateId");
|
|
5
|
-
var CommandStatus = {
|
|
6
|
-
Accepted: "accepted",
|
|
7
|
-
Rejected: "rejected",
|
|
8
|
-
Timeout: "timeout"
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { CommandStatus, buildTemplateId };
|
|
12
|
-
//# sourceMappingURL=EYZBXTU6.js.map
|
|
13
|
-
//# sourceMappingURL=EYZBXTU6.js.map
|
package/dist/EYZBXTU6.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"names":["buildTemplateId","packageId","modulePath","CommandStatus","Accepted","Rejected","Timeout"],"mappings":";;;AAaO,IAAMA,eAAAA,2BAAmBC,SAAAA,EAAmBC,UAAAA,KAC/C,GAAGD,SAAAA,CAAAA,CAAAA,EAAaC,UAAAA,CAAAA,CAAAA,EADW,iBAAA;AAyBxB,IAAMC,aAAAA,GAAgB;EACzBC,QAAAA,EAAU,UAAA;EACVC,QAAAA,EAAU,UAAA;EACVC,OAAAA,EAAS;AACb","file":"EYZBXTU6.js","sourcesContent":["import type { ContractId, Party } from '@daml/types';\n\n/**\n * Core Types\n */\nexport type TemplateId = string;\n\n/**\n * Build a Canton template ID from a package ID and module path.\n *\n * @example buildTemplateId('abc123', 'RequestFactory:RequestFactory')\n * // => 'abc123:RequestFactory:RequestFactory'\n */\nexport const buildTemplateId = (packageId: string, modulePath: string): TemplateId =>\n `${packageId}:${modulePath}`;\n\nexport type Contract<T extends object> = {\n templateId: TemplateId;\n contractId: ContractId<T>;\n payload: T;\n};\n\n/**\n * Submission Types\n */\nexport type SubmitActors = {\n actAs: Party[];\n readAs?: Party[];\n};\n\nexport type SubmitResult = {\n commandId: string;\n completionOffset: number;\n};\n\n/**\n * Wait / Reconciliation Types\n */\nexport const CommandStatus = {\n Accepted: 'accepted',\n Rejected: 'rejected',\n Timeout: 'timeout',\n} as const;\n\nexport type CommandStatus = (typeof CommandStatus)[keyof typeof CommandStatus];\n\nexport type WaitAccepted = {\n status: typeof CommandStatus.Accepted;\n commandId: string;\n updateId: string;\n offset: number;\n};\nexport type WaitRejected = {\n status: typeof CommandStatus.Rejected;\n commandId: string;\n offset: number;\n error: { code?: number; message: string; details?: unknown };\n};\ntype WaitTimeout = {\n status: typeof CommandStatus.Timeout;\n commandId: string;\n lastCheckedOffset?: number;\n};\n\nexport type WaitResult = WaitAccepted | WaitRejected | WaitTimeout;\n\nexport type WaitOptions = {\n parties: Party[];\n beginExclusive?: number;\n timeoutMs?: number;\n poll?: {\n limit?: number;\n streamIdleTimeoutMs?: number;\n backoffMs?: { initial: number; max: number };\n };\n};\n\n/**\n * External Party / Interactive Submission Types\n */\n\n/**\n * A prepared transaction ready for external signing.\n */\nexport type PreparedTransaction = {\n /** The transaction blob to sign */\n preparedTransaction: string;\n /** Hash of the transaction (sign this) */\n preparedTransactionHash: string;\n /** Hashing scheme version used */\n hashingSchemeVersion: 'HASHING_SCHEME_VERSION_UNSPECIFIED' | 'HASHING_SCHEME_VERSION_V2';\n /** Command ID for tracking */\n commandId: string;\n};\n\nexport type ExternalSignature = {\n /** The party that signed */\n party: Party;\n /** The signature bytes (base64 or hex) */\n signature: string;\n /** Fingerprint/ID of the signing key */\n signedBy: string;\n /** Signature format (e.g., 'Raw') */\n format: string;\n /** Signing algorithm (e.g., 'Ed25519') */\n signingAlgorithmSpec: string;\n};\n\n/**\n * A right granted to a Canton user, as returned by `/v2/users/{userId}/rights`.\n *\n * The `kind` is a discriminated union — only one variant is set per right:\n * - `CanActAs.value.party`: user can submit transactions as that party\n * - `CanReadAs.value.party`: user can read events visible to that party\n * - `ParticipantAdmin`: user has admin rights on the participant\n * - `IdentityProviderAdmin`: user can administer its identity provider\n * - `CanReadAsAnyParty`: user can read as any party\n * - `CanExecuteAsAnyParty`: user can submit as any party\n *\n * Hand-rolled because the OpenAPI generator's `Kind` converter is broken\n * (`instanceOfKindOneOf` checks lowercase `canActAs`, but `KindOneOfFromJSON`\n * reads uppercase `CanActAs`), so the typed client strips all party data.\n *\n * The four nullary variants carry `value: unknown` because Canton's wire\n * format for them is literally `{ \"value\": {} }` (see\n * https://docs.digitalasset.com/build/3.4/explanations/json-api/) and we\n * never read into that payload — only the presence of the variant matters.\n */\nexport type UserRightKind = {\n CanActAs?: { value: { party: string } };\n CanReadAs?: { value: { party: string } };\n ParticipantAdmin?: { value: unknown };\n IdentityProviderAdmin?: { value: unknown };\n CanReadAsAnyParty?: { value: unknown };\n CanExecuteAsAnyParty?: { value: unknown };\n};\n\nexport type UserRight = {\n kind: UserRightKind;\n};\n\n/** Normalized active contract (flat shape derived from JsActiveContract). */\nexport type NormalizedActiveContract = {\n contractId: string;\n templateId: string;\n payload: unknown;\n synchronizerId: string;\n};\n"]}
|