@layerzerolabs/common-canton 1.2.67 → 1.2.69
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/index.js +140 -138
- package/package.json +10 -10
- package/src/refresh/README.md +119 -0
- package/src/refresh/address-resolver.ts +27 -19
- package/src/refresh/index.ts +2 -0
- package/src/refresh/plan.ts +176 -0
- package/src/refresh/resolve-plan.ts +502 -0
- package/src/refresh/resolve.ts +21 -2
- package/src/transaction.ts +3 -0
- package/test/refresh/resolve-plan.test.ts +723 -0
package/dist/index.js
CHANGED
|
@@ -1,51 +1,54 @@
|
|
|
1
|
-
import './AQJMQQ4W.js';
|
|
2
|
-
export { resolveCantonTransaction } from './AM6OIKMW.js';
|
|
3
|
-
export { createContractAddressResolver, isConcreteActiveContractRef, isRefAlive, matchesContractStateFilter, queryLiveContractIdsForRef, queryLiveContractsForRef, resolveContractStateFilter, resolveExpectedSignatories } from './75B7Y26B.js';
|
|
4
|
-
export { wrapLzSdk } from './HF5HP2EX.js';
|
|
5
|
-
export { substituteCidsToRefs, substituteRefsToCids } from './WLHCBBAJ.js';
|
|
6
1
|
import './5GUYLHA7.js';
|
|
7
2
|
export { CantonSdk } from './D52OIJDY.js';
|
|
3
|
+
import './6UDREB6T.js';
|
|
4
|
+
export { wrapLzSdk } from './HF5HP2EX.js';
|
|
5
|
+
export { resolveCantonTransaction } from './K3ZNKULN.js';
|
|
6
|
+
export { substituteCidsToRefs, substituteRefsToCids } from './WLHCBBAJ.js';
|
|
7
|
+
export { resolveCantonActiveContracts, resolveCantonRefreshPlan, selectContractsByGte } from './SIBBQMZE.js';
|
|
8
|
+
export { createContractAddressResolver, isConcreteActiveContractRef, isRefAlive, matchesContractStateFilter, queryLiveContractIdsForRef, queryLiveContractsForRef, resolveContractStateFilter, resolveExpectedSignatories } from './42L4RKH6.js';
|
|
8
9
|
import './7JX6NIYS.js';
|
|
9
10
|
export { buildMultiTransactionSignatures, buildSignedTransaction } from './WKC6X2E3.js';
|
|
10
11
|
import './IIWYAFUO.js';
|
|
11
12
|
export { parseMinFeeValue } from './M3GPMXME.js';
|
|
12
|
-
export { createCantonChainProvider, parseCantonChainUri } from './
|
|
13
|
-
export { CantonClient } from './
|
|
14
|
-
import './
|
|
13
|
+
export { createCantonChainProvider, parseCantonChainUri } from './XPBJWESZ.js';
|
|
14
|
+
export { CantonClient } from './MI3L7BKC.js';
|
|
15
|
+
import './B42Y5JOK.js';
|
|
15
16
|
import './6CPYXAOF.js';
|
|
17
|
+
import './4MFKSIYK.js';
|
|
18
|
+
import './5KFMHJZB.js';
|
|
19
|
+
import './76PPVRJ6.js';
|
|
16
20
|
import './F6OBDGNC.js';
|
|
17
21
|
import './Q3CWBD5A.js';
|
|
18
22
|
import './DUQWP47Z.js';
|
|
19
23
|
import './3YMFQHQ2.js';
|
|
20
24
|
import './YG6MDQAI.js';
|
|
21
|
-
import './WSLU3JGO.js';
|
|
22
|
-
import './QYQWHMQM.js';
|
|
23
|
-
import './76PPVRJ6.js';
|
|
24
25
|
import './6K3YSZCK.js';
|
|
25
26
|
import './Y7ND62EN.js';
|
|
26
|
-
import './UQMKPY2S.js';
|
|
27
|
-
import './FB6G6OD4.js';
|
|
28
27
|
import './PGQCNYFD.js';
|
|
28
|
+
import './TAI7WDMG.js';
|
|
29
|
+
import './FB6G6OD4.js';
|
|
29
30
|
import './ZGWBZC76.js';
|
|
30
|
-
import './
|
|
31
|
-
import './
|
|
32
|
-
import './
|
|
33
|
-
import './
|
|
34
|
-
import './
|
|
31
|
+
import './BLWJ63ZZ.js';
|
|
32
|
+
import './JG3CGXAA.js';
|
|
33
|
+
import './EITKKRM7.js';
|
|
34
|
+
import './HGLH54M2.js';
|
|
35
|
+
import './X5Q5IDTX.js';
|
|
35
36
|
import './RW5PUYQM.js';
|
|
36
37
|
import './UZEQR4K7.js';
|
|
38
|
+
import './KSW67SU5.js';
|
|
37
39
|
import './JOKWDCVQ.js';
|
|
38
|
-
import './
|
|
39
|
-
import './JXKVPYCE.js';
|
|
40
|
-
import './T6UKLW2J.js';
|
|
41
|
-
import './4GB3DPXG.js';
|
|
42
|
-
import './UYKPXKW5.js';
|
|
40
|
+
import './JH2I4JGJ.js';
|
|
43
41
|
import './FEAZ4ULP.js';
|
|
44
42
|
import './SZLSOCSR.js';
|
|
45
43
|
import './QCG5SPPK.js';
|
|
46
44
|
import './NU7VYPQS.js';
|
|
45
|
+
import './T6UKLW2J.js';
|
|
46
|
+
import './4GB3DPXG.js';
|
|
47
|
+
import './UYKPXKW5.js';
|
|
47
48
|
import './X4YPYKWZ.js';
|
|
48
|
-
import './
|
|
49
|
+
import './5PL2GRP6.js';
|
|
50
|
+
import './DNH3CRBL.js';
|
|
51
|
+
import './VBS2IYYS.js';
|
|
49
52
|
import './KKCWYT6E.js';
|
|
50
53
|
import './S7OPYTA6.js';
|
|
51
54
|
import './KFPAEUU7.js';
|
|
@@ -54,42 +57,33 @@ import './NOXVUNXQ.js';
|
|
|
54
57
|
import './ZBDCYY5O.js';
|
|
55
58
|
import './TKTYXEED.js';
|
|
56
59
|
import './QKX6RB6N.js';
|
|
57
|
-
import './5PL2GRP6.js';
|
|
58
|
-
import './DNH3CRBL.js';
|
|
59
|
-
import './3T46OKQU.js';
|
|
60
|
-
import './LL7Z56UN.js';
|
|
61
60
|
import './KCRFOKIB.js';
|
|
62
|
-
import './
|
|
63
|
-
import './
|
|
64
|
-
import './
|
|
65
|
-
import './
|
|
66
|
-
import './
|
|
61
|
+
import './ZQ2F7HPB.js';
|
|
62
|
+
import './53STMMNU.js';
|
|
63
|
+
import './3T46OKQU.js';
|
|
64
|
+
import './IHOOPR5Q.js';
|
|
65
|
+
import './LS6TAA3S.js';
|
|
66
|
+
import './BA56KCNU.js';
|
|
67
|
+
import './ZILWPZLS.js';
|
|
68
|
+
import './Z2TOQ5RW.js';
|
|
67
69
|
import './2633VCK5.js';
|
|
68
|
-
import './
|
|
70
|
+
import './EWDK2D2A.js';
|
|
71
|
+
import './MLPZRNZP.js';
|
|
72
|
+
import './HCWCELIY.js';
|
|
69
73
|
import './IIQYRITU.js';
|
|
70
74
|
import './CDHOTGTN.js';
|
|
71
|
-
import './
|
|
72
|
-
import './
|
|
73
|
-
import './53STMMNU.js';
|
|
74
|
-
import './MZMRFQTR.js';
|
|
75
|
-
import './QZJONP6W.js';
|
|
76
|
-
import './7STDATVZ.js';
|
|
77
|
-
import './34I4OGQK.js';
|
|
78
|
-
import './MXJ2SKCA.js';
|
|
79
|
-
import './6GAFSKMN.js';
|
|
80
|
-
import './6GU7J47E.js';
|
|
81
|
-
import './MOQL7EDE.js';
|
|
82
|
-
import './K3RKYYAJ.js';
|
|
83
|
-
import './WQJNYC3S.js';
|
|
75
|
+
import './NMK4KJVK.js';
|
|
76
|
+
import './J26F3LZM.js';
|
|
84
77
|
import './N2H3JQGZ.js';
|
|
85
|
-
import './
|
|
86
|
-
import './
|
|
87
|
-
import './
|
|
88
|
-
import './YMURVGWI.js';
|
|
78
|
+
import './WQJNYC3S.js';
|
|
79
|
+
import './T5O5EZO2.js';
|
|
80
|
+
import './5GUS3R4R.js';
|
|
89
81
|
import './GSEDMLUC.js';
|
|
90
82
|
import './KBZ6YXX4.js';
|
|
91
|
-
import './
|
|
83
|
+
import './5RZS7DZN.js';
|
|
84
|
+
import './YMURVGWI.js';
|
|
92
85
|
import './73I7CBP3.js';
|
|
86
|
+
import './5N747JZQ.js';
|
|
93
87
|
import './TDLALQCM.js';
|
|
94
88
|
import './DDITSIMP.js';
|
|
95
89
|
import './4GYCD3G4.js';
|
|
@@ -99,19 +93,39 @@ import './MS6MVDLI.js';
|
|
|
99
93
|
import './YUSKGBOM.js';
|
|
100
94
|
import './ELKKWJ73.js';
|
|
101
95
|
import './SSIXD5B2.js';
|
|
96
|
+
import './L4NQUCEZ.js';
|
|
97
|
+
import './5235KHHW.js';
|
|
102
98
|
import './C7EKAFQT.js';
|
|
103
99
|
import './FB4MMBJU.js';
|
|
104
100
|
import './WE3VOYW4.js';
|
|
105
101
|
import './BITUOW7N.js';
|
|
106
|
-
import './L4NQUCEZ.js';
|
|
107
|
-
import './5235KHHW.js';
|
|
108
102
|
import './WXYN3MFC.js';
|
|
109
103
|
import './KVXEYMWG.js';
|
|
110
104
|
import './GJNXH4RV.js';
|
|
111
105
|
import './T7UHDP5T.js';
|
|
112
106
|
import './2UG7UYH5.js';
|
|
107
|
+
import './HLEDC536.js';
|
|
108
|
+
import './VWP2ORHR.js';
|
|
109
|
+
import './MZMRFQTR.js';
|
|
110
|
+
import './QZJONP6W.js';
|
|
111
|
+
import './7STDATVZ.js';
|
|
112
|
+
import './LQ3LPE4G.js';
|
|
113
|
+
import './LJWTM73C.js';
|
|
114
|
+
import './A7U4VVQK.js';
|
|
115
|
+
import './WRPKZZ4E.js';
|
|
116
|
+
import './3JWW6VWI.js';
|
|
117
|
+
import './BWCLX6XE.js';
|
|
118
|
+
import './HTXBXFKR.js';
|
|
119
|
+
import './JJLCFUQT.js';
|
|
120
|
+
import './PVD6NHYE.js';
|
|
121
|
+
import './34I4OGQK.js';
|
|
122
|
+
import './MXJ2SKCA.js';
|
|
123
|
+
import './LXIBC5QC.js';
|
|
124
|
+
import './6GAFSKMN.js';
|
|
113
125
|
import './JKQLMXRN.js';
|
|
114
|
-
import './
|
|
126
|
+
import './2QISQFNQ.js';
|
|
127
|
+
import './3R25GDYP.js';
|
|
128
|
+
import './CM3AEJH2.js';
|
|
115
129
|
import './RV24CYI3.js';
|
|
116
130
|
import './XINHRIWA.js';
|
|
117
131
|
import './TJBQSG4B.js';
|
|
@@ -121,87 +135,80 @@ import './DB3ADDKC.js';
|
|
|
121
135
|
import './DCWJXAUI.js';
|
|
122
136
|
import './VJINT4U6.js';
|
|
123
137
|
import './OPRFXRK5.js';
|
|
124
|
-
import './LXIBC5QC.js';
|
|
125
|
-
import './CLAE73FR.js';
|
|
126
|
-
import './LQ3LPE4G.js';
|
|
127
|
-
import './LJWTM73C.js';
|
|
128
|
-
import './A7U4VVQK.js';
|
|
129
|
-
import './WRPKZZ4E.js';
|
|
130
|
-
import './3JWW6VWI.js';
|
|
131
|
-
import './BWCLX6XE.js';
|
|
132
|
-
import './HTXBXFKR.js';
|
|
133
|
-
import './PVD6NHYE.js';
|
|
134
|
-
import './JJLCFUQT.js';
|
|
135
138
|
import './NIN7X4D3.js';
|
|
136
139
|
import './IROQTIJZ.js';
|
|
137
140
|
import './GBFMX33M.js';
|
|
138
|
-
import './
|
|
139
|
-
import './
|
|
140
|
-
import './
|
|
141
|
+
import './WLJJ4FDL.js';
|
|
142
|
+
import './2PMOI5F3.js';
|
|
143
|
+
import './C46IODEA.js';
|
|
141
144
|
import './VQXHCSJ4.js';
|
|
145
|
+
import './LEDX6CMV.js';
|
|
146
|
+
import './2BIDSJF6.js';
|
|
147
|
+
import './G4FJL7ZV.js';
|
|
148
|
+
import './WJFNYWLV.js';
|
|
142
149
|
import './D5KKWJ4T.js';
|
|
143
|
-
import './
|
|
144
|
-
import './
|
|
145
|
-
import './
|
|
146
|
-
import './
|
|
147
|
-
import './
|
|
148
|
-
import './
|
|
150
|
+
import './UUJVV37M.js';
|
|
151
|
+
import './NAKXSYHE.js';
|
|
152
|
+
import './5O7CQ3B5.js';
|
|
153
|
+
import './XFM6ATM3.js';
|
|
154
|
+
import './7QVLLG7J.js';
|
|
155
|
+
import './H2QNCZZP.js';
|
|
156
|
+
import './P6RLTY4Q.js';
|
|
149
157
|
import './RPOQ54PG.js';
|
|
150
158
|
import './OH7SHQF6.js';
|
|
151
|
-
import './
|
|
152
|
-
import './
|
|
153
|
-
import './
|
|
159
|
+
import './SPMIXP6R.js';
|
|
160
|
+
import './AXXLRBOT.js';
|
|
161
|
+
import './OMKZNVQ6.js';
|
|
154
162
|
import './PBBQTZR5.js';
|
|
155
163
|
import './FXR2Z54G.js';
|
|
156
164
|
import './KOUK7GBL.js';
|
|
157
165
|
import './HZG6J4V4.js';
|
|
158
166
|
import './RY2LC7P3.js';
|
|
159
167
|
import './GJPYFCRF.js';
|
|
160
|
-
import './
|
|
161
|
-
import './
|
|
162
|
-
import './
|
|
163
|
-
import './
|
|
164
|
-
import './
|
|
168
|
+
import './DAP5XJGH.js';
|
|
169
|
+
import './65PSGOOO.js';
|
|
170
|
+
import './57DRTFD5.js';
|
|
171
|
+
import './JDRCVB2P.js';
|
|
172
|
+
import './2CWG6G2U.js';
|
|
165
173
|
import './LX4D3IC6.js';
|
|
166
174
|
import './I2M5WSEM.js';
|
|
167
175
|
import './QDOJTBN4.js';
|
|
168
176
|
import './BXDXCO3L.js';
|
|
169
|
-
import './
|
|
170
|
-
import './
|
|
177
|
+
import './VNAH76JJ.js';
|
|
178
|
+
import './UZTJVHNP.js';
|
|
171
179
|
import './SF7H2DPL.js';
|
|
172
|
-
import './
|
|
173
|
-
import './OMKZNVQ6.js';
|
|
180
|
+
import './4XJYWTSD.js';
|
|
174
181
|
import './R6RFWKWB.js';
|
|
175
|
-
import './DAP5XJGH.js';
|
|
176
|
-
import './65PSGOOO.js';
|
|
177
|
-
import './57DRTFD5.js';
|
|
178
|
-
import './JDRCVB2P.js';
|
|
179
|
-
import './2CWG6G2U.js';
|
|
180
182
|
import './42XERBT4.js';
|
|
181
183
|
import './KLGD7ZKC.js';
|
|
182
184
|
import './FSI4ML2J.js';
|
|
185
|
+
import './UKPTMFE5.js';
|
|
183
186
|
import './JRFMLEIC.js';
|
|
184
|
-
import './
|
|
185
|
-
import './
|
|
187
|
+
import './UOJYTAJA.js';
|
|
188
|
+
import './TKPU3I2P.js';
|
|
186
189
|
import './NXFOIDBZ.js';
|
|
187
190
|
import './YYZ6GHBF.js';
|
|
188
191
|
import './WEB5TZQE.js';
|
|
189
192
|
import './6HBTMZ2U.js';
|
|
190
|
-
import './4XJYWTSD.js';
|
|
191
193
|
import './AMLJTQWB.js';
|
|
192
194
|
import './AONQHJ67.js';
|
|
193
195
|
import './223ZGSPH.js';
|
|
194
196
|
import './W3V3QO3M.js';
|
|
195
|
-
import './
|
|
197
|
+
import './7QB5CK2R.js';
|
|
196
198
|
import './5KFH4GBA.js';
|
|
197
|
-
import './
|
|
199
|
+
import './JRALW2JZ.js';
|
|
200
|
+
import './5C4DHFKJ.js';
|
|
198
201
|
import './6DNDE3V5.js';
|
|
199
202
|
import './VEDIQN4O.js';
|
|
200
|
-
import './5C4DHFKJ.js';
|
|
201
203
|
import './N4ZM4N2T.js';
|
|
202
|
-
import './
|
|
203
|
-
import './
|
|
204
|
-
import './
|
|
204
|
+
import './JNFIJ7LA.js';
|
|
205
|
+
import './YJ63OODS.js';
|
|
206
|
+
import './TGNRKR6H.js';
|
|
207
|
+
import './WS55YOW3.js';
|
|
208
|
+
import './S5X72W5R.js';
|
|
209
|
+
import './NXLM7ANC.js';
|
|
210
|
+
import './ZGT2WRBJ.js';
|
|
211
|
+
import './CWZMBPM3.js';
|
|
205
212
|
import './YQIQBEDK.js';
|
|
206
213
|
import './RT5FBW5C.js';
|
|
207
214
|
import './AHL4CCNO.js';
|
|
@@ -209,16 +216,17 @@ import './KHRPAP5A.js';
|
|
|
209
216
|
import './2F66XH7X.js';
|
|
210
217
|
import './OLOOZCJ6.js';
|
|
211
218
|
import './UFRAGOR4.js';
|
|
212
|
-
import './ZGT2WRBJ.js';
|
|
213
|
-
import './CWZMBPM3.js';
|
|
214
219
|
import './FKJBUIAF.js';
|
|
215
220
|
import './ZDVQJMLH.js';
|
|
216
221
|
import './5ZZP4T75.js';
|
|
217
222
|
import './6L7QPUXX.js';
|
|
218
223
|
import './2I2KZ57G.js';
|
|
219
224
|
import './4ABHRM2Z.js';
|
|
220
|
-
import './
|
|
221
|
-
import './
|
|
225
|
+
import './KYQVWBET.js';
|
|
226
|
+
import './2NZC3LBF.js';
|
|
227
|
+
import './I42TYLNY.js';
|
|
228
|
+
import './Z2PCDUTA.js';
|
|
229
|
+
import './VZY2QLIH.js';
|
|
222
230
|
import './E3S4Q7BW.js';
|
|
223
231
|
import './OVI22V4D.js';
|
|
224
232
|
import './X74MS4NY.js';
|
|
@@ -226,41 +234,39 @@ import './T2TBHOJW.js';
|
|
|
226
234
|
import './V6YYBQQ7.js';
|
|
227
235
|
import './VMMOYWRH.js';
|
|
228
236
|
import './M4ENXXGH.js';
|
|
229
|
-
import './I42TYLNY.js';
|
|
230
|
-
import './Z2PCDUTA.js';
|
|
231
|
-
import './VZY2QLIH.js';
|
|
232
237
|
import './FBZYVJHN.js';
|
|
233
|
-
import './
|
|
234
|
-
import './
|
|
238
|
+
import './JVRWQ36T.js';
|
|
239
|
+
import './OU6ZGOI7.js';
|
|
235
240
|
import './6CDYG5J4.js';
|
|
236
241
|
import './YO6M5EI2.js';
|
|
237
242
|
import './4FVB5LZE.js';
|
|
238
|
-
import './
|
|
239
|
-
import './
|
|
240
|
-
import './
|
|
241
|
-
import './
|
|
242
|
-
import './
|
|
243
|
-
import './
|
|
244
|
-
import './
|
|
243
|
+
import './SUQRZQJZ.js';
|
|
244
|
+
import './OV57R5W2.js';
|
|
245
|
+
import './24YQIQ26.js';
|
|
246
|
+
import './AADTV7OJ.js';
|
|
247
|
+
import './CPODYNES.js';
|
|
248
|
+
import './CYUO5SRQ.js';
|
|
249
|
+
import './5LBZE3FZ.js';
|
|
245
250
|
import './P4OZVLZ5.js';
|
|
246
|
-
import './
|
|
247
|
-
import './4XVTGYYU.js';
|
|
251
|
+
import './JEVZBCKB.js';
|
|
248
252
|
import './B5NXLJBP.js';
|
|
249
|
-
import './57SJMVEE.js';
|
|
250
253
|
import './XHRPB5KB.js';
|
|
254
|
+
import './57SJMVEE.js';
|
|
255
|
+
import './4XVTGYYU.js';
|
|
256
|
+
import './2Y3QRNON.js';
|
|
251
257
|
import './TQODWV5P.js';
|
|
252
258
|
import './GEKUWBT6.js';
|
|
253
|
-
import './2Y3QRNON.js';
|
|
254
259
|
import './KIXMSGXW.js';
|
|
255
260
|
import './PXLKEN6Q.js';
|
|
256
261
|
import './QMG5HIWM.js';
|
|
257
|
-
import './ZLGKSCEZ.js';
|
|
258
|
-
import './OV57R5W2.js';
|
|
259
|
-
import './24YQIQ26.js';
|
|
260
|
-
import './AADTV7OJ.js';
|
|
261
262
|
import './BMVKXYRP.js';
|
|
262
|
-
import './
|
|
263
|
-
import './
|
|
263
|
+
import './ZLGKSCEZ.js';
|
|
264
|
+
import './I6JD5SVF.js';
|
|
265
|
+
import './OR2CV5NU.js';
|
|
266
|
+
import './LQUUIINH.js';
|
|
267
|
+
import './FV6OZTC6.js';
|
|
268
|
+
import './EIJI6ZMQ.js';
|
|
269
|
+
import './H5NCYXPN.js';
|
|
264
270
|
import './BZIM4HLD.js';
|
|
265
271
|
import './X6CZGKDI.js';
|
|
266
272
|
import './UO7AO4TN.js';
|
|
@@ -271,10 +277,8 @@ import './WSW75GTU.js';
|
|
|
271
277
|
import './O6CDI3U6.js';
|
|
272
278
|
import './I3OMGYUX.js';
|
|
273
279
|
import './QYESYTLQ.js';
|
|
274
|
-
import './
|
|
275
|
-
import './
|
|
276
|
-
import './EIJI6ZMQ.js';
|
|
277
|
-
import './H5NCYXPN.js';
|
|
280
|
+
import './TSE2DUDN.js';
|
|
281
|
+
import './EE2Y3CQ3.js';
|
|
278
282
|
import './5NV4O3K7.js';
|
|
279
283
|
import './XOLOXB7M.js';
|
|
280
284
|
import './QNJSSXUH.js';
|
|
@@ -282,7 +286,6 @@ import './S3CSDPDX.js';
|
|
|
282
286
|
import './IXH2E5MF.js';
|
|
283
287
|
import './KNH4DSGV.js';
|
|
284
288
|
import './ZAFXW6OP.js';
|
|
285
|
-
import './I6JD5SVF.js';
|
|
286
289
|
import './TVDUWBAO.js';
|
|
287
290
|
import './Q7CJWR7Y.js';
|
|
288
291
|
import './V6427LHF.js';
|
|
@@ -292,14 +295,12 @@ import './AJ4M7JFK.js';
|
|
|
292
295
|
import './26MNW5VA.js';
|
|
293
296
|
import './BHV6BRHZ.js';
|
|
294
297
|
import './PY4KJ4FA.js';
|
|
295
|
-
import './TSE2DUDN.js';
|
|
296
|
-
import './EE2Y3CQ3.js';
|
|
297
298
|
export { Configuration, ResponseError } from './KBNUN3MF.js';
|
|
298
299
|
export { AMULET_INSTRUMENT_ID, fetchAcceptContext, fetchAmuletContext, fetchAmuletRules, fetchDsoParty, fetchOpenAndIssuingMiningRounds, injectExternalPartyAmuletRules, toDisclosedContract } from './SEKD553P.js';
|
|
299
|
-
export { CantonGrpcClient } from './
|
|
300
|
+
export { CantonGrpcClient } from './6AK25YSE.js';
|
|
301
|
+
export { computeDecentralizedNamespace, computeMultiTransactionHash } from './PL4H5XEA.js';
|
|
300
302
|
import './RVQWP4JU.js';
|
|
301
303
|
import './VJ4PVZYL.js';
|
|
302
|
-
export { computeDecentralizedNamespace, computeMultiTransactionHash } from './PL4H5XEA.js';
|
|
303
304
|
export { cantonMultihash, computeCantonFingerprint, computePublicKeyFingerprint, extractTransactions } from './WLV6EHDB.js';
|
|
304
305
|
export { CommandStatus, IntLikeSchema, buildTemplateId, canonicalizeDamlDecimal, smallestUnitsToDamlDecimal } from './4WZTQJXP.js';
|
|
305
306
|
import './35ELVFTS.js';
|
|
@@ -311,9 +312,10 @@ export { CANTON_CID_ADDRESS_PREFIX, CANTON_GLOBAL_ADDRESS_PREFIX, CANTON_PARTY_A
|
|
|
311
312
|
export { SECP256K1_SPKI_DER_HEADER, SECP256K1_SPKI_DER_HEADER_HEX, derEncodeSignature, publicKeyToSpkiDer } from './CMDFOA7C.js';
|
|
312
313
|
export { assertHexLength, codePointLength, formatDamlDecimal, intToHex, keccak256Hex, padLeft, showBool, showInt, textToHex, timeToUnixSeconds, toBigInt } from './EZIA6KIP.js';
|
|
313
314
|
export { CantonApiError, CantonError, CantonProtocolError, CantonTransportError, cantonApiErrorFromResponse, isRetryableCantonError } from './3K5JL2TP.js';
|
|
314
|
-
export { cantonDeploymentSucceeded, fetchCreatedEvents, findMatchingCreatedEvent, findMatchingCreatedEventFromTx, getExercisedEvent, waitForArchival } from './
|
|
315
|
+
export { cantonDeploymentSucceeded, fetchCreatedEvents, findMatchingCreatedEvent, findMatchingCreatedEventFromTx, getExercisedEvent, waitForArchival } from './3EBJKA4R.js';
|
|
315
316
|
export { buildCantonDeployedContractAddressRef, qualifiedTemplateName, templateIdMatches } from './PXHLNX4K.js';
|
|
316
|
-
export { buildCantonTransaction, cantonAssignedTransactionSchema, cantonCommandSchema, cantonDisclosedContractSchema, cantonMinedTransactionSchema, cantonSignedTransactionSchema, cantonTransactionSchema, cantonTransactionWithResultSchema, unresolvedCantonCommandSchema } from './
|
|
317
|
+
export { buildCantonTransaction, cantonAssignedTransactionSchema, cantonCommandSchema, cantonDisclosedContractSchema, cantonMinedTransactionSchema, cantonSignedTransactionSchema, cantonTransactionSchema, cantonTransactionWithResultSchema, unresolvedCantonCommandSchema } from './SYYLQ25A.js';
|
|
318
|
+
export { cantonActiveContractSelectionSchema, cantonArgumentRefreshTargetSchema, cantonRefreshPathSchema, cantonRefreshPathSegmentSchema, cantonRefreshPlanSchema, cantonRefreshSchema, cantonRefreshTargetSchema } from './TIYP6NEB.js';
|
|
317
319
|
export { areExpectedSignatories, getCreateArgumentField, isSignatoryOrigin, isTrustedOrigin } from './SWY4QT4I.js';
|
|
318
320
|
export { CANTON_DEFERRED_SENDER, CANTON_DEFERRED_VALUE_PREFIX, CANTON_DEFERRED_VALUE_SUFFIX, cantonActiveContractIdRef, cantonActiveContractIdsRef, cantonAmuletContextRef, cantonAmuletRulesCidRef, cantonDeferredSenderSchema, cantonDeferredValueSchema, cantonExpectedSignatoriesSchema, cantonRefreshPartyFilterSchema, cantonSenderPartyRef, encodeCantonDeferredValue, isCantonDeferredSender, isCantonDeferredSentinel, isCantonPlaceholder, parseCantonDeferredValue, parseCantonDeferredValueOrThrow } from './QSQZYJB6.js';
|
|
319
321
|
import './VUOMXK5T.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.69",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Canton VM client and utilities",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@canton-network/core-ledger-proto": "^1.7.0",
|
|
30
30
|
"@daml/types": "3.4.8",
|
|
31
31
|
"@grpc/grpc-js": "^1.12.0",
|
|
32
|
-
"@layerzerolabs/common-chain-model": "1.2.
|
|
33
|
-
"@layerzerolabs/common-encoding-utils": "1.2.
|
|
34
|
-
"@layerzerolabs/common-error-utils": "1.2.
|
|
35
|
-
"@layerzerolabs/typescript-utils": "1.2.
|
|
32
|
+
"@layerzerolabs/common-chain-model": "1.2.69",
|
|
33
|
+
"@layerzerolabs/common-encoding-utils": "1.2.69",
|
|
34
|
+
"@layerzerolabs/common-error-utils": "1.2.69",
|
|
35
|
+
"@layerzerolabs/typescript-utils": "1.2.69",
|
|
36
36
|
"@mojotech/json-type-validation": "^3.1.0",
|
|
37
37
|
"@noble/hashes": "^1.8.0",
|
|
38
38
|
"@noble/secp256k1": "1.7.1",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"zod": "4.3.5"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@layerzerolabs/eslint-configuration": "^1.2.
|
|
47
|
-
"@layerzerolabs/tsup-configuration": "1.2.
|
|
48
|
-
"@layerzerolabs/typescript-configuration": "1.2.
|
|
49
|
-
"@layerzerolabs/vitest-configuration": "1.2.
|
|
50
|
-
"@layerzerolabs/vm-tooling-canton": "1.2.
|
|
46
|
+
"@layerzerolabs/eslint-configuration": "^1.2.69",
|
|
47
|
+
"@layerzerolabs/tsup-configuration": "1.2.69",
|
|
48
|
+
"@layerzerolabs/typescript-configuration": "1.2.69",
|
|
49
|
+
"@layerzerolabs/vitest-configuration": "1.2.69",
|
|
50
|
+
"@layerzerolabs/vm-tooling-canton": "1.2.69",
|
|
51
51
|
"@vitest/coverage-v8": "4.1.10",
|
|
52
52
|
"eslint": "9.39.1",
|
|
53
53
|
"tsup": "^8.4.0",
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
owner: Protocol team
|
|
3
|
+
reviewed: 2026-10-01
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Canton refresh plans
|
|
7
|
+
|
|
8
|
+
A transaction producer or activity can attach a `refreshPlan` to
|
|
9
|
+
`CantonPopulatedTransaction` when command inputs may become stale before signing. Protocol SDKs
|
|
10
|
+
should still build ordinary Canton commands with current values; they should not emit deferred
|
|
11
|
+
sentinels or define refresh policy.
|
|
12
|
+
|
|
13
|
+
At sign time, the common Canton transaction layer:
|
|
14
|
+
|
|
15
|
+
1. clones `unresolvedCommands`;
|
|
16
|
+
2. resolves each refresh against current ledger, wallet, or clock state;
|
|
17
|
+
3. applies replacements only to the declared command targets;
|
|
18
|
+
4. replaces refresh-owned disclosures and deduplicates the result; and
|
|
19
|
+
5. passes the resulting `commands` and `disclosedContracts` to `prepareForSigning`.
|
|
20
|
+
|
|
21
|
+
The persisted unresolved values remain the immutable baseline. Do not combine a `refreshPlan` with
|
|
22
|
+
legacy `CANTON_DEFERRED` sentinels.
|
|
23
|
+
|
|
24
|
+
## Defining a plan
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
const populatedTransaction: CantonPopulatedTransaction = {
|
|
28
|
+
unresolvedCommands: prepared.commands,
|
|
29
|
+
unresolvedDisclosedContracts: prepared.disclosedContracts,
|
|
30
|
+
actAs: prepared.actAs,
|
|
31
|
+
refreshPlan: {
|
|
32
|
+
commands: [
|
|
33
|
+
{
|
|
34
|
+
resolver: {
|
|
35
|
+
type: 'activeContract',
|
|
36
|
+
selector: {
|
|
37
|
+
queryAs: { party: executorParty },
|
|
38
|
+
templateId: '#layerzero-executor:Executor:Executor',
|
|
39
|
+
expectedSignatories: [executorParty],
|
|
40
|
+
},
|
|
41
|
+
selection: { kind: 'exactlyOne' },
|
|
42
|
+
},
|
|
43
|
+
targets: [
|
|
44
|
+
{
|
|
45
|
+
commandIndex: 0,
|
|
46
|
+
command: 'exercise',
|
|
47
|
+
field: 'contractId',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
resolver: {
|
|
53
|
+
type: 'timestamp',
|
|
54
|
+
},
|
|
55
|
+
targets: [
|
|
56
|
+
{
|
|
57
|
+
commandIndex: 0,
|
|
58
|
+
command: 'exercise',
|
|
59
|
+
choice: 'DelegateLzReceive',
|
|
60
|
+
arguments: [{ path: [{ field: 'timestamp' }] }],
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`refreshPlan.commands` contains the instructions that resolve and patch volatile Canton command
|
|
70
|
+
values. Each instruction groups one `resolver` with every command target that consumes its output,
|
|
71
|
+
so external reads and correlated timestamps are shared. Some resolvers also emit the fresh
|
|
72
|
+
disclosures required by their values.
|
|
73
|
+
|
|
74
|
+
`commandIndex` selects an entry in `unresolvedCommands`. `command` validates that the entry has the
|
|
75
|
+
required create or exercise shape. Each target groups its nested `arguments` under one guarded
|
|
76
|
+
command: exercise targets require `choice`, while create targets require `template`.
|
|
77
|
+
An exercise `contractId` target remains a separate variant and does not have a choice guard.
|
|
78
|
+
|
|
79
|
+
Nested paths support:
|
|
80
|
+
|
|
81
|
+
- `{ field: 'name' }` for object fields;
|
|
82
|
+
- `{ index: 0 }` for array entries; and
|
|
83
|
+
- `{ damlMapKey: 'timestamp' }` for entries in Daml maps represented as key-value tuples.
|
|
84
|
+
|
|
85
|
+
Path segments can be mixed and repeated, so nested Daml maps use consecutive `damlMapKey` segments.
|
|
86
|
+
Timestamp `offsetMs` is configured per argument.
|
|
87
|
+
|
|
88
|
+
Only an `activeContract` refresh with `selection.kind: 'exactlyOne'` can target an exercise
|
|
89
|
+
`contractId`. Collection-valued `activeContract` selections and `amuletContext` refreshes target
|
|
90
|
+
choice or create arguments. Timestamp refreshes also require a non-empty nested argument path.
|
|
91
|
+
|
|
92
|
+
## Command resolvers
|
|
93
|
+
|
|
94
|
+
- `activeContract`: queries authenticated active contracts, then selects `exactlyOne`, `all`, or
|
|
95
|
+
enough contracts for a numeric field to be greater than or equal to a requested value:
|
|
96
|
+
`{ kind: 'gte', field: 'amount', value: feeAmount }`.
|
|
97
|
+
- `amuletContext`: refreshes the wallet-provided context, ExternalPartyAmuletRules CID, and
|
|
98
|
+
disclosures.
|
|
99
|
+
- `timestamp`: refreshes one or more Canton Time values from the same current instant; `offsetMs`
|
|
100
|
+
can derive an expiry from that instant. Timestamp refreshes run after all ledger and wallet
|
|
101
|
+
refreshes regardless of declaration order.
|
|
102
|
+
|
|
103
|
+
`gte.field` may be a dotted create-argument path. Its value may be a Daml Decimal string or an
|
|
104
|
+
Amulet-style record containing `initialAmount`.
|
|
105
|
+
|
|
106
|
+
When the persisted baseline contains disclosures owned by a command refresh, list their contract
|
|
107
|
+
IDs under `refreshPlan.disclosures.excludeBaselineCids`. The IDs must be unique and must exist in
|
|
108
|
+
`unresolvedDisclosedContracts`. Those baseline records are excluded before fresh resolver
|
|
109
|
+
disclosures are added; the IDs identify old records, not their replacements.
|
|
110
|
+
|
|
111
|
+
Active-contract queries always request `createdEventBlob`, and conflicting disclosures for the
|
|
112
|
+
same CID fail.
|
|
113
|
+
|
|
114
|
+
Keep `queryAs` (ledger visibility) separate from `expectedSignatories` (authority), and use
|
|
115
|
+
`stateFilter` for semantic payload identity such as an owner. Missing filter paths fail closed.
|
|
116
|
+
|
|
117
|
+
See
|
|
118
|
+
[`createExecuteTransaction()`](../../../../../../migrated/offchain-monorepo/packages/sdks/executor-sdk/src/canton/index.ts)
|
|
119
|
+
for the first complete activity-side example.
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { ContractId } from '@daml/types';
|
|
2
|
-
|
|
3
1
|
import { NonRetryableError } from '@layerzerolabs/common-error-utils';
|
|
4
2
|
|
|
5
3
|
import type { ICantonClient } from '../client/interface';
|
|
@@ -123,7 +121,12 @@ export const queryLiveContractsForRef = async (
|
|
|
123
121
|
ref.templateId,
|
|
124
122
|
);
|
|
125
123
|
const contractStateFilter = resolveContractStateFilter(ref.contractStateFilter, party);
|
|
126
|
-
return (
|
|
124
|
+
return (
|
|
125
|
+
await client.queryActiveContracts(party, offset, {
|
|
126
|
+
templateIds: [ref.templateId],
|
|
127
|
+
includeCreatedEventBlob: true,
|
|
128
|
+
})
|
|
129
|
+
)
|
|
127
130
|
.filter((contract) => matchesContractStateFilter(contract, contractStateFilter))
|
|
128
131
|
.filter(
|
|
129
132
|
(contract) =>
|
|
@@ -201,22 +204,21 @@ export const createContractAddressResolver = (deps: ContractAddressResolverDeps)
|
|
|
201
204
|
const toDisclose = contracts.filter(needsDisclosure);
|
|
202
205
|
if (toDisclose.length === 0) return;
|
|
203
206
|
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
contractId
|
|
210
|
-
[party],
|
|
207
|
+
const disclosures = toDisclose.map((contract) => {
|
|
208
|
+
const contractId = contract.createdEvent.contractId;
|
|
209
|
+
const createdEventBlob = contract.createdEvent.createdEventBlob;
|
|
210
|
+
if (!createdEventBlob) {
|
|
211
|
+
throw new NonRetryableError(
|
|
212
|
+
`Could not disclose ${contractId} (template ${ref.templateId}) — ACS result omitted createdEventBlob`,
|
|
211
213
|
);
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
);
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
contractId,
|
|
217
|
+
templateId: contract.createdEvent.templateId,
|
|
218
|
+
createdEventBlob,
|
|
219
|
+
synchronizerId: contract.synchronizerId,
|
|
220
|
+
};
|
|
221
|
+
});
|
|
220
222
|
appendDisclosures(disclosures);
|
|
221
223
|
};
|
|
222
224
|
|
|
@@ -237,5 +239,11 @@ export const createContractAddressResolver = (deps: ContractAddressResolverDeps)
|
|
|
237
239
|
return contracts.map((contract) => contract.createdEvent.contractId);
|
|
238
240
|
};
|
|
239
241
|
|
|
240
|
-
return {
|
|
242
|
+
return {
|
|
243
|
+
resolveActiveContractId,
|
|
244
|
+
resolveActiveContractIds,
|
|
245
|
+
resolveActiveContracts: queryAsParty,
|
|
246
|
+
discloseActiveContracts: discloseContracts,
|
|
247
|
+
requireSenderParty: requireSender,
|
|
248
|
+
};
|
|
241
249
|
};
|