@layerzerolabs/common-canton 1.2.29 → 1.2.31
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/dist/{BAIUJA2D.js → 22ZNNS3H.js} +3 -3
- package/dist/{BAIUJA2D.js.map → 22ZNNS3H.js.map} +1 -1
- package/dist/{RJHKVYCL.js → 3ESWXEO3.js} +3 -3
- package/dist/{RJHKVYCL.js.map → 3ESWXEO3.js.map} +1 -1
- package/dist/{MCD2CFLV.js → 4PEF77PU.js} +3 -3
- package/dist/{MCD2CFLV.js.map → 4PEF77PU.js.map} +1 -1
- package/dist/{3RGRZQQT.js → A2ZXPTGE.js} +4 -4
- package/dist/{3RGRZQQT.js.map → A2ZXPTGE.js.map} +1 -1
- package/dist/{3T46OKQU.js → AVC5GQFU.js} +3 -3
- package/dist/{3T46OKQU.js.map → AVC5GQFU.js.map} +1 -1
- package/dist/{IOW2523G.js → BHESIRKK.js} +3 -3
- package/dist/{IOW2523G.js.map → BHESIRKK.js.map} +1 -1
- package/dist/{WXYN3MFC.js → CYZU3DTJ.js} +3 -3
- package/dist/{WXYN3MFC.js.map → CYZU3DTJ.js.map} +1 -1
- package/dist/{EWDK2D2A.js → DDAINXFD.js} +3 -3
- package/dist/{EWDK2D2A.js.map → DDAINXFD.js.map} +1 -1
- package/dist/{NVDYBSHG.js → FZGCL63V.js} +3 -3
- package/dist/{NVDYBSHG.js.map → FZGCL63V.js.map} +1 -1
- package/dist/{OQVZLKQ5.js → GHWJBJNB.js} +3 -3
- package/dist/{OQVZLKQ5.js.map → GHWJBJNB.js.map} +1 -1
- package/dist/{25GBI5E7.js → H3BWRDYY.js} +3 -3
- package/dist/{25GBI5E7.js.map → H3BWRDYY.js.map} +1 -1
- package/dist/{WAKNWPCR.js → HKUMVSX6.js} +4 -4
- package/dist/{WAKNWPCR.js.map → HKUMVSX6.js.map} +1 -1
- package/dist/{I7FWUGTT.js → IA2UQ4WQ.js} +2 -22
- package/dist/IA2UQ4WQ.js.map +1 -0
- package/dist/{7STDATVZ.js → JUZKQC2G.js} +3 -3
- package/dist/{7STDATVZ.js.map → JUZKQC2G.js.map} +1 -1
- package/dist/{QZJONP6W.js → KCFOSGPU.js} +3 -3
- package/dist/{QZJONP6W.js.map → KCFOSGPU.js.map} +1 -1
- package/dist/{UV3W5HVQ.js → KIQAFHKC.js} +3 -3
- package/dist/{UV3W5HVQ.js.map → KIQAFHKC.js.map} +1 -1
- package/dist/{FXR2Z54G.js → KJRFPBY4.js} +3 -3
- package/dist/{FXR2Z54G.js.map → KJRFPBY4.js.map} +1 -1
- package/dist/{AMLJTQWB.js → N3INXXRG.js} +3 -3
- package/dist/{AMLJTQWB.js.map → N3INXXRG.js.map} +1 -1
- package/dist/{GSEDMLUC.js → NJW7UX2A.js} +3 -3
- package/dist/{GSEDMLUC.js.map → NJW7UX2A.js.map} +1 -1
- package/dist/{WRKQRG6I.js → NRGCZ4DG.js} +4 -4
- package/dist/{WRKQRG6I.js.map → NRGCZ4DG.js.map} +1 -1
- package/dist/{DAP5XJGH.js → NX67V54F.js} +3 -3
- package/dist/{DAP5XJGH.js.map → NX67V54F.js.map} +1 -1
- package/dist/{7ZK6FSHF.js → OIFJOKIO.js} +3 -3
- package/dist/{7ZK6FSHF.js.map → OIFJOKIO.js.map} +1 -1
- package/dist/{4FW6H35F.js → OO73Z5K6.js} +3 -3
- package/dist/{4FW6H35F.js.map → OO73Z5K6.js.map} +1 -1
- package/dist/{BFNNJFWC.js → OUEL7K27.js} +3 -3
- package/dist/{BFNNJFWC.js.map → OUEL7K27.js.map} +1 -1
- package/dist/{W5H6OVFB.js → OWXOYIMA.js} +3 -3
- package/dist/{W5H6OVFB.js.map → OWXOYIMA.js.map} +1 -1
- package/dist/{CLAE73FR.js → OZZHAISY.js} +3 -3
- package/dist/{CLAE73FR.js.map → OZZHAISY.js.map} +1 -1
- package/dist/{IIQYRITU.js → PDIG5OUV.js} +3 -3
- package/dist/{IIQYRITU.js.map → PDIG5OUV.js.map} +1 -1
- package/dist/{VJP6DRFT.js → QJMVWOLL.js} +3 -3
- package/dist/{VJP6DRFT.js.map → QJMVWOLL.js.map} +1 -1
- package/dist/{KVXEYMWG.js → QNO3456Y.js} +3 -3
- package/dist/{KVXEYMWG.js.map → QNO3456Y.js.map} +1 -1
- package/dist/{TDLALQCM.js → R5PCNLRD.js} +3 -3
- package/dist/{TDLALQCM.js.map → R5PCNLRD.js.map} +1 -1
- package/dist/{Q4H5IB4B.js → RHNMCG3C.js} +3 -3
- package/dist/{Q4H5IB4B.js.map → RHNMCG3C.js.map} +1 -1
- package/dist/{DJ67CXMJ.js → SNDN7G42.js} +3 -3
- package/dist/{DJ67CXMJ.js.map → SNDN7G42.js.map} +1 -1
- package/dist/{MNIG6M5P.js → TZTIULG5.js} +21 -21
- package/dist/{MNIG6M5P.js.map → TZTIULG5.js.map} +1 -1
- package/dist/{WUXBJ4EJ.js → WUXXJWII.js} +3 -3
- package/dist/{WUXBJ4EJ.js.map → WUXXJWII.js.map} +1 -1
- package/dist/{KYBLHMHO.js → ZPDAMGTS.js} +5 -6
- package/dist/ZPDAMGTS.js.map +1 -0
- package/dist/{FFZGONTK.js → ZZCNITRN.js} +3 -3
- package/dist/{FFZGONTK.js.map → ZZCNITRN.js.map} +1 -1
- package/dist/client/canton-client.js +87 -87
- package/dist/client/grpc.d.ts +0 -1
- package/dist/client/grpc.d.ts.map +1 -1
- package/dist/client/grpc.js +1 -2
- package/dist/client/index.js +92 -93
- package/dist/client/topology/types.d.ts +0 -2
- package/dist/client/topology/types.d.ts.map +1 -1
- package/dist/index.js +98 -99
- package/dist/open-api/apis/DefaultApi.js +85 -85
- package/dist/open-api/apis/index.js +85 -85
- package/dist/open-api/index.js +85 -85
- package/dist/open-api/models/Completion.js +1 -1
- package/dist/open-api/models/Completion1.js +1 -1
- package/dist/open-api/models/CompletionResponse.js +5 -5
- package/dist/open-api/models/CompletionResponseOneOf.js +1 -1
- package/dist/open-api/models/CompletionStreamResponse.js +5 -5
- package/dist/open-api/models/CreateUserRequest.js +4 -4
- package/dist/open-api/models/CumulativeFilter.js +2 -2
- package/dist/open-api/models/DeduplicationPeriod1.js +1 -1
- package/dist/open-api/models/DeduplicationPeriod2.js +2 -2
- package/dist/open-api/models/EventFormat.js +2 -2
- package/dist/open-api/models/FeaturesDescriptor.js +2 -2
- package/dist/open-api/models/Filters.js +2 -2
- package/dist/open-api/models/GetActiveContractsRequest.js +2 -2
- package/dist/open-api/models/GetEventsByContractIdRequest.js +2 -2
- package/dist/open-api/models/GetLedgerApiVersionResponse.js +3 -3
- package/dist/open-api/models/GetTransactionByIdRequest.js +2 -2
- package/dist/open-api/models/GetTransactionByOffsetRequest.js +2 -2
- package/dist/open-api/models/GetUpdateByIdRequest.js +2 -2
- package/dist/open-api/models/GetUpdateByOffsetRequest.js +2 -2
- package/dist/open-api/models/GetUpdatesRequest.js +2 -2
- package/dist/open-api/models/GrantUserRightsRequest.js +4 -4
- package/dist/open-api/models/GrantUserRightsResponse.js +4 -4
- package/dist/open-api/models/IdentifierFilter.js +2 -2
- package/dist/open-api/models/JsExecuteSubmissionAndWaitForTransactionRequest.js +5 -5
- package/dist/open-api/models/JsExecuteSubmissionAndWaitRequest.js +3 -3
- package/dist/open-api/models/JsExecuteSubmissionRequest.js +3 -3
- package/dist/open-api/models/JsGetUpdateResponse.js +17 -17
- package/dist/open-api/models/JsGetUpdateTreesResponse.js +10 -10
- package/dist/open-api/models/JsGetUpdatesResponse.js +17 -17
- package/dist/open-api/models/JsReassignment.js +4 -4
- package/dist/open-api/models/JsReassignmentEvent.js +3 -3
- package/dist/open-api/models/JsSubmitAndWaitForReassignmentResponse.js +5 -5
- package/dist/open-api/models/JsSubmitAndWaitForTransactionRequest.js +2 -2
- package/dist/open-api/models/JsTopologyTransaction.js +6 -6
- package/dist/open-api/models/Kind.js +2 -2
- package/dist/open-api/models/ListUserRightsResponse.js +4 -4
- package/dist/open-api/models/Reassignment.js +5 -5
- package/dist/open-api/models/Reassignment1.js +5 -5
- package/dist/open-api/models/RevokeUserRightsRequest.js +4 -4
- package/dist/open-api/models/RevokeUserRightsResponse.js +4 -4
- package/dist/open-api/models/Right.js +3 -3
- package/dist/open-api/models/SubmitAndWaitForReassignmentRequest.js +2 -2
- package/dist/open-api/models/TopologyEvent.js +5 -5
- package/dist/open-api/models/TopologyEventEvent.js +4 -4
- package/dist/open-api/models/TopologyTransaction.js +7 -7
- package/dist/open-api/models/TransactionFilter.js +2 -2
- package/dist/open-api/models/TransactionFormat.js +2 -2
- package/dist/open-api/models/Update.js +16 -16
- package/dist/open-api/models/Update1.js +9 -9
- package/dist/open-api/models/Update1OneOf1.js +6 -6
- package/dist/open-api/models/UpdateFormat.js +2 -2
- package/dist/open-api/models/UpdateOneOf1.js +6 -6
- package/dist/open-api/models/UpdateOneOf2.js +8 -8
- package/dist/open-api/models/index.js +84 -84
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +93 -94
- package/dist/refresh/index.js +2 -2
- package/dist/refresh/resolve.js +2 -2
- package/package.json +12 -12
- package/src/client/grpc.ts +0 -16
- package/src/client/topology/types.ts +0 -2
- package/src/provider.ts +0 -1
- package/dist/I7FWUGTT.js.map +0 -1
- package/dist/KYBLHMHO.js.map +0 -1
- package/dist/MIPVIR2V.js +0 -68
- package/dist/MIPVIR2V.js.map +0 -1
- package/dist/client/user-management.d.ts +0 -21
- package/dist/client/user-management.d.ts.map +0 -1
- package/dist/client/user-management.js +0 -4
- package/dist/client/user-management.js.map +0 -1
- package/src/client/user-management.ts +0 -74
package/dist/provider.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
export { createCantonChainProvider, parseCantonChainUri } from './
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
1
|
+
export { createCantonChainProvider, parseCantonChainUri } from './ZPDAMGTS.js';
|
|
2
|
+
import './HKUMVSX6.js';
|
|
3
|
+
import './IA2UQ4WQ.js';
|
|
4
|
+
import './RVQWP4JU.js';
|
|
5
|
+
import './VJ4PVZYL.js';
|
|
6
|
+
import './QAKOQQ7E.js';
|
|
7
|
+
import './WLV6EHDB.js';
|
|
8
|
+
import './DSYVONFP.js';
|
|
9
|
+
import './TZTIULG5.js';
|
|
4
10
|
import './6CPYXAOF.js';
|
|
5
|
-
import './F6OBDGNC.js';
|
|
6
11
|
import './Q3CWBD5A.js';
|
|
7
12
|
import './DUQWP47Z.js';
|
|
8
13
|
import './3YMFQHQ2.js';
|
|
@@ -12,11 +17,11 @@ import './5KFMHJZB.js';
|
|
|
12
17
|
import './76PPVRJ6.js';
|
|
13
18
|
import './6K3YSZCK.js';
|
|
14
19
|
import './Y7ND62EN.js';
|
|
20
|
+
import './F6OBDGNC.js';
|
|
15
21
|
import './UQMKPY2S.js';
|
|
16
22
|
import './FB6G6OD4.js';
|
|
17
23
|
import './PGQCNYFD.js';
|
|
18
|
-
import './
|
|
19
|
-
import './BFNNJFWC.js';
|
|
24
|
+
import './OUEL7K27.js';
|
|
20
25
|
import './FCOOEGLV.js';
|
|
21
26
|
import './V6WKCZKX.js';
|
|
22
27
|
import './KSW67SU5.js';
|
|
@@ -25,6 +30,7 @@ import './UZEQR4K7.js';
|
|
|
25
30
|
import './JOKWDCVQ.js';
|
|
26
31
|
import './ZGWBZC76.js';
|
|
27
32
|
import './BLWJ63ZZ.js';
|
|
33
|
+
import './OIFJOKIO.js';
|
|
28
34
|
import './JH2I4JGJ.js';
|
|
29
35
|
import './FEAZ4ULP.js';
|
|
30
36
|
import './SZLSOCSR.js';
|
|
@@ -34,7 +40,6 @@ import './T6UKLW2J.js';
|
|
|
34
40
|
import './4GB3DPXG.js';
|
|
35
41
|
import './UYKPXKW5.js';
|
|
36
42
|
import './X4YPYKWZ.js';
|
|
37
|
-
import './KKCWYT6E.js';
|
|
38
43
|
import './S7OPYTA6.js';
|
|
39
44
|
import './KFPAEUU7.js';
|
|
40
45
|
import './VXAIGTYV.js';
|
|
@@ -44,70 +49,65 @@ import './TKTYXEED.js';
|
|
|
44
49
|
import './QKX6RB6N.js';
|
|
45
50
|
import './5PL2GRP6.js';
|
|
46
51
|
import './DNH3CRBL.js';
|
|
47
|
-
import './
|
|
48
|
-
import './
|
|
52
|
+
import './H3BWRDYY.js';
|
|
53
|
+
import './KKCWYT6E.js';
|
|
54
|
+
import './AVC5GQFU.js';
|
|
49
55
|
import './D3AV6J7R.js';
|
|
50
56
|
import './KCRFOKIB.js';
|
|
51
57
|
import './LYW3PRU5.js';
|
|
52
|
-
import './WUXBJ4EJ.js';
|
|
53
58
|
import './2UWZKS5E.js';
|
|
54
59
|
import './53STMMNU.js';
|
|
55
|
-
import './
|
|
56
|
-
import './7STDATVZ.js';
|
|
60
|
+
import './JUZKQC2G.js';
|
|
57
61
|
import './34I4OGQK.js';
|
|
58
62
|
import './MXJ2SKCA.js';
|
|
59
63
|
import './6GAFSKMN.js';
|
|
60
64
|
import './6GU7J47E.js';
|
|
61
|
-
import './
|
|
62
|
-
import './
|
|
65
|
+
import './22ZNNS3H.js';
|
|
66
|
+
import './FZGCL63V.js';
|
|
67
|
+
import './A2ZXPTGE.js';
|
|
68
|
+
import './2633VCK5.js';
|
|
69
|
+
import './DDAINXFD.js';
|
|
70
|
+
import './H5WF7YON.js';
|
|
71
|
+
import './A3YRP3CP.js';
|
|
72
|
+
import './PDIG5OUV.js';
|
|
73
|
+
import './CDHOTGTN.js';
|
|
74
|
+
import './MOQL7EDE.js';
|
|
75
|
+
import './K3RKYYAJ.js';
|
|
76
|
+
import './WQJNYC3S.js';
|
|
77
|
+
import './N2H3JQGZ.js';
|
|
78
|
+
import './WUXXJWII.js';
|
|
79
|
+
import './NRGCZ4DG.js';
|
|
63
80
|
import './YMURVGWI.js';
|
|
64
|
-
import './
|
|
65
|
-
import './
|
|
81
|
+
import './NJW7UX2A.js';
|
|
82
|
+
import './GHWJBJNB.js';
|
|
66
83
|
import './5RZS7DZN.js';
|
|
67
|
-
import './
|
|
84
|
+
import './SNDN7G42.js';
|
|
68
85
|
import './5N747JZQ.js';
|
|
69
|
-
import './
|
|
86
|
+
import './R5PCNLRD.js';
|
|
70
87
|
import './DDITSIMP.js';
|
|
71
|
-
import './
|
|
72
|
-
import './
|
|
73
|
-
import './
|
|
74
|
-
import './YUSKGBOM.js';
|
|
88
|
+
import './KIQAFHKC.js';
|
|
89
|
+
import './OWXOYIMA.js';
|
|
90
|
+
import './OO73Z5K6.js';
|
|
75
91
|
import './ELKKWJ73.js';
|
|
76
92
|
import './SSIXD5B2.js';
|
|
77
93
|
import './MS6MVDLI.js';
|
|
78
|
-
import './
|
|
79
|
-
import './FB4MMBJU.js';
|
|
94
|
+
import './YUSKGBOM.js';
|
|
80
95
|
import './WE3VOYW4.js';
|
|
81
96
|
import './BITUOW7N.js';
|
|
82
97
|
import './L4NQUCEZ.js';
|
|
83
98
|
import './5235KHHW.js';
|
|
84
|
-
import './
|
|
85
|
-
import './
|
|
86
|
-
import './
|
|
87
|
-
import './
|
|
88
|
-
import './EWDK2D2A.js';
|
|
89
|
-
import './A3YRP3CP.js';
|
|
90
|
-
import './IIQYRITU.js';
|
|
91
|
-
import './CDHOTGTN.js';
|
|
92
|
-
import './MOQL7EDE.js';
|
|
93
|
-
import './K3RKYYAJ.js';
|
|
94
|
-
import './WQJNYC3S.js';
|
|
95
|
-
import './N2H3JQGZ.js';
|
|
96
|
-
import './WXYN3MFC.js';
|
|
97
|
-
import './KVXEYMWG.js';
|
|
98
|
-
import './GJNXH4RV.js';
|
|
99
|
+
import './C7EKAFQT.js';
|
|
100
|
+
import './FB4MMBJU.js';
|
|
101
|
+
import './CYZU3DTJ.js';
|
|
102
|
+
import './QNO3456Y.js';
|
|
99
103
|
import './T7UHDP5T.js';
|
|
100
104
|
import './2UG7UYH5.js';
|
|
101
|
-
import './
|
|
102
|
-
import './TJBQSG4B.js';
|
|
103
|
-
import './25GBF3LO.js';
|
|
104
|
-
import './6BRQJODF.js';
|
|
105
|
-
import './DB3ADDKC.js';
|
|
106
|
-
import './DCWJXAUI.js';
|
|
107
|
-
import './VJINT4U6.js';
|
|
108
|
-
import './OPRFXRK5.js';
|
|
105
|
+
import './GJNXH4RV.js';
|
|
109
106
|
import './LXIBC5QC.js';
|
|
110
|
-
import './
|
|
107
|
+
import './OZZHAISY.js';
|
|
108
|
+
import './MZMRFQTR.js';
|
|
109
|
+
import './JKQLMXRN.js';
|
|
110
|
+
import './KCFOSGPU.js';
|
|
111
111
|
import './LQ3LPE4G.js';
|
|
112
112
|
import './LJWTM73C.js';
|
|
113
113
|
import './A7U4VVQK.js';
|
|
@@ -117,17 +117,21 @@ import './BWCLX6XE.js';
|
|
|
117
117
|
import './HTXBXFKR.js';
|
|
118
118
|
import './PVD6NHYE.js';
|
|
119
119
|
import './JJLCFUQT.js';
|
|
120
|
-
import './MZMRFQTR.js';
|
|
121
|
-
import './JKQLMXRN.js';
|
|
122
|
-
import './NIN7X4D3.js';
|
|
123
120
|
import './IROQTIJZ.js';
|
|
124
|
-
import './GBFMX33M.js';
|
|
125
121
|
import './2QISQFNQ.js';
|
|
126
122
|
import './3R25GDYP.js';
|
|
127
123
|
import './T4AL4FJH.js';
|
|
128
124
|
import './RV24CYI3.js';
|
|
129
|
-
import './
|
|
130
|
-
import './
|
|
125
|
+
import './XINHRIWA.js';
|
|
126
|
+
import './TJBQSG4B.js';
|
|
127
|
+
import './25GBF3LO.js';
|
|
128
|
+
import './6BRQJODF.js';
|
|
129
|
+
import './DB3ADDKC.js';
|
|
130
|
+
import './DCWJXAUI.js';
|
|
131
|
+
import './VJINT4U6.js';
|
|
132
|
+
import './OPRFXRK5.js';
|
|
133
|
+
import './NIN7X4D3.js';
|
|
134
|
+
import './GBFMX33M.js';
|
|
131
135
|
import './W53LLP7R.js';
|
|
132
136
|
import './YN7J2UOM.js';
|
|
133
137
|
import './25GNLJIH.js';
|
|
@@ -135,11 +139,10 @@ import './TL2NURGK.js';
|
|
|
135
139
|
import './CLFKYN43.js';
|
|
136
140
|
import './RPOQ54PG.js';
|
|
137
141
|
import './OH7SHQF6.js';
|
|
138
|
-
import './VVR6BIVE.js';
|
|
139
142
|
import './WLJJ4FDL.js';
|
|
140
|
-
import './
|
|
141
|
-
import './
|
|
142
|
-
import './
|
|
143
|
+
import './4PEF77PU.js';
|
|
144
|
+
import './BHESIRKK.js';
|
|
145
|
+
import './VQXHCSJ4.js';
|
|
143
146
|
import './KOUK7GBL.js';
|
|
144
147
|
import './HZG6J4V4.js';
|
|
145
148
|
import './RY2LC7P3.js';
|
|
@@ -150,6 +153,8 @@ import './G4FJL7ZV.js';
|
|
|
150
153
|
import './WJFNYWLV.js';
|
|
151
154
|
import './D5KKWJ4T.js';
|
|
152
155
|
import './UUJVV37M.js';
|
|
156
|
+
import './4AM6UVPL.js';
|
|
157
|
+
import './VVR6BIVE.js';
|
|
153
158
|
import './I2M5WSEM.js';
|
|
154
159
|
import './QDOJTBN4.js';
|
|
155
160
|
import './BXDXCO3L.js';
|
|
@@ -159,35 +164,35 @@ import './SF7H2DPL.js';
|
|
|
159
164
|
import './4UM5TVKI.js';
|
|
160
165
|
import './OMKZNVQ6.js';
|
|
161
166
|
import './PBBQTZR5.js';
|
|
167
|
+
import './KJRFPBY4.js';
|
|
162
168
|
import './R6RFWKWB.js';
|
|
163
|
-
import './
|
|
169
|
+
import './NX67V54F.js';
|
|
164
170
|
import './65PSGOOO.js';
|
|
165
171
|
import './57DRTFD5.js';
|
|
166
|
-
import './JDRCVB2P.js';
|
|
167
172
|
import './2CWG6G2U.js';
|
|
173
|
+
import './JDRCVB2P.js';
|
|
168
174
|
import './42XERBT4.js';
|
|
169
175
|
import './KLGD7ZKC.js';
|
|
170
176
|
import './FSI4ML2J.js';
|
|
171
177
|
import './LX4D3IC6.js';
|
|
172
|
-
import './JRFMLEIC.js';
|
|
173
178
|
import './37DZS34C.js';
|
|
174
179
|
import './CXFHE5WB.js';
|
|
180
|
+
import './4XJYWTSD.js';
|
|
181
|
+
import './UKPTMFE5.js';
|
|
182
|
+
import './JRFMLEIC.js';
|
|
175
183
|
import './NXFOIDBZ.js';
|
|
176
184
|
import './YYZ6GHBF.js';
|
|
177
185
|
import './WEB5TZQE.js';
|
|
178
186
|
import './6HBTMZ2U.js';
|
|
179
|
-
import './4XJYWTSD.js';
|
|
180
|
-
import './UKPTMFE5.js';
|
|
181
187
|
import './JQKAQ6XO.js';
|
|
182
188
|
import './6DNDE3V5.js';
|
|
183
189
|
import './VEDIQN4O.js';
|
|
184
190
|
import './5C4DHFKJ.js';
|
|
185
|
-
import './
|
|
186
|
-
import './AONQHJ67.js';
|
|
191
|
+
import './N3INXXRG.js';
|
|
187
192
|
import './223ZGSPH.js';
|
|
188
193
|
import './W3V3QO3M.js';
|
|
189
194
|
import './5KFH4GBA.js';
|
|
190
|
-
import './
|
|
195
|
+
import './AONQHJ67.js';
|
|
191
196
|
import './6L7QPUXX.js';
|
|
192
197
|
import './2I2KZ57G.js';
|
|
193
198
|
import './4ABHRM2Z.js';
|
|
@@ -195,27 +200,25 @@ import './REC34FNU.js';
|
|
|
195
200
|
import './YAMAXOF4.js';
|
|
196
201
|
import './E3S4Q7BW.js';
|
|
197
202
|
import './OVI22V4D.js';
|
|
198
|
-
import './X74MS4NY.js';
|
|
199
|
-
import './T2TBHOJW.js';
|
|
200
203
|
import './V6YYBQQ7.js';
|
|
201
204
|
import './VMMOYWRH.js';
|
|
202
205
|
import './M4ENXXGH.js';
|
|
203
206
|
import './I42TYLNY.js';
|
|
204
207
|
import './Z2PCDUTA.js';
|
|
205
208
|
import './VZY2QLIH.js';
|
|
209
|
+
import './X74MS4NY.js';
|
|
210
|
+
import './T2TBHOJW.js';
|
|
206
211
|
import './FBZYVJHN.js';
|
|
207
212
|
import './7QB5CK2R.js';
|
|
208
213
|
import './N4ZM4N2T.js';
|
|
209
|
-
import './6CDYG5J4.js';
|
|
210
214
|
import './YO6M5EI2.js';
|
|
211
215
|
import './4FVB5LZE.js';
|
|
212
216
|
import './JNFIJ7LA.js';
|
|
213
217
|
import './YJ63OODS.js';
|
|
214
218
|
import './TGNRKR6H.js';
|
|
215
|
-
import './
|
|
216
|
-
import './
|
|
217
|
-
import './
|
|
218
|
-
import './RT5FBW5C.js';
|
|
219
|
+
import './QJMVWOLL.js';
|
|
220
|
+
import './3ESWXEO3.js';
|
|
221
|
+
import './RHNMCG3C.js';
|
|
219
222
|
import './AHL4CCNO.js';
|
|
220
223
|
import './KHRPAP5A.js';
|
|
221
224
|
import './2F66XH7X.js';
|
|
@@ -224,19 +227,25 @@ import './UFRAGOR4.js';
|
|
|
224
227
|
import './ZGT2WRBJ.js';
|
|
225
228
|
import './CWZMBPM3.js';
|
|
226
229
|
import './YQIQBEDK.js';
|
|
230
|
+
import './RT5FBW5C.js';
|
|
227
231
|
import './FKJBUIAF.js';
|
|
232
|
+
import './ZDVQJMLH.js';
|
|
228
233
|
import './5ZZP4T75.js';
|
|
229
234
|
import './JVRWQ36T.js';
|
|
230
235
|
import './O6E7FCNL.js';
|
|
231
236
|
import './K7VI5TVN.js';
|
|
232
237
|
import './TIKYUQ7Z.js';
|
|
238
|
+
import './ZLGKSCEZ.js';
|
|
239
|
+
import './OV57R5W2.js';
|
|
240
|
+
import './24YQIQ26.js';
|
|
241
|
+
import './AADTV7OJ.js';
|
|
242
|
+
import './6CDYG5J4.js';
|
|
233
243
|
import './WH4AALW7.js';
|
|
234
244
|
import './CXV5NOWI.js';
|
|
235
245
|
import './P4OZVLZ5.js';
|
|
236
246
|
import './Z74KDZ47.js';
|
|
237
247
|
import './4XVTGYYU.js';
|
|
238
248
|
import './B5NXLJBP.js';
|
|
239
|
-
import './57SJMVEE.js';
|
|
240
249
|
import './XHRPB5KB.js';
|
|
241
250
|
import './TQODWV5P.js';
|
|
242
251
|
import './GEKUWBT6.js';
|
|
@@ -244,17 +253,8 @@ import './2Y3QRNON.js';
|
|
|
244
253
|
import './KIXMSGXW.js';
|
|
245
254
|
import './PXLKEN6Q.js';
|
|
246
255
|
import './QMG5HIWM.js';
|
|
247
|
-
import './
|
|
248
|
-
import './OV57R5W2.js';
|
|
249
|
-
import './24YQIQ26.js';
|
|
250
|
-
import './AADTV7OJ.js';
|
|
256
|
+
import './57SJMVEE.js';
|
|
251
257
|
import './BMVKXYRP.js';
|
|
252
|
-
import './UO7AO4TN.js';
|
|
253
|
-
import './JVSF5ESX.js';
|
|
254
|
-
import './TRKFVDLS.js';
|
|
255
|
-
import './AXDSPLHG.js';
|
|
256
|
-
import './WSW75GTU.js';
|
|
257
|
-
import './O6CDI3U6.js';
|
|
258
258
|
import './QNJSSXUH.js';
|
|
259
259
|
import './S3CSDPDX.js';
|
|
260
260
|
import './IXH2E5MF.js';
|
|
@@ -270,9 +270,12 @@ import './EIJI6ZMQ.js';
|
|
|
270
270
|
import './H5NCYXPN.js';
|
|
271
271
|
import './BZIM4HLD.js';
|
|
272
272
|
import './X6CZGKDI.js';
|
|
273
|
-
import './
|
|
274
|
-
import './
|
|
275
|
-
import './
|
|
273
|
+
import './UO7AO4TN.js';
|
|
274
|
+
import './JVSF5ESX.js';
|
|
275
|
+
import './TRKFVDLS.js';
|
|
276
|
+
import './AXDSPLHG.js';
|
|
277
|
+
import './WSW75GTU.js';
|
|
278
|
+
import './O6CDI3U6.js';
|
|
276
279
|
import './3PWAEVJM.js';
|
|
277
280
|
import './FBGPMEXZ.js';
|
|
278
281
|
import './AJ4M7JFK.js';
|
|
@@ -283,14 +286,10 @@ import './TSE2DUDN.js';
|
|
|
283
286
|
import './EE2Y3CQ3.js';
|
|
284
287
|
import './5NV4O3K7.js';
|
|
285
288
|
import './XOLOXB7M.js';
|
|
289
|
+
import './TVDUWBAO.js';
|
|
290
|
+
import './Q7CJWR7Y.js';
|
|
291
|
+
import './V6427LHF.js';
|
|
286
292
|
import './KBNUN3MF.js';
|
|
287
|
-
import './DSYVONFP.js';
|
|
288
|
-
import './I7FWUGTT.js';
|
|
289
|
-
import './RVQWP4JU.js';
|
|
290
|
-
import './VJ4PVZYL.js';
|
|
291
|
-
import './QAKOQQ7E.js';
|
|
292
|
-
import './MIPVIR2V.js';
|
|
293
|
-
import './WLV6EHDB.js';
|
|
294
293
|
import './V2H2WXKE.js';
|
|
295
294
|
import './SCEF7TLZ.js';
|
|
296
295
|
import './CMDFOA7C.js';
|
package/dist/refresh/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../AQJMQQ4W.js';
|
|
2
2
|
export { buildCantonDeployedContractAddressRef, qualifiedTemplateName } from '../I6Z5XG3N.js';
|
|
3
|
-
export { resolveCantonTransaction } from '../
|
|
3
|
+
export { resolveCantonTransaction } from '../ZZCNITRN.js';
|
|
4
|
+
export { createContractAddressResolver, isConcreteActiveContractRef, isRefAlive, matchesContractStateFilter, queryLiveContractIdsForRef, queryLiveContractsForRef } from '../VAFLUPQJ.js';
|
|
4
5
|
export { wrapLzSdk } from '../RJSKBZMO.js';
|
|
5
6
|
export { substituteCidsToRefs, substituteRefsToCids } from '../57KDDFEU.js';
|
|
6
|
-
export { createContractAddressResolver, isConcreteActiveContractRef, isRefAlive, matchesContractStateFilter, queryLiveContractIdsForRef, queryLiveContractsForRef } from '../VAFLUPQJ.js';
|
|
7
7
|
import '../DSYVONFP.js';
|
|
8
8
|
import '../Z35TKEFU.js';
|
|
9
9
|
import '../3K5JL2TP.js';
|
package/dist/refresh/resolve.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { resolveCantonTransaction } from '../
|
|
2
|
-
import '../57KDDFEU.js';
|
|
1
|
+
export { resolveCantonTransaction } from '../ZZCNITRN.js';
|
|
3
2
|
import '../VAFLUPQJ.js';
|
|
3
|
+
import '../57KDDFEU.js';
|
|
4
4
|
import '../DSYVONFP.js';
|
|
5
5
|
import '../Z35TKEFU.js';
|
|
6
6
|
import '../3K5JL2TP.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/common-canton",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.31",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Canton VM client and utilities",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,22 +32,22 @@
|
|
|
32
32
|
"@protobuf-ts/runtime-rpc": "^2.11.1",
|
|
33
33
|
"es-toolkit": "^1.39.10",
|
|
34
34
|
"zod": "4.3.5",
|
|
35
|
-
"@layerzerolabs/common-
|
|
36
|
-
"@layerzerolabs/
|
|
37
|
-
"@layerzerolabs/common-chain-model": "1.2.
|
|
38
|
-
"@layerzerolabs/
|
|
35
|
+
"@layerzerolabs/common-encoding-utils": "1.2.31",
|
|
36
|
+
"@layerzerolabs/common-error-utils": "1.2.31",
|
|
37
|
+
"@layerzerolabs/common-chain-model": "1.2.31",
|
|
38
|
+
"@layerzerolabs/typescript-utils": "1.2.31"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@vitest/coverage-v8": "
|
|
41
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
42
42
|
"eslint": "9.39.1",
|
|
43
43
|
"tsup": "^8.4.0",
|
|
44
44
|
"typescript": "^6.0.3",
|
|
45
|
-
"vitest": "^
|
|
46
|
-
"@layerzerolabs/eslint-configuration": "^1.2.
|
|
47
|
-
"@layerzerolabs/tsup-configuration": "1.2.
|
|
48
|
-
"@layerzerolabs/
|
|
49
|
-
"@layerzerolabs/vitest-configuration": "1.2.
|
|
50
|
-
"@layerzerolabs/
|
|
45
|
+
"vitest": "^4.1.10",
|
|
46
|
+
"@layerzerolabs/eslint-configuration": "^1.2.31",
|
|
47
|
+
"@layerzerolabs/tsup-configuration": "1.2.31",
|
|
48
|
+
"@layerzerolabs/typescript-configuration": "1.2.31",
|
|
49
|
+
"@layerzerolabs/vitest-configuration": "1.2.31",
|
|
50
|
+
"@layerzerolabs/vm-tooling-canton": "1.2.31"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public",
|
package/src/client/grpc.ts
CHANGED
|
@@ -42,7 +42,6 @@ import {
|
|
|
42
42
|
headStateBaseQuery,
|
|
43
43
|
synchronizerStore,
|
|
44
44
|
} from './topology/utils';
|
|
45
|
-
import { UserManagementServiceClient } from './user-management';
|
|
46
45
|
import { computePublicKeyFingerprint } from './utils';
|
|
47
46
|
|
|
48
47
|
/** Default gRPC client options: 128 MiB message-size limits for large admin responses. */
|
|
@@ -65,9 +64,7 @@ export class CantonGrpcClient {
|
|
|
65
64
|
readonly #topologyRead: TopologyManagerReadServiceClient;
|
|
66
65
|
readonly #topologyWrite: TopologyManagerWriteServiceClient;
|
|
67
66
|
readonly #connectivity: SynchronizerConnectivityServiceClient;
|
|
68
|
-
readonly #userManagement: UserManagementServiceClient;
|
|
69
67
|
readonly #tokenProvider: TokenProvider;
|
|
70
|
-
readonly #userId: string;
|
|
71
68
|
#synchronizerId?: string;
|
|
72
69
|
|
|
73
70
|
/**
|
|
@@ -75,7 +72,6 @@ export class CantonGrpcClient {
|
|
|
75
72
|
*/
|
|
76
73
|
constructor(opts: CantonGrpcClientOptions) {
|
|
77
74
|
this.#tokenProvider = opts.tokenProvider;
|
|
78
|
-
this.#userId = opts.userId;
|
|
79
75
|
this.#synchronizerId = opts.synchronizerId;
|
|
80
76
|
this.#transport = new GrpcTransport({
|
|
81
77
|
host: opts.host,
|
|
@@ -85,7 +81,6 @@ export class CantonGrpcClient {
|
|
|
85
81
|
this.#topologyRead = new TopologyManagerReadServiceClient(this.#transport);
|
|
86
82
|
this.#topologyWrite = new TopologyManagerWriteServiceClient(this.#transport);
|
|
87
83
|
this.#connectivity = new SynchronizerConnectivityServiceClient(this.#transport);
|
|
88
|
-
this.#userManagement = new UserManagementServiceClient(this.#transport);
|
|
89
84
|
}
|
|
90
85
|
|
|
91
86
|
/** Returns per-RPC gRPC metadata with a fresh Bearer token. */
|
|
@@ -437,17 +432,6 @@ export class CantonGrpcClient {
|
|
|
437
432
|
);
|
|
438
433
|
}
|
|
439
434
|
|
|
440
|
-
async grantCanActAs(partyId: string): Promise<void> {
|
|
441
|
-
await this.#userManagement.grantUserRights(
|
|
442
|
-
{
|
|
443
|
-
userId: this.#userId,
|
|
444
|
-
rights: [{ canActAs: { party: partyId } }],
|
|
445
|
-
identityProviderId: '',
|
|
446
|
-
},
|
|
447
|
-
{ meta: await this.#getMeta() },
|
|
448
|
-
);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
435
|
/** Closes the underlying gRPC transport. */
|
|
452
436
|
close(): void {
|
|
453
437
|
this.#transport.close();
|
|
@@ -120,8 +120,6 @@ export type CantonGrpcClientOptions = {
|
|
|
120
120
|
host: string;
|
|
121
121
|
/** Supplies a fresh Bearer token before each RPC call. */
|
|
122
122
|
tokenProvider: TokenProvider;
|
|
123
|
-
/** Ledger API user ID used for user-management RPCs (e.g. `GrantUserRights`). */
|
|
124
|
-
userId: string;
|
|
125
123
|
/**
|
|
126
124
|
* Logical synchronizer id used as the topology store. When omitted, the first
|
|
127
125
|
* synchronizer the participant is connected to (via `ListConnectedSynchronizers`)
|
package/src/provider.ts
CHANGED
package/dist/I7FWUGTT.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client/grpc.ts"],"names":["DEFAULT_GRPC_CLIENT_OPTIONS","CantonGrpcClient","opts","tokenProvider","userId","synchronizerId","GrpcTransport","host","channelCredentials","buildChannelCredentials","tls","clientOptions","grpcClientOptions","TopologyManagerReadServiceClient","TopologyManagerWriteServiceClient","SynchronizerConnectivityServiceClient","UserManagementServiceClient","token","getToken","Authorization","response","listConnectedSynchronizers","meta","synchronizer","connectedSynchronizers","CantonProtocolError","mapping","serial","generateTransactions","GenerateTransactionsRequest","create","proposals","GenerateTransactionsRequest_Proposal","operation","Enums_TopologyChangeOp","ADD_REPLACE","store","synchronizerStore","generated","generatedTransactions","getNamespaceDelegation","namespaceFingerprint","listNamespaceDelegation","ListNamespaceDelegationRequest","baseQuery","headStateBaseQuery","filterNamespace","filterTargetKeyFingerprint","results","flatMap","result","item","publicKey","targetKey","namespace","targetKeyFingerprint","computePublicKeyFingerprint","isRootDelegation","context","getDecentralizedNamespaceDefinition","listDecentralizedNamespaceDefinition","ListDecentralizedNamespaceDefinitionRequest","decentralizedNamespace","threshold","owners","getPartyToKeyMapping","partyId","listPartyToKeyMapping","ListPartyToKeyMappingRequest","filterParty","party","signingKeyFingerprints","signingKeys","map","key","getPartyToParticipantMapping","listPartyToParticipant","ListPartyToParticipantRequest","filterParticipant","participants","participant","participantUid","permission","createNamespaceDelegationTx","params","buildNamespaceDelegationMapping","publicKeyDer","createDecentralizedNamespaceDefinitionTx","computeDecentralizedNamespace","buildDecentralizedNamespaceDefinitionMapping","updateDecentralizedNamespaceDefinitionTx","createPartyToKeyTx","buildPartyToKeyMapping","signingPublicKeyDers","createPartyToParticipantTx","buildPartyToParticipantMapping","participantIds","submitTopologyTransactions","transactions","length","CantonError","addTransactions","AddTransactionsRequest","grantCanActAs","grantUserRights","rights","canActAs","identityProviderId","close"],"mappings":";;;;;;;;;;AAgDA,IAAMA,2BAAAA,GAA8B;AAChC,EAAA,iCAAA,EAAmC,MAAM,IAAA,GAAO,IAAA;AAChD,EAAA,8BAAA,EAAgC,MAAM,IAAA,GAAO;AACjD,CAAA;AAWO,IAAMC,mBAAN,MAAMA;EA9Db;;;AA+Da,EAAA,UAAA;AACA,EAAA,aAAA;AACA,EAAA,cAAA;AACA,EAAA,aAAA;AACA,EAAA,eAAA;AACA,EAAA,cAAA;AACA,EAAA,OAAA;AACT,EAAA,eAAA;;;;AAKA,EAAA,WAAA,CAAYC,IAAAA,EAA+B;AACvC,IAAA,IAAA,CAAK,iBAAiBA,IAAAA,CAAKC,aAAAA;AAC3B,IAAA,IAAA,CAAK,UAAUD,IAAAA,CAAKE,MAAAA;AACpB,IAAA,IAAA,CAAK,kBAAkBF,IAAAA,CAAKG,cAAAA;AAC5B,IAAA,IAAA,CAAK,UAAA,GAAa,IAAIC,aAAAA,CAAc;AAChCC,MAAAA,IAAAA,EAAML,IAAAA,CAAKK,IAAAA;AACXC,MAAAA,kBAAAA,E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AAK;AACzB,EAAA;AACJ","file":"I7FWUGTT.js","sourcesContent":["import {\n AddTransactionsRequest,\n Enums_TopologyChangeOp,\n GenerateTransactionsRequest,\n GenerateTransactionsRequest_Proposal,\n ListDecentralizedNamespaceDefinitionRequest,\n ListNamespaceDelegationRequest,\n ListPartyToKeyMappingRequest,\n ListPartyToParticipantRequest,\n type SignedTopologyTransaction,\n TopologyManagerReadServiceClient,\n TopologyManagerWriteServiceClient,\n type TopologyMapping,\n} from '@canton-network/core-ledger-proto';\nimport { GrpcTransport } from '@protobuf-ts/grpc-transport';\n\nimport type { TokenProvider } from '../auth/token-provider';\nimport { CantonError, CantonProtocolError } from '../errors';\nimport {\n buildDecentralizedNamespaceDefinitionMapping,\n buildNamespaceDelegationMapping,\n buildPartyToKeyMapping,\n buildPartyToParticipantMapping,\n} from './topology/mappings';\nimport { SynchronizerConnectivityServiceClient } from './topology/synchronizer-connectivity';\nimport type {\n CantonGrpcClientOptions,\n CreateDecentralizedNamespaceDefinitionTxParams,\n CreateNamespaceDelegationTxParams,\n CreatePartyToKeyMappingTxParams,\n CreatePartyToParticipantMappingTxParams,\n DecentralizedNamespaceDefinitionState,\n GeneratedTopologyTransaction,\n NamespaceDelegationState,\n PartyToKeyMappingState,\n PartyToParticipantMappingState,\n UpdateDecentralizedNamespaceDefinitionTxParams,\n} from './topology/types';\nimport {\n buildChannelCredentials,\n computeDecentralizedNamespace,\n headStateBaseQuery,\n synchronizerStore,\n} from './topology/utils';\nimport { UserManagementServiceClient } from './user-management';\nimport { computePublicKeyFingerprint } from './utils';\n\n/** Default gRPC client options: 128 MiB message-size limits for large admin responses. */\nconst DEFAULT_GRPC_CLIENT_OPTIONS = {\n 'grpc.max_receive_message_length': 128 * 1024 * 1024,\n 'grpc.max_send_message_length': 128 * 1024 * 1024,\n} as const;\n\n/**\n * gRPC client for the Canton participant admin Topology Manager API.\n *\n * Exposes read queries for topology mappings and write helpers that call\n * `GenerateTransactions` to produce unsigned topology transactions and\n * `AddTransactions` to submit signed ones.\n *\n * A fresh Bearer token is attached to each RPC via {@link TokenProvider}.\n */\nexport class CantonGrpcClient {\n readonly #transport: GrpcTransport;\n readonly #topologyRead: TopologyManagerReadServiceClient;\n readonly #topologyWrite: TopologyManagerWriteServiceClient;\n readonly #connectivity: SynchronizerConnectivityServiceClient;\n readonly #userManagement: UserManagementServiceClient;\n readonly #tokenProvider: TokenProvider;\n readonly #userId: string;\n #synchronizerId?: string;\n\n /**\n * @param opts - Admin API host, auth, optional synchronizer id, and optional TLS.\n */\n constructor(opts: CantonGrpcClientOptions) {\n this.#tokenProvider = opts.tokenProvider;\n this.#userId = opts.userId;\n this.#synchronizerId = opts.synchronizerId;\n this.#transport = new GrpcTransport({\n host: opts.host,\n channelCredentials: buildChannelCredentials(opts.host, opts.tls),\n clientOptions: opts.grpcClientOptions ?? DEFAULT_GRPC_CLIENT_OPTIONS,\n });\n this.#topologyRead = new TopologyManagerReadServiceClient(this.#transport);\n this.#topologyWrite = new TopologyManagerWriteServiceClient(this.#transport);\n this.#connectivity = new SynchronizerConnectivityServiceClient(this.#transport);\n this.#userManagement = new UserManagementServiceClient(this.#transport);\n }\n\n /** Returns per-RPC gRPC metadata with a fresh Bearer token. */\n async #getMeta(): Promise<Record<string, string>> {\n const token = await this.#tokenProvider.getToken();\n return { Authorization: `Bearer ${token}` };\n }\n\n /**\n * Returns the client synchronizer id, discovering it on first use when omitted at construction.\n *\n * @throws {CantonProtocolError} If the participant exposes no synchronizer store.\n */\n async #getSynchronizerId(): Promise<string> {\n if (this.#synchronizerId) {\n return this.#synchronizerId;\n }\n this.#synchronizerId = await this.#discoverSynchronizerId();\n return this.#synchronizerId;\n }\n\n /**\n * Resolves the logical id of the first synchronizer the participant is connected to.\n *\n * @throws {CantonProtocolError} If the participant is not connected to any synchronizer.\n */\n async #discoverSynchronizerId(): Promise<string> {\n const { response } = await this.#connectivity.listConnectedSynchronizers(\n {},\n { meta: await this.#getMeta() },\n );\n for (const synchronizer of response.connectedSynchronizers) {\n if (synchronizer.synchronizerId) {\n return synchronizer.synchronizerId;\n }\n }\n throw new CantonProtocolError('Participant is not connected to any synchronizer');\n }\n\n /**\n * Calls `GenerateTransactions` for a single ADD_REPLACE mapping.\n *\n * @param synchronizerId - Synchronizer store to target.\n * @param mapping - Topology mapping to encode into the transaction.\n * @param serial - Topology serial (`0` lets Canton auto-determine).\n * @returns Unsigned topology transaction (`serializedTransaction`, `transactionHash`).\n * @throws {CantonProtocolError} If the RPC returns no generated transaction.\n */\n async #generateTopologyTransaction(\n synchronizerId: string,\n mapping: TopologyMapping,\n serial: number,\n ): Promise<GeneratedTopologyTransaction> {\n const { response } = await this.#topologyWrite.generateTransactions(\n GenerateTransactionsRequest.create({\n proposals: [\n GenerateTransactionsRequest_Proposal.create({\n operation: Enums_TopologyChangeOp.ADD_REPLACE,\n serial,\n mapping,\n store: synchronizerStore(synchronizerId),\n }),\n ],\n }),\n { meta: await this.#getMeta() },\n );\n\n const generated = response.generatedTransactions[0];\n if (!generated) {\n throw new CantonProtocolError('GenerateTransactions returned no topology transaction');\n }\n return generated;\n }\n\n /**\n * Lists Namespace Delegation (NSD) mappings for a namespace.\n *\n * Queries topology head state on the synchronizer. Returns every result from\n * the list RPC.\n *\n * @param namespaceFingerprint - Namespace to filter on (for root NSD, the owner key fingerprint).\n * @returns All matching NSD mappings, or an empty array if none exist.\n */\n async getNamespaceDelegation(\n namespaceFingerprint: string,\n ): Promise<NamespaceDelegationState[]> {\n const synchronizerId = await this.#getSynchronizerId();\n const { response } = await this.#topologyRead.listNamespaceDelegation(\n ListNamespaceDelegationRequest.create({\n baseQuery: headStateBaseQuery(synchronizerId),\n filterNamespace: namespaceFingerprint,\n // Empty string = no target-key filter; return all delegations for this namespace.\n filterTargetKeyFingerprint: '',\n }),\n { meta: await this.#getMeta() },\n );\n\n return response.results.flatMap((result) => {\n const item = result.item;\n const publicKey = item?.targetKey?.publicKey;\n if (!item || !publicKey) {\n return [];\n }\n return [\n {\n namespace: item.namespace,\n targetKeyFingerprint: computePublicKeyFingerprint(publicKey),\n isRootDelegation: item.isRootDelegation,\n serial: result.context?.serial ?? 0,\n },\n ];\n });\n }\n\n /**\n * Lists Decentralized Namespace Definition (DND) mappings for a namespace.\n *\n * Queries topology head state on the synchronizer. For a party id `hint::1220…`,\n * pass the `1220…` suffix as `namespaceFingerprint`.\n *\n * @param namespaceFingerprint - Decentralized namespace fingerprint to filter on.\n * @returns All matching DND mappings, or an empty array if none exist.\n */\n async getDecentralizedNamespaceDefinition(\n namespaceFingerprint: string,\n ): Promise<DecentralizedNamespaceDefinitionState[]> {\n const synchronizerId = await this.#getSynchronizerId();\n const { response } = await this.#topologyRead.listDecentralizedNamespaceDefinition(\n ListDecentralizedNamespaceDefinitionRequest.create({\n baseQuery: headStateBaseQuery(synchronizerId),\n filterNamespace: namespaceFingerprint,\n }),\n { meta: await this.#getMeta() },\n );\n\n return response.results.flatMap((result) => {\n const item = result.item;\n if (!item) {\n return [];\n }\n return [\n {\n namespace: item.decentralizedNamespace,\n threshold: item.threshold,\n owners: [...item.owners],\n serial: result.context?.serial ?? 0,\n },\n ];\n });\n }\n\n /**\n * Lists Party-to-Key (PTK) mappings for a party.\n *\n * Queries topology head state on the synchronizer.\n *\n * @param partyId - Full party identifier (e.g. `hint::1220…`).\n * @returns All matching PTK mappings, or an empty array if none exist.\n */\n async getPartyToKeyMapping(partyId: string): Promise<PartyToKeyMappingState[]> {\n const synchronizerId = await this.#getSynchronizerId();\n const { response } = await this.#topologyRead.listPartyToKeyMapping(\n ListPartyToKeyMappingRequest.create({\n baseQuery: headStateBaseQuery(synchronizerId),\n filterParty: partyId,\n }),\n { meta: await this.#getMeta() },\n );\n\n return response.results.flatMap((result) => {\n const item = result.item;\n if (!item) {\n return [];\n }\n return [\n {\n party: item.party,\n threshold: item.threshold,\n signingKeyFingerprints: item.signingKeys.map((key) =>\n computePublicKeyFingerprint(key.publicKey),\n ),\n serial: result.context?.serial ?? 0,\n },\n ];\n });\n }\n\n /**\n * Lists Party-to-Participant (PTP) mappings for a party.\n *\n * Queries topology head state on the synchronizer.\n *\n * @param partyId - Full party identifier (e.g. `hint::1220…`).\n * @param proposals - If `true`, query pending proposals instead of authorized mappings.\n * @returns All matching PTP mappings, or an empty array if none exist.\n */\n async getPartyToParticipantMapping(\n partyId: string,\n proposals = false,\n ): Promise<PartyToParticipantMappingState[]> {\n const synchronizerId = await this.#getSynchronizerId();\n const { response } = await this.#topologyRead.listPartyToParticipant(\n ListPartyToParticipantRequest.create({\n baseQuery: headStateBaseQuery(synchronizerId, proposals),\n filterParty: partyId,\n // Empty string = no participant filter; return all hosting mappings for this party.\n filterParticipant: '',\n }),\n { meta: await this.#getMeta() },\n );\n\n return response.results.flatMap((result) => {\n const item = result.item;\n if (!item) {\n return [];\n }\n return [\n {\n party: item.party,\n threshold: item.threshold,\n participants: item.participants.map((participant) => ({\n participantUid: participant.participantUid,\n permission: participant.permission,\n })),\n serial: result.context?.serial ?? 0,\n },\n ];\n });\n }\n\n /**\n * Builds an unsigned Namespace Delegation (NSD) topology transaction.\n *\n * Calls `GenerateTransactions` with an ADD_REPLACE mapping. The returned\n * `transactionHash` must be signed by the namespace key.\n *\n * @param params - Owner public key and optional serial.\n * @returns Unsigned topology transaction (`serializedTransaction`, `transactionHash`).\n */\n async createNamespaceDelegationTx(\n params: CreateNamespaceDelegationTxParams,\n ): Promise<GeneratedTopologyTransaction> {\n const synchronizerId = await this.#getSynchronizerId();\n const mapping = buildNamespaceDelegationMapping(params.publicKeyDer);\n return this.#generateTopologyTransaction(synchronizerId, mapping, params.serial ?? 0);\n }\n\n /**\n * Builds an unsigned Decentralized Namespace Definition (DND) topology transaction.\n *\n * The decentralized namespace id is derived from `params.owners`. All owners\n * must sign the transaction hash.\n *\n * @param params - Owner fingerprints, threshold, and optional serial.\n * @returns Unsigned topology transaction (`serializedTransaction`, `transactionHash`).\n */\n async createDecentralizedNamespaceDefinitionTx(\n params: CreateDecentralizedNamespaceDefinitionTxParams,\n ): Promise<GeneratedTopologyTransaction> {\n const synchronizerId = await this.#getSynchronizerId();\n const decentralizedNamespace = computeDecentralizedNamespace(params.owners);\n const mapping = buildDecentralizedNamespaceDefinitionMapping(\n decentralizedNamespace,\n params.threshold,\n params.owners,\n );\n return this.#generateTopologyTransaction(synchronizerId, mapping, params.serial ?? 0);\n }\n\n async updateDecentralizedNamespaceDefinitionTx(\n params: UpdateDecentralizedNamespaceDefinitionTxParams,\n ): Promise<GeneratedTopologyTransaction> {\n const synchronizerId = await this.#getSynchronizerId();\n const mapping = buildDecentralizedNamespaceDefinitionMapping(\n params.namespace,\n params.threshold,\n params.owners,\n );\n return this.#generateTopologyTransaction(synchronizerId, mapping, params.serial ?? 0);\n }\n\n /**\n * Builds an unsigned Party-to-Key (PTK) topology transaction.\n *\n * Decentralized namespace owners must sign the transaction hash.\n *\n * @param params - Party id, signing keys, threshold, and optional serial.\n * @returns Unsigned topology transaction (`serializedTransaction`, `transactionHash`).\n */\n async createPartyToKeyTx(\n params: CreatePartyToKeyMappingTxParams,\n ): Promise<GeneratedTopologyTransaction> {\n const synchronizerId = await this.#getSynchronizerId();\n const mapping = buildPartyToKeyMapping(\n params.partyId,\n params.signingPublicKeyDers,\n params.threshold,\n );\n return this.#generateTopologyTransaction(synchronizerId, mapping, params.serial ?? 0);\n }\n\n /**\n * Builds an unsigned Party-to-Participant (PTP) topology transaction.\n *\n * Party owners sign the transaction hash. On submit, set `proposal: true` on the\n * signed transaction so the hosting participant can authorize via `Authorize`.\n *\n * @param params - Party id, participant ids, threshold, and optional serial.\n * @returns Unsigned topology transaction (`serializedTransaction`, `transactionHash`).\n */\n async createPartyToParticipantTx(\n params: CreatePartyToParticipantMappingTxParams,\n ): Promise<GeneratedTopologyTransaction> {\n const synchronizerId = await this.#getSynchronizerId();\n const mapping = buildPartyToParticipantMapping(\n params.partyId,\n params.participantIds,\n params.threshold,\n );\n return this.#generateTopologyTransaction(synchronizerId, mapping, params.serial ?? 0);\n }\n\n /**\n * Submits signed topology transactions to the synchronizer store.\n *\n * Multiple transactions are submitted atomically in one `AddTransactions` call.\n * When batching, sign `computeMultiTransactionHash` over all transaction hashes\n * and attach the same `MultiTransactionSignatures` to each entry.\n *\n * Set `proposal: true` on a transaction when the hosting participant must\n * authorize that mapping afterward.\n *\n * @param transactions - One or more signed topology transactions.\n * @throws {CantonError} If `transactions` is empty.\n */\n async submitTopologyTransactions(\n transactions: readonly SignedTopologyTransaction[],\n ): Promise<void> {\n if (transactions.length === 0) {\n throw new CantonError('AddTransactions requires at least one transaction');\n }\n const synchronizerId = await this.#getSynchronizerId();\n await this.#topologyWrite.addTransactions(\n AddTransactionsRequest.create({\n transactions: [...transactions],\n store: synchronizerStore(synchronizerId),\n }),\n { meta: await this.#getMeta() },\n );\n }\n\n async grantCanActAs(partyId: string): Promise<void> {\n await this.#userManagement.grantUserRights(\n {\n userId: this.#userId,\n rights: [{ canActAs: { party: partyId } }],\n identityProviderId: '',\n },\n { meta: await this.#getMeta() },\n );\n }\n\n /** Closes the underlying gRPC transport. */\n close(): void {\n this.#transport.close();\n }\n}\n"]}
|
package/dist/KYBLHMHO.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/provider.ts"],"names":["parseCantonChainUri","uri","url","URL","adminApiHost","searchParams","get","Error","userId","actAsParam","actAs","split","map","party","trim","filter","length","walletUrl","tokenUrl","undefined","clientId","clientSecret","process","env","CANTON_CLIENT_SECRET","scope","audience","key","delete","jsonApiUrl","toString","replace","oauth2","createCantonChainProvider","isLocal","params","tokenProvider","createTokenProvider","configuration","Configuration","basePath","accessToken","getToken","client","CantonClient","grpcClient","CantonGrpcClient","host","LocalTokenProvider","admin","ClientCredentialsTokenProvider"],"mappings":";;;;;;;;AA6DO,SAASA,oBAAoBC,GAAAA,EAAW;AAC3C,EAAA,MAAMC,GAAAA,GAAM,IAAIC,GAAAA,CAAIF,GAAAA,CAAAA;AAEpB,EAAA,MAAMG,YAAAA,GAAeF,GAA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MAAML,aAAAA,CAAcM,QAAAA,EAAQ,EAA5B,aAAA;GACjB,CAAA;AACA,EAAA,MAAMC,MAAAA,GAAS,IAAIC,YAAAA,CAAaN,aAAAA,EAAeH,OAAO3B,MAAAA,EAAQ;AAC1DS,IAAAA,SAAAA,EAAWkB,MAAAA,CAAOlB,SAAAA;AAClBmB,IAAAA;GACJ,CAAA;AAGA,EAAA,MAAMS,UAAAA,GAAa,IAAIC,gBAAAA,CAAiB;AACpCC,IAAAA,IAAAA,EAAMZ,MAAAA,CAAO/B,YAAAA;AACbgC,IAAAA,aAAAA;AACA5B,IAAAA,MAAAA,EAAQ2B,MAAAA,CAAO3B;GACnB,CAAA;AAEA,EAAA,OAAO;AACHmC,IAAAA,MAAAA;AACAE,IAAAA,UAAAA;AACAT,IAAAA,aAAAA;AACAnB,IAAAA,SAAAA,EAAWkB,MAAAA,CAAOlB;AACtB,GAAA;AACJ;AA/BgBgB,MAAAA,CAAAA,yBAAAA,EAAAA,2BAAAA,CAAAA;AAiChB,SAASI,mBAAAA,CAAoBF,QAA8BD,OAAAA,EAAgB;AACvE,EAAA,IAAIA,OAAAA,EAAS;AACT,IAAA,OAAO,IAAIc,kBAAAA,CAAmB;AAC1BxC,MAAAA,MAAAA,EAAQ2B,MAAAA,CAAO3B,MAAAA;AACfE,MAAAA,KAAAA,EAAOyB,MAAAA,CAAOzB,KAAAA;MACduC,KAAAA,EAAO;KACX,CAAA;AACJ,EAAA;AAGA,EAAA,IAAI,CAACd,OAAOH,MAAAA,EAAQ;AAChB,IAAA,MAAM,IAAIzB,MACN,kHAAA,CAAA;AAER,EAAA;AAEA,EAAA,OAAO,IAAI2C,8BAAAA,CAA+Bf,MAAAA,CAAOH,MAAM,CAAA;AAC3D;AAjBSK,MAAAA,CAAAA,mBAAAA,EAAAA,qBAAAA,CAAAA","file":"KYBLHMHO.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 * - {@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 * - {@link walletUrl} — Canton Network validator wallet (scan-proxy CIP-56 endpoints)\n */\nexport type CantonChainProvider = {\n client: ICantonClient;\n grpcClient: CantonGrpcClient;\n tokenProvider: TokenProvider;\n /** Validator wallet URL for scan-proxy CIP-56 endpoints. Required. */\n walletUrl: string;\n};\n\n// ─────────────────────────────────────────────────────────────────────────────\n// URI Parsing\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport type CantonChainUriParams = {\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 /** Parties granted `actAs` on localnet tokens (comma-separated in the URI). */\n actAs: string[];\n /** Validator wallet URL for scan-proxy CIP-56 endpoints (e.g. \"http://localhost:7201\"). Required. */\n walletUrl: string;\n /** OAuth2 client credentials config — present only for non-local environments */\n oauth2?: ClientCredentialsTokenProviderConfig;\n};\n\n/**\n * Parse a Canton chain provider URI into its constituent parts.\n *\n * URI format:\n * `<json-api-base>?admin-api=<host:port>&user-id=<id>&wallet-url=<url>[&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 *\n * When `client-secret` is omitted from the URI, `CANTON_CLIENT_SECRET` is read from the\n * environment.\n */\nexport function parseCantonChainUri(uri: string): CantonChainUriParams {\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 actAsParam = url.searchParams.get('act-as');\n const actAs =\n actAsParam\n ?.split(',')\n .map((party) => party.trim())\n .filter((party) => party.length > 0) ?? [];\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 tokenUrl = url.searchParams.get('token-url') ?? undefined;\n const clientId = url.searchParams.get('client-id') ?? undefined;\n // Prefer URI param; fall back to env so secrets are not committed in provider configs.\n const clientSecret =\n url.searchParams.get('client-secret') ??\n // eslint-disable-next-line turbo/no-undeclared-env-vars -- runtime OAuth secret, not a turbo task input\n process.env.CANTON_CLIENT_SECRET ??\n undefined;\n const scope = url.searchParams.get('scope') ?? undefined;\n const audience = url.searchParams.get('audience') ?? undefined;\n\n for (const key of [\n 'admin-api',\n 'user-id',\n 'act-as',\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 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 actAs,\n walletUrl,\n oauth2,\n };\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Provider Factory\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport type CreateCantonChainProviderOptions = {\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 CantonChainProvider} 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 createCantonChainProvider({\n uri,\n isLocal,\n}: CreateCantonChainProviderOptions): CantonChainProvider {\n const params = parseCantonChainUri(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 walletUrl: params.walletUrl,\n tokenProvider,\n });\n\n // ── gRPC Admin API Client ───────────────────────────────────────────\n const grpcClient = new CantonGrpcClient({\n host: params.adminApiHost,\n tokenProvider,\n userId: params.userId,\n });\n\n return {\n client,\n grpcClient,\n tokenProvider,\n walletUrl: params.walletUrl,\n };\n}\n\nfunction createTokenProvider(params: CantonChainUriParams, isLocal: boolean): TokenProvider {\n if (isLocal) {\n return new LocalTokenProvider({\n userId: params.userId,\n actAs: params.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 URI or CANTON_CLIENT_SECRET)',\n );\n }\n\n return new ClientCredentialsTokenProvider(params.oauth2);\n}\n"]}
|