@agoric/orchestration 0.1.1-dev-31a57fc.0 → 0.1.1-dev-ab4941a.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 (36) hide show
  1. package/package.json +17 -17
  2. package/src/chain-info.d.ts +2 -2
  3. package/src/chain-info.d.ts.map +1 -1
  4. package/src/chain-info.js +20 -37
  5. package/src/examples/basic-flows.contract.d.ts +4 -1
  6. package/src/examples/basic-flows.contract.d.ts.map +1 -1
  7. package/src/examples/basic-flows.contract.js +1 -1
  8. package/src/examples/sendAnywhere.contract.d.ts +1 -1
  9. package/src/examples/swapExample.contract.d.ts +1 -1
  10. package/src/examples/swapExample.contract.d.ts.map +1 -1
  11. package/src/examples/swapExample.contract.js +0 -7
  12. package/src/examples/unbondExample.contract.d.ts +2 -3
  13. package/src/examples/unbondExample.contract.d.ts.map +1 -1
  14. package/src/examples/unbondExample.contract.js +0 -2
  15. package/src/exos/chain-hub.d.ts +14 -12
  16. package/src/exos/chain-hub.d.ts.map +1 -1
  17. package/src/exos/chain-hub.js +108 -28
  18. package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
  19. package/src/exos/cosmos-orchestration-account.js +0 -1
  20. package/src/exos/local-chain-facade.d.ts +1 -0
  21. package/src/exos/local-chain-facade.d.ts.map +1 -1
  22. package/src/exos/local-chain-facade.js +1 -0
  23. package/src/exos/local-orchestration-account.d.ts.map +1 -1
  24. package/src/exos/local-orchestration-account.js +0 -1
  25. package/src/exos/remote-chain-facade.d.ts +1 -0
  26. package/src/exos/remote-chain-facade.d.ts.map +1 -1
  27. package/src/exos/remote-chain-facade.js +1 -0
  28. package/src/facade.d.ts +5 -2
  29. package/src/facade.d.ts.map +1 -1
  30. package/src/facade.js +14 -21
  31. package/src/proposals/orchestration-proposal.js +2 -2
  32. package/src/typeGuards.d.ts +21 -26
  33. package/src/typeGuards.d.ts.map +1 -1
  34. package/src/typeGuards.js +13 -7
  35. package/src/utils/start-helper.d.ts +6 -6
  36. package/src/utils/start-helper.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/orchestration",
3
- "version": "0.1.1-dev-31a57fc.0+31a57fc",
3
+ "version": "0.1.1-dev-ab4941a.0+ab4941a",
4
4
  "description": "Chain abstraction for Agoric's orchestration clients",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -33,19 +33,19 @@
33
33
  },
34
34
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
35
35
  "dependencies": {
36
- "@agoric/async-flow": "0.1.1-dev-31a57fc.0+31a57fc",
37
- "@agoric/cosmic-proto": "0.4.1-dev-31a57fc.0+31a57fc",
38
- "@agoric/ertp": "0.16.3-dev-31a57fc.0+31a57fc",
39
- "@agoric/internal": "0.3.3-dev-31a57fc.0+31a57fc",
40
- "@agoric/network": "0.1.1-dev-31a57fc.0+31a57fc",
41
- "@agoric/notifier": "0.6.3-dev-31a57fc.0+31a57fc",
42
- "@agoric/store": "0.9.3-dev-31a57fc.0+31a57fc",
43
- "@agoric/time": "0.3.3-dev-31a57fc.0+31a57fc",
44
- "@agoric/vat-data": "0.5.3-dev-31a57fc.0+31a57fc",
45
- "@agoric/vats": "0.15.2-dev-31a57fc.0+31a57fc",
46
- "@agoric/vow": "0.1.1-dev-31a57fc.0+31a57fc",
47
- "@agoric/zoe": "0.26.3-dev-31a57fc.0+31a57fc",
48
- "@agoric/zone": "0.2.3-dev-31a57fc.0+31a57fc",
36
+ "@agoric/async-flow": "0.1.1-dev-ab4941a.0+ab4941a",
37
+ "@agoric/cosmic-proto": "0.4.1-dev-ab4941a.0+ab4941a",
38
+ "@agoric/ertp": "0.16.3-dev-ab4941a.0+ab4941a",
39
+ "@agoric/internal": "0.3.3-dev-ab4941a.0+ab4941a",
40
+ "@agoric/network": "0.1.1-dev-ab4941a.0+ab4941a",
41
+ "@agoric/notifier": "0.6.3-dev-ab4941a.0+ab4941a",
42
+ "@agoric/store": "0.9.3-dev-ab4941a.0+ab4941a",
43
+ "@agoric/time": "0.3.3-dev-ab4941a.0+ab4941a",
44
+ "@agoric/vat-data": "0.5.3-dev-ab4941a.0+ab4941a",
45
+ "@agoric/vats": "0.15.2-dev-ab4941a.0+ab4941a",
46
+ "@agoric/vow": "0.1.1-dev-ab4941a.0+ab4941a",
47
+ "@agoric/zoe": "0.26.3-dev-ab4941a.0+ab4941a",
48
+ "@agoric/zone": "0.2.3-dev-ab4941a.0+ab4941a",
49
49
  "@endo/base64": "^1.0.5",
50
50
  "@endo/errors": "^1.2.2",
51
51
  "@endo/far": "^1.1.2",
@@ -54,7 +54,7 @@
54
54
  "@noble/hashes": "github:paulmillr/noble-hashes#ae060da"
55
55
  },
56
56
  "devDependencies": {
57
- "@agoric/swingset-liveslots": "0.10.3-dev-31a57fc.0+31a57fc",
57
+ "@agoric/swingset-liveslots": "0.10.3-dev-ab4941a.0+ab4941a",
58
58
  "@chain-registry/client": "^1.47.4",
59
59
  "@cosmjs/amino": "^0.32.3",
60
60
  "@cosmjs/proto-signing": "^0.32.3",
@@ -92,7 +92,7 @@
92
92
  "access": "public"
93
93
  },
94
94
  "typeCoverage": {
95
- "atLeast": 97.99
95
+ "atLeast": 98.04
96
96
  },
97
- "gitHead": "31a57fcc7ed223d138521e7bf9de090378f29962"
97
+ "gitHead": "ab4941a38e563ef355fadbf464e1694e02923d54"
98
98
  }
@@ -1,5 +1,5 @@
1
- export function registerChain(agoricNamesAdmin: ERef<import("@agoric/vats").NameHubKit["nameAdmin"]>, name: string, chainInfo: CosmosChainInfo, log?: ((...messages: string[]) => void) | undefined): Promise<void>;
2
- export function registerChainNamespace(agoricNamesAdmin: ERef<import("@agoric/vats").NameHubKit["nameAdmin"]>, log?: ((...messages: string[]) => void) | undefined): Promise<void>;
1
+ export function registerChain(agoricNamesAdmin: ERef<import("@agoric/vats").NameHubKit["nameAdmin"]>, name: string, chainInfo: CosmosChainInfo, log?: ((...messages: string[]) => void) | undefined, handledConnections?: Set<string> | undefined): Promise<void>;
2
+ export function registerKnownChains(agoricNamesAdmin: ERef<import("@agoric/vats").NameHubKit["nameAdmin"]>, log?: ((...messages: string[]) => void) | undefined): Promise<void>;
3
3
  export type ChainInfo = CosmosChainInfo | EthChainInfo;
4
4
  export type KnownChains = typeof knownChains;
5
5
  import type { CosmosChainInfo } from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"chain-info.d.ts","sourceRoot":"","sources":["chain-info.js"],"names":[],"mappings":"AAsGO,gDALI,IAAI,CAAC,OAAO,cAAc,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,QACpD,MAAM,aACN,eAAe,uBACD,MAAM,EAAE,KAAK,IAAI,8BAoCzC;AAMM,yDAHI,IAAI,CAAC,OAAO,cAAc,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,uBACtC,MAAM,EAAE,KAAK,IAAI,8BAMzC;wBA1Ia,eAAe,GAAG,YAAY;0BAyD9B,OAAO,WAAW;qCA3DoC,YAAY;kCAAZ,YAAY;AAAhF,oFAAoF;AAEpF,0DAA0D;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDE"}
package/src/chain-info.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { E } from '@endo/far';
2
2
  import { mustMatch } from '@endo/patterns';
3
- import { connectionKey } from './exos/chain-hub.js';
3
+ import { normalizeConnectionInfo } from './exos/chain-hub.js';
4
4
  import fetchedChainInfo from './fetched-chain-info.js'; // Refresh with scripts/refresh-chain-info.ts
5
5
  import { CosmosChainInfoShape } from './typeGuards.js';
6
6
 
@@ -65,46 +65,20 @@ const knownChains = /** @satisfies {Record<string, ChainInfo>} */ (
65
65
 
66
66
  /** @typedef {typeof knownChains} KnownChains */
67
67
 
68
- /**
69
- * Utility to reverse connection info perspective.
70
- *
71
- * @param {IBCConnectionInfo} connInfo
72
- * @returns {IBCConnectionInfo}
73
- */
74
- const reverseConnInfo = connInfo => {
75
- const { transferChannel } = connInfo;
76
- return {
77
- id: connInfo.counterparty.connection_id,
78
- client_id: connInfo.counterparty.client_id,
79
- counterparty: {
80
- client_id: connInfo.client_id,
81
- connection_id: connInfo.id,
82
- prefix: {
83
- key_prefix: '',
84
- },
85
- },
86
- state: connInfo.state,
87
- transferChannel: {
88
- ...transferChannel,
89
- channelId: transferChannel.counterPartyChannelId,
90
- counterPartyChannelId: transferChannel.channelId,
91
- portId: transferChannel.counterPartyPortId,
92
- counterPartyPortId: transferChannel.portId,
93
- },
94
- };
95
- };
96
-
97
68
  /**
98
69
  * @param {ERef<import('@agoric/vats').NameHubKit['nameAdmin']>} agoricNamesAdmin
99
70
  * @param {string} name
100
71
  * @param {CosmosChainInfo} chainInfo
101
72
  * @param {(...messages: string[]) => void} [log]
73
+ * @param {Set<string>} [handledConnections] connection keys that need not be
74
+ * updated
102
75
  */
103
76
  export const registerChain = async (
104
77
  agoricNamesAdmin,
105
78
  name,
106
79
  chainInfo,
107
80
  log = () => {},
81
+ handledConnections = new Set(),
108
82
  ) => {
109
83
  const { nameAdmin } = await E(agoricNamesAdmin).provideChild('chain');
110
84
  const { nameAdmin: connAdmin } =
@@ -120,28 +94,37 @@ export const registerChain = async (
120
94
  ];
121
95
 
122
96
  const { chainId } = chainInfo;
123
- // FIXME updates redundantly, twice per edge
124
97
  for (const [counterChainId, connInfo] of Object.entries(connections)) {
125
- const key = connectionKey(chainId, counterChainId);
126
- const normalizedConnInfo =
127
- chainId < counterChainId ? connInfo : reverseConnInfo(connInfo);
98
+ const [key, connectionInfo] = normalizeConnectionInfo(
99
+ chainId,
100
+ counterChainId,
101
+ connInfo,
102
+ );
103
+ if (handledConnections.has(key)) {
104
+ continue;
105
+ }
128
106
 
129
107
  promises.push(
130
108
  E(connAdmin)
131
- .update(key, normalizedConnInfo)
109
+ .update(key, connectionInfo)
132
110
  .then(() => log(`registering agoricNames chainConnection.${key}`)),
133
111
  );
112
+
113
+ handledConnections.add(key);
134
114
  }
135
115
  // Bundle to pipeline IO
136
116
  await Promise.all(promises);
137
117
  };
138
118
 
139
119
  /**
120
+ * Register all the chains that are known statically.
121
+ *
140
122
  * @param {ERef<import('@agoric/vats').NameHubKit['nameAdmin']>} agoricNamesAdmin
141
123
  * @param {(...messages: string[]) => void} [log]
142
124
  */
143
- export const registerChainNamespace = async (agoricNamesAdmin, log) => {
125
+ export const registerKnownChains = async (agoricNamesAdmin, log) => {
126
+ const handledConnections = new Set();
144
127
  for await (const [name, info] of Object.entries(knownChains)) {
145
- await registerChain(agoricNamesAdmin, name, info, log);
128
+ await registerChain(agoricNamesAdmin, name, info, log, handledConnections);
146
129
  }
147
130
  };
@@ -2,10 +2,13 @@ export function start(zcf: ZCF, privateArgs: OrchestrationPowers & {
2
2
  marshaller: Marshaller;
3
3
  }, baggage: Baggage): Promise<{
4
4
  publicFacet: import("@endo/exo").Guarded<{
5
- makeOrchAccountInvitation(): Promise<Invitation<unknown, never>>;
5
+ makeOrchAccountInvitation(): Promise<Invitation<Vow<import("../utils/zoe-tools.js").ResolvedContinuingOfferResult>, {
6
+ chainName: string;
7
+ }>>;
6
8
  }>;
7
9
  }>;
8
10
  export type BasicFlowsSF = typeof start;
9
11
  import type { OrchestrationPowers } from '../utils/start-helper.js';
10
12
  import type { Baggage } from '@agoric/vat-data';
13
+ import type { Vow } from '@agoric/vow';
11
14
  //# sourceMappingURL=basic-flows.contract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"basic-flows.contract.d.ts","sourceRoot":"","sources":["basic-flows.contract.js"],"names":[],"mappings":"AAsCO,2BANI,GAAG,eACH,mBAAmB,GAAG;IAChC,UAAc,EAAE,UAAU,CAAC;CACxB,WACO,OAAO;;;;GAiCjB;2BAEa,OAAO,KAAK;yCA5DY,0BAA0B;6BAFtC,kBAAkB"}
1
+ {"version":3,"file":"basic-flows.contract.d.ts","sourceRoot":"","sources":["basic-flows.contract.js"],"names":[],"mappings":"AAuCO,2BANI,GAAG,eACH,mBAAmB,GAAG;IAChC,UAAc,EAAE,UAAU,CAAC;CACxB,WACO,OAAO;;;uBAfM,MAAM;;;GA+C7B;2BAEa,OAAO,KAAK;yCA3DY,0BAA0B;6BAHtC,kBAAkB;yBAEZ,aAAa"}
@@ -9,6 +9,7 @@ import { provideOrchestration } from '../utils/start-helper.js';
9
9
  /**
10
10
  * @import {Baggage} from '@agoric/vat-data';
11
11
  * @import {Orchestrator} from '@agoric/orchestration';
12
+ * @import {Vow, VowTools} from '@agoric/vow';
12
13
  * @import {OrchestrationPowers} from '../utils/start-helper.js';
13
14
  */
14
15
 
@@ -44,7 +45,6 @@ export const start = async (zcf, privateArgs, baggage) => {
44
45
  privateArgs.marshaller,
45
46
  );
46
47
 
47
- /** @type {OfferHandler} */
48
48
  const makeOrchAccount = orchestrate(
49
49
  'makeOrchAccount',
50
50
  undefined,
@@ -22,7 +22,7 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: Orchestrati
22
22
  marshaller: Marshaller;
23
23
  }, baggage: import("@agoric/vat-data").Baggage) => Promise<{
24
24
  publicFacet: import("@endo/exo").Guarded<{
25
- makeSendInvitation(): Promise<Invitation<any, any>>;
25
+ makeSendInvitation(): Promise<Invitation<import("@agoric/vow").Vow<any>, any>>;
26
26
  }>;
27
27
  creatorFacet: import("@endo/exo").Guarded<{
28
28
  /**
@@ -13,7 +13,7 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: {
13
13
  marshaller: Marshaller;
14
14
  }, baggage: import("@agoric/vat-data").Baggage) => Promise<{
15
15
  publicFacet: import("@endo/exo").Guarded<{
16
- makeSwapAndStakeInvitation(): Promise<Invitation<unknown, {
16
+ makeSwapAndStakeInvitation(): Promise<Invitation<import("@agoric/vow").Vow<void>, {
17
17
  staked: Amount<"nat">;
18
18
  validator: CosmosValidatorAddress;
19
19
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"swapExample.contract.d.ts","sourceRoot":"","sources":["swapExample.contract.js"],"names":[],"mappings":"AA8DA,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAWnC;AASK,0CAHI,KAAK;;;EAIsC;AAmDtD;iBA5CkB,OAAO,OAAO,CAAC;gBAChB,OAAO,UAAU,CAAC;0BACR,OAAO,uBAAuB,CAAC;iBACxC,OAAO,WAAW,CAAC;kBAClB,OAAO,YAAY,CAAC;gBACtB,UAAU;;;;oBAYV,MAAM,CAAC,KAAK,CAAC;uBAAa,sBAAsB;;;GA2BhB;6BAxHvB,cAAc;4BAFf,kBAAkB;gCADd,gCAAgC;6CAEnB,sCAAsC;kCAHjD,cAAc;4CADU,aAAa"}
1
+ {"version":3,"file":"swapExample.contract.d.ts","sourceRoot":"","sources":["swapExample.contract.js"],"names":[],"mappings":"AA6DA,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAWnC;AASK,0CAHI,KAAK;;;EAIsC;AA6CtD;iBAtCkB,OAAO,OAAO,CAAC;gBAChB,OAAO,UAAU,CAAC;0BACR,OAAO,uBAAuB,CAAC;iBACxC,OAAO,WAAW,CAAC;kBAClB,OAAO,YAAY,CAAC;gBACtB,UAAU;;;;oBAtEhB,MAAM,CAAC,KAAK,CAAC;uBACb,sBAAsB;;;GAsGgB;6BAlHvB,cAAc;4BAFf,kBAAkB;gCADd,gCAAgC;6CAEnB,sCAAsC;kCAHjD,cAAc;4CADU,aAAa"}
@@ -5,7 +5,6 @@ import { orcUtils } from '../utils/orc.js';
5
5
  import { withOrchestration } from '../utils/start-helper.js';
6
6
 
7
7
  /**
8
- * @import {GuestInterface, GuestOf} from '@agoric/async-flow';
9
8
  * @import {LocalTransfer} from '../utils/zoe-tools.js';
10
9
  * @import {Orchestrator, CosmosValidatorAddress} from '../types.js'
11
10
  * @import {TimerService} from '@agoric/time';
@@ -102,12 +101,6 @@ const contract = async (zcf, privateArgs, zone, { orchestrate, zoeTools }) => {
102
101
  const { brands } = zcf.getTerms();
103
102
 
104
103
  /** deprecated historical example */
105
- /**
106
- * @type {OfferHandler<
107
- * unknown,
108
- * { staked: Amount<'nat'>; validator: CosmosValidatorAddress }
109
- * >}
110
- */
111
104
  const swapAndStakeHandler = orchestrate(
112
105
  'LSTTia',
113
106
  { zcf, localTransfer: zoeTools.localTransfer },
@@ -5,9 +5,9 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: {
5
5
  storageNode: Remote<StorageNode>;
6
6
  marshaller: Marshaller;
7
7
  timerService: Remote<TimerService>;
8
- }, baggage: Baggage) => Promise<{
8
+ }, baggage: import("@agoric/vat-data").Baggage) => Promise<{
9
9
  publicFacet: import("@endo/exo").Guarded<{
10
- makeUnbondAndLiquidStakeInvitation(): Promise<Invitation<unknown, never>>;
10
+ makeUnbondAndLiquidStakeInvitation(): Promise<Invitation<import("@agoric/vow").Vow<void>, undefined>>;
11
11
  }>;
12
12
  }>;
13
13
  import type { NameHub } from '@agoric/vats';
@@ -15,5 +15,4 @@ import type { Remote } from '@agoric/internal';
15
15
  import type { LocalChain } from '@agoric/vats/src/localchain.js';
16
16
  import type { CosmosInterchainService } from '../exos/cosmos-interchain-service.js';
17
17
  import type { TimerService } from '@agoric/time';
18
- import type { Baggage } from '@agoric/vat-data';
19
18
  //# sourceMappingURL=unbondExample.contract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unbondExample.contract.d.ts","sourceRoot":"","sources":["unbondExample.contract.js"],"names":[],"mappings":"AAuFA;iBArCkB,OAAO,OAAO,CAAC;gBAChB,OAAO,UAAU,CAAC;0BACR,OAAO,uBAAuB,CAAC;iBACxC,OAAO,WAAW,CAAC;gBACpB,UAAU;kBACR,OAAO,YAAY,CAAC;;;;;GAgCU;6BA/EvB,cAAc;4BACf,kBAAkB;gCAFd,gCAAgC;6CAInB,sCAAsC;kCANjD,cAAc;6BACnB,kBAAkB"}
1
+ {"version":3,"file":"unbondExample.contract.d.ts","sourceRoot":"","sources":["unbondExample.contract.js"],"names":[],"mappings":"AAqFA;iBApCkB,OAAO,OAAO,CAAC;gBAChB,OAAO,UAAU,CAAC;0BACR,OAAO,uBAAuB,CAAC;iBACxC,OAAO,WAAW,CAAC;gBACpB,UAAU;kBACR,OAAO,YAAY,CAAC;;;;;GA+BU;6BA9EvB,cAAc;4BACf,kBAAkB;gCAFd,gCAAgC;6CAInB,sCAAsC;kCALjD,cAAc"}
@@ -4,7 +4,6 @@ import { withOrchestration } from '../utils/start-helper.js';
4
4
  /**
5
5
  * @import {Orchestrator, IcaAccount, CosmosValidatorAddress} from '../types.js'
6
6
  * @import {TimerService} from '@agoric/time';
7
- * @import {Baggage} from '@agoric/vat-data';
8
7
  * @import {LocalChain} from '@agoric/vats/src/localchain.js';
9
8
  * @import {NameHub} from '@agoric/vats';
10
9
  * @import {Remote} from '@agoric/internal';
@@ -59,7 +58,6 @@ const unbondAndLiquidStakeFn = async (orch, { zcf }, _seat, _offerArgs) => {
59
58
  * @param {OrchestrationTools} tools
60
59
  */
61
60
  const contract = async (zcf, privateArgs, zone, { orchestrate }) => {
62
- /** @type {OfferHandler} */
63
61
  const unbondAndLiquidStake = orchestrate(
64
62
  'LSTTia',
65
63
  { zcf },
@@ -17,6 +17,8 @@ export const CHAIN_KEY: "chain";
17
17
  /** namehub for connection info */
18
18
  export const CONNECTIONS_KEY: "chainConnection";
19
19
  export function connectionKey(chainId1: string, chainId2: string): string;
20
+ export function reverseConnInfo(connInfo: IBCConnectionInfo): IBCConnectionInfo;
21
+ export function normalizeConnectionInfo(primaryChainId: string, counterChainId: string, directed: IBCConnectionInfo): [string, IBCConnectionInfo];
20
22
  export function makeChainHub(agoricNames: Remote<NameHub>, vowTools: VowTools): import("@endo/exo").Guarded<{
21
23
  /**
22
24
  * Register a new chain. The name will override a name in well known chain
@@ -38,40 +40,40 @@ export function makeChainHub(agoricNames: Remote<NameHub>, vowTools: VowTools):
38
40
  */
39
41
  getChainInfo<K extends string>(chainName: K): Vow<ActualChainInfo<K>>;
40
42
  /**
41
- * @param {string} chainId1
42
- * @param {string} chainId2
43
- * @param {IBCConnectionInfo} connectionInfo
43
+ * @param {string} primaryChainId
44
+ * @param {string} counterpartyChainId
45
+ * @param {IBCConnectionInfo} connectionInfo from primary to counterparty
44
46
  */
45
- registerConnection(chainId1: string, chainId2: string, connectionInfo: IBCConnectionInfo): void;
47
+ registerConnection(primaryChainId: string, counterpartyChainId: string, connectionInfo: IBCConnectionInfo): void;
46
48
  /**
47
- * @param {string | { chainId: string }} chain1
48
- * @param {string | { chainId: string }} chain2
49
+ * @param {string | { chainId: string }} primary the primary chain
50
+ * @param {string | { chainId: string }} counter the counterparty chain
49
51
  * @returns {Vow<IBCConnectionInfo>}
50
52
  */
51
- getConnectionInfo(chain1: string | {
53
+ getConnectionInfo(primary: string | {
52
54
  chainId: string;
53
- }, chain2: string | {
55
+ }, counter: string | {
54
56
  chainId: string;
55
57
  }): Vow<IBCConnectionInfo>;
56
58
  /**
57
59
  * @template {string} C1
58
60
  * @template {string} C2
59
- * @param {C1} chainName1
60
- * @param {C2} chainName2
61
+ * @param {C1} primaryName the primary chain name
62
+ * @param {C2} counterName the counterparty chain name
61
63
  * @returns {Vow<
62
64
  * [ActualChainInfo<C1>, ActualChainInfo<C2>, IBCConnectionInfo]
63
65
  * >}
64
66
  */
65
- getChainsAndConnection<C1 extends string, C2 extends string>(chainName1: C1, chainName2: C2): Vow<[ActualChainInfo<C1>, ActualChainInfo<C2>, IBCConnectionInfo]>;
67
+ getChainsAndConnection<C1 extends string, C2 extends string>(primaryName: C1, counterName: C2): Vow<[ActualChainInfo<C1>, ActualChainInfo<C2>, IBCConnectionInfo]>;
66
68
  }>;
67
69
  export type ActualChainInfo<K extends string> = K extends keyof KnownChains ? Omit<KnownChains[K], "connections"> : ChainInfo;
68
70
  export type ChainHub = ReturnType<typeof makeChainHub>;
71
+ import type { IBCConnectionInfo } from '../cosmos-api.js';
69
72
  import type { NameHub } from '@agoric/vats';
70
73
  import type { Remote } from '@agoric/internal';
71
74
  import type { VowTools } from '@agoric/vow';
72
75
  import type { CosmosChainInfo } from '../cosmos-api.js';
73
76
  import type { Vow } from '@agoric/vow';
74
- import type { IBCConnectionInfo } from '../cosmos-api.js';
75
77
  import type { KnownChains } from '../chain-info.js';
76
78
  import type { ChainInfo } from '../chain-info.js';
77
79
  //# sourceMappingURL=chain-hub.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chain-hub.d.ts","sourceRoot":"","sources":["ch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AAM,YACN,MAAM,UAUhB;AAQM,0CAHI,iBAAiB,GACf,iBAAiB,CAuB7B;AAUM,wDALI,MAAM,kBACN,MAAM,YACN,iBAAiB,GACf,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAavC;AAuDM,0CAHI,OAAO,OAAO,CAAC,YACf,QAAQ;IAoGf;;;;;;;;;;;OAWG;wBAFQ,MAAM,aACN,eAAe;IAK1B;;;;OAIG;iBAHmB,CAAC,SAAV,MAAQ,aACV,CAAC,GACC,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;IAYpC;;;;OAIG;uCAHQ,MAAM,uBACN,MAAM,kBACN,iBAAiB;IAW5B;;;;OAIG;+BAHQ,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,WAC5B,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAC1B,IAAI,iBAAiB,CAAC;IAmBnC;;;;;;;;OAQG;2BAPmB,EAAE,SAAX,MAAQ,EACC,EAAE,SAAX,MAAQ,eACV,EAAE,eACF,EAAE,GACA,IACZ,CAAK,eAAe,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAC9D;GASP;4BAnUqB,CAAC,SAAV,MAAQ,IACR,CAAC,SAAS,MAAM,WAAW,GACjC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GACnC,SAAS;uBAiUF,UAAU,CAAC,OAAO,YAAY,CAAC;uCA3UQ,kBAAkB;6BAF7C,cAAc;4BAIf,kBAAkB;8BAHX,aAAa;qCACQ,kBAAkB;yBADvC,aAAa;iCAEJ,kBAAkB;+BAAlB,kBAAkB"}
@@ -56,6 +56,75 @@ export const connectionKey = (chainId1, chainId2) => {
56
56
  return [chainId1, chainId2].sort().join(CHAIN_ID_SEPARATOR);
57
57
  };
58
58
 
59
+ /**
60
+ * Utility to reverse connection info perspective.
61
+ *
62
+ * @param {IBCConnectionInfo} connInfo
63
+ * @returns {IBCConnectionInfo}
64
+ */
65
+ export const reverseConnInfo = connInfo => {
66
+ const { transferChannel } = connInfo;
67
+ return {
68
+ id: connInfo.counterparty.connection_id,
69
+ client_id: connInfo.counterparty.client_id,
70
+ counterparty: {
71
+ client_id: connInfo.client_id,
72
+ connection_id: connInfo.id,
73
+ prefix: {
74
+ key_prefix: 'FIXME',
75
+ },
76
+ },
77
+ state: connInfo.state,
78
+ transferChannel: {
79
+ ...transferChannel,
80
+ channelId: transferChannel.counterPartyChannelId,
81
+ counterPartyChannelId: transferChannel.channelId,
82
+ portId: transferChannel.counterPartyPortId,
83
+ counterPartyPortId: transferChannel.portId,
84
+ },
85
+ };
86
+ };
87
+
88
+ /**
89
+ * Convert the info to an undirected form.
90
+ *
91
+ * @param {string} primaryChainId
92
+ * @param {string} counterChainId
93
+ * @param {IBCConnectionInfo} directed
94
+ * @returns {[string, IBCConnectionInfo]}
95
+ */
96
+ export const normalizeConnectionInfo = (
97
+ primaryChainId,
98
+ counterChainId,
99
+ directed,
100
+ ) => {
101
+ const key = connectionKey(primaryChainId, counterChainId);
102
+ if (primaryChainId < counterChainId) {
103
+ return [key, directed];
104
+ } else {
105
+ return [key, reverseConnInfo(directed)];
106
+ }
107
+ };
108
+
109
+ /**
110
+ * Provide a view on the connection from the primary chain's perspective.
111
+ *
112
+ * @param {string} primaryChainId
113
+ * @param {string} counterChainId
114
+ * @param {IBCConnectionInfo} normalized
115
+ */
116
+ const denormalizeConnectionInfo = (
117
+ primaryChainId,
118
+ counterChainId,
119
+ normalized,
120
+ ) => {
121
+ if (primaryChainId < counterChainId) {
122
+ return normalized;
123
+ } else {
124
+ return reverseConnInfo(normalized);
125
+ }
126
+ };
127
+
59
128
  const ChainIdArgShape = M.or(
60
129
  M.string(),
61
130
  M.splitRecord(
@@ -146,7 +215,8 @@ export const makeChainHub = (agoricNames, vowTools) => {
146
215
  if (!connectionInfos.has(key)) {
147
216
  connectionInfos.init(key, connectionInfo);
148
217
  }
149
- return connectionInfo;
218
+
219
+ return denormalizeConnectionInfo(chainId1, chainId2, connectionInfo);
150
220
  } catch (e) {
151
221
  console.error('lookupConnectionInfo', chainId1, chainId2, 'error', e);
152
222
  throw makeError(`connection not found: ${chainId1}<->${chainId2}`);
@@ -161,26 +231,26 @@ export const makeChainHub = (agoricNames, vowTools) => {
161
231
  /**
162
232
  * @template {string} C1
163
233
  * @template {string} C2
164
- * @param {C1} chainName1
165
- * @param {C2} chainName2
234
+ * @param {C1} primaryName
235
+ * @param {C2} counterName
166
236
  * @returns {Promise<
167
237
  * [ActualChainInfo<C1>, ActualChainInfo<C2>, IBCConnectionInfo]
168
238
  * >}
169
239
  */
170
240
  // 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(
241
+ async (primaryName, counterName) => {
242
+ const [primary, counter] = await vowTools.asPromise(
173
243
  vowTools.allVows([
174
- chainHub.getChainInfo(chainName1),
175
- chainHub.getChainInfo(chainName2),
244
+ chainHub.getChainInfo(primaryName),
245
+ chainHub.getChainInfo(counterName),
176
246
  ]),
177
247
  );
178
248
  const connectionInfo = await vowTools.asPromise(
179
- chainHub.getConnectionInfo(chain2, chain1),
249
+ chainHub.getConnectionInfo(primary, counter),
180
250
  );
181
251
  return /** @type {[ActualChainInfo<C1>, ActualChainInfo<C2>, IBCConnectionInfo]} */ ([
182
- chain1,
183
- chain2,
252
+ primary,
253
+ counter,
184
254
  connectionInfo,
185
255
  ]);
186
256
  },
@@ -218,43 +288,53 @@ export const makeChainHub = (agoricNames, vowTools) => {
218
288
  return lookupChainInfo(chainName);
219
289
  },
220
290
  /**
221
- * @param {string} chainId1
222
- * @param {string} chainId2
223
- * @param {IBCConnectionInfo} connectionInfo
291
+ * @param {string} primaryChainId
292
+ * @param {string} counterpartyChainId
293
+ * @param {IBCConnectionInfo} connectionInfo from primary to counterparty
224
294
  */
225
- registerConnection(chainId1, chainId2, connectionInfo) {
226
- const key = connectionKey(chainId1, chainId2);
227
- connectionInfos.init(key, connectionInfo);
295
+ registerConnection(primaryChainId, counterpartyChainId, connectionInfo) {
296
+ const [key, normalized] = normalizeConnectionInfo(
297
+ primaryChainId,
298
+ counterpartyChainId,
299
+ connectionInfo,
300
+ );
301
+ connectionInfos.init(key, normalized);
228
302
  },
229
303
 
230
304
  /**
231
- * @param {string | { chainId: string }} chain1
232
- * @param {string | { chainId: string }} chain2
305
+ * @param {string | { chainId: string }} primary the primary chain
306
+ * @param {string | { chainId: string }} counter the counterparty chain
233
307
  * @returns {Vow<IBCConnectionInfo>}
234
308
  */
235
- getConnectionInfo(chain1, chain2) {
236
- const chainId1 = typeof chain1 === 'string' ? chain1 : chain1.chainId;
237
- const chainId2 = typeof chain2 === 'string' ? chain2 : chain2.chainId;
238
- const key = connectionKey(chainId1, chainId2);
309
+ getConnectionInfo(primary, counter) {
310
+ const primaryId = typeof primary === 'string' ? primary : primary.chainId;
311
+ const counterId = typeof counter === 'string' ? counter : counter.chainId;
312
+ const key = connectionKey(primaryId, counterId);
239
313
  if (connectionInfos.has(key)) {
240
- return vowTools.asVow(() => connectionInfos.get(key));
314
+ return vowTools.asVow(() =>
315
+ denormalizeConnectionInfo(
316
+ primaryId,
317
+ counterId,
318
+ connectionInfos.get(key),
319
+ ),
320
+ );
241
321
  }
242
322
 
243
- return lookupConnectionInfo(chainId1, chainId2);
323
+ return lookupConnectionInfo(primaryId, counterId);
244
324
  },
245
325
 
246
326
  /**
247
327
  * @template {string} C1
248
328
  * @template {string} C2
249
- * @param {C1} chainName1
250
- * @param {C2} chainName2
329
+ * @param {C1} primaryName the primary chain name
330
+ * @param {C2} counterName the counterparty chain name
251
331
  * @returns {Vow<
252
332
  * [ActualChainInfo<C1>, ActualChainInfo<C2>, IBCConnectionInfo]
253
333
  * >}
254
334
  */
255
- getChainsAndConnection(chainName1, chainName2) {
335
+ getChainsAndConnection(primaryName, counterName) {
256
336
  // @ts-expect-error XXX generic parameter propagation
257
- return lookupChainsAndConnection(chainName1, chainName2);
337
+ return lookupChainsAndConnection(primaryName, counterName);
258
338
  },
259
339
  });
260
340
 
@@ -1 +1 @@
1
- {"version":3,"file":"cosmos-orchestration-account.d.ts","sourceRoot":"","sources":["cosmos-orchestration-account.js"],"names":[],"mappings":"AAsDA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH,mCAAmC;AACnC;;;;;;;;;;;;;;GAaG;AAgBI,2DALI,IAAI,mBACJ,eAAe,0BACf,QAAQ,OACR,GAAG;aAwDC,UAAU;iBACV,OAAO,WAAW,CAAC;mBACnB,aAAa,GAAG,SAAS;WACzB,OAAO,YAAY,CAAC;;;QAc3B,wDAAwD;;;QAWxD;;;WAGG;6BAFQ,SAAS,GACP,IAAI;;;QAiBjB;;WAEG;8BADQ,SAAS,aAAa,CAAC,EAAE;;;QAYpC;;WAEG;4BADQ,MAAM;;IAgBnB;;;OAGG;;QAED,uDAAuD;4BAA3C,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;QAO5C,6BAA6B;4BAAjB,MAAM;;;QAYlB;;;WAGG;4BAFQ,sBAAsB,UACtB,SAAS;QAUpB;;;;WAIG;iCAHQ,sBAAsB,gBACtB,sBAAsB,UACtB,SAAS;QAYpB,gDAAgD;kCAApC,sBAAsB;QASlC,kEAAkE;gCAAtD,IAAI,CAAC,UAAU,EAAE,kBAAkB,CAAC,EAAE;;QAYlD;;;;WAIG;;;;QAMH,iEAAiE;;QAsBjE,+DAA+D;;QAiB/D,0DAA0D;;QAI1D,wDAAwD;;QAmBxD,2DAA2D;;QAK3D,0DAA0D;;QAyB1D,8DAA8D;;QAgB9D,0DAA0D;;QAsB1D,oDAAoD;;QAMpD,wDAAwD;;QAMxD,6DAA6D;;QAM7D,+DAA+D;;QAK/D,0DAA0D;;;GA6BjE;AAmBM,wDAVI,IAAI,mBACJ,eAAe,YACf,QAAQ,OACR,GAAG,GACD,CACZ,GAAO,IAAI,EAAE,UAAU,CACvB,UA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a;4CAPqH,aAAa;gCAGlJ,wDAAwD;8BAH6E,aAAa;iCAChI,6CAA6C"}
@@ -329,7 +329,6 @@ export const prepareCosmosOrchestrationAccountKit = (
329
329
  // expect this complete in the same run
330
330
  publicSubscribers: await when(holder.getPublicTopics()),
331
331
  invitationMakers,
332
- holder,
333
332
  });
334
333
  });
335
334
  },
@@ -98,6 +98,7 @@ export type LocalChainFacadePowers = {
98
98
  vowTools: VowTools;
99
99
  };
100
100
  export type MakeLocalChainFacade = ReturnType<typeof prepareLocalChainFacade>;
101
+ export type LocalChainFacade = ReturnType<MakeLocalChainFacade>;
101
102
  import type { Zone } from '@agoric/base-zone';
102
103
  import type { IBCConnectionInfo } from '../types.js';
103
104
  import type { Vow } from '@agoric/vow';
@@ -1 +1 @@
1
- {"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AAiIO,8CAHI,IAAI,UACJ,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;QArDzB,6DAA6D;uBAA/C,IAAI,4BAA4B,CAAC,QAAQ,CAAC,CAAC;;;QAazD;;WAEG;wCADQ,CAAC,iBAAiB,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;QAWrD;;;;;;WAMG;+BALQ,OAAO,WAAW,CAAC,wBACnB;YACV,OAAW,EAAE,iBAAiB,CAAC;YAC/B,OAAW,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;SAChC;;;;;;;;;;;;;;;;;;;;;;;;cA4BX;qCA9GY;IACZ,gCAAoC,EAAE,gCAAgC,CAAC;IACvE,aAAiB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACnD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;IAChC,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,QAAY,EAAE,QAAQ,CAAC;CACpB;mCA0GU,UAAU,CAAC,OA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ChainFacade = (zone, powers) => {
134
134
  harden(prepareLocalChainFacade);
135
135
 
136
136
  /** @typedef {ReturnType<typeof prepareLocalChainFacade>} MakeLocalChainFacade */
137
+ /** @typedef {ReturnType<MakeLocalChainFacade>} LocalChainFacade */
@@ -1 +1 @@
1
- {"version":3,"file":"local-orchestration-account.d.ts","sourceRoot":"","sources":["local-orchestration-account.js"],"names":[],"mappings":"AA2EO,0DAPI,IAAI,mBACJ,eAAe,OACf,GAAG,gBACH,OAAO,YAAY,CAAC,mCACpB,QAAQ,YACR,QAAQ;aA6DJ,iBAAiB;aACjB,YAAY;iBACZ,OAAO,WAAW,CAAC;;;QAa1B;;;WAGG;mCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;QAYxB;;;WAGG;qCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;;;QAiBxB;;;;;;WAMG;8BALQ,CACV,SACA,UAAgB,+CAA+C,CAAC,CAC3D,CACF;;;QAcJ;;;WAGG;6DADQ,YAAY;;;QAUvB;;;;;;;;;;WAUG;6DATQ,CACV;YAAM,eAAe,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;SAAE,EAC7D,MAAU,CACP,iCACO;YACV,WAAe,EAAE,YAAY,CAAC;YAC9B,IAAQ,EAAE,qBAAqB,CAAC;YAChC,MAAU,EAAE,WAAW,CAAC;SACrB;;;;IA4BN;;;OAGG;;QAED;;WAEG;6BADQ,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE;;IAQvC;;;OAGG;;QAED;;WAEG;6BADQ,OAAO;;IAMpB;;;OAGG;;QAED;;;;WAIG;+BAHQ,MAAM,CAAC,KAAK,CAAC,SACb,WAAW,CAAC,OAAO,CAAC,GAClB,WAAW;;;QAOxB,iEAAiE;;QAsBjE;;;;WAIG;;QAeH,2DAA2D;;QAM3D;;WAEG;;QAiBH;;;WAGG;mCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;QAsBxB;;;;WAIG;qCAHQ,MA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AAsB;+BAP6F,uBAAuB;uCAAvB,uBAAuB;2CAAvB,uBAAuB;iCAAvB,uBAAuB;+BAAvB,uBAAuB;iCACjI,6CAA6C"}
@@ -307,7 +307,6 @@ export const prepareLocalOrchestrationAccountKit = (
307
307
  // expect this complete in the same run
308
308
  publicSubscribers: await when(holder.getPublicTopics()),
309
309
  invitationMakers,
310
- holder,
311
310
  });
312
311
  });
313
312
  },
@@ -98,6 +98,7 @@ export type RemoteChainFacadePowers = {
98
98
  vowTools: VowTools;
99
99
  };
100
100
  export type MakeRemoteChainFacade = ReturnType<typeof prepareRemoteChainFacade>;
101
+ export type RemoteChainFacade = ReturnType<MakeRemoteChainFacade>;
101
102
  import type { Zone } from '@agoric/base-zone';
102
103
  import type { IBCConnectionInfo } from '../types.js';
103
104
  import type { HostInterface } from '@agoric/async-flow';
@@ -1 +1 @@
1
- {"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AA2KO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;QAnF1B,4CAA4C;;QAK5C,2CAA2C;;;;QAqB3C;;;;WAIG;6BADQ,UAAU;;;;;;;;;;;;;;;;;QAWrB;;;WAGG;kCAFQ,YAAY,WACZ,UAAU;;;;;;;;;;;;;;;;;QAWrB;;;;;;WAMG;+BALQ,OAAO,WAAW,CAAC,6BACnB;YACV,OAAW,EAAE,UAAU,CAAC;YACxB,YAAgB,EAAE,YAAY,CAAC;SAC5B;;;;;;;;;;;;;;;;cA8BX;sCApJY;IACZ,8BAAkC,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACN,aAAiB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACnD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;IAChC,QAAY,EAAE,QAAQ,CAAC;CACpB;oCA+IU,UAAU,CAAC,OAAO,wBAAwB,CAAC;0BAvKlC,mBAAmB;uCAMoF,aAAa;mCAPnG,oBAAoB;yBAI5B,aAAa;0CAGiF,aAAa;gCAAb,aAAa;kCAAb,aAAa;4BAJlH,kBAAkB;uDAGS,mCAAmC;6CAD7C,gCAAgC;kCAH3C,cAAc;8BAEb,aAAa"}
1
+ {"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AA2KO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;QAnF1B,4CAA4C;;QAK5C,2CAA2C;;;;QAqB3C;;;;WAIG;6BADQ,UAAU;;;;;;;;;;;;;;;;;QAWrB;;;WAGG;kCAFQ,YAAY,WACZ,UAAU;;;;;;;;;;;;;;;;;QAWrB;;;;;;WAMG;+BALQ,OAAO,WAAW,CAAC,6BACnB;YACV,OAAW,EAAE,UAAU,CAAC;YACxB,YAAgB,EAAE,YAAY,CAAC;SAC5B;;;;;;;;;;;;;;;;cA8BX;sCApJY;IACZ,8BAAkC,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACN,aAAiB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACnD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;IAChC,QAAY,EAAE,QAAQ,CAAC;CACpB;oCA+IU,UAAU,CAAC,OAAO,wBAAwB,CAAC;gCAC3C,UAAU,CAAC,qBAAqB,CAAC;0BAxKxB,mBAAmB;uCAMoF,aAAa;mCAPnG,oBAAoB;yBAI5B,aAAa;0CAGiF,aAAa;gCAAb,aAAa;kCAAb,aAAa;4BAJlH,kBAAkB;uDAGS,mCAAmC;6CAD7C,gCAAgC;kCAH3C,cAAc;8BAEb,aAAa"}
@@ -176,3 +176,4 @@ export const prepareRemoteChainFacade = (zone, powers) => {
176
176
  harden(prepareRemoteChainFacade);
177
177
 
178
178
  /** @typedef {ReturnType<typeof prepareRemoteChainFacade>} MakeRemoteChainFacade */
179
+ /** @typedef {ReturnType<MakeRemoteChainFacade>} RemoteChainFacade */
package/src/facade.d.ts CHANGED
@@ -14,11 +14,11 @@ export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode,
14
14
  wakeAll(): void;
15
15
  getFlowForOutcomeVow(outcomeVow: any): any;
16
16
  }>;
17
- orchestrate: <GuestReturn, HostReturn, GuestContext, HostContext, GuestArgs extends any[], HostArgs extends any[]>(durableName: string, hostCtx: HostContext, guestFn: (guestOrc: Orchestrator, guestCtx: GuestContext, ...args: GuestArgs) => Promise<GuestReturn>) => (...args: HostArgs) => Promise<HostReturn>;
17
+ orchestrate: <GR, HC, GA extends any[]>(durableName: string, hostCtx: HC, guestFn: (guestOrc: Orchestrator, guestCtx: GuestInterface<HC>, ...args: GA) => Promise<GR>) => (...args: HostArgs<GA>) => Vow<GR>;
18
18
  orchestrateAll: (guestFns: {
19
19
  [durableName: string]: (...args: any[]) => any;
20
20
  }, hostCtx: any) => {
21
- [k: string]: (...args: any[]) => Promise<any>;
21
+ [k: string]: (...args: any[]) => Vow<any>;
22
22
  };
23
23
  };
24
24
  export type OrchestrationFacade = ReturnType<typeof makeOrchestrationFacade>;
@@ -31,4 +31,7 @@ import type { HostOrchestrator } from './exos/orchestrator.js';
31
31
  import type { VowTools } from '@agoric/vow';
32
32
  import type { AsyncFlowTools } from '@agoric/async-flow';
33
33
  import type { Orchestrator } from './types.js';
34
+ import type { GuestInterface } from '@agoric/async-flow';
35
+ import type { HostArgs } from '@agoric/async-flow';
36
+ import type { Vow } from '@agoric/vow';
34
37
  //# sourceMappingURL=facade.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AA6BO,sKAZI;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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C;;;;;;kBA4BW,EAAE,EACF,EAAE,EACM,EAAE,SAAT,GAAG,EAAG,eACT,MAAM,WAEN,EAAE,WACF,CACV,QAAY,EAAE,YAAY,EAC1B,QAAY,EAAE,eAAe,EAAE,CAAC,EAChC,GAAO,IAAI,EAAE,EAAE,KACR,OAAO,CAAC,EAAE,CAAC,KACN,CAAC,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;+BA2BpC;QAAE,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;KAAE,WAClD,GAAG;yCA5B0B,QAAO;;EA2ChD;kCAEa,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BAzGjC,cAAc;kCAEN,cAAc;4BAGpB,kBAAkB;6CACD,qCAAqC;qCAHhC,6CAA6C;sCACzD,wBAAwB;8BAH3B,aAAa;oCAFc,oBAAoB;kCAQ4B,YAAY;oCAR5D,oBAAoB;8BAApB,oBAAoB;yBAE/C,aAAa"}
package/src/facade.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { assertAllDefined } from '@agoric/internal';
4
4
 
5
5
  /**
6
- * @import {AsyncFlowTools} from '@agoric/async-flow';
6
+ * @import {AsyncFlowTools, GuestInterface, HostArgs} from '@agoric/async-flow';
7
7
  * @import {Zone} from '@agoric/zone';
8
8
  * @import {Vow, VowTools} from '@agoric/vow';
9
9
  * @import {TimerService} from '@agoric/time';
@@ -52,27 +52,19 @@ export const makeOrchestrationFacade = ({
52
52
 
53
53
  const { prepareEndowment, asyncFlow, adminAsyncFlow } = asyncFlowTools;
54
54
 
55
- const { when } = vowTools;
56
-
57
55
  /**
58
- * @template GuestReturn
59
- * @template HostReturn
60
- * @template GuestContext
61
- * @template HostContext
62
- * @template {any[]} GuestArgs
63
- * @template {any[]} HostArgs
56
+ * @template GR - return type
57
+ * @template HC - host context
58
+ * @template {any[]} GA - guest args
64
59
  * @param {string} durableName - the orchestration flow identity in the zone
65
60
  * (to resume across upgrades)
66
- * @param {HostContext} hostCtx - values to pass through the async flow
67
- * membrane
61
+ * @param {HC} hostCtx - values to pass through the async flow membrane
68
62
  * @param {(
69
63
  * guestOrc: Orchestrator,
70
- * guestCtx: GuestContext,
71
- * ...args: GuestArgs
72
- * ) => Promise<GuestReturn>} guestFn
73
- * @returns {(...args: HostArgs) => Promise<HostReturn>} TODO returns a
74
- * Promise for now for compat before use of asyncFlow. But really should be
75
- * `Vow<HostReturn>`
64
+ * guestCtx: GuestInterface<HC>,
65
+ * ...args: GA
66
+ * ) => Promise<GR>} guestFn
67
+ * @returns {(...args: HostArgs<GA>) => Vow<GR>}
76
68
  */
77
69
  const orchestrate = (durableName, hostCtx, guestFn) => {
78
70
  const subZone = zone.subZone(durableName);
@@ -86,10 +78,11 @@ export const makeOrchestrationFacade = ({
86
78
 
87
79
  const hostFn = asyncFlow(subZone, 'asyncFlow', guestFn);
88
80
 
89
- const orcFn = (...args) =>
90
- // TODO remove the `when` after fixing the return type
91
- // to `Vow<HostReturn>`
92
- when(hostFn(wrappedOrc, wrappedCtx, ...args));
81
+ // cast because return could be arbitrary subtype
82
+ const orcFn = /** @type {(...args: HostArgs<GA>) => Vow<GR>} */ (
83
+ (...args) => hostFn(wrappedOrc, wrappedCtx, ...args)
84
+ );
85
+
93
86
  return harden(orcFn);
94
87
  };
95
88
 
@@ -2,7 +2,7 @@ import { Fail } from '@endo/errors';
2
2
  import { E, Far } from '@endo/far';
3
3
  import { makeMarshal } from '@endo/marshal';
4
4
  import { makeTracer } from '@agoric/internal';
5
- import { registerChainNamespace } from '../chain-info.js';
5
+ import { registerKnownChains } from '../chain-info.js';
6
6
  import { CHAIN_KEY, CONNECTIONS_KEY } from '../exos/chain-hub.js';
7
7
 
8
8
  const trace = makeTracer('CoreEvalOrchestration', true);
@@ -127,7 +127,7 @@ export const initChainInfo = async ({
127
127
  await publishChainInfoToChainStorage(agoricNamesAdmin, chainStorageP);
128
128
 
129
129
  // Now register the names
130
- await registerChainNamespace(agoricNamesAdmin, trace);
130
+ await registerKnownChains(agoricNamesAdmin, trace);
131
131
  };
132
132
  harden(initChainInfo);
133
133
 
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @import {TypedPattern} from '@agoric/internal';
3
- * @import {CosmosChainInfo} from './cosmos-api.js';
3
+ * @import {ChainAddress, ChainInfo, CosmosChainInfo, DenomAmount} from './types.js';
4
+ * @import {Delegation} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
4
5
  */
5
6
  /**
6
7
  * Used for IBC Channel Connections that only send outgoing transactions. If
@@ -11,50 +12,40 @@ export const OutboundConnectionHandlerI: import("@endo/patterns").InterfaceGuard
11
12
  onOpen: import("@endo/patterns").MethodGuard;
12
13
  onClose: import("@endo/patterns").MethodGuard;
13
14
  }>;
14
- export namespace ChainAddressShape {
15
- let chainId: import("@endo/patterns").Matcher;
16
- let encoding: import("@endo/patterns").Matcher;
15
+ /** @type {TypedPattern<ChainAddress>} */
16
+ export const ChainAddressShape: TypedPattern<ChainAddress>;
17
+ export namespace Proto3Shape {
18
+ let typeUrl: import("@endo/patterns").Matcher;
17
19
  let value: import("@endo/patterns").Matcher;
18
20
  }
19
- export namespace Proto3Shape {
20
- export let typeUrl: import("@endo/patterns").Matcher;
21
+ export namespace CoinShape {
21
22
  let value_1: import("@endo/patterns").Matcher;
22
23
  export { value_1 as value };
23
- }
24
- export namespace CoinShape {
25
- let value_2: import("@endo/patterns").Matcher;
26
- export { value_2 as value };
27
24
  export let denom: import("@endo/patterns").Matcher;
28
25
  }
29
26
  export namespace ChainAmountShape {
30
27
  let denom_1: import("@endo/patterns").Matcher;
31
28
  export { denom_1 as denom };
32
- let value_3: import("@endo/patterns").Matcher;
33
- export { value_3 as value };
29
+ let value_2: import("@endo/patterns").Matcher;
30
+ export { value_2 as value };
34
31
  }
35
32
  export const AmountArgShape: import("@endo/patterns").Matcher;
36
- export namespace DelegationShape {
37
- let validatorAddress: import("@endo/patterns").Matcher;
38
- let shares: import("@endo/patterns").Matcher;
39
- }
33
+ /** @type {TypedPattern<Delegation>} */
34
+ export const DelegationShape: TypedPattern<Delegation>;
40
35
  export const IBCTransferOptionsShape: import("@endo/patterns").Matcher;
41
36
  export const IBCChannelIDShape: import("@endo/patterns").Matcher;
42
37
  export const IBCChannelInfoShape: import("@endo/patterns").Matcher;
43
38
  export const IBCConnectionIDShape: import("@endo/patterns").Matcher;
44
39
  export const IBCConnectionInfoShape: import("@endo/patterns").Matcher;
45
- /**
46
- * @type {TypedPattern<CosmosChainInfo>}
47
- */
40
+ /** @type {TypedPattern<CosmosChainInfo>} */
48
41
  export const CosmosChainInfoShape: TypedPattern<CosmosChainInfo>;
49
- export const ChainInfoShape: import("@endo/patterns").Matcher;
42
+ /** @type {TypedPattern<ChainInfo>} */
43
+ export const ChainInfoShape: TypedPattern<ChainInfo>;
50
44
  export const LocalChainAccountShape: import("@endo/patterns").Matcher;
51
45
  export const DenomShape: import("@endo/patterns").Matcher;
52
46
  export const BrandInfoShape: import("@endo/patterns").Matcher;
53
- export namespace DenomAmountShape {
54
- export { DenomShape as denom };
55
- let value_4: import("@endo/patterns").Matcher;
56
- export { value_4 as value };
57
- }
47
+ /** @type {TypedPattern<DenomAmount>} */
48
+ export const DenomAmountShape: TypedPattern<DenomAmount>;
58
49
  /** @see {Chain} */
59
50
  export const ChainFacadeI: import("@endo/patterns").InterfaceGuard<{
60
51
  getChainInfo: import("@endo/patterns").MethodGuard;
@@ -64,6 +55,10 @@ export namespace TimestampProtoShape {
64
55
  let seconds: import("@endo/patterns").Matcher;
65
56
  let nanos: import("@endo/patterns").Matcher;
66
57
  }
67
- import type { CosmosChainInfo } from './cosmos-api.js';
58
+ import type { ChainAddress } from './types.js';
68
59
  import type { TypedPattern } from '@agoric/internal';
60
+ import type { Delegation } from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
61
+ import type { CosmosChainInfo } from './types.js';
62
+ import type { ChainInfo } from './types.js';
63
+ import type { DenomAmount } from './types.js';
69
64
  //# sourceMappingURL=typeGuards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA;;;GAGG;AAEH;;;;GAIG;AACH;;;GAQE;;;;;;;;;;;;;;;;;;;;;;AAiBF,8DAAkE;;;;;AAOlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH;;GAEG;AACH,mCAFU,aAAa,eAAe,CAAC,CAYrC;AAGF,8DAAsC;AACtC,sEAAuE;AACvE,0DAAqC;AAErC,8DAAsC;;;;;;AAItC,mBAAmB;AACnB;;;GAGG;;;;;qCAzG+B,iBAAiB;kCADpB,kBAAkB"}
1
+ {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH;;;;GAIG;AACH;;;GAQE;AAEF,yCAAyC;AACzC,gCADW,aAAa,YAAY,CAAC,CAKnC;;;;;;;;;;;;;;;;AAYF,8DAAkE;AAGlE,uCAAuC;AACvC,8BADW,aAAa,UAAU,CAAC,CAIhC;AAEH,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH,4CAA4C;AAC5C,mCADW,aAAa,eAAe,CAAC,CAWtC;AAEF,sCAAsC;AACtC,6BADW,aAAa,SAAS,CAAC,CAG/B;AACH,sEAAuE;AACvE,0DAAqC;AAErC,8DAAsC;AAEtC,wCAAwC;AACxC,+BADW,aAAa,WAAW,CAAC,CACqC;AAEzE,mBAAmB;AACnB;;;GAGG;;;;;kCA/GqE,YAAY;kCADrD,kBAAkB;gCAEpB,wDAAwD;qCADb,YAAY;+BAAZ,YAAY;iCAAZ,YAAY"}
package/src/typeGuards.js CHANGED
@@ -4,7 +4,8 @@ import { M } from '@endo/patterns';
4
4
 
5
5
  /**
6
6
  * @import {TypedPattern} from '@agoric/internal';
7
- * @import {CosmosChainInfo} from './cosmos-api.js';
7
+ * @import {ChainAddress, ChainInfo, CosmosChainInfo, DenomAmount} from './types.js';
8
+ * @import {Delegation} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
8
9
  */
9
10
 
10
11
  /**
@@ -22,6 +23,7 @@ export const OutboundConnectionHandlerI = M.interface(
22
23
  },
23
24
  );
24
25
 
26
+ /** @type {TypedPattern<ChainAddress>} */
25
27
  export const ChainAddressShape = {
26
28
  chainId: M.string(),
27
29
  encoding: M.string(),
@@ -33,12 +35,15 @@ export const Proto3Shape = {
33
35
  value: M.string(),
34
36
  };
35
37
 
38
+ // XXX same as ChainAmountShape and DenomAmount type
36
39
  export const CoinShape = { value: M.bigint(), denom: M.string() };
37
40
 
38
41
  export const ChainAmountShape = harden({ denom: M.string(), value: M.nat() });
39
42
 
40
43
  export const AmountArgShape = M.or(AmountShape, ChainAmountShape);
41
44
 
45
+ // FIXME missing `delegatorAddress` from the type
46
+ /** @type {TypedPattern<Delegation>} */
42
47
  export const DelegationShape = harden({
43
48
  validatorAddress: M.string(),
44
49
  shares: M.string(), // TODO: bigint?
@@ -81,9 +86,7 @@ export const IBCConnectionInfoShape = M.splitRecord({
81
86
  transferChannel: IBCChannelInfoShape,
82
87
  });
83
88
 
84
- /**
85
- * @type {TypedPattern<CosmosChainInfo>}
86
- */
89
+ /** @type {TypedPattern<CosmosChainInfo>} */
87
90
  export const CosmosChainInfoShape = M.splitRecord(
88
91
  {
89
92
  chainId: M.string(),
@@ -96,13 +99,16 @@ export const CosmosChainInfoShape = M.splitRecord(
96
99
  },
97
100
  );
98
101
 
99
- // FIXME more validation
100
- export const ChainInfoShape = M.any();
102
+ /** @type {TypedPattern<ChainInfo>} */
103
+ export const ChainInfoShape = M.splitRecord({
104
+ chainId: M.string(),
105
+ });
101
106
  export const LocalChainAccountShape = M.remotable('LocalChainAccount');
102
107
  export const DenomShape = M.string();
103
- // FIXME more validation
108
+ // TODO define for #9211
104
109
  export const BrandInfoShape = M.any();
105
110
 
111
+ /** @type {TypedPattern<DenomAmount>} */
106
112
  export const DenomAmountShape = { denom: DenomShape, value: M.bigint() };
107
113
 
108
114
  /** @see {Chain} */
@@ -2,13 +2,13 @@ export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: O
2
2
  chainHub: import("@endo/exo").Guarded<{
3
3
  registerChain(name: string, chainInfo: import("../cosmos-api.js").CosmosChainInfo): void;
4
4
  getChainInfo<K extends string>(chainName: K): import("@agoric/vow").Vow<ActualChainInfo<K>>;
5
- registerConnection(chainId1: string, chainId2: string, connectionInfo: import("../cosmos-api.js").IBCConnectionInfo): void;
6
- getConnectionInfo(chain1: string | {
5
+ registerConnection(primaryChainId: string, counterpartyChainId: string, connectionInfo: import("../cosmos-api.js").IBCConnectionInfo): void;
6
+ getConnectionInfo(primary: string | {
7
7
  chainId: string;
8
- }, chain2: string | {
8
+ }, counter: string | {
9
9
  chainId: string;
10
10
  }): import("@agoric/vow").Vow<import("../cosmos-api.js").IBCConnectionInfo>;
11
- getChainsAndConnection<C1 extends string, C2 extends string>(chainName1: C1, chainName2: C2): import("@agoric/vow").Vow<[ActualChainInfo<C1>, ActualChainInfo<C2>, import("../cosmos-api.js").IBCConnectionInfo]>;
11
+ getChainsAndConnection<C1 extends string, C2 extends string>(primaryName: C1, counterName: C2): import("@agoric/vow").Vow<[ActualChainInfo<C1>, ActualChainInfo<C2>, import("../cosmos-api.js").IBCConnectionInfo]>;
12
12
  }>;
13
13
  vowTools: {
14
14
  when: <T, TResult1 = import("@agoric/vow").EUnwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow").EUnwrap<T>) => TResult1 | PromiseLike<TResult1>) | undefined, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined) => Promise<TResult1 | TResult2>;
@@ -28,11 +28,11 @@ export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: O
28
28
  wakeAll(): void;
29
29
  getFlowForOutcomeVow(outcomeVow: any): any;
30
30
  }>;
31
- orchestrate: <GuestReturn, HostReturn, GuestContext, HostContext, GuestArgs extends any[], HostArgs extends any[]>(durableName: string, hostCtx: HostContext, guestFn: (guestOrc: import("../orchestration-api.js").Orchestrator, guestCtx: GuestContext, ...args: GuestArgs) => Promise<GuestReturn>) => (...args: HostArgs) => Promise<HostReturn>;
31
+ orchestrate: <GR, HC, GA extends any[]>(durableName: string, hostCtx: HC, guestFn: (guestOrc: import("../orchestration-api.js").Orchestrator, guestCtx: import("@agoric/async-flow").GuestInterface<HC>, ...args: GA) => Promise<GR>) => (...args: import("@agoric/async-flow").HostArgs<GA>) => import("@agoric/vow").Vow<GR>;
32
32
  orchestrateAll: (guestFns: {
33
33
  [durableName: string]: (...args: any[]) => any;
34
34
  }, hostCtx: any) => {
35
- [k: string]: (...args: any[]) => Promise<any>;
35
+ [k: string]: (...args: any[]) => import("@agoric/vow").Vow<any>;
36
36
  };
37
37
  };
38
38
  export function withOrchestration<CT extends Record<string, unknown>, PA extends OrchestrationPowers & {
@@ -1 +1 @@
1
- {"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AA8CO,0CALI,GAAG,WACH,OAAO,gBACP,mBAAmB,cACnB,UAAU;;;;;;;;;;;;;;;;;wCA+B+B,GAAG;;+BAjDjD,GAAG,+EAIY,GAAG,yCACA,GAAG;;;;;;;;;;;8PAsBrB,GACF,8CAImB,GAAG;;gCAiCxB,GAAE;;;;EAyDH;AAuBM,kCAdgC,EAAE,SAA3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAE,EAGhC,EAAE,SAFM,mBAAmB,GAAG;IACnC,UAAc,EAAE,UAAU,CAAC;CACvB,EACQ,CAAC,cACH,CACV,GAAO,EAAE,GAAG,CAAC,EAAE,CAAC,EAChB,WAAe,EAAE,EAAE,EACnB,IAAQ,EAAE,IAAI,EACd,KAAS,EAAE,kBAAkB,KACtB,OAAO,CAAC,CAAC,CAAC,GACL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