@agoric/orchestration 0.2.0 → 0.2.1-upgrade-23-dev-bd79330.0.bd79330

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.
Files changed (234) hide show
  1. package/index.js +0 -4
  2. package/package.json +27 -27
  3. package/src/axelar-types.d.ts +2 -0
  4. package/src/axelar-types.d.ts.map +1 -1
  5. package/src/axelar-types.js +2 -0
  6. package/src/cctp-chain-info.js +4 -1
  7. package/src/chain-info.d.ts +21 -6
  8. package/src/chain-info.d.ts.map +1 -1
  9. package/src/chain-info.js +9 -8
  10. package/src/cosmos-api.d.ts +102 -29
  11. package/src/cosmos-api.d.ts.map +1 -1
  12. package/src/cosmos-api.js +585 -0
  13. package/src/{ethereum-api.ts → ethereum-api.js} +1 -1
  14. package/src/examples/auto-stake-it-tap-kit.d.ts +4 -3
  15. package/src/examples/auto-stake-it-tap-kit.d.ts.map +1 -1
  16. package/src/examples/auto-stake-it-tap-kit.js +3 -4
  17. package/src/examples/auto-stake-it.contract.d.ts +6 -4
  18. package/src/examples/auto-stake-it.contract.d.ts.map +1 -1
  19. package/src/examples/auto-stake-it.contract.js +3 -1
  20. package/src/examples/auto-stake-it.flows.d.ts +2 -1
  21. package/src/examples/auto-stake-it.flows.d.ts.map +1 -1
  22. package/src/examples/auto-stake-it.flows.js +1 -0
  23. package/src/examples/axelar-gmp-account-kit.d.ts +6 -4
  24. package/src/examples/axelar-gmp-account-kit.d.ts.map +1 -1
  25. package/src/examples/axelar-gmp-account-kit.js +4 -2
  26. package/src/examples/axelar-gmp.contract.d.ts +8 -8
  27. package/src/examples/axelar-gmp.contract.d.ts.map +1 -1
  28. package/src/examples/axelar-gmp.contract.js +2 -2
  29. package/src/examples/axelar-gmp.flows.d.ts +1 -1
  30. package/src/examples/basic-flows.contract.d.ts +7 -5
  31. package/src/examples/basic-flows.contract.d.ts.map +1 -1
  32. package/src/examples/basic-flows.contract.js +3 -1
  33. package/src/examples/basic-flows.flows.d.ts +2 -1
  34. package/src/examples/basic-flows.flows.d.ts.map +1 -1
  35. package/src/examples/basic-flows.flows.js +1 -0
  36. package/src/examples/send-anywhere.contract.d.ts +12 -6
  37. package/src/examples/send-anywhere.contract.d.ts.map +1 -1
  38. package/src/examples/send-anywhere.contract.js +4 -1
  39. package/src/examples/send-anywhere.flows.d.ts +3 -2
  40. package/src/examples/send-anywhere.flows.d.ts.map +1 -1
  41. package/src/examples/send-anywhere.flows.js +3 -6
  42. package/src/examples/stake-bld.contract.d.ts +206 -25
  43. package/src/examples/stake-bld.contract.d.ts.map +1 -1
  44. package/src/examples/stake-bld.contract.js +19 -4
  45. package/src/examples/stake-ica.contract.d.ts +434 -71
  46. package/src/examples/stake-ica.contract.d.ts.map +1 -1
  47. package/src/examples/stake-ica.contract.js +28 -6
  48. package/src/examples/staking-combinations.contract.d.ts +4 -2
  49. package/src/examples/staking-combinations.contract.d.ts.map +1 -1
  50. package/src/examples/staking-combinations.contract.js +5 -3
  51. package/src/examples/staking-combinations.flows.d.ts +3 -2
  52. package/src/examples/staking-combinations.flows.d.ts.map +1 -1
  53. package/src/examples/staking-combinations.flows.js +7 -6
  54. package/src/examples/swap-anything.contract.d.ts +14 -7
  55. package/src/examples/swap-anything.contract.d.ts.map +1 -1
  56. package/src/examples/swap-anything.contract.js +12 -8
  57. package/src/examples/swap.contract.d.ts +18 -6
  58. package/src/examples/swap.contract.d.ts.map +1 -1
  59. package/src/examples/swap.contract.js +9 -3
  60. package/src/examples/swap.flows.d.ts +2 -0
  61. package/src/examples/swap.flows.d.ts.map +1 -1
  62. package/src/examples/swap.flows.js +2 -0
  63. package/src/examples/unbond.contract.d.ts +7 -4
  64. package/src/examples/unbond.contract.d.ts.map +1 -1
  65. package/src/examples/unbond.contract.js +6 -3
  66. package/src/exos/chain-hub-admin.d.ts +1 -19
  67. package/src/exos/chain-hub-admin.d.ts.map +1 -1
  68. package/src/exos/chain-hub-admin.js +1 -1
  69. package/src/exos/chain-hub.d.ts +4 -2
  70. package/src/exos/chain-hub.d.ts.map +1 -1
  71. package/src/exos/chain-hub.js +2 -1
  72. package/src/exos/combine-invitation-makers.d.ts +2 -1
  73. package/src/exos/combine-invitation-makers.d.ts.map +1 -1
  74. package/src/exos/combine-invitation-makers.js +2 -1
  75. package/src/exos/cosmos-orchestration-account.d.ts +615 -98
  76. package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
  77. package/src/exos/cosmos-orchestration-account.js +695 -306
  78. package/src/exos/exo-interfaces.js +35 -0
  79. package/src/exos/ibc-packet.d.ts +11 -9
  80. package/src/exos/ibc-packet.d.ts.map +1 -1
  81. package/src/exos/ibc-packet.js +33 -8
  82. package/src/exos/ica-account-kit.d.ts +4 -9
  83. package/src/exos/ica-account-kit.d.ts.map +1 -1
  84. package/src/exos/ica-account-kit.js +10 -7
  85. package/src/exos/icq-connection-kit.d.ts +1 -1
  86. package/src/exos/local-chain-facade.d.ts +1542 -5
  87. package/src/exos/local-chain-facade.d.ts.map +1 -1
  88. package/src/exos/local-chain-facade.js +4 -2
  89. package/src/exos/local-orchestration-account.d.ts +201 -56
  90. package/src/exos/local-orchestration-account.d.ts.map +1 -1
  91. package/src/exos/local-orchestration-account.js +260 -51
  92. package/src/exos/orchestrator.d.ts +35813 -73
  93. package/src/exos/orchestrator.d.ts.map +1 -1
  94. package/src/exos/orchestrator.js +7 -10
  95. package/src/exos/packet-tools.d.ts +19 -8
  96. package/src/exos/packet-tools.d.ts.map +1 -1
  97. package/src/exos/packet-tools.js +92 -9
  98. package/src/exos/portfolio-holder-kit.d.ts +90 -2
  99. package/src/exos/portfolio-holder-kit.d.ts.map +1 -1
  100. package/src/exos/remote-chain-facade.d.ts +1499 -1
  101. package/src/exos/remote-chain-facade.d.ts.map +1 -1
  102. package/src/exos/remote-chain-facade.js +8 -3
  103. package/src/facade.d.ts +1 -0
  104. package/src/facade.d.ts.map +1 -1
  105. package/src/facade.js +4 -6
  106. package/src/fixtures/query-flows.contract.d.ts +8 -6
  107. package/src/fixtures/query-flows.contract.d.ts.map +1 -1
  108. package/src/fixtures/query-flows.contract.js +3 -1
  109. package/src/fixtures/query-flows.flows.d.ts +1 -0
  110. package/src/fixtures/query-flows.flows.d.ts.map +1 -1
  111. package/src/fixtures/query-flows.flows.js +1 -0
  112. package/src/orchestration-api.d.ts +46 -16
  113. package/src/orchestration-api.d.ts.map +1 -1
  114. package/src/orchestration-api.js +410 -0
  115. package/src/proposals/init-chain-info.js +10 -2
  116. package/src/proposals/orchestration-proposal.js +3 -0
  117. package/src/proposals/revise-chain-info.js +4 -1
  118. package/src/proposals/start-auto-stake-it.js +1 -0
  119. package/src/proposals/start-axelar-gmp.js +2 -2
  120. package/src/proposals/start-basic-flows.js +5 -0
  121. package/src/proposals/start-send-anywhere.js +4 -2
  122. package/src/proposals/start-stakeAtom.js +5 -4
  123. package/src/proposals/start-stakeBld.js +8 -6
  124. package/src/proposals/start-stakeOsmo.js +5 -4
  125. package/src/proposals/start-swap-anything.js +4 -2
  126. package/src/stubs/{viem-abi.d.ts → viem-typedData.js} +10 -4
  127. package/src/typeGuards.d.ts +38 -5
  128. package/src/typeGuards.d.ts.map +1 -1
  129. package/src/typeGuards.js +92 -22
  130. package/src/types.d.ts +1 -0
  131. package/src/types.d.ts.map +1 -1
  132. package/src/types.js +27 -0
  133. package/src/utils/abitype.d.ts +6 -0
  134. package/src/utils/abitype.d.ts.map +1 -0
  135. package/src/utils/abitype.js +13 -0
  136. package/src/utils/address.d.ts +3 -1
  137. package/src/utils/address.d.ts.map +1 -1
  138. package/src/utils/address.js +24 -2
  139. package/src/utils/agd-lib.d.ts +1 -51
  140. package/src/utils/agd-lib.d.ts.map +1 -1
  141. package/src/utils/agd-lib.js +1 -1
  142. package/src/utils/amounts.d.ts +1 -0
  143. package/src/utils/amounts.d.ts.map +1 -1
  144. package/src/utils/amounts.js +1 -0
  145. package/src/utils/asset.d.ts +1 -0
  146. package/src/utils/asset.d.ts.map +1 -1
  147. package/src/utils/asset.js +1 -0
  148. package/src/utils/chain-hub-helper.d.ts +1 -0
  149. package/src/utils/chain-hub-helper.d.ts.map +1 -1
  150. package/src/utils/chain-hub-helper.js +1 -0
  151. package/src/utils/codecs.d.ts +145 -0
  152. package/src/utils/codecs.d.ts.map +1 -0
  153. package/src/utils/codecs.js +206 -0
  154. package/src/utils/cosmos.d.ts +5 -4
  155. package/src/utils/cosmos.d.ts.map +1 -1
  156. package/src/utils/cosmos.js +29 -9
  157. package/src/utils/exo-helpers.d.ts +156 -0
  158. package/src/utils/exo-helpers.d.ts.map +1 -0
  159. package/src/utils/exo-helpers.js +241 -0
  160. package/src/utils/gmp.d.ts +2 -2
  161. package/src/utils/gmp.d.ts.map +1 -1
  162. package/src/utils/gmp.js +31 -15
  163. package/src/utils/orchestrationAccount.d.ts +79 -0
  164. package/src/utils/orchestrationAccount.d.ts.map +1 -1
  165. package/src/utils/orchestrationAccount.js +210 -6
  166. package/src/utils/packet.d.ts.map +1 -1
  167. package/src/utils/packet.js +5 -0
  168. package/src/utils/permit2/signatureTransfer.d.ts +221 -0
  169. package/src/utils/permit2/signatureTransfer.d.ts.map +1 -0
  170. package/src/utils/permit2/signatureTransfer.js +265 -0
  171. package/src/utils/permit2/signatureTransferHelpers.d.ts +334 -0
  172. package/src/utils/permit2/signatureTransferHelpers.d.ts.map +1 -0
  173. package/src/utils/permit2/signatureTransferHelpers.js +270 -0
  174. package/src/utils/permit2.d.ts +11 -0
  175. package/src/utils/permit2.d.ts.map +1 -0
  176. package/src/utils/permit2.js +11 -0
  177. package/src/utils/progress.d.ts +41 -0
  178. package/src/utils/progress.d.ts.map +1 -0
  179. package/src/utils/progress.js +180 -0
  180. package/src/utils/start-helper.d.ts +28 -10
  181. package/src/utils/start-helper.d.ts.map +1 -1
  182. package/src/utils/start-helper.js +30 -7
  183. package/src/utils/time.d.ts +2 -2
  184. package/src/utils/time.d.ts.map +1 -1
  185. package/src/utils/time.js +1 -1
  186. package/src/utils/viem-utils/hashTypedData.d.ts +21 -0
  187. package/src/utils/viem-utils/hashTypedData.d.ts.map +1 -0
  188. package/src/utils/viem-utils/hashTypedData.js +61 -0
  189. package/src/utils/viem-utils/types.d.ts +6 -0
  190. package/src/utils/viem-utils/types.d.ts.map +1 -0
  191. package/src/utils/viem-utils/types.js +18 -0
  192. package/src/utils/viem.d.ts +11 -0
  193. package/src/utils/viem.d.ts.map +1 -0
  194. package/src/utils/viem.js +11 -0
  195. package/src/utils/zcf-tools.d.ts +15 -1
  196. package/src/utils/zcf-tools.d.ts.map +1 -1
  197. package/src/utils/zcf-tools.js +19 -3
  198. package/src/utils/zoe-tools.d.ts +5 -2
  199. package/src/utils/zoe-tools.d.ts.map +1 -1
  200. package/src/utils/zoe-tools.js +8 -2
  201. package/src/vat-orchestration.d.ts +5 -3
  202. package/src/vat-orchestration.d.ts.map +1 -1
  203. package/src/vat-orchestration.js +4 -3
  204. package/src/vendor/viem/{_esm-YOAV66U4.js → _esm-OKAICHVC.js} +2 -2
  205. package/src/vendor/viem/{ccip-AAQDZF3N.js → ccip-34BSSMV5.js} +1 -2
  206. package/src/vendor/viem/{chunk-4EF4K2MH.js → chunk-GCI53Z2G.js} +35 -1
  207. package/src/vendor/viem/chunk-ZKSIP2AM.js +326 -0
  208. package/src/vendor/viem/viem-abi.js +2 -2
  209. package/src/vendor/viem/viem-typedData.d.ts +19 -0
  210. package/src/vendor/viem/viem-typedData.js +59 -0
  211. package/tools/contract-tests.d.ts +34 -19
  212. package/tools/contract-tests.d.ts.map +1 -1
  213. package/tools/contract-tests.ts +15 -3
  214. package/tools/ibc-mock-fixtures.d.ts +49 -0
  215. package/tools/ibc-mock-fixtures.d.ts.map +1 -0
  216. package/tools/ibc-mock-fixtures.ts +161 -0
  217. package/tools/ibc-mocks.d.ts +2 -3
  218. package/tools/ibc-mocks.d.ts.map +1 -1
  219. package/tools/ibc-mocks.ts +2 -1
  220. package/tools/make-test-address.d.ts +1 -1
  221. package/tools/make-test-address.d.ts.map +1 -1
  222. package/tools/make-test-address.js +1 -2
  223. package/tools/network-fakes.d.ts +142 -0
  224. package/tools/network-fakes.d.ts.map +1 -0
  225. package/tools/network-fakes.ts +388 -0
  226. package/tsup.config.ts +3 -1
  227. package/src/cosmos-api.ts +0 -469
  228. package/src/exos/exo-interfaces.ts +0 -35
  229. package/src/orchestration-api.ts +0 -365
  230. package/src/stubs/viem-abi.d.ts.map +0 -1
  231. package/src/types.ts +0 -26
  232. package/src/vendor/viem/chunk-XN4LUOIH.js +0 -253
  233. package/src/vendor/viem/secp256k1-WHBDSQB2.js +0 -1914
  234. /package/src/stubs/{viem-abi.ts → viem-abi.js} +0 -0
@@ -0,0 +1,410 @@
1
+ /**
2
+ * @file General API of orchestration
3
+ * - must not have chain-specific types without runtime narrowing by chain id
4
+ * - should remain relatively stable.
5
+ */
6
+
7
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- fails to notice the @see uses
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+ /**
39
+ * Options relevant to all queries (non-mutating).
40
+ */
41
+
42
+
43
+
44
+
45
+ /**
46
+ * Options relevant to all actions (mutating).
47
+ */
48
+
49
+
50
+
51
+
52
+ /**
53
+ * A denom that designates a path to a token type on some blockchain.
54
+ *
55
+ * Multiple denoms may designate the same underlying base denom (e.g., `uist`,
56
+ * `uatom`) on different Chains or on the same Chain via different paths. On
57
+ * Cosmos chains, all but the base denom are IBC style denoms, but that may vary
58
+ * across other chains. All the denoms that designate the same underlying base
59
+ * denom form an equivalence class, along with the unique Brand on the local
60
+ * Chain. Some operations accept any member of the equivalence class to
61
+ * effectively designate the corresponding token type on the target chain.
62
+ */
63
+ // ibc/... or uist
64
+
65
+ // ??? when multiple Denoms provide paths to the same remote token type,
66
+ // should the brand be 1:1 with that equivalence class or each Denom?
67
+ /**
68
+ * In many cases, either a denom string or a local Brand can be used to
69
+ * designate a remote token type.
70
+ */
71
+
72
+
73
+ /**
74
+ * Count of some fungible token on some blockchain.
75
+ *
76
+ * @see {@link Orchestrator.asAmount} to convert to an Amount surjectively
77
+ */
78
+
79
+
80
+
81
+
82
+
83
+ /** Amounts can be provided as pure data using denoms or as ERTP Amounts */
84
+
85
+
86
+ /**
87
+ * Per `chain_id` in CAIP-2. In that spec all chain IDs are scoped
88
+ * (namespace:reference) but in the Cosmos ecosystem the namespace is implied
89
+ * and they use `chain_id`/`chainId` for what CAIP-2 calls the `reference`. We
90
+ * qualify the term here to avoid confusion.
91
+ *
92
+ * @see {@link https://standards.chainagnostic.org/CAIPs/caip-2}
93
+ */
94
+
95
+
96
+ /**
97
+ * à la CAIP-10
98
+ *
99
+ * account_id: chain_id + ":" + account_address
100
+ * chain_id: [-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32} (See [CAIP-2][])
101
+ * account_address: [-.%a-zA-Z0-9]{1,128}
102
+ *
103
+ * @see {@link https://standards.chainagnostic.org/CAIPs/caip-10}
104
+ */
105
+
106
+
107
+ /**
108
+ * Rough approximation for `/0x([0-9a-fA-F]{2})+/`
109
+ */
110
+
111
+
112
+ /**
113
+ * Specific to Cosmos chains
114
+ * @see {AccountId} for universal account identifier
115
+ */
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ /**
125
+ * Info used to identify blockchains across ecosystems
126
+ * @see {@link https://standards.chainagnostic.org/CAIPs/caip-2}
127
+ */
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ /**
141
+ * Shape that `ChainHub` is expecting
142
+ */
143
+
144
+
145
+
146
+ /**
147
+ * A value that can be converted mechanically to an AccountId.
148
+ * @see {@link ChainHub.resolveAccountId}
149
+ */
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ /**
159
+ * Object that controls an account on a particular chain.
160
+ *
161
+ * The methods available depend on the chain and its capabilities.
162
+ */
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+ /**
174
+ * An object for access the core functions of a remote chain.
175
+ *
176
+ * Note that "remote" can mean the local chain; it's just that
177
+ * accounts are treated as remote/arms length for consistency.
178
+ */
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+ /**
207
+ * Used with `orch.getDenomInfo('ibc/1234')`. See {@link Orchestrator.getDenomInfo}
208
+ */
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+ /**
224
+ * Provided in the callback to `orchestrate()`.
225
+ */
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ /**
262
+ * An object that supports high-level operations for an account on a remote chain.
263
+ */
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+ /**
358
+ * Flows to orchestrate are regular Javascript functions but have some
359
+ * constraints to fulfill the requirements of resumability after termination of
360
+ * the enclosing vat. Some requirements for each orchestration flow:
361
+ * - must not close over any values that could change between invocations
362
+ * - must satisfy the `OrchestrationFlow` interface
363
+ * - must be hardened
364
+ * - must not use `E()` (eventual send)
365
+ *
366
+ * The call to `orchestrate` using a flow function in reincarnations of the vat
367
+ * must have the same `durableName` as before. To help enforce these
368
+ * constraints, we recommend:
369
+ *
370
+ * - keeping flows in a `.flows.js` module
371
+ * - importing them all with `import * as flows` to get a single object keyed by
372
+ * the export name
373
+ * - using `orchestrateAll` to treat each export name as the `durableName` of
374
+ * the flow
375
+ * - adopting `@agoric/eslint-config` that has rules to help detect problems
376
+ */
377
+
378
+
379
+
380
+
381
+ /**
382
+ * Internal structure for TransferMsgs.
383
+ * The type must be able to express transfers across different chains and transports.
384
+ *
385
+ * NOTE Expected to change, so consider an opaque structure.
386
+ * @internal
387
+ */
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+ /** @alpha */
396
+
397
+
398
+
399
+
400
+ /** @alpha */
401
+
402
+
403
+
404
+
405
+ /** @alpha */
406
+
407
+
408
+
409
+
410
+
@@ -5,6 +5,14 @@ import { makeTracer } from '@agoric/internal';
5
5
  import { registerKnownChains } from '../chain-info.js';
6
6
  import { HubName } from '../exos/chain-hub.js';
7
7
 
8
+ /**
9
+ * @import {NameHubKit} from '@agoric/vats';
10
+ * @import {Remote} from '@agoric/internal';
11
+ * @import {ERef} from '@agoric/vow';
12
+ * @import {StorageNode} from '@agoric/internal/src/lib-chainStorage.js';
13
+ * @import {BootstrapPowers} from '@agoric/vats/src/core/types.js';
14
+ */
15
+
8
16
  const trace = makeTracer('InitChainInfo', true);
9
17
 
10
18
  /**
@@ -13,8 +21,8 @@ const trace = makeTracer('InitChainInfo', true);
13
21
  */
14
22
 
15
23
  /**
16
- * @param {ERef<import('@agoric/vats').NameHubKit['nameAdmin']>} agoricNamesAdmin
17
- * @param {ERef<StorageNode | null>} chainStorageP
24
+ * @param {ERef<NameHubKit['nameAdmin']>} agoricNamesAdmin
25
+ * @param {ERef<Remote<StorageNode> | null>} chainStorageP
18
26
  */
19
27
  const publishChainInfoToChainStorage = async (
20
28
  agoricNamesAdmin,
@@ -5,6 +5,9 @@ const trace = makeTracer('CoreEvalOrchestration', true);
5
5
 
6
6
  /**
7
7
  * @import {PortAllocator} from '@agoric/network';
8
+ * @import {BootstrapPowers} from '@agoric/vats/src/core/types.js';
9
+ * @import {Producer} from '@agoric/vats/src/core/types.js';
10
+ * @import {VatSourceRef} from '@agoric/vats/src/core/types.js';
8
11
  */
9
12
 
10
13
  /**
@@ -3,7 +3,10 @@ import { registerChain } from '../chain-info.js';
3
3
 
4
4
  const trace = makeTracer('ReviseChainInfo', true);
5
5
 
6
- /** @import {CosmosChainInfo} from '../types.js'; */
6
+ /**
7
+ * @import {CosmosChainInfo} from '../types.js';
8
+ * @import {BootstrapPowers} from '@agoric/vats/src/core/types.js';
9
+ */
7
10
 
8
11
  /**
9
12
  * This will add news values AND overwrite any existing values. Voters on a
@@ -12,6 +12,7 @@ import { deeplyFulfilled } from '@endo/marshal';
12
12
  /**
13
13
  * @import {AutoStakeItSF} from '@agoric/orchestration/src/examples/auto-stake-it.contract.js';
14
14
  * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
15
+ * @import {BootstrapPowers, StartUpgradableOpts} from '@agoric/vats/src/core/types.js';
15
16
  */
16
17
 
17
18
  const contractName = 'autoAutoStakeIt';
@@ -1,5 +1,3 @@
1
- /// <reference types="@agoric/vats/src/core/types-ambient"/>
2
-
3
1
  import {
4
2
  deeplyFulfilledObject,
5
3
  makeTracer,
@@ -12,6 +10,8 @@ import { E } from '@endo/far';
12
10
  * @import {Installation, Instance} from '@agoric/zoe/src/zoeService/utils.js';
13
11
  * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
14
12
  * @import {start as StartFn} from '@agoric/orchestration/src/examples/axelar-gmp.contract.js';
13
+ * @import {BootstrapPowers} from '@agoric/vats/src/core/types.js';
14
+ * @import {Producer} from '@agoric/vats/src/core/types.js';
15
15
  */
16
16
 
17
17
  const trace = makeTracer('start axelarGmp', true);
@@ -8,6 +8,11 @@ import { E } from '@endo/far';
8
8
  /**
9
9
  * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
10
10
  * @import {BasicFlowsSF} from '../examples/basic-flows.contract.js';
11
+ * @import {Installation} from '@agoric/zoe';
12
+ * @import {Instance} from '@agoric/zoe';
13
+ * @import {Issuer} from '@agoric/ertp';
14
+ * @import {BootstrapPowers, StartUpgradableOpts} from '@agoric/vats/src/core/types.js';
15
+ * @import {Producer} from '@agoric/vats/src/core/types.js';
11
16
  */
12
17
 
13
18
  const trace = makeTracer('StartBasicFlows', true);
@@ -5,12 +5,14 @@ import {
5
5
  } from '@agoric/internal';
6
6
  import { E } from '@endo/far';
7
7
 
8
- /// <reference types="@agoric/vats/src/core/types-ambient"/>
9
-
10
8
  /**
11
9
  * @import {Installation} from '@agoric/zoe/src/zoeService/utils.js';
12
10
  * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
13
11
  * @import {start as StartFn} from '@agoric/orchestration/src/examples/send-anywhere.contract.js';
12
+ * @import {Instance} from '@agoric/zoe';
13
+ * @import {Issuer} from '@agoric/ertp';
14
+ * @import {BootstrapPowers} from '@agoric/vats/src/core/types.js';
15
+ * @import {Producer} from '@agoric/vats/src/core/types.js';
14
16
  */
15
17
 
16
18
  const trace = makeTracer('StartSA', true);
@@ -9,7 +9,10 @@ import { registerChainsAndAssets } from '../utils/chain-hub-helper.js';
9
9
  /**
10
10
  * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
11
11
  * @import {IBCConnectionID} from '@agoric/vats';
12
- * @import {StakeIcaSF, StakeIcaTerms} from '../examples/stake-ica.contract';
12
+ * @import {StakeIcaSF, StakeIcaTerms} from '../examples/stake-ica.contract.js';
13
+ * @import {start} from '../examples/stake-ica.contract.js';
14
+ * @import {Installation} from '@agoric/zoe';
15
+ * @import {BootstrapPowers, StartUpgradableOpts} from '@agoric/vats/src/core/types.js';
13
16
  */
14
17
 
15
18
  const trace = makeTracer('StartStakeAtom', true);
@@ -18,9 +21,7 @@ const trace = makeTracer('StartStakeAtom', true);
18
21
  * @param {BootstrapPowers & {
19
22
  * installation: {
20
23
  * consume: {
21
- * stakeIca: Installation<
22
- * import('../examples/stake-ica.contract.js').start
23
- * >;
24
+ * stakeIca: Installation<typeof start>;
24
25
  * };
25
26
  * };
26
27
  * }} powers
@@ -3,15 +3,19 @@ import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';
3
3
  import { Stake } from '@agoric/internal/src/tokens.js';
4
4
  import { E } from '@endo/far';
5
5
 
6
+ /**
7
+ * @import {start} from '../../src/examples/stake-bld.contract.js';
8
+ * @import {Installation} from '@agoric/zoe';
9
+ * @import {BootstrapPowers, StartUpgradableOpts} from '@agoric/vats/src/core/types.js';
10
+ */
11
+
6
12
  const trace = makeTracer('StartStakeBld', true);
7
13
 
8
14
  /**
9
15
  * @param {BootstrapPowers & {
10
16
  * installation: {
11
17
  * consume: {
12
- * stakeBld: Installation<
13
- * import('../../src/examples/stake-bld.contract.js').start
14
- * >;
18
+ * stakeBld: Installation<typeof start>;
15
19
  * };
16
20
  * };
17
21
  * }} powers
@@ -49,9 +53,7 @@ export const startStakeBld = async ({
49
53
  ]);
50
54
 
51
55
  /**
52
- * @type {StartUpgradableOpts<
53
- * import('../../src/examples/stake-bld.contract.js').start
54
- * >}
56
+ * @type {StartUpgradableOpts<typeof start>}
55
57
  */
56
58
  const startOpts = {
57
59
  label: 'stakeBld',
@@ -9,7 +9,10 @@ import { registerChainsAndAssets } from '../utils/chain-hub-helper.js';
9
9
  /**
10
10
  * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
11
11
  * @import {IBCConnectionID} from '@agoric/vats';
12
- * @import {StakeIcaSF} from '../examples/stake-ica.contract';
12
+ * @import {StakeIcaSF} from '../examples/stake-ica.contract.js';
13
+ * @import {start} from '../examples/stake-ica.contract.js';
14
+ * @import {Installation} from '@agoric/zoe';
15
+ * @import {BootstrapPowers, StartUpgradableOpts} from '@agoric/vats/src/core/types.js';
13
16
  */
14
17
 
15
18
  const trace = makeTracer('StartStakeOsmo', true);
@@ -18,9 +21,7 @@ const trace = makeTracer('StartStakeOsmo', true);
18
21
  * @param {BootstrapPowers & {
19
22
  * installation: {
20
23
  * consume: {
21
- * stakeIca: Installation<
22
- * import('../examples/stake-ica.contract.js').start
23
- * >;
24
+ * stakeIca: Installation<typeof start>;
24
25
  * };
25
26
  * };
26
27
  * instance: {
@@ -5,12 +5,14 @@ import {
5
5
  } from '@agoric/internal';
6
6
  import { E } from '@endo/far';
7
7
 
8
- /// <reference types="@agoric/vats/src/core/types-ambient"/>
9
-
10
8
  /**
11
9
  * @import {Installation} from '@agoric/zoe/src/zoeService/utils.js';
12
10
  * @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
13
11
  * @import {start as StartFn} from '@agoric/orchestration/src/examples/swap-anything.contract.js';
12
+ * @import {Instance} from '@agoric/zoe';
13
+ * @import {Issuer} from '@agoric/ertp';
14
+ * @import {BootstrapPowers} from '@agoric/vats/src/core/types.js';
15
+ * @import {Producer} from '@agoric/vats/src/core/types.js';
14
16
  */
15
17
 
16
18
  const trace = makeTracer('StartSA', true);
@@ -6,7 +6,13 @@
6
6
  * So we use tsup to do dead code elimination, aka tree-shaking,
7
7
  * while preserving type info.
8
8
  */
9
- export { encodeFunctionData } from 'viem/utils';
10
- export { decodeAbiParameters } from 'viem/utils';
11
- export { encodeAbiParameters } from 'viem/utils';
12
- //# sourceMappingURL=viem-abi.d.ts.map
9
+ export {
10
+ isHex,
11
+ hashStruct,
12
+ hashTypedData,
13
+ recoverTypedDataAddress,
14
+ verifyTypedData,
15
+ serializeTypedData,
16
+ validateTypedData,
17
+ } from 'viem/utils';
18
+ export { encodeType } from '../utils/viem-utils/hashTypedData.js';