@agoric/orchestration 0.2.0-upgrade-18a-dev-2899fb9.0 → 0.2.0-upgrade-19-dev-0754752.0

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 (93) hide show
  1. package/package.json +26 -25
  2. package/src/chain-capabilities.d.ts +2 -0
  3. package/src/chain-capabilities.d.ts.map +1 -1
  4. package/src/chain-capabilities.js +22 -0
  5. package/src/chain-info.d.ts +7278 -673
  6. package/src/chain-info.d.ts.map +1 -1
  7. package/src/cosmos-api.d.ts +7 -6
  8. package/src/cosmos-api.d.ts.map +1 -1
  9. package/src/cosmos-api.ts +7 -10
  10. package/src/examples/auto-stake-it.contract.d.ts +2 -0
  11. package/src/examples/auto-stake-it.contract.d.ts.map +1 -1
  12. package/src/examples/auto-stake-it.contract.js +1 -1
  13. package/src/examples/basic-flows.contract.d.ts +1 -0
  14. package/src/examples/basic-flows.contract.d.ts.map +1 -1
  15. package/src/examples/basic-flows.contract.js +1 -1
  16. package/src/examples/send-anywhere.contract.d.ts +13 -8
  17. package/src/examples/send-anywhere.contract.d.ts.map +1 -1
  18. package/src/examples/send-anywhere.contract.js +5 -4
  19. package/src/examples/stake-bld.contract.d.ts +1 -1
  20. package/src/examples/stake-ica.contract.d.ts +1 -1
  21. package/src/examples/staking-combinations.contract.d.ts +1 -0
  22. package/src/examples/staking-combinations.contract.d.ts.map +1 -1
  23. package/src/examples/staking-combinations.contract.js +1 -1
  24. package/src/examples/swap.contract.d.ts +1 -0
  25. package/src/examples/swap.contract.d.ts.map +1 -1
  26. package/src/examples/swap.contract.js +1 -1
  27. package/src/examples/unbond.contract.d.ts.map +1 -1
  28. package/src/examples/unbond.contract.js +1 -1
  29. package/src/exos/chain-hub.d.ts +1 -0
  30. package/src/exos/chain-hub.d.ts.map +1 -1
  31. package/src/exos/chain-hub.js +19 -13
  32. package/src/exos/cosmos-orchestration-account.d.ts +15 -11
  33. package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
  34. package/src/exos/cosmos-orchestration-account.js +18 -13
  35. package/src/exos/ibc-packet.d.ts +34 -3
  36. package/src/exos/ibc-packet.d.ts.map +1 -1
  37. package/src/exos/local-chain-facade.d.ts +3 -1
  38. package/src/exos/local-chain-facade.d.ts.map +1 -1
  39. package/src/exos/local-chain-facade.js +9 -7
  40. package/src/exos/local-orchestration-account.d.ts +3 -3
  41. package/src/exos/local-orchestration-account.d.ts.map +1 -1
  42. package/src/exos/local-orchestration-account.js +11 -5
  43. package/src/exos/orchestrator.d.ts +6 -5
  44. package/src/exos/orchestrator.d.ts.map +1 -1
  45. package/src/exos/portfolio-holder-kit.d.ts +1 -1
  46. package/src/exos/remote-chain-facade.d.ts +3 -2
  47. package/src/exos/remote-chain-facade.d.ts.map +1 -1
  48. package/src/exos/remote-chain-facade.js +12 -8
  49. package/src/facade.d.ts +1 -4
  50. package/src/facade.d.ts.map +1 -1
  51. package/src/facade.js +2 -9
  52. package/src/fetched-chain-info.d.ts +7475 -735
  53. package/src/fetched-chain-info.js +7349 -690
  54. package/src/fixtures/query-flows.contract.d.ts.map +1 -1
  55. package/src/fixtures/query-flows.contract.js +1 -1
  56. package/src/orchestration-api.d.ts +3 -3
  57. package/src/orchestration-api.d.ts.map +1 -1
  58. package/src/orchestration-api.ts +3 -3
  59. package/src/utils/registry.d.ts +1 -0
  60. package/src/utils/registry.d.ts.map +1 -1
  61. package/src/utils/start-helper.d.ts +10 -2
  62. package/src/utils/start-helper.d.ts.map +1 -1
  63. package/src/utils/start-helper.js +15 -6
  64. package/src/utils/time.d.ts +3 -1
  65. package/src/utils/time.d.ts.map +1 -1
  66. package/src/utils/time.js +2 -1
  67. package/tools/ibc-mocks.d.ts +116 -0
  68. package/tools/ibc-mocks.d.ts.map +1 -0
  69. package/tools/ibc-mocks.ts +262 -0
  70. package/tools/make-test-address.d.ts +2 -0
  71. package/tools/make-test-address.d.ts.map +1 -0
  72. package/tools/make-test-address.js +21 -0
  73. package/tools/protobuf-decoder.d.ts +19 -0
  74. package/tools/protobuf-decoder.d.ts.map +1 -0
  75. package/tools/protobuf-decoder.js +153 -0
  76. package/src/proposals/init-chain-info.d.ts +0 -12
  77. package/src/proposals/init-chain-info.d.ts.map +0 -1
  78. package/src/proposals/orchestration-proposal.d.ts +0 -33
  79. package/src/proposals/orchestration-proposal.d.ts.map +0 -1
  80. package/src/proposals/revise-chain-info.d.ts +0 -21
  81. package/src/proposals/revise-chain-info.d.ts.map +0 -1
  82. package/src/proposals/start-auto-stake-it.d.ts +0 -52
  83. package/src/proposals/start-auto-stake-it.d.ts.map +0 -1
  84. package/src/proposals/start-basic-flows.d.ts +0 -73
  85. package/src/proposals/start-basic-flows.d.ts.map +0 -1
  86. package/src/proposals/start-send-anywhere.d.ts +0 -105
  87. package/src/proposals/start-send-anywhere.d.ts.map +0 -1
  88. package/src/proposals/start-stakeAtom.d.ts +0 -142
  89. package/src/proposals/start-stakeAtom.d.ts.map +0 -1
  90. package/src/proposals/start-stakeBld.d.ts +0 -82
  91. package/src/proposals/start-stakeBld.d.ts.map +0 -1
  92. package/src/proposals/start-stakeOsmo.d.ts +0 -146
  93. package/src/proposals/start-stakeOsmo.d.ts.map +0 -1
@@ -87,20 +87,20 @@ const trace = makeTracer('CosmosOrchAccount');
87
87
  const { Vow$ } = NetworkShape; // TODO #9611
88
88
 
89
89
  /**
90
- * @typedef {object} ComosOrchestrationAccountNotification
90
+ * @typedef {object} CosmosOrchestrationAccountNotification
91
91
  * @property {ChainAddress} chainAddress
92
92
  */
93
93
 
94
94
  /**
95
95
  * @private
96
96
  * @typedef {{
97
- * topicKit: RecorderKit<ComosOrchestrationAccountNotification>;
98
97
  * account: IcaAccount;
99
98
  * chainAddress: ChainAddress;
99
+ * icqConnection: ICQConnection | undefined;
100
100
  * localAddress: LocalIbcAddress;
101
101
  * remoteAddress: RemoteIbcAddress;
102
- * icqConnection: ICQConnection | undefined;
103
102
  * timer: Remote<TimerService>;
103
+ * topicKit: RecorderKit<CosmosOrchestrationAccountNotification> | undefined;
104
104
  * }} State
105
105
  * Internal to the IcaAccountHolder exo
106
106
  */
@@ -291,26 +291,29 @@ export const prepareCosmosOrchestrationAccountKit = (
291
291
  * @param {RemoteIbcAddress} info.remoteAddress
292
292
  * @param {object} io
293
293
  * @param {IcaAccount} io.account
294
- * @param {Remote<StorageNode>} io.storageNode
295
- * @param {ICQConnection | undefined} io.icqConnection
294
+ * @param {Remote<StorageNode>} [io.storageNode]
295
+ * @param {ICQConnection} [io.icqConnection]
296
296
  * @param {Remote<TimerService>} io.timer
297
297
  * @returns {State}
298
298
  */
299
299
  ({ chainAddress, localAddress, remoteAddress }, io) => {
300
300
  const { storageNode } = io;
301
301
  // must be the fully synchronous maker because the kit is held in durable state
302
- const topicKit = makeRecorderKit(storageNode, PUBLIC_TOPICS.account[1]);
302
+ const topicKit = storageNode
303
+ ? makeRecorderKit(storageNode, PUBLIC_TOPICS.account[1])
304
+ : undefined;
303
305
  // TODO determine what goes in vstorage https://github.com/Agoric/agoric-sdk/issues/9066
304
306
  // XXX consider parsing local/remoteAddr to portId, channelId, counterpartyPortId, counterpartyChannelId, connectionId, counterpartyConnectionId
305
307
  // FIXME these values will not update if IcaAccount gets new values after reopening.
306
308
  // consider having IcaAccount responsible for the owning the writer. It might choose to share it with COA.
307
- void E(topicKit.recorder).write(
308
- /** @type {CosmosOrchestrationAccountStorageState} */ ({
309
- localAddress,
310
- remoteAddress,
311
- }),
312
- );
313
-
309
+ if (topicKit) {
310
+ void E(topicKit.recorder).write(
311
+ /** @type {CosmosOrchestrationAccountStorageState} */ ({
312
+ localAddress,
313
+ remoteAddress,
314
+ }),
315
+ );
316
+ }
314
317
  const { account, icqConnection, timer } = io;
315
318
  return {
316
319
  account,
@@ -333,6 +336,7 @@ export const prepareCosmosOrchestrationAccountKit = (
333
336
  return account;
334
337
  },
335
338
  getUpdater() {
339
+ if (!this.state.topicKit) throw Fail`no topicKit`;
336
340
  return this.state.topicKit.recorder;
337
341
  },
338
342
  /**
@@ -731,6 +735,7 @@ export const prepareCosmosOrchestrationAccountKit = (
731
735
  return asVow(async () => {
732
736
  await null;
733
737
  const { topicKit } = this.state;
738
+ if (!topicKit) throw Fail`No topicKit; storageNode not provided`;
734
739
  return harden({
735
740
  account: {
736
741
  description: PUBLIC_TOPICS.account[0],
@@ -2,11 +2,39 @@ export const ICS20_TRANSFER_SUCCESS_RESULT: "AQ==";
2
2
  export function createSequencePattern(sequence: any): Pattern;
3
3
  export function prepareIBCTransferSender(zone: import("@agoric/base-zone").Zone, { watch, makeIBCReplyKit }: VowTools & {
4
4
  makeIBCReplyKit: MakeIBCReplyKit;
5
- }): (txExecutor: {
5
+ }): (...args: Parameters<(txExecutor: {
6
6
  executeTx: LocalChainAccount["executeTx"];
7
7
  }, transferMsg: import("@agoric/cosmic-proto/ibc/applications/transfer/v1/tx.js").MsgTransfer & {
8
8
  '@type': "/ibc.applications.transfer.v1.MsgTransfer";
9
- }) => import("@endo/exo").Guarded<{
9
+ }) => import("@endo/exo").GuardedKit<{
10
+ public: {
11
+ sendPacket(match: any, opts: any): Vow<{
12
+ eventPattern: import("@endo/patterns").Matcher;
13
+ resultV: Vow<void>;
14
+ }>;
15
+ };
16
+ responseWatcher: {
17
+ /**
18
+ * Wait for successfully sending the transfer packet.
19
+ *
20
+ * @param {[
21
+ * JsonSafe<
22
+ * ResponseTo<
23
+ * TypedJson<'/ibc.applications.transfer.v1.MsgTransfer'>
24
+ * >
25
+ * >,
26
+ * ]} response
27
+ * @param {Record<string, any>} ctx
28
+ */
29
+ onFulfilled([{ sequence }]: [JsonSafe<ResponseTo<TypedJson<"/ibc.applications.transfer.v1.MsgTransfer">>>], ctx: Record<string, any>): {
30
+ eventPattern: import("@endo/patterns").Matcher;
31
+ resultV: Vow<void>;
32
+ };
33
+ };
34
+ verifyTransferSuccess: {
35
+ onFulfilled(ackData: any): void;
36
+ };
37
+ }>>) => import("@endo/exo").Guarded<{
10
38
  sendPacket(match: any, opts: any): Vow<{
11
39
  eventPattern: import("@endo/patterns").Matcher;
12
40
  resultV: Vow<void>;
@@ -34,7 +62,10 @@ export function prepareIBCTools(zone: import("@agoric/base-zone").Zone, vowTools
34
62
  };
35
63
  export type MakeIBCReplyKit = ReturnType<typeof prepareIBCReplyKit>;
36
64
  import type { VowTools } from '@agoric/vow';
37
- import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
38
65
  import type { Vow } from '@agoric/vow';
66
+ import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
67
+ import type { TypedJson } from '@agoric/cosmic-proto';
68
+ import type { ResponseTo } from '@agoric/cosmic-proto';
69
+ import type { JsonSafe } from '@agoric/cosmic-proto';
39
70
  import type { PacketOptions } from './packet-tools.js';
40
71
  //# sourceMappingURL=ibc-packet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ibc-packet.d.ts","sourceRoot":"","sources":["ibc-packet.js"],"names":[],"mappings":"AAMA,4CAA6C,MAAM,CAAC;AAkB7C,gDAHI,GAAG,GACD,OAAO,CAgCnB;AAOM,+CAHI,OAAO,mBAAmB,EAAE,IAAI,8BAChC,QAAQ,GAAG;IAAE,eAAe,EAAE,eAAe,CAAA;CAAE;eAkBtC,iBAAiB,CAAC,WAAW,CAAC;;;;;;;;GA0EjD;AAOM,yCAHI,OAAO,mBAAmB,EAAE,IAAI,YAChC,QAAQ,wBAyBN,OAAO,UACP,IAAI,GAAG,CAAC,QACR,aAAa;;;EAmBzB;AAQM,sCAHI,OAAO,mBAAmB,EAAE,IAAI,YAChC,QAAQ;;mBAnIC,iBAAiB,CAAC,WAAW,CAAC;;;;;;;;;0CAwGrC,OAAO,UACP,IAAI,GAAG,CAAC,QACR,aAAa;;;;EAkCzB;8BAba,UAAU,CAAC,OAAO,kBAAkB,CAAC;8BAlMnB,aAAa;uCACT,gCAAgC;yBADpC,aAAa;mCAEb,mBAAmB"}
1
+ {"version":3,"file":"ibc-packet.d.ts","sourceRoot":"","sources":["ibc-packet.js"],"names":[],"mappings":"AAMA,4CAA6C,MAAM,CAAC;AAkB7C,gDAHI,GAAG,GACD,OAAO,CAgCnB;AAOM,+CAHI,OAAO,mBAAmB,EAAE,IAAI,8BAChC,QAAQ,GAAG;IAAE,eAAe,EAAE,eAAe,CAAA;CAAE,IA2FhD,GAAG,MAFA,UAAU;eAvEH,iBAAiB,CAAC,WAAW,CAAC;;;;;;;;;;;QAoB1C;;;;;;;;;;;WAWG;oCARQ,CACV,SACA,WACA,UAAkB,2CAA2C,CAAC,CACvD,CACF,CACF,OACO,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;;;GA2CrB;;;;;GAChB;AAOM,yCAHI,OAAO,mBAAmB,EAAE,IAAI,YAChC,QAAQ,wBAyBN,OAAO,UACP,IAAI,GAAG,CAAC,QACR,aAAa;;;EAmBzB;AAQM,sCAHI,OAAO,mBAAmB,EAAE,IAAI,YAChC,QAAQ;;mBAnIC,iBAAiB,CAAC,WAAW,CAAC;;;;;;;;;0CAwGrC,OAAO,UACP,IAAI,GAAG,CAAC,QACR,aAAa;;;;EAkCzB;8BAba,UAAU,CAAC,OAAO,kBAAkB,CAAC;8BAlMnB,aAAa;yBAAb,aAAa;uCACT,gCAAgC;+BAFlB,sBAAsB;gCAAtB,sBAAsB;8BAAtB,sBAAsB;mCAGxC,mBAAmB"}
@@ -7,6 +7,7 @@ export function prepareLocalChainFacade(zone: Zone, powers: LocalChainFacadePowe
7
7
  stakingTokens?: Readonly<Array<{
8
8
  denom: string;
9
9
  }>>;
10
+ icaEnabled?: boolean;
10
11
  }>) => import("@endo/exo").Guarded<{
11
12
  getChainInfo(): Vow<Readonly<{
12
13
  bech32Prefix?: string;
@@ -17,6 +18,7 @@ export function prepareLocalChainFacade(zone: Zone, powers: LocalChainFacadePowe
17
18
  stakingTokens?: Readonly<Array<{
18
19
  denom: string;
19
20
  }>>;
21
+ icaEnabled?: boolean;
20
22
  }>>;
21
23
  /** @returns {Vow<LocalOrchestrationAccountKit['holder']>} */
22
24
  makeAccount(): Vow<LocalOrchestrationAccountKit["holder"]>;
@@ -45,7 +47,7 @@ export type AgoricChainMethods = {
45
47
  export type LocalChainFacadePowers = {
46
48
  makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit;
47
49
  orchestration: Remote<CosmosInterchainService>;
48
- storageNode: Remote<StorageNode>;
50
+ storageNode: Remote<StorageNode> | undefined;
49
51
  agoricNames: Remote<NameHub>;
50
52
  timer: Remote<TimerService>;
51
53
  localchain: Remote<LocalChain>;
@@ -1 +1 @@
1
- {"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AA4LO,8CAJI,IAAI,UACJ,sBAAsB;;;;;;;;;;;;;;;;;;;;IApFzB,6DAA6D;mBAA/C,IAAI,4BAA4B,CAAC,QAAQ,CAAC,CAAC;;;;;;;;;;GA0FhE;;;;;;;;;;;uBAnKa,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC;;qCAO3B;IACR,gCAAgC,EAAE,gCAAgC,CAAC;IACnE,aAAa,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC/C,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,YAAY,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,QAAQ,EAAE,QAAQ,CAAC;CACpB;mCAuJU,UAAU,CAAC,OAAO,uBAAuB,CAAC;+BAC1C,UAAU,CAAC,oBAAoB,CAAC;0BAvLvB,mBAAmB;uCASiE,aAAa;yBAHxF,aAAa;kDAEoC,kCAAkC;+BAJvF,8BAA8B;sDAIuB,kCAAkC;6CADzE,qBAAqB;4BALtC,kBAAkB;6BAGjB,cAAc;kCAJT,cAAc;gCAEgB,gCAAgC;8BAG7D,aAAa"}
1
+ {"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AA8LO,8CAJI,IAAI,UACJ,sBAAsB;;;;;;;;;;;;;;;;;;;;;;IAtFzB,6DAA6D;mBAA/C,IAAI,4BAA4B,CAAC,QAAQ,CAAC,CAAC;;;;;;;;;;GA4FhE;;;;;;;;;;;uBArKa,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC;;qCAO3B;IACR,gCAAgC,EAAE,gCAAgC,CAAC;IACnE,aAAa,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC/C,WAAW,EAAE,OAAO,WAAW,CAAC,GAAG,SAAS,CAAC;IAC7C,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,YAAY,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,QAAQ,EAAE,QAAQ,CAAC;CACpB;mCAyJU,UAAU,CAAC,OAAO,uBAAuB,CAAC;+BAC1C,UAAU,CAAC,oBAAoB,CAAC;0BAzLvB,mBAAmB;uCASiE,aAAa;yBAHxF,aAAa;kDAEoC,kCAAkC;+BAJvF,8BAA8B;sDAIuB,kCAAkC;6CADzE,qBAAqB;4BALtC,kBAAkB;6BAGjB,cAAc;kCAJT,cAAc;gCAEgB,gCAAgC;8BAG7D,aAAa"}
@@ -36,7 +36,7 @@ import { chainFacadeMethods, TypedJsonShape } from '../typeGuards.js';
36
36
  * @typedef {{
37
37
  * makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit;
38
38
  * orchestration: Remote<CosmosInterchainService>;
39
- * storageNode: Remote<StorageNode>;
39
+ * storageNode: Remote<StorageNode> | undefined;
40
40
  * agoricNames: Remote<NameHub>;
41
41
  * timer: Remote<TimerService>;
42
42
  * localchain: Remote<LocalChain>;
@@ -79,7 +79,7 @@ const prepareLocalChainFacadeKit = (
79
79
  .returns(VowShape),
80
80
  }),
81
81
  makeChildNodeWatcher: M.interface('makeChildNodeWatcher', {
82
- onFulfilled: M.call(M.remotable())
82
+ onFulfilled: M.call(M.or(M.remotable(), M.undefined()))
83
83
  .optional({ account: M.remotable(), address: M.string() }) // empty context
84
84
  .returns(M.remotable()),
85
85
  }),
@@ -145,11 +145,13 @@ const prepareLocalChainFacadeKit = (
145
145
  * @param {[LocalChainAccount, ChainAddress['value']]} results
146
146
  */
147
147
  onFulfilled([account, address]) {
148
- return watch(
149
- E(storageNode).makeChildNode(address),
150
- this.facets.makeChildNodeWatcher,
151
- { account, address },
152
- );
148
+ const optionalStorageNode = storageNode
149
+ ? E(storageNode).makeChildNode(address)
150
+ : undefined;
151
+ return watch(optionalStorageNode, this.facets.makeChildNodeWatcher, {
152
+ account,
153
+ address,
154
+ });
153
155
  },
154
156
  },
155
157
  makeChildNodeWatcher: {
@@ -9,7 +9,7 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
9
9
  }): (args_0: {
10
10
  account: LocalChainAccount;
11
11
  address: ChainAddress;
12
- storageNode: Remote<StorageNode>;
12
+ storageNode?: Remote<globalThis.StorageNode> | undefined;
13
13
  }) => import("@endo/exo").GuardedKit<{
14
14
  helper: {
15
15
  /**
@@ -157,7 +157,7 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, { makeRecorderKi
157
157
  '@type': string;
158
158
  }[]>;
159
159
  getAddress(): ChainAddress;
160
- send(toAccount: ChainAddress, amounts: AmountArg): Vow<void>;
160
+ send(toAccount: ChainAddress, amount: AmountArg): Vow<void>;
161
161
  sendAll(toAccount: ChainAddress, amounts: AmountArg[]): Vow<void>;
162
162
  /**
163
163
  * @param {ChainAddress} destination
@@ -188,7 +188,7 @@ export type LocalChainAccountNotification = {
188
188
  * Internal to the LocalOrchestrationAccount exo
189
189
  */
190
190
  export type State = {
191
- topicKit: RecorderKit<LocalChainAccountNotification>;
191
+ topicKit: RecorderKit<LocalChainAccountNotification> | undefined;
192
192
  packetTools: PacketTools;
193
193
  account: LocalChainAccount;
194
194
  address: ChainAddress;
@@ -1 +1 @@
1
- {"version":3,"file":"local-orchestration-account.d.ts","sourceRoot":"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;;;;;;;;WAWG;8BAVQ,YAAY,UACZ,SAAS,SAET,qBAAqB,GAGnB,IAAI,GAAG,CAAC;;;;;;;;;GAmE5B;;aArrBa,MAAM;;;;;oBAKP;IACR,QAAQ,EAAE,YAAY,6BAA6B,CAAC,GAAG,SAAS,CAAC;IACjE,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,YAAY,CAAC;CACvB;+CA6qBU,UAAU,CAAC,OAAO,mCAAmC,CAAC;2CACtD,UAAU,CAAC,gCAAgC,CAAC;0BA7sBnC,cAAc;qCADU,6CAA6C;kCAI5C,cAAc;4BAFrC,kBAAkB;8BAGX,aAAa;8BAIlB,gBAAgB;gCAXK,gCAAgC;8BAarD,uBAAuB;uCAbF,gCAAgC;kCACiF,uBAAuB;+BAAvB,uBAAuB;0BAQjK,kDAAkD;yBAFzC,aAAa;qCADG,cAAc;2CALmG,uBAAuB;+BAOtI,sBAAsB;8BAAtB,sBAAsB;mCAPyF,uBAAuB;iCAAvB,uBAAuB;gCAOtI,sBAAsB;iCANzB,6CAA6C;iCAU9D,mBAAmB"}
@@ -57,7 +57,7 @@ const EVow$ = shape => M.or(Vow$(shape), M.promise(/* shape */));
57
57
  /**
58
58
  * @private
59
59
  * @typedef {{
60
- * topicKit: RecorderKit<LocalChainAccountNotification>;
60
+ * topicKit: RecorderKit<LocalChainAccountNotification> | undefined;
61
61
  * packetTools: PacketTools;
62
62
  * account: LocalChainAccount;
63
63
  * address: ChainAddress;
@@ -181,17 +181,22 @@ export const prepareLocalOrchestrationAccountKit = (
181
181
  * @param {object} initState
182
182
  * @param {LocalChainAccount} initState.account
183
183
  * @param {ChainAddress} initState.address
184
- * @param {Remote<StorageNode>} initState.storageNode
184
+ * @param {Remote<StorageNode>} [initState.storageNode]
185
185
  * @returns {State}
186
186
  */
187
187
  ({ account, address, storageNode }) => {
188
188
  // must be the fully synchronous maker because the kit is held in durable state
189
- const topicKit = makeRecorderKit(storageNode, PUBLIC_TOPICS.account[1]);
189
+ const topicKit = storageNode
190
+ ? makeRecorderKit(storageNode, PUBLIC_TOPICS.account[1])
191
+ : undefined;
190
192
  // TODO determine what goes in vstorage https://github.com/Agoric/agoric-sdk/issues/9066
191
- void E(topicKit.recorder).write('');
193
+ if (topicKit) {
194
+ void E(topicKit.recorder).write('');
195
+ }
196
+
192
197
  const packetTools = makePacketTools(account);
193
198
 
194
- return { account, address, topicKit, packetTools };
199
+ return { account, address, packetTools, topicKit };
195
200
  },
196
201
  {
197
202
  helper: {
@@ -548,6 +553,7 @@ export const prepareLocalOrchestrationAccountKit = (
548
553
  return asVow(async () => {
549
554
  await null;
550
555
  const { topicKit } = this.state;
556
+ if (!topicKit) throw Fail`No topicKit; storageNode not provided`;
551
557
  return harden({
552
558
  account: {
553
559
  description: PUBLIC_TOPICS.account[0],
@@ -10,8 +10,8 @@ export function prepareOrchestrator(zone: Zone, powers: {
10
10
  makeRemoteChainFacade: MakeRemoteChainFacade;
11
11
  vowTools: VowTools;
12
12
  }): () => import("@endo/exo").Guarded<{
13
- getChain(chainName: string): Vow<HostInterface<Chain<any>>>;
14
- getDenomInfo(denom: string, srcChainName: "agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze"): HostInterface<import("../orchestration-api.js").DenomInfo<"agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze", "agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze">>;
13
+ getChain(chainName: string): Vow<HostInterface<Chain<any> & object>>;
14
+ getDenomInfo(denom: string, srcChainName: "agoric" | "archway" | "celestia" | "dydx" | "evmos" | "haqq" | "juno" | "kava" | "kujira" | "migaloo" | "neutron" | "noble" | "nolus" | "persistence" | "pryzm" | "sei" | "shido" | "stride" | "titan" | "umee" | "beezee" | "carbon" | "coreum" | "cosmoshub" | "crescent" | "doravota" | "dymension" | "empowerchain" | "injective" | "lava" | "nibiru" | "omniflixhub" | "osmosis" | "planq" | "provenance" | "quicksilver" | "secretnetwork" | "sifchain" | "stargaze" | "terra2"): HostInterface<import("../orchestration-api.js").DenomInfo<"agoric" | "archway" | "celestia" | "dydx" | "evmos" | "haqq" | "juno" | "kava" | "kujira" | "migaloo" | "neutron" | "noble" | "nolus" | "persistence" | "pryzm" | "sei" | "shido" | "stride" | "titan" | "umee" | "beezee" | "carbon" | "coreum" | "cosmoshub" | "crescent" | "doravota" | "dymension" | "empowerchain" | "injective" | "lava" | "nibiru" | "omniflixhub" | "osmosis" | "planq" | "provenance" | "quicksilver" | "secretnetwork" | "sifchain" | "stargaze" | "terra2", "agoric" | "archway" | "celestia" | "dydx" | "evmos" | "haqq" | "juno" | "kava" | "kujira" | "migaloo" | "neutron" | "noble" | "nolus" | "persistence" | "pryzm" | "sei" | "shido" | "stride" | "titan" | "umee" | "beezee" | "carbon" | "coreum" | "cosmoshub" | "crescent" | "doravota" | "dymension" | "empowerchain" | "injective" | "lava" | "nibiru" | "omniflixhub" | "osmosis" | "planq" | "provenance" | "quicksilver" | "secretnetwork" | "sifchain" | "stargaze" | "terra2">>;
15
15
  /** @type {HostOf<Orchestrator['asAmount']>} */
16
16
  asAmount: HostOf<Orchestrator["asAmount"]>;
17
17
  }>;
@@ -60,6 +60,7 @@ declare function prepareOrchestratorKit(zone: Zone, { chainHub, makeLocalChainFa
60
60
  stakingTokens?: Readonly<Array<{
61
61
  denom: string;
62
62
  }>>;
63
+ icaEnabled?: boolean;
63
64
  }>>;
64
65
  makeAccount(): Vow<import("./local-orchestration-account.js").LocalOrchestrationAccountKit["holder"]>;
65
66
  query(args_0: {
@@ -87,7 +88,7 @@ declare function prepareOrchestratorKit(zone: Zone, { chainHub, makeLocalChainFa
87
88
  */
88
89
  onFulfilled([_agoricChainInfo, remoteChainInfo, connectionInfo]: [ChainInfo, ChainInfo, IBCConnectionInfo], name: string): import("@endo/exo").Guarded<{
89
90
  getChainInfo(): Vow<any>;
90
- makeAccount(): Vow<HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon> | HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods> | HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").LocalAccountMethods> | HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries>>;
91
+ makeAccount(): Vow<HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & object> | HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").LocalAccountMethods> | HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods & object> | HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries>>;
91
92
  query(msgs: {
92
93
  data: string;
93
94
  path: string;
@@ -113,8 +114,8 @@ declare function prepareOrchestratorKit(zone: Zone, { chainHub, makeLocalChainFa
113
114
  }>;
114
115
  };
115
116
  orchestrator: {
116
- getChain(chainName: string): Vow<HostInterface<Chain<any>>>;
117
- getDenomInfo(denom: string, srcChainName: "agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze"): HostInterface<import("../orchestration-api.js").DenomInfo<"agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze", "agoric" | "celestia" | "dydx" | "juno" | "neutron" | "noble" | "stride" | "umee" | "cosmoshub" | "omniflixhub" | "osmosis" | "secretnetwork" | "stargaze">>;
117
+ getChain(chainName: string): Vow<HostInterface<Chain<any> & object>>;
118
+ getDenomInfo(denom: string, srcChainName: "agoric" | "archway" | "celestia" | "dydx" | "evmos" | "haqq" | "juno" | "kava" | "kujira" | "migaloo" | "neutron" | "noble" | "nolus" | "persistence" | "pryzm" | "sei" | "shido" | "stride" | "titan" | "umee" | "beezee" | "carbon" | "coreum" | "cosmoshub" | "crescent" | "doravota" | "dymension" | "empowerchain" | "injective" | "lava" | "nibiru" | "omniflixhub" | "osmosis" | "planq" | "provenance" | "quicksilver" | "secretnetwork" | "sifchain" | "stargaze" | "terra2"): HostInterface<import("../orchestration-api.js").DenomInfo<"agoric" | "archway" | "celestia" | "dydx" | "evmos" | "haqq" | "juno" | "kava" | "kujira" | "migaloo" | "neutron" | "noble" | "nolus" | "persistence" | "pryzm" | "sei" | "shido" | "stride" | "titan" | "umee" | "beezee" | "carbon" | "coreum" | "cosmoshub" | "crescent" | "doravota" | "dymension" | "empowerchain" | "injective" | "lava" | "nibiru" | "omniflixhub" | "osmosis" | "planq" | "provenance" | "quicksilver" | "secretnetwork" | "sifchain" | "stargaze" | "terra2", "agoric" | "archway" | "celestia" | "dydx" | "evmos" | "haqq" | "juno" | "kava" | "kujira" | "migaloo" | "neutron" | "noble" | "nolus" | "persistence" | "pryzm" | "sei" | "shido" | "stride" | "titan" | "umee" | "beezee" | "carbon" | "coreum" | "cosmoshub" | "crescent" | "doravota" | "dymension" | "empowerchain" | "injective" | "lava" | "nibiru" | "omniflixhub" | "osmosis" | "planq" | "provenance" | "quicksilver" | "secretnetwork" | "sifchain" | "stargaze" | "terra2">>;
118
119
  /** @type {HostOf<Orchestrator['asAmount']>} */
119
120
  asAmount: HostOf<Orchestrator["asAmount"]>;
120
121
  };
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAiCA,0BAA0B;AAC1B;;;;GAI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ApC,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;GAoBlD;;;;;+BAMY,UAAU,CAClB,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAC1C,CAAC,cAAc,CAAC;0BAnLG,mBAAmB;8BACE,gBAAgB;0CASrB,yBAAyB;2CACxB,0BAA0B;8BARlC,aAAa;2BASoC,aAAa;mCAVtC,oBAAoB;yBAC5C,aAAa;kCASoC,aAAa;4BAVtC,oBAAoB;AAuB5E;;;;;;;;GAQG;AACH,8CARW,IAAI,0FACJ;IACN,QAAQ,EAAE,QAAQ,CAAC;IACnB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,EAAE,QAAQ,CAAC;CACpB;IAwCE,2DAA2D;;QAEzD;;WAEG;qCADQ,gBAAgB,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;IAQtC;;;OAGG;;QAED;;;;;;WAMG;0HADQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA0DjB,+CAA+C;kBAApC,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;;GAKlD;qCA3J2C,gBAAgB;uCAWqB,aAAa;+BAAb,aAAa"}
@@ -53,7 +53,7 @@ declare function preparePortfolioHolderKit(zone: Zone, { asVow, when }: VowTools
53
53
  /**
54
54
  * @param {string} chainName key where the account is stored
55
55
  */
56
- getAccount(chainName: string): import("@agoric/vow").Vow<HostInterface<OrchestrationAccountCommon>>;
56
+ getAccount(chainName: string): import("@agoric/vow").Vow<HostInterface<OrchestrationAccountCommon & object>>;
57
57
  };
58
58
  }>;
59
59
  import type { OrchestrationAccount } from '@agoric/orchestration';
@@ -7,9 +7,10 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
7
7
  stakingTokens?: Readonly<Array<{
8
8
  denom: string;
9
9
  }>>;
10
+ icaEnabled?: boolean;
10
11
  }>, connectionInfo: IBCConnectionInfo) => import("@endo/exo").Guarded<{
11
12
  getChainInfo(): Vow<any>;
12
- makeAccount(): Vow<import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").LocalAccountMethods> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries>>;
13
+ makeAccount(): Vow<import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & object> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").LocalAccountMethods> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods & object> | import("@agoric/async-flow").HostInterface<import("../orchestration-api.js").OrchestrationAccountCommon & import("../cosmos-api.js").IcaAccountMethods & import("../cosmos-api.js").StakingAccountActions & import("../cosmos-api.js").StakingAccountQueries>>;
13
14
  query(msgs: {
14
15
  data: string;
15
16
  path: string;
@@ -36,7 +37,7 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
36
37
  export type RemoteChainFacadePowers = {
37
38
  makeCosmosOrchestrationAccount: ReturnType<typeof prepareCosmosOrchestrationAccount>;
38
39
  orchestration: Remote<CosmosInterchainService>;
39
- storageNode: Remote<StorageNode>;
40
+ storageNode: Remote<StorageNode> | undefined;
40
41
  timer: Remote<TimerService>;
41
42
  vowTools: VowTools;
42
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AAmQO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;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F,aAAa;uDAGO,mCAAmC;6CAD7C,qBAAqB;4BAHtC,kBAAkB;kCADZ,cAAc;8BAEb,aAAa;qCAIwD,aAAa;mCAAb,aAAa"}
@@ -33,7 +33,7 @@ const trace = makeTracer('RemoteChainFacade');
33
33
  * typeof prepareCosmosOrchestrationAccount
34
34
  * >;
35
35
  * orchestration: Remote<CosmosInterchainService>;
36
- * storageNode: Remote<StorageNode>;
36
+ * storageNode: Remote<StorageNode> | undefined;
37
37
  * timer: Remote<TimerService>;
38
38
  * vowTools: VowTools;
39
39
  * }} RemoteChainFacadePowers
@@ -94,7 +94,7 @@ const prepareRemoteChainFacadeKit = (
94
94
  ).returns(VowShape),
95
95
  }),
96
96
  makeChildNodeWatcher: M.interface('makeChildNodeWatcher', {
97
- onFulfilled: M.call(M.remotable(), {
97
+ onFulfilled: M.call(M.or(M.remotable(), M.undefined()), {
98
98
  account: M.remotable(),
99
99
  chainAddress: ChainAddressShape,
100
100
  localAddress: M.string(),
@@ -210,16 +210,20 @@ const prepareRemoteChainFacadeKit = (
210
210
  * @param {IcaAccount} account
211
211
  */
212
212
  onFulfilled([chainAddress, localAddress, remoteAddress], account) {
213
- return watch(
214
- E(storageNode).makeChildNode(chainAddress.value),
215
- this.facets.makeChildNodeWatcher,
216
- { account, chainAddress, localAddress, remoteAddress },
217
- );
213
+ const optionalStorageNode = storageNode
214
+ ? E(storageNode).makeChildNode(chainAddress.value)
215
+ : undefined;
216
+ return watch(optionalStorageNode, this.facets.makeChildNodeWatcher, {
217
+ account,
218
+ chainAddress,
219
+ localAddress,
220
+ remoteAddress,
221
+ });
218
222
  },
219
223
  },
220
224
  makeChildNodeWatcher: {
221
225
  /**
222
- * @param {Remote<StorageNode>} childNode
226
+ * @param {Remote<StorageNode> | undefined} childNode
223
227
  * @param {{
224
228
  * account: IcaAccount;
225
229
  * chainAddress: ChainAddress;
package/src/facade.d.ts CHANGED
@@ -1,10 +1,8 @@
1
- export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode, orchestrationService, makeRecorderKit, makeOrchestrator, vowTools, asyncFlowTools, }: {
1
+ export function makeOrchestrationFacade({ zone, timerService, zcf, orchestrationService, makeOrchestrator, vowTools, asyncFlowTools, }: {
2
2
  zone: Zone;
3
3
  timerService: Remote<TimerService>;
4
4
  zcf: ZCF;
5
- storageNode: Remote<StorageNode>;
6
5
  orchestrationService: Remote<CosmosInterchainService>;
7
- makeRecorderKit: MakeRecorderKit;
8
6
  makeOrchestrator: () => HostOrchestrator;
9
7
  vowTools: VowTools;
10
8
  asyncFlowTools: AsyncFlowTools;
@@ -23,7 +21,6 @@ import type { Zone } from '@agoric/zone';
23
21
  import type { TimerService } from '@agoric/time';
24
22
  import type { Remote } from '@agoric/internal';
25
23
  import type { CosmosInterchainService } from './exos/exo-interfaces.js';
26
- import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
27
24
  import type { HostOrchestrator } from './exos/orchestrator.js';
28
25
  import type { VowTools } from '@agoric/vow';
29
26
  import type { AsyncFlowTools } from '@agoric/async-flow';
@@ -1 +1 @@
1
- {"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAyCO,sKAZI;IACN,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,OAAO,YAAY,CAAC,CAAC;IACnC,GAAG,EAAE,GAAG,CAAC;IACT,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,oBAAoB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACtD,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;IACzC,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;CAChC;kBA4BW,EAAE,EACsC,EAAE,SAA1C,kBAAmB,eAAe,EAAE,CAAC,CAAE,eACzC,MAAM,WAEN,EAAE,WACF,EAAE,KACA,YAAY,CAAC,EAAE,CAAC;qBAmCM,EAAE,SAAvB,MAAM,CAAC,MAA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AC,MAAM,EAAE,GAAG,CAAE,EAG5B,GAAG,SAFI;QACZ,CAAK,WAAW,EAAE,MAAM,GAAG,kBAAkB,eAAe,EAAE,CAAC,CAAC,CAAC;KAC7D,YAEM,GAAG,WACH,EAAE,KACA,GAAG,CAAC,IAAI,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAE;EA+BxD;;;;yBA1HgC,EAAE,SAAtB,iBAAmB,IACnB,EAAE,SAAS,CACnB,GAAG,EAAE,YAAY,EACjB,GAAG,EAAE,GAAG,EACZ,GAAO,IAAI,EAAE,MAAM,EAAE,KACd,OAAO,CAAC,MAAM,EAAE,CAAC,GAClB,CAAC,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,GAClC,KAAK;kCAqHE,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BAxIjC,cAAc;kCAEN,cAAc;4BAEpB,kBAAkB;6CACD,0BAA0B;sCAFjC,wBAAwB;8BAF3B,aAAa;oCAFc,oBAAoB;oCAApB,oBAAoB;uCAO7B,YAAY;kCAAZ,YAAY;8BAPH,oBAAoB;yBAE/C,aAAa"}
package/src/facade.js CHANGED
@@ -2,15 +2,14 @@
2
2
  import { assertAllDefined, deepMapObject } from '@agoric/internal';
3
3
 
4
4
  /**
5
- * @import {AsyncFlowTools, GuestInterface, HostArgs, HostOf} from '@agoric/async-flow';
5
+ * @import {AsyncFlowTools, GuestInterface, HostArgs} from '@agoric/async-flow';
6
6
  * @import {Zone} from '@agoric/zone';
7
7
  * @import {Vow, VowTools} from '@agoric/vow';
8
8
  * @import {TimerService} from '@agoric/time';
9
- * @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
10
9
  * @import {HostOrchestrator} from './exos/orchestrator.js';
11
10
  * @import {Remote} from '@agoric/internal';
12
11
  * @import {CosmosInterchainService} from './exos/exo-interfaces.js';
13
- * @import {Chain, ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, OrchestrationFlow, Orchestrator} from './types.js';
12
+ * @import {OrchestrationFlow, Orchestrator} from './types.js';
14
13
  */
15
14
 
16
15
  /**
@@ -31,9 +30,7 @@ import { assertAllDefined, deepMapObject } from '@agoric/internal';
31
30
  * zone: Zone;
32
31
  * timerService: Remote<TimerService>;
33
32
  * zcf: ZCF;
34
- * storageNode: Remote<StorageNode>;
35
33
  * orchestrationService: Remote<CosmosInterchainService>;
36
- * makeRecorderKit: MakeRecorderKit;
37
34
  * makeOrchestrator: () => HostOrchestrator;
38
35
  * vowTools: VowTools;
39
36
  * asyncFlowTools: AsyncFlowTools;
@@ -43,9 +40,7 @@ export const makeOrchestrationFacade = ({
43
40
  zone,
44
41
  timerService,
45
42
  zcf,
46
- storageNode,
47
43
  orchestrationService,
48
- makeRecorderKit,
49
44
  makeOrchestrator,
50
45
  vowTools,
51
46
  asyncFlowTools,
@@ -54,9 +49,7 @@ export const makeOrchestrationFacade = ({
54
49
  zone,
55
50
  timerService,
56
51
  zcf,
57
- storageNode,
58
52
  orchestrationService,
59
- makeRecorderKit,
60
53
  makeOrchestrator,
61
54
  vowTools,
62
55
  asyncFlowTools,