@agoric/orchestration 0.1.1-dev-217005a.0 → 0.1.1-dev-b196804.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 (54) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +1 -1
  3. package/package.json +16 -15
  4. package/src/examples/sendAnywhere.contract.d.ts +12 -7
  5. package/src/examples/sendAnywhere.contract.d.ts.map +1 -1
  6. package/src/examples/sendAnywhere.contract.js +22 -17
  7. package/src/examples/stakeBld.contract.js +1 -1
  8. package/src/examples/stakeIca.contract.d.ts +4 -4
  9. package/src/examples/stakeIca.contract.d.ts.map +1 -1
  10. package/src/examples/stakeIca.contract.js +9 -4
  11. package/src/examples/swapExample.contract.d.ts +6 -12
  12. package/src/examples/swapExample.contract.d.ts.map +1 -1
  13. package/src/examples/swapExample.contract.js +25 -43
  14. package/src/examples/unbondExample.contract.d.ts +6 -8
  15. package/src/examples/unbondExample.contract.d.ts.map +1 -1
  16. package/src/examples/unbondExample.contract.js +26 -43
  17. package/src/exos/chain-hub.d.ts +3 -3
  18. package/src/exos/chain-hub.d.ts.map +1 -1
  19. package/src/exos/chain-hub.js +93 -44
  20. package/src/exos/cosmos-interchain-service.d.ts +43 -0
  21. package/src/exos/cosmos-interchain-service.d.ts.map +1 -0
  22. package/src/{service.js → exos/cosmos-interchain-service.js} +21 -18
  23. package/src/exos/local-chain-facade.d.ts +2 -2
  24. package/src/exos/local-chain-facade.d.ts.map +1 -1
  25. package/src/exos/local-chain-facade.js +2 -2
  26. package/src/exos/orchestrator.d.ts +2 -2
  27. package/src/exos/orchestrator.d.ts.map +1 -1
  28. package/src/exos/orchestrator.js +2 -2
  29. package/src/exos/remote-chain-facade.d.ts +2 -2
  30. package/src/exos/remote-chain-facade.d.ts.map +1 -1
  31. package/src/exos/remote-chain-facade.js +2 -2
  32. package/src/facade.d.ts +2 -2
  33. package/src/facade.d.ts.map +1 -1
  34. package/src/facade.js +2 -2
  35. package/src/proposals/orchestration-proposal.d.ts +2 -11
  36. package/src/proposals/orchestration-proposal.d.ts.map +1 -1
  37. package/src/proposals/orchestration-proposal.js +8 -31
  38. package/src/proposals/start-stakeAtom.d.ts +3 -3
  39. package/src/proposals/start-stakeAtom.d.ts.map +1 -1
  40. package/src/proposals/start-stakeAtom.js +9 -6
  41. package/src/proposals/start-stakeOsmo.d.ts +3 -3
  42. package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
  43. package/src/proposals/start-stakeOsmo.js +9 -6
  44. package/src/types.d.ts +1 -1
  45. package/src/types.d.ts.map +1 -1
  46. package/src/types.ts +1 -1
  47. package/src/utils/start-helper.d.ts +9 -3
  48. package/src/utils/start-helper.d.ts.map +1 -1
  49. package/src/utils/start-helper.js +56 -13
  50. package/src/vat-orchestration.d.ts +7 -49
  51. package/src/vat-orchestration.d.ts.map +1 -1
  52. package/src/vat-orchestration.js +7 -7
  53. package/src/service.d.ts +0 -97
  54. package/src/service.d.ts.map +0 -1
@@ -3,18 +3,12 @@ import { E } from '@endo/far';
3
3
  import { M } from '@endo/patterns';
4
4
 
5
5
  import { VowShape } from '@agoric/vow';
6
- // eslint-disable-next-line no-restricted-syntax
7
- import { heapVowTools } from '@agoric/vow/vat.js';
8
6
  import { makeHeapZone } from '@agoric/zone';
9
7
  import { CosmosChainInfoShape, IBCConnectionInfoShape } from '../typeGuards.js';
10
8
 
11
- // FIXME test thoroughly whether heap suffices for ChainHub
12
- // eslint-disable-next-line no-restricted-syntax
13
- const { allVows, watch } = heapVowTools;
14
-
15
9
  /**
16
10
  * @import {NameHub} from '@agoric/vats';
17
- * @import {Vow} from '@agoric/vow';
11
+ * @import {Vow, VowTools} from '@agoric/vow';
18
12
  * @import {CosmosChainInfo, IBCConnectionInfo} from '../cosmos-api.js';
19
13
  * @import {ChainInfo, KnownChains} from '../chain-info.js';
20
14
  * @import {Remote} from '@agoric/internal';
@@ -94,9 +88,10 @@ const ChainHubI = M.interface('ChainHub', {
94
88
  * hub and repeat the registrations.
95
89
  *
96
90
  * @param {Remote<NameHub>} agoricNames
97
- * @param {Zone} [zone]
91
+ * @param {VowTools} vowTools
98
92
  */
99
- export const makeChainHub = (agoricNames, zone = makeHeapZone()) => {
93
+ export const makeChainHub = (agoricNames, vowTools) => {
94
+ const zone = makeHeapZone();
100
95
  /** @type {MapStore<string, CosmosChainInfo>} */
101
96
  const chainInfos = zone.mapStore('chainInfos', {
102
97
  keyShape: M.string(),
@@ -108,6 +103,89 @@ export const makeChainHub = (agoricNames, zone = makeHeapZone()) => {
108
103
  valueShape: IBCConnectionInfoShape,
109
104
  });
110
105
 
106
+ const lookupChainInfo = vowTools.retriable(
107
+ zone,
108
+ 'lookupChainInfo',
109
+ /** @param {string} chainName */
110
+ // eslint-disable-next-line no-restricted-syntax -- TODO more exact rules for vow best practices
111
+ async chainName => {
112
+ await null;
113
+ try {
114
+ const chainInfo = await E(agoricNames).lookup(CHAIN_KEY, chainName);
115
+ // It may have been set by another concurrent call
116
+ // TODO consider makeAtomicProvider for vows
117
+ if (!chainInfos.has(chainName)) {
118
+ chainInfos.init(chainName, chainInfo);
119
+ }
120
+ return chainInfo;
121
+ } catch (e) {
122
+ console.error('lookupChainInfo', chainName, 'error', e);
123
+ throw makeError(`chain not found:${chainName}`);
124
+ }
125
+ },
126
+ );
127
+
128
+ const lookupConnectionInfo = vowTools.retriable(
129
+ zone,
130
+ 'lookupConnectionInfo',
131
+ /**
132
+ * @param {string} chainId1
133
+ * @param {string} chainId2
134
+ */
135
+ // eslint-disable-next-line no-restricted-syntax -- TODO more exact rules for vow best practices
136
+ async (chainId1, chainId2) => {
137
+ await null;
138
+ const key = connectionKey(chainId1, chainId2);
139
+ try {
140
+ const connectionInfo = await E(agoricNames).lookup(
141
+ CONNECTIONS_KEY,
142
+ key,
143
+ );
144
+ // It may have been set by another concurrent call
145
+ // TODO consider makeAtomicProvider for vows
146
+ if (!connectionInfos.has(key)) {
147
+ connectionInfos.init(key, connectionInfo);
148
+ }
149
+ return connectionInfo;
150
+ } catch (e) {
151
+ console.error('lookupConnectionInfo', chainId1, chainId2, 'error', e);
152
+ throw makeError(`connection not found: ${chainId1}<->${chainId2}`);
153
+ }
154
+ },
155
+ );
156
+
157
+ /* eslint-disable no-use-before-define -- chainHub defined below */
158
+ const lookupChainsAndConnection = vowTools.retriable(
159
+ zone,
160
+ 'lookupChainsAndConnection',
161
+ /**
162
+ * @template {string} C1
163
+ * @template {string} C2
164
+ * @param {C1} chainName1
165
+ * @param {C2} chainName2
166
+ * @returns {Promise<
167
+ * [ActualChainInfo<C1>, ActualChainInfo<C2>, IBCConnectionInfo]
168
+ * >}
169
+ */
170
+ // eslint-disable-next-line no-restricted-syntax -- TODO more exact rules for vow best practices
171
+ async (chainName1, chainName2) => {
172
+ const [chain1, chain2] = await vowTools.asPromise(
173
+ vowTools.allVows([
174
+ chainHub.getChainInfo(chainName1),
175
+ chainHub.getChainInfo(chainName2),
176
+ ]),
177
+ );
178
+ const connectionInfo = await vowTools.asPromise(
179
+ chainHub.getConnectionInfo(chain2, chain1),
180
+ );
181
+ return /** @type {[ActualChainInfo<C1>, ActualChainInfo<C2>, IBCConnectionInfo]} */ ([
182
+ chain1,
183
+ chain2,
184
+ connectionInfo,
185
+ ]);
186
+ },
187
+ );
188
+
111
189
  const chainHub = zone.exo('ChainHub', ChainHubI, {
112
190
  /**
113
191
  * Register a new chain. The name will override a name in well known chain
@@ -133,19 +211,11 @@ export const makeChainHub = (agoricNames, zone = makeHeapZone()) => {
133
211
  // Either from registerChain or memoized remote lookup()
134
212
  if (chainInfos.has(chainName)) {
135
213
  return /** @type {Vow<ActualChainInfo<K>>} */ (
136
- watch(chainInfos.get(chainName))
214
+ vowTools.asVow(() => chainInfos.get(chainName))
137
215
  );
138
216
  }
139
217
 
140
- return watch(E(agoricNames).lookup(CHAIN_KEY, chainName), {
141
- onFulfilled: chainInfo => {
142
- chainInfos.init(chainName, chainInfo);
143
- return chainInfo;
144
- },
145
- onRejected: _cause => {
146
- throw makeError(`chain not found:${chainName}`);
147
- },
148
- });
218
+ return lookupChainInfo(chainName);
149
219
  },
150
220
  /**
151
221
  * @param {string} chainId1
@@ -167,18 +237,10 @@ export const makeChainHub = (agoricNames, zone = makeHeapZone()) => {
167
237
  const chainId2 = typeof chain2 === 'string' ? chain2 : chain2.chainId;
168
238
  const key = connectionKey(chainId1, chainId2);
169
239
  if (connectionInfos.has(key)) {
170
- return watch(connectionInfos.get(key));
240
+ return vowTools.asVow(() => connectionInfos.get(key));
171
241
  }
172
242
 
173
- return watch(E(agoricNames).lookup(CONNECTIONS_KEY, key), {
174
- onFulfilled: connectionInfo => {
175
- connectionInfos.init(key, connectionInfo);
176
- return connectionInfo;
177
- },
178
- onRejected: _cause => {
179
- throw makeError(`connection not found: ${chainId1}<->${chainId2}`);
180
- },
181
- });
243
+ return lookupConnectionInfo(chainId1, chainId2);
182
244
  },
183
245
 
184
246
  /**
@@ -191,21 +253,8 @@ export const makeChainHub = (agoricNames, zone = makeHeapZone()) => {
191
253
  * >}
192
254
  */
193
255
  getChainsAndConnection(chainName1, chainName2) {
194
- return watch(
195
- allVows([
196
- chainHub.getChainInfo(chainName1),
197
- chainHub.getChainInfo(chainName2),
198
- ]),
199
- {
200
- onFulfilled: ([chain1, chain2]) => {
201
- return watch(chainHub.getConnectionInfo(chain2, chain1), {
202
- onFulfilled: connectionInfo => {
203
- return [chain1, chain2, connectionInfo];
204
- },
205
- });
206
- },
207
- },
208
- );
256
+ // @ts-expect-error XXX generic parameter propagation
257
+ return lookupChainsAndConnection(chainName1, chainName2);
209
258
  },
210
259
  });
211
260
 
@@ -0,0 +1,43 @@
1
+ export function prepareCosmosInterchainService(zone: Zone, vowTools: VowTools): (initialPowers: any) => import("@endo/exo").Guarded<{
2
+ /**
3
+ * @param {string} chainId
4
+ * @param {IBCConnectionID} hostConnectionId the counterparty
5
+ * connection_id
6
+ * @param {IBCConnectionID} controllerConnectionId self connection_id
7
+ * @returns {Vow<IcaAccount>}
8
+ */
9
+ makeAccount(chainId: string, hostConnectionId: IBCConnectionID, controllerConnectionId: IBCConnectionID): Vow<IcaAccount>;
10
+ /**
11
+ * @param {IBCConnectionID} controllerConnectionId
12
+ * @returns {Vow<ICQConnection> | ICQConnection}
13
+ */
14
+ provideICQConnection(controllerConnectionId: IBCConnectionID): Vow<ICQConnection> | ICQConnection;
15
+ }>;
16
+ export type OrchestrationPowers = {
17
+ portAllocator: Remote<PortAllocator>;
18
+ };
19
+ /**
20
+ * PowerStore is used so additional powers can be added on upgrade. See
21
+ * [#7337](https://github.com/Agoric/agoric-sdk/issues/7337) for tracking on Exo
22
+ * state migrations.
23
+ */
24
+ export type PowerStore = MapStore<keyof OrchestrationPowers, OrchestrationPowers[keyof OrchestrationPowers]>;
25
+ export type ICQConnectionStore = MapStore<IBCConnectionID, ICQConnectionKit>;
26
+ export type ConnectionKit = ChainAccountKit | ICQConnectionKit;
27
+ export type OrchestrationState = {
28
+ powers: PowerStore;
29
+ icqConnections: ICQConnectionStore;
30
+ };
31
+ export type MakeCosmosInterchainService = ReturnType<typeof prepareCosmosInterchainService>;
32
+ export type CosmosInterchainService = ReturnType<MakeCosmosInterchainService>;
33
+ import type { Zone } from '@agoric/base-zone';
34
+ import type { VowTools } from '@agoric/vow';
35
+ import type { IBCConnectionID } from '@agoric/vats';
36
+ import type { IcaAccount } from '../types.js';
37
+ import type { Vow } from '@agoric/vow';
38
+ import type { ICQConnection } from '../types.js';
39
+ import type { PortAllocator } from '@agoric/network';
40
+ import type { Remote } from '@agoric/internal';
41
+ import type { ICQConnectionKit } from '../types.js';
42
+ import type { ChainAccountKit } from '../types.js';
43
+ //# sourceMappingURL=cosmos-interchain-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cosmos-interchain-service.d.ts","sourceRoot":"","sources":["cosmos-interchain-service.js"],"names":[],"mappings":"AAkPO,qDAHI,IAAI,YACJ,QAAQ;IAnDX;;;;;;OAMG;yBALQ,MAAM,oBACN,eAAe,0BAEf,eAAe,GACb,IAAI,UAAU,CAAC;IAiB5B;;;OAGG;iDAFQ,eAAe,GACb,IAAI,aAAa,CAAC,GAAG,aAAa;GA4CtD;;mBAvOa,OAAO,aAAa,CAAC;;;;;;;yBAQtB,QAAQ,CACpB,MAAU,mBAAmB,EAC7B,mBAAuB,CAAC,MAAM,mBAAmB,CAAC,CAC/C;iCAGU,QAAQ,CAAC,eAAe,EAAE,gBAAgB,CAAC;4BAE3C,eAAe,GAAG,gBAAgB;iCAYlC;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,cAAc,EAAE,kBAAkB,CAAA;CAAE;0CA8M1D,UAAU,CAAC,OAAO,8BAA8B,CAAC;sCACjD,UAAU,CAAC,2BAA2B,CAAC;0BAvP9B,mBAAmB;8BAKV,aAAa;qCAFX,cAAc;gCAG+B,aAAa;yBAD5D,aAAa;mCACkC,aAAa;mCAJ1C,iBAAiB;4BAD1C,kBAAkB;sCAKoC,aAAa;qCAAb,aAAa"}
@@ -4,12 +4,12 @@ import { Fail, b } from '@endo/errors';
4
4
  import { E } from '@endo/far';
5
5
  import { M } from '@endo/patterns';
6
6
  import { Shape as NetworkShape } from '@agoric/network';
7
- import { prepareChainAccountKit } from './exos/chain-account-kit.js';
8
- import { prepareICQConnectionKit } from './exos/icq-connection-kit.js';
7
+ import { prepareChainAccountKit } from './chain-account-kit.js';
8
+ import { prepareICQConnectionKit } from './icq-connection-kit.js';
9
9
  import {
10
10
  makeICAChannelAddress,
11
11
  makeICQChannelAddress,
12
- } from './utils/address.js';
12
+ } from '../utils/address.js';
13
13
 
14
14
  /**
15
15
  * @import {Zone} from '@agoric/base-zone';
@@ -18,7 +18,7 @@ import {
18
18
  * @import {IBCConnectionID} from '@agoric/vats';
19
19
  * @import {RemoteIbcAddress} from '@agoric/vats/tools/ibc-utils.js';
20
20
  * @import {Vow, VowTools} from '@agoric/vow';
21
- * @import {ICQConnection, IcaAccount, ICQConnectionKit, ChainAccountKit} from './types.js';
21
+ * @import {ICQConnection, IcaAccount, ICQConnectionKit, ChainAccountKit} from '../types.js';
22
22
  */
23
23
 
24
24
  const { Vow$ } = NetworkShape; // TODO #9611
@@ -60,7 +60,7 @@ const getPower = (powers, name) => {
60
60
  * @param {ReturnType<typeof prepareChainAccountKit>} makeChainAccountKit
61
61
  * @param {ReturnType<typeof prepareICQConnectionKit>} makeICQConnectionKit
62
62
  */
63
- const prepareOrchestrationKit = (
63
+ const prepareCosmosOrchestrationServiceKit = (
64
64
  zone,
65
65
  { watch },
66
66
  makeChainAccountKit,
@@ -92,7 +92,7 @@ const prepareOrchestrationKit = (
92
92
  )
93
93
  .returns(M.remotable('ConnectionKit Holder facet')),
94
94
  }),
95
- public: M.interface('OrchestrationService', {
95
+ public: M.interface('CosmosInterchainService', {
96
96
  makeAccount: M.call(M.string(), M.string(), M.string()).returns(
97
97
  Vow$(M.remotable('ChainAccountKit')),
98
98
  ),
@@ -240,20 +240,23 @@ const prepareOrchestrationKit = (
240
240
  * @param {Zone} zone
241
241
  * @param {VowTools} vowTools
242
242
  */
243
- export const prepareOrchestrationTools = (zone, vowTools) => {
243
+ export const prepareCosmosInterchainService = (zone, vowTools) => {
244
244
  const makeChainAccountKit = prepareChainAccountKit(zone, vowTools);
245
245
  const makeICQConnectionKit = prepareICQConnectionKit(zone, vowTools);
246
- const makeOrchestrationKit = prepareOrchestrationKit(
247
- zone,
248
- vowTools,
249
- makeChainAccountKit,
250
- makeICQConnectionKit,
251
- );
246
+ const makeCosmosOrchestrationServiceKit =
247
+ prepareCosmosOrchestrationServiceKit(
248
+ zone,
249
+ vowTools,
250
+ makeChainAccountKit,
251
+ makeICQConnectionKit,
252
+ );
253
+
254
+ const makeCosmosInterchainService = initialPowers =>
255
+ makeCosmosOrchestrationServiceKit(initialPowers).public;
252
256
 
253
- return harden({ makeOrchestrationKit });
257
+ return makeCosmosInterchainService;
254
258
  };
255
- harden(prepareOrchestrationTools);
259
+ harden(prepareCosmosInterchainService);
256
260
 
257
- /** @typedef {ReturnType<typeof prepareOrchestrationTools>} OrchestrationTools */
258
- /** @typedef {ReturnType<OrchestrationTools['makeOrchestrationKit']>} OrchestrationKit */
259
- /** @typedef {OrchestrationKit['public']} OrchestrationService */
261
+ /** @typedef {ReturnType<typeof prepareCosmosInterchainService>} MakeCosmosInterchainService */
262
+ /** @typedef {ReturnType<MakeCosmosInterchainService>} CosmosInterchainService */
@@ -57,7 +57,7 @@ export function prepareLocalChainFacade(zone: Zone, powers: LocalChainFacadePowe
57
57
  }>>["public"];
58
58
  export type LocalChainFacadePowers = {
59
59
  makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit;
60
- orchestration: Remote<OrchestrationService>;
60
+ orchestration: Remote<CosmosInterchainService>;
61
61
  storageNode: Remote<StorageNode>;
62
62
  timer: Remote<TimerService>;
63
63
  localchain: Remote<LocalChain>;
@@ -73,7 +73,7 @@ import type { PromiseToVow } from '../types.js';
73
73
  import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
74
74
  import type { ChainAddress } from '../types.js';
75
75
  import type { MakeLocalOrchestrationAccountKit } from './local-orchestration-account.js';
76
- import type { OrchestrationService } from '../service.js';
76
+ import type { CosmosInterchainService } from './cosmos-interchain-service.js';
77
77
  import type { Remote } from '@agoric/internal';
78
78
  import type { TimerService } from '@agoric/time';
79
79
  import type { LocalChain } from '@agoric/vats/src/localchain.js';
@@ -1 +1 @@
1
- {"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AA0GO,8CAHI,IAAI,UACJ,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;QAtCzB,oEAAoE;uBAAtD,IAAI,aAAa,qBAAqB,SAAS,CAAC,CAAC,CAAC;;;QAchE;;WAEG;wCADQ,CAAC,iBAAiB,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;cA4B5D;qCA1FY;IACZ,gCAAoC,EAAE,gCAAgC,CAAC;IACvE,aAAiB,EAAE,OA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AAc;gCAEG,gCAAgC;8BAChD,aAAa"}
@@ -11,7 +11,7 @@ import { ChainFacadeI } from '../typeGuards.js';
11
11
  * @import {Remote} from '@agoric/internal';
12
12
  * @import {LocalChain, LocalChainAccount} from '@agoric/vats/src/localchain.js';
13
13
  * @import {Vow, VowTools} from '@agoric/vow';
14
- * @import {OrchestrationService} from '../service.js';
14
+ * @import {CosmosInterchainService} from './cosmos-interchain-service.js';
15
15
  * @import {MakeLocalOrchestrationAccountKit} from './local-orchestration-account.js';
16
16
  * @import {ChainAddress, ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, PromiseToVow} from '../types.js';
17
17
  */
@@ -19,7 +19,7 @@ import { ChainFacadeI } from '../typeGuards.js';
19
19
  /**
20
20
  * @typedef {{
21
21
  * makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit;
22
- * orchestration: Remote<OrchestrationService>;
22
+ * orchestration: Remote<CosmosInterchainService>;
23
23
  * storageNode: Remote<StorageNode>;
24
24
  * timer: Remote<TimerService>;
25
25
  * localchain: Remote<LocalChain>;
@@ -12,7 +12,7 @@ export function prepareOrchestratorKit(zone: Zone, { chainHub, localchain, makeL
12
12
  makeRecorderKit: MakeRecorderKit;
13
13
  makeLocalChainFacade: MakeLocalChainFacade;
14
14
  makeRemoteChainFacade: MakeRemoteChainFacade;
15
- orchestrationService: Remote<OrchestrationService>;
15
+ orchestrationService: Remote<CosmosInterchainService>;
16
16
  storageNode: Remote<StorageNode>;
17
17
  timerService: Remote<TimerService>;
18
18
  vowTools: VowTools;
@@ -79,7 +79,7 @@ import type { Remote } from '@agoric/internal';
79
79
  import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
80
80
  import type { MakeLocalChainFacade } from './local-chain-facade.js';
81
81
  import type { MakeRemoteChainFacade } from './remote-chain-facade.js';
82
- import type { OrchestrationService } from '../service.js';
82
+ import type { CosmosInterchainService } from './cosmos-interchain-service.js';
83
83
  import type { TimerService } from '@agoric/time';
84
84
  import type { VowTools } from '@agoric/vow';
85
85
  import type { ChainInfo } from '../types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAmCA,0BAA0B;AAC1B;;;;;GAKG;AAkBI,6CAfI,IAAI,+FACJ;IACV,cAAkB,EAAE,cAAc,CAAC;IACnC,QAAY,EAAE,QAAQ,CAAC;IACvB,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,eAAmB,EAAE,eAAe,CAAC;IACrC,oBAAwB,EAAE,oBAAoB,CAAC;IAC/C,qBAAyB,EAAE,qBAAqB,CAAC;IACjD,oBAAwB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IACvD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,QAAY,EAAE,QAAQ,CAAC;IACvB,GAAO,EAAE,GAAG,CAAC;CACV;IAmCE,2DAA2D;;QAEzD,yCAAyC;;;;;;;;;;;;;IAK3C;;;OAGG;;QAED;;;;;WAKG;;;;;;;;;;;;;;QAMH,qDAAqD;;;;;;;;;;;;;GAwB1D;0BA5HoB,mBAAmB;oCAET,oBAAoB;8BAD1B,gBAAgB;gCAId,gCAAgC;4BAEpC,kBAAkB;qCADI,6CAA6C;0CAKrD,yBAAyB;2CACxB,0BAA0B;0CAH3B,eAAe;kCALvB,cAAc;8BADb,aAAa;+BAU4E,aAAa;uCAAb,aAAa;yBAVtG,aAAa;0CAU4E,aAAa;kCAAb,aAAa;2BAAb,aAAa"}
1
+ {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAmCA,0BAA0B;AAC1B;;;;;GAKG;AAkBI,6CAfI,IAAI,+FACJ;IACV,cAAkB,EAAE,cAAc,CAAC;IACnC,QAAY,EAAE,QAAQ,CAAC;IACvB,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,eAAmB,EAAE,eAAe,CAAC;IACrC,oBAAwB,EAAE,oBAAoB,CAAC;IAC/C,qBAAyB,EAAE,qBAAqB,CAAC;IACjD,oBAAwB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC1D,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,QAAY,EAAE,QAAQ,CAAC;IACvB,GAAO,EAAE,GAAG,CAAC;CACV;IAmCE,2DAA2D;;QAEzD,yCAAyC;;;;;;;;;;;;;IAK3C;;;OAGG;;QAED;;;;;WAKG;;;;;;;;;;;;;;QAMH,qDAAqD;;;;;;;;;;;;;GAwB1D;0BA5HoB,mBAAmB;oCAET,oBAAoB;8BAD1B,gBAAgB;gCAId,gCAAgC;4BAEpC,kBAAkB;qCADI,6CAA6C;0CAKrD,yBAAyB;2CACxB,0BAA0B;6CAHxB,gCAAgC;kCAL3C,cAAc;8BADb,aAAa;+BAU4E,aAAa;uCAAb,aAAa;yBAVtG,aAAa;0CAU4E,aAAa;kCAAb,aAAa;2BAAb,aAAa"}
@@ -22,7 +22,7 @@ import {
22
22
  * @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
23
23
  * @import {Remote} from '@agoric/internal';
24
24
  * @import {PickFacet} from '@agoric/swingset-liveslots';
25
- * @import {OrchestrationService} from '../service.js';
25
+ * @import {CosmosInterchainService} from './cosmos-interchain-service.js';
26
26
  * @import {MakeLocalOrchestrationAccountKit} from './local-orchestration-account.js';
27
27
  * @import {MakeLocalChainFacade} from './local-chain-facade.js';
28
28
  * @import {MakeRemoteChainFacade} from './remote-chain-facade.js';
@@ -50,7 +50,7 @@ export const OrchestratorI = M.interface('Orchestrator', {
50
50
  * makeRecorderKit: MakeRecorderKit;
51
51
  * makeLocalChainFacade: MakeLocalChainFacade;
52
52
  * makeRemoteChainFacade: MakeRemoteChainFacade;
53
- * orchestrationService: Remote<OrchestrationService>;
53
+ * orchestrationService: Remote<CosmosInterchainService>;
54
54
  * storageNode: Remote<StorageNode>;
55
55
  * timerService: Remote<TimerService>;
56
56
  * vowTools: VowTools;
@@ -119,7 +119,7 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
119
119
  }>>["public"];
120
120
  export type RemoteChainFacadePowers = {
121
121
  makeCosmosOrchestrationAccount: ReturnType<typeof prepareCosmosOrchestrationAccount>;
122
- orchestration: Remote<OrchestrationService>;
122
+ orchestration: Remote<CosmosInterchainService>;
123
123
  storageNode: Remote<StorageNode>;
124
124
  timer: Remote<TimerService>;
125
125
  vowTools: VowTools;
@@ -135,7 +135,7 @@ import type { IcaAccount } from '../types.js';
135
135
  import type { Denom } from '../types.js';
136
136
  import type { ChainAddress } from '../types.js';
137
137
  import type { prepareCosmosOrchestrationAccount } from './cosmos-orchestration-account.js';
138
- import type { OrchestrationService } from '../service.js';
138
+ import type { CosmosInterchainService } from './cosmos-interchain-service.js';
139
139
  import type { Remote } from '@agoric/internal';
140
140
  import type { TimerService } from '@agoric/time';
141
141
  import type { VowTools } from '@agoric/vow';
@@ -1 +1 @@
1
- {"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AA0IO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;QAzD1B,oEAAoE;uBAAtD,IAAI,aAAa,qBAAqB,SAAS,CAAC,CAAC,CAAC;;;QAwBhE;;;WAGG;6BAFQ,UAAU,gBACV,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAUhB;;;WAGG;kCAFQ,YAAY,6BACZ;YAAE,YAAY,EAAE,KAAK,CAAC;YAAC,OAAO,EAAE,UAAU,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwB9D;sCApHY;IACZ,8BAAkC,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACN,aAAiB,EA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aAAa;kCAAb,aAAa;uDAD9F,mCAAmC;6CAD7C,gCAAgC;4BAFjD,kBAAkB;kCADZ,cAAc;8BAEb,aAAa"}
@@ -11,7 +11,7 @@ import { ChainFacadeI } from '../typeGuards.js';
11
11
  * @import {TimerService} from '@agoric/time';
12
12
  * @import {Remote} from '@agoric/internal';
13
13
  * @import {Vow, VowTools} from '@agoric/vow';
14
- * @import {OrchestrationService} from '../service.js';
14
+ * @import {CosmosInterchainService} from './cosmos-interchain-service.js';
15
15
  * @import {prepareCosmosOrchestrationAccount} from './cosmos-orchestration-account.js';
16
16
  * @import {ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, ChainAddress, IcaAccount, PromiseToVow, Denom} from '../types.js';
17
17
  */
@@ -27,7 +27,7 @@ const anyVal = null;
27
27
  * makeCosmosOrchestrationAccount: ReturnType<
28
28
  * typeof prepareCosmosOrchestrationAccount
29
29
  * >;
30
- * orchestration: Remote<OrchestrationService>;
30
+ * orchestration: Remote<CosmosInterchainService>;
31
31
  * storageNode: Remote<StorageNode>;
32
32
  * timer: Remote<TimerService>;
33
33
  * vowTools: VowTools;
package/src/facade.d.ts CHANGED
@@ -3,7 +3,7 @@ export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode,
3
3
  timerService: Remote<TimerService>;
4
4
  zcf: ZCF;
5
5
  storageNode: Remote<StorageNode>;
6
- orchestrationService: Remote<OrchestrationService>;
6
+ orchestrationService: Remote<CosmosInterchainService>;
7
7
  localchain: Remote<LocalChain>;
8
8
  chainHub: import("./exos/chain-hub.js").ChainHub;
9
9
  makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit;
@@ -45,7 +45,7 @@ export type OrchestrationFacade = ReturnType<typeof makeOrchestrationFacade>;
45
45
  import type { Zone } from '@agoric/zone';
46
46
  import type { TimerService } from '@agoric/time';
47
47
  import type { Remote } from '@agoric/internal';
48
- import type { OrchestrationService } from './service.js';
48
+ import type { CosmosInterchainService } from './exos/cosmos-interchain-service.js';
49
49
  import type { LocalChain } from '@agoric/vats/src/localchain.js';
50
50
  import type { MakeLocalOrchestrationAccountKit } from './exos/local-orchestration-account.js';
51
51
  import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
@@ -1 +1 @@
1
- {"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAwCO,yPAjBI;IACV,IAAQ,EAAE,IAAI,CAAC;IACf,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,GAAO,EAAE,GAAG,CAAC;IACb,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,oBAAwB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IACvD,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,QAAY,EAAE,OAAO,qBAAqB,EAAE,QAAQ,CAAC;IACrD,gCAAoC,EAAE,gCAAgC,CAAC;IACvE,eAAmB,EAAE,eAAe,CAAC;IACrC,8BAAkC,EAAE,GAAG,CAAC;IACxC,oBAAwB,EAAE,oBAAoB,CAAC;IAC/C,qBAAyB,EAAE,qBAAqB,CAAC;IACjD,QAAY,EAAE,QAAQ,CAAC;IACvB,cAAkB,EAAE,cAAc,CAAC;CAChC;IAmDA;;;;;;;;;;;;;;;;;;;OAmBG;gBAlBU,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACH,SAAS,SAAhB,GAAG,EAAG,EACC,QAAQ,SAAf,GAAG,EAAG,eACT,MAAM,WAEN,WAAW,WAEX,CACV,QAAY,EAAE,YAAY,EAC1B,QAAY,EAAE,YAAY,EAC1B,GAAO,IAAI,EAAE,SAAS,KACf,OAAO,CAAC,WAAW,CAAC,GACf,CAAC,GAAG,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,UAAU,CAAC;;;;;;EAwB1D;kCAEa,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BA3HjC,cAAc;kCAEN,cAAc;4BAIpB,kBAAkB;0CACJ,cAAc;gCAHxB,g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0CAIrD,8BAA8B;2CAC7B,+BAA+B;8BATvC,aAAa;oCAFZ,oBAAoB;kCASsD,YAAY"}
package/src/facade.js CHANGED
@@ -13,7 +13,7 @@ import { prepareOrchestratorKit } from './exos/orchestrator.js';
13
13
  * @import {LocalChain} from '@agoric/vats/src/localchain.js';
14
14
  * @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
15
15
  * @import {Remote} from '@agoric/internal';
16
- * @import {OrchestrationService} from './service.js';
16
+ * @import {CosmosInterchainService} from './exos/cosmos-interchain-service.js';
17
17
  * @import {Chain, ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, Orchestrator} from './types.js';
18
18
  * @import {MakeLocalChainFacade} from './exos/local-chain-facade.js';
19
19
  * @import {MakeRemoteChainFacade} from './exos/remote-chain-facade.js';
@@ -26,7 +26,7 @@ import { prepareOrchestratorKit } from './exos/orchestrator.js';
26
26
  * timerService: Remote<TimerService>;
27
27
  * zcf: ZCF;
28
28
  * storageNode: Remote<StorageNode>;
29
- * orchestrationService: Remote<OrchestrationService>;
29
+ * orchestrationService: Remote<CosmosInterchainService>;
30
30
  * localchain: Remote<LocalChain>;
31
31
  * chainHub: import('./exos/chain-hub.js').ChainHub;
32
32
  * makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit;
@@ -1,10 +1,8 @@
1
- export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocator: portAllocatorP }, produce: { orchestrationVat, orchestration, orchestrationKit: orchestrationKitP, }, }: BootstrapPowers & {
1
+ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocator: portAllocatorP }, produce: { orchestrationVat, ...produce }, }: BootstrapPowers & {
2
2
  consume: {
3
3
  portAllocator: PortAllocator;
4
4
  };
5
5
  produce: {
6
- orchestration: Producer<any>;
7
- orchestrationKit: Producer<any>;
8
6
  orchestrationVat: Producer<any>;
9
7
  };
10
8
  }, options: {
@@ -13,11 +11,6 @@ export function setupOrchestrationVat({ consume: { loadCriticalVat, portAllocato
13
11
  };
14
12
  }): Promise<void>;
15
13
  export function initChainInfo({ consume: { agoricNamesAdmin, chainStorage: chainStorageP }, }: BootstrapPowers): Promise<void>;
16
- export function addOrchestrationToClient({ consume: { client, orchestration } }: BootstrapPowers & {
17
- consume: {
18
- orchestration: OrchestrationService;
19
- };
20
- }, _options: object): Promise<void>;
21
14
  export function getManifestForOrchestration(_powers: any, { orchestrationRef }: {
22
15
  orchestrationRef: any;
23
16
  }): {
@@ -30,8 +23,7 @@ export function getManifestForOrchestration(_powers: any, { orchestrationRef }:
30
23
  chainStorage?: undefined;
31
24
  };
32
25
  produce: {
33
- orchestration: string;
34
- orchestrationKit: string;
26
+ cosmosInterchainService: string;
35
27
  orchestrationVat: string;
36
28
  };
37
29
  } | {
@@ -49,5 +41,4 @@ export function getManifestForOrchestration(_powers: any, { orchestrationRef }:
49
41
  };
50
42
  };
51
43
  import type { PortAllocator } from '@agoric/network';
52
- import type { OrchestrationService } from '../service.js';
53
44
  //# sourceMappingURL=orchestration-proposal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"orchestration-proposal.d.ts","sourceRoot":"","sources":["orchestration-proposal.js"],"names":[],"mappings":"AA4BO,4LAZI,eAAe,GAAG;IAC5B,OAAW,EAAE;QACb,aAAmB,EAAE,aAAa,CAAC;KAC9B,CAAC;IACN,OAAW,EAAE;QACb,aAAmB,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;QACnC,gBAAsB,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;QACtC,gBAAsB,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;KACjC,CAAC;CACH,WACO;IAAE,OAAO,EAAE;QAAE,gBAAgB,EAAE,YAAY,CAAA;KAAE,CAAA;CAAE,iBAiCzD;AAoEM,+FAFI,eAAe,iBAYzB;AAWM,iFAPI,eAAe,GAAG;IAC5B,OAAW,EAAE;QACb,aAAmB,EAAE,oBAAoB,CAAC;KACrC,CAAC;CACH,YACO,MAAM,iBAOhB;AAEM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBL;mCAxK8B,iBAAiB;0CACV,eAAe"}
1
+ {"version":3,"file":"orchestration-proposal.d.ts","sourceRoot":"","sources":["orchestration-proposal.js"],"names":[],"mappings":"AAyBO,mJAVI,eAAe,GAAG;IAC5B,OAAW,EAAE;QACb,aAAmB,EAAE,aAAa,CAAC;KAC9B,CAAC;IACN,OAAW,EAAE;QACb,gBAAsB,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;KACjC,CAAC;CACH,WACO;IAAE,OAAO,EAAE;QAAE,gBAAgB,EAAE,YAAY,CAAA;KAAE,CAAA;CAAE,iBA6BzD;AAoEM,+FAFI,eAAe,iBAYzB;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBL;mCAjJ8B,iBAAiB"}
@@ -9,8 +9,7 @@ const trace = makeTracer('CoreEvalOrchestration', true);
9
9
 
10
10
  /**
11
11
  * @import {PortAllocator} from '@agoric/network';
12
- * @import {OrchestrationService} from '../service.js'
13
- * @import {OrchestrationVat} from '../vat-orchestration.js'
12
+ * @import {CosmosInterchainService} from '../exos/cosmos-interchain-service.js'
14
13
  */
15
14
 
16
15
  /**
@@ -19,8 +18,6 @@ const trace = makeTracer('CoreEvalOrchestration', true);
19
18
  * portAllocator: PortAllocator;
20
19
  * };
21
20
  * produce: {
22
- * orchestration: Producer<any>;
23
- * orchestrationKit: Producer<any>;
24
21
  * orchestrationVat: Producer<any>;
25
22
  * };
26
23
  * }} powers
@@ -29,11 +26,7 @@ const trace = makeTracer('CoreEvalOrchestration', true);
29
26
  export const setupOrchestrationVat = async (
30
27
  {
31
28
  consume: { loadCriticalVat, portAllocator: portAllocatorP },
32
- produce: {
33
- orchestrationVat,
34
- orchestration,
35
- orchestrationKit: orchestrationKitP,
36
- },
29
+ produce: { orchestrationVat, ...produce },
37
30
  },
38
31
  options,
39
32
  ) => {
@@ -49,14 +42,14 @@ export const setupOrchestrationVat = async (
49
42
 
50
43
  const portAllocator = await portAllocatorP;
51
44
 
52
- const newOrchestrationKit = await E(vats.orchestration).makeOrchestrationKit({
45
+ const cosmosInterchainService = await E(
46
+ vats.orchestration,
47
+ ).makeCosmosInterchainService({
53
48
  portAllocator,
54
49
  });
55
50
 
56
- orchestration.reset();
57
- orchestration.resolve(newOrchestrationKit.public);
58
- orchestrationKitP.reset();
59
- orchestrationKitP.resolve(newOrchestrationKit);
51
+ produce.cosmosInterchainService.reset();
52
+ produce.cosmosInterchainService.resolve(cosmosInterchainService);
60
53
  };
61
54
 
62
55
  /**
@@ -138,21 +131,6 @@ export const initChainInfo = async ({
138
131
  };
139
132
  harden(initChainInfo);
140
133
 
141
- /**
142
- * @param {BootstrapPowers & {
143
- * consume: {
144
- * orchestration: OrchestrationService;
145
- * };
146
- * }} powers
147
- * @param {object} _options
148
- */
149
- export const addOrchestrationToClient = async (
150
- { consume: { client, orchestration } },
151
- _options,
152
- ) => {
153
- return E(client).assignBundle([_a => ({ orchestration })]);
154
- };
155
-
156
134
  export const getManifestForOrchestration = (_powers, { orchestrationRef }) => ({
157
135
  manifest: {
158
136
  [setupOrchestrationVat.name]: {
@@ -161,8 +139,7 @@ export const getManifestForOrchestration = (_powers, { orchestrationRef }) => ({
161
139
  portAllocator: 'portAllocator',
162
140
  },
163
141
  produce: {
164
- orchestration: 'orchestration',
165
- orchestrationKit: 'orchestrationKit',
142
+ cosmosInterchainService: 'cosmosInterchainService',
166
143
  orchestrationVat: 'orchestrationVat',
167
144
  },
168
145
  },
@@ -1,8 +1,8 @@
1
- export function startStakeAtom({ consume: { agoricNames, board, chainStorage, chainTimerService, orchestration, startUpgradable, }, installation: { consume: { stakeIca }, }, instance: { produce: { stakeAtom: produceInstance }, }, }: BootstrapPowers & {
1
+ export function startStakeAtom({ consume: { agoricNames, board, chainStorage, chainTimerService, cosmosInterchainService, startUpgradable, }, installation: { consume: { stakeIca }, }, instance: { produce: { stakeAtom: produceInstance }, }, }: BootstrapPowers & {
2
2
  installation: {
3
3
  consume: {
4
4
  stakeIca: Installation<(zcf: ZCF<StakeIcaTerms>, privateArgs: {
5
- orchestration: import("../service.js").OrchestrationService;
5
+ cosmosInterchainService: import("../types.js").CosmosInterchainService;
6
6
  storageNode: StorageNode;
7
7
  marshaller: Marshaller;
8
8
  timer: import("@agoric/time").TimerService;
@@ -82,7 +82,7 @@ export function getManifestForStakeAtom({ restoreRef }: {
82
82
  board: boolean;
83
83
  chainStorage: boolean;
84
84
  chainTimerService: boolean;
85
- orchestration: boolean;
85
+ cosmosInterchainService: boolean;
86
86
  startUpgradable: boolean;
87
87
  };
88
88
  installation: {
@@ -1 +1 @@
1
- {"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAuBO,yOAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,CAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA0D,CACjD,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAoDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;mCAjG4C,+BAA+B"}
1
+ {"version":3,"file":"start-stakeAtom.d.ts","sourceRoot":"","sources":["start-stakeAtom.js"],"names":[],"mappings":"AAyBO,mPAVI,eAAe,GAAG;IAC5B,YAAgB,EAAE;QAClB,OAAa,EAAE;YACf,QAAgB,EAAE,YAAY,CAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA0D,CACjD,CAAC;SACH,CAAC;KACH,CAAC;CACH,iBAqDH;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN;mCAlG4C,+BAA+B"}