@agoric/orchestration 0.1.1-dev-52e0339.0 → 0.1.1-dev-788647d.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/orchestration",
3
- "version": "0.1.1-dev-52e0339.0+52e0339",
3
+ "version": "0.1.1-dev-788647d.0+788647d",
4
4
  "description": "Chain abstraction for Agoric's orchestration clients",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -33,20 +33,20 @@
33
33
  },
34
34
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
35
35
  "dependencies": {
36
- "@agoric/assert": "0.6.1-dev-52e0339.0+52e0339",
37
- "@agoric/async-flow": "0.1.1-dev-52e0339.0+52e0339",
38
- "@agoric/cosmic-proto": "0.4.1-dev-52e0339.0+52e0339",
39
- "@agoric/ertp": "0.16.3-dev-52e0339.0+52e0339",
40
- "@agoric/internal": "0.3.3-dev-52e0339.0+52e0339",
41
- "@agoric/network": "0.1.1-dev-52e0339.0+52e0339",
42
- "@agoric/notifier": "0.6.3-dev-52e0339.0+52e0339",
43
- "@agoric/store": "0.9.3-dev-52e0339.0+52e0339",
44
- "@agoric/time": "0.3.3-dev-52e0339.0+52e0339",
45
- "@agoric/vat-data": "0.5.3-dev-52e0339.0+52e0339",
46
- "@agoric/vats": "0.15.2-dev-52e0339.0+52e0339",
47
- "@agoric/vow": "0.1.1-dev-52e0339.0+52e0339",
48
- "@agoric/zoe": "0.26.3-dev-52e0339.0+52e0339",
49
- "@agoric/zone": "0.2.3-dev-52e0339.0+52e0339",
36
+ "@agoric/assert": "0.6.1-dev-788647d.0+788647d",
37
+ "@agoric/async-flow": "0.1.1-dev-788647d.0+788647d",
38
+ "@agoric/cosmic-proto": "0.4.1-dev-788647d.0+788647d",
39
+ "@agoric/ertp": "0.16.3-dev-788647d.0+788647d",
40
+ "@agoric/internal": "0.3.3-dev-788647d.0+788647d",
41
+ "@agoric/network": "0.1.1-dev-788647d.0+788647d",
42
+ "@agoric/notifier": "0.6.3-dev-788647d.0+788647d",
43
+ "@agoric/store": "0.9.3-dev-788647d.0+788647d",
44
+ "@agoric/time": "0.3.3-dev-788647d.0+788647d",
45
+ "@agoric/vat-data": "0.5.3-dev-788647d.0+788647d",
46
+ "@agoric/vats": "0.15.2-dev-788647d.0+788647d",
47
+ "@agoric/vow": "0.1.1-dev-788647d.0+788647d",
48
+ "@agoric/zoe": "0.26.3-dev-788647d.0+788647d",
49
+ "@agoric/zone": "0.2.3-dev-788647d.0+788647d",
50
50
  "@endo/base64": "^1.0.5",
51
51
  "@endo/far": "^1.1.2",
52
52
  "@endo/marshal": "^1.5.0",
@@ -90,5 +90,5 @@
90
90
  "typeCoverage": {
91
91
  "atLeast": 97.1
92
92
  },
93
- "gitHead": "52e0339dbc10c331ae287e380d1e178f508841ac"
93
+ "gitHead": "788647d162386a8ab80ce1928645dc3712d7c0f6"
94
94
  }
@@ -1,5 +1,5 @@
1
- export function registerChain(agoricNamesAdmin: ERef<import("@agoric/vats").NameHubKit["nameAdmin"]>, name: string, chainInfo: CosmosChainInfo, log?: (...messages: string[]) => void): Promise<void>;
2
- export function registerChainNamespace(agoricNamesAdmin: ERef<import("@agoric/vats").NameHubKit["nameAdmin"]>, log: (...messages: string[]) => void): Promise<void>;
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>;
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"],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDE"}
package/src/chain-info.js CHANGED
@@ -69,7 +69,7 @@ const knownChains = /** @satisfies {Record<string, ChainInfo>} */ (
69
69
  * @param {ERef<import('@agoric/vats').NameHubKit['nameAdmin']>} agoricNamesAdmin
70
70
  * @param {string} name
71
71
  * @param {CosmosChainInfo} chainInfo
72
- * @param {(...messages: string[]) => void} log
72
+ * @param {(...messages: string[]) => void} [log]
73
73
  */
74
74
  export const registerChain = async (
75
75
  agoricNamesAdmin,
@@ -105,7 +105,7 @@ export const registerChain = async (
105
105
 
106
106
  /**
107
107
  * @param {ERef<import('@agoric/vats').NameHubKit['nameAdmin']>} agoricNamesAdmin
108
- * @param {(...messages: string[]) => void} log
108
+ * @param {(...messages: string[]) => void} [log]
109
109
  */
110
110
  export const registerChainNamespace = async (agoricNamesAdmin, log) => {
111
111
  for await (const [name, info] of Object.entries(knownChains)) {
@@ -1 +1 @@
1
- {"version":3,"file":"sendAnywhere.contract.d.ts","sourceRoot":"","sources":["sendAnywhere.contract.js"],"names":[],"mappings":"AAYA;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AAEH,kEAKE;AASK,2BANI,GAAG,eACH,mBAAmB,GAAG;IAChC,UAAc,EAAE,UAAU,CAAC;CACxB,WACO,OAAO;;;;;QAsFZ;;;WAGG;4BAFQ,eAAe,kBACf,iBAAiB;;GAmBjC;kCAhIY;IACZ,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,oBAAwB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IACvD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,WAAe,EAAE,OAAO,OAAO,CAAC,CAAC;CAC9B;6BAhBsB,kBAAkB;qCACS,eAAe;uCAAf,eAAe;gCAEvC,gCAAgC;4BAGpC,aAAa;0CAFC,eAAe;kCAFX,cAAc;6BAG/B,cAAc"}
1
+ {"version":3,"file":"sendAnywhere.contract.d.ts","sourceRoot":"","sources":["sendAnywhere.contract.js"],"names":[],"mappings":"AAYA;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AAEH,kEAKE;AASK,2BANI,GAAG,eACH,mBAAmB,GAAG;IAChC,UAAc,EAAE,UAAU,CAAC;CACxB,WACO,OAAO;;;;;QA2FZ;;;WAGG;4BAFQ,eAAe,kBACf,iBAAiB;;GAmBjC;kCArIY;IACZ,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,oBAAwB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IACvD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,WAAe,EAAE,OAAO,OAAO,CAAC,CAAC;CAC9B;6BAhBsB,kBAAkB;qCACS,eAAe;uCAAf,eAAe;gCAEvC,gCAAgC;4BAGpC,aAAa;0CAFC,eAAe;kCAFX,cAAc;6BAG/B,cAAc"}
@@ -83,11 +83,16 @@ export const start = async (zcf, privateArgs, baggage) => {
83
83
  // FIXME ok to use a heap var crossing the membrane scope this way?
84
84
  if (!contractAccount) {
85
85
  const agoricChain = await orch.getChain('agoric');
86
- contractAccount = await agoricChain.makeAccount();
86
+ // XXX when() until membrane
87
+ contractAccount = await V.when(agoricChain.makeAccount());
88
+ console.log('contractAccount', contractAccount);
87
89
  }
88
90
 
89
- const info = await chain.getChainInfo();
91
+ // XXX when() until membrane
92
+ const info = await V.when(chain.getChainInfo());
93
+ console.log('info', info);
90
94
  const { chainId } = info;
95
+ assert(typeof chainId === 'string', 'bad chainId');
91
96
  const { [kw]: pmtP } = await withdrawFromSeat(zcf, seat, give);
92
97
  await E.when(pmtP, pmt => contractAccount.deposit(pmt));
93
98
  await contractAccount.transfer(
@@ -1 +1 @@
1
- {"version":3,"file":"swapExample.contract.d.ts","sourceRoot":"","sources":["swapExample.contract.js"],"names":[],"mappings":"AASA;;;;;;;;GAQG;AAEH,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAWnC;AASK,0CAHI,KAAK;;;EAIsC;AAc/C,2BAXI,GAAG,eACH;IACV,WAAe,EAAE,OAAO,OAAO,CAAC,CAAC;IACjC,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,oBAAwB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IACvD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,UAAc,EAAE,UAAU,CAAC;CACxB,WACO,OAAO;;;oBA+BD,MAAM,CAAC,KAAK,CAAC;uBAAa,sBAAsB;;;;oBAAhD,MAAM,CAAC,KAAK,CAAC;uBAAa,sBAAsB;;;GAoEhE;6BAvIyB,cAAc;4BAHf,kBAAkB;gCADd,gCAAgC;0CAEtB,eAAe;kCAHvB,cAAc;6BAInB,kBAAkB;4CALuB,aAAa"}
1
+ {"version":3,"file":"swapExample.contract.d.ts","sourceRoot":"","sources":["swapExample.contract.js"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AAEH,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAWnC;AASK,0CAHI,KAAK;;;EAIsC;AAc/C,2BAXI,GAAG,eACH;IACV,WAAe,EAAE,OAAO,OAAO,CAAC,CAAC;IACjC,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,oBAAwB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IACvD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,UAAc,EAAE,UAAU,CAAC;CACxB,WACO,OAAO;;;oBA+BD,MAAM,CAAC,KAAK,CAAC;uBAAa,sBAAsB;;;;oBAAhD,MAAM,CAAC,KAAK,CAAC;uBAAa,sBAAsB;;;GAsEhE;6BAzIyB,cAAc;4BAHf,kBAAkB;gCADd,gCAAgC;0CAEtB,eAAe;kCAHvB,cAAc;6BAInB,kBAAkB;4CALuB,aAAa"}
@@ -4,6 +4,7 @@ import { withdrawFromSeat } from '@agoric/zoe/src/contractSupport/zoeHelpers.js'
4
4
  import { Far } from '@endo/far';
5
5
  import { deeplyFulfilled } from '@endo/marshal';
6
6
  import { M, objectMap } from '@endo/patterns';
7
+ import { when } from '@agoric/vow/vat.js';
7
8
  import { orcUtils } from '../utils/orc.js';
8
9
  import { provideOrchestration } from '../utils/start-helper.js';
9
10
 
@@ -95,8 +96,10 @@ export const start = async (zcf, privateArgs, baggage) => {
95
96
  const agoric = await orch.getChain('agoric');
96
97
 
97
98
  const [omniAccount, localAccount] = await Promise.all([
98
- omni.makeAccount(),
99
- agoric.makeAccount(),
99
+ // XXX when() until membrane
100
+ when(omni.makeAccount()),
101
+ // XXX when() until membrane
102
+ when(agoric.makeAccount()),
100
103
  ]);
101
104
 
102
105
  const omniAddress = omniAccount.getAddress();
@@ -1,9 +1,10 @@
1
- export function prepareLocalChainFacade(zone: Zone, { makeLocalOrchestrationAccountKit, localchain, storageNode }: {
1
+ export function prepareLocalChainFacade(zone: Zone, { makeLocalOrchestrationAccountKit, localchain, storageNode, vowTools: { allVows }, }: {
2
2
  makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit;
3
3
  orchestration: Remote<OrchestrationService>;
4
4
  storageNode: Remote<StorageNode>;
5
5
  timer: Remote<TimerService>;
6
6
  localchain: Remote<LocalChain>;
7
+ vowTools: VowTools;
7
8
  }): (localChainInfo: Readonly<{
8
9
  chainId: string;
9
10
  connections?: Record<string, IBCConnectionInfo>;
@@ -12,7 +13,7 @@ export function prepareLocalChainFacade(zone: Zone, { makeLocalOrchestrationAcco
12
13
  denom: string;
13
14
  }>>;
14
15
  }>) => import("@endo/exo").Guarded<{
15
- getChainInfo(): Promise<Readonly<{
16
+ getChainInfo(): Vow<Readonly<{
16
17
  chainId: string;
17
18
  connections?: Record<string, IBCConnectionInfo>;
18
19
  icqEnabled?: boolean;
@@ -20,8 +21,8 @@ export function prepareLocalChainFacade(zone: Zone, { makeLocalOrchestrationAcco
20
21
  denom: string;
21
22
  }>>;
22
23
  }>>;
23
- /** @returns {Promise<OrchestrationAccount<ChainInfo>>} */
24
- makeAccount(): Promise<OrchestrationAccount<ChainInfo>>;
24
+ /** @returns {Vow<OrchestrationAccount<ChainInfo>>} */
25
+ makeAccount(): Vow<OrchestrationAccount<ChainInfo>>;
25
26
  }>;
26
27
  export type MakeLocalChainFacade = ReturnType<typeof prepareLocalChainFacade>;
27
28
  import type { Zone } from '@agoric/base-zone';
@@ -30,7 +31,9 @@ import type { OrchestrationService } from '../service.js';
30
31
  import type { Remote } from '@agoric/internal';
31
32
  import type { TimerService } from '@agoric/time';
32
33
  import type { LocalChain } from '@agoric/vats/src/localchain.js';
34
+ import type { VowTools } from '@agoric/vow';
33
35
  import type { IBCConnectionInfo } from '../types.js';
36
+ import type { Vow } from '@agoric/vow';
34
37
  import type { ChainInfo } from '../types.js';
35
38
  import type { OrchestrationAccount } from '../types.js';
36
39
  //# sourceMappingURL=local-chain-facade.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AAyBO,8CATI,IAAI,iEACJ;IACV,gCAAoC,EAAE,gCAAgC,CAAC;IACvE,aAAiB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IAChD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;IAChC,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;CAChC;;;;;;;;;;;;;;;;IAsBE,0DAA0D;mBAA5C,OAAO,CAAC,qBAAqB,SAAS,CAAC,CAAC;GAmBzD;mCAEW,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BA5DjC,mBAAmB;sDAKS,kCAAkC;0CAD9C,eAAe;4BAF7B,kBAAkB;kCADZ,cAAc;gCAEhB,gCAAgC;uCAGyB,aAAa;+BAAb,aAAa;0CAAb,aAAa"}
1
+ {"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AA2BO,8CAVI,IAAI,yFACJ;IACV,gCAAoC,EAAE,gCAAgC,CAAC;IACvE,aAAiB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IAChD,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;;;;;;;;;;;;;;;;IA2BE,sDAAsD;mBAAxC,IAAI,qBAAqB,SAAS,CAAC,CAAC;GAsBrD;mCAEW,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BAtEjC,mBAAmB;sDAMS,kCAAkC;0CAD9C,eAAe;4BAH7B,kBAAkB;kCADZ,cAAc;gCAEhB,gCAAgC;8BAC7B,aAAa;uCAGyC,aAAa;yBAHnE,aAAa;+BAGyC,aAAa;0CAAb,aAAa"}
@@ -1,5 +1,5 @@
1
1
  /** @file ChainAccount exo */
2
- import { V } from '@agoric/vow/vat.js';
2
+ import { V, watch } from '@agoric/vow/vat.js';
3
3
 
4
4
  import { ChainFacadeI } from '../typeGuards.js';
5
5
 
@@ -8,6 +8,7 @@ import { ChainFacadeI } from '../typeGuards.js';
8
8
  * @import {TimerService} from '@agoric/time';
9
9
  * @import {Remote} from '@agoric/internal';
10
10
  * @import {LocalChain} from '@agoric/vats/src/localchain.js';
11
+ * @import {Vow, VowTools} from '@agoric/vow';
11
12
  * @import {OrchestrationService} from '../service.js';
12
13
  * @import {MakeLocalOrchestrationAccountKit} from './local-orchestration-account.js';
13
14
  * @import {ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount} from '../types.js';
@@ -21,11 +22,17 @@ import { ChainFacadeI } from '../typeGuards.js';
21
22
  * storageNode: Remote<StorageNode>;
22
23
  * timer: Remote<TimerService>;
23
24
  * localchain: Remote<LocalChain>;
25
+ * vowTools: VowTools;
24
26
  * }} powers
25
27
  */
26
28
  export const prepareLocalChainFacade = (
27
29
  zone,
28
- { makeLocalOrchestrationAccountKit, localchain, storageNode },
30
+ {
31
+ makeLocalOrchestrationAccountKit,
32
+ localchain,
33
+ storageNode,
34
+ vowTools: { allVows },
35
+ },
29
36
  ) =>
30
37
  zone.exoClass(
31
38
  'LocalChainFacade',
@@ -37,29 +44,32 @@ export const prepareLocalChainFacade = (
37
44
  return { localChainInfo };
38
45
  },
39
46
  {
40
- async getChainInfo() {
41
- return this.state.localChainInfo;
47
+ getChainInfo() {
48
+ return watch(this.state.localChainInfo);
42
49
  },
43
50
 
44
51
  // FIXME parameterize on the remoteChainInfo to make()
45
52
  // That used to work but got lost in the migration to Exo
46
- /** @returns {Promise<OrchestrationAccount<ChainInfo>>} */
47
- async makeAccount() {
53
+ /** @returns {Vow<OrchestrationAccount<ChainInfo>>} */
54
+ makeAccount() {
48
55
  const { localChainInfo } = this.state;
49
56
  const lcaP = V(localchain).makeAccount();
50
- const [lca, address] = await Promise.all([lcaP, V(lcaP).getAddress()]);
51
- const { holder: account } = makeLocalOrchestrationAccountKit({
52
- account: lca,
53
- address: harden({
54
- address,
55
- chainId: localChainInfo.chainId,
56
- addressEncoding: 'bech32',
57
- }),
58
- // FIXME storage path https://github.com/Agoric/agoric-sdk/issues/9066
59
- storageNode,
57
+ // FIXME use watch() from vowTools
58
+ return watch(allVows([lcaP, V(lcaP).getAddress()]), {
59
+ onFulfilled: ([lca, address]) => {
60
+ const { holder: account } = makeLocalOrchestrationAccountKit({
61
+ account: lca,
62
+ address: harden({
63
+ address,
64
+ addressEncoding: 'bech32',
65
+ chainId: localChainInfo.chainId,
66
+ }),
67
+ // FIXME storage path https://github.com/Agoric/agoric-sdk/issues/9066
68
+ storageNode,
69
+ });
70
+ return account;
71
+ },
60
72
  });
61
-
62
- return account;
63
73
  },
64
74
  },
65
75
  );
@@ -22,7 +22,7 @@ export function prepareOrchestratorKit(zone: Zone, { chainHub, localchain, makeL
22
22
  makeLocalChainFacadeWatcher: {
23
23
  /** @param {ChainInfo} agoricChainInfo */
24
24
  onFulfilled(agoricChainInfo: ChainInfo): import("@endo/exo").Guarded<{
25
- getChainInfo(): Promise<Readonly<{
25
+ getChainInfo(): Vow<Readonly<{
26
26
  chainId: string;
27
27
  connections?: Record<string, IBCConnectionInfo>;
28
28
  icqEnabled?: boolean;
@@ -30,7 +30,7 @@ export function prepareOrchestratorKit(zone: Zone, { chainHub, localchain, makeL
30
30
  denom: string;
31
31
  }>>;
32
32
  }>>;
33
- makeAccount(): Promise<OrchestrationAccount<ChainInfo>>;
33
+ makeAccount(): Vow<OrchestrationAccount<ChainInfo>>;
34
34
  }>;
35
35
  };
36
36
  /**
@@ -45,7 +45,7 @@ export function prepareOrchestratorKit(zone: Zone, { chainHub, localchain, makeL
45
45
  * @param {[ChainInfo, ChainInfo, IBCConnectionInfo]} chainsAndConnection
46
46
  */
47
47
  onFulfilled([_agoricChainInfo, remoteChainInfo, connectionInfo]: [ChainInfo, ChainInfo, IBCConnectionInfo]): import("@endo/exo").Guarded<{
48
- getChainInfo(): Promise<Readonly<{
48
+ getChainInfo(): Vow<Readonly<{
49
49
  chainId: string;
50
50
  connections?: Record<string, IBCConnectionInfo>;
51
51
  icqEnabled?: boolean;
@@ -53,7 +53,7 @@ export function prepareOrchestratorKit(zone: Zone, { chainHub, localchain, makeL
53
53
  denom: string;
54
54
  }>>;
55
55
  }>>;
56
- makeAccount(): Promise<OrchestrationAccount<ChainInfo>>;
56
+ makeAccount(): Vow<OrchestrationAccount<ChainInfo>>;
57
57
  }>;
58
58
  };
59
59
  orchestrator: {
@@ -84,6 +84,7 @@ import type { TimerService } from '@agoric/time';
84
84
  import type { VowTools } from '@agoric/vow';
85
85
  import type { ChainInfo } from '../types.js';
86
86
  import type { IBCConnectionInfo } from '../types.js';
87
+ import type { Vow } from '@agoric/vow';
87
88
  import type { OrchestrationAccount } from '../types.js';
88
89
  import type { Chain } from '../types.js';
89
90
  //# sourceMappingURL=orchestrator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAiCA,0BAA0B;AAC1B;;;;;GAKG;AAkBI,6CAfI,IAAI,qGACJ;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,uCAAuC;;;;;;;;;;;;;GA0B5C;0BA7HoB,mBAAmB;oCAET,oBAAoB;8BAD1B,gBAAgB;gCAId,gCAAgC;4BAEpC,kBAAkB;qCADI,6CAA6C;0CAKrD,yBAAyB;2CACxB,0BAA0B;0CAH3B,eAAe;kCALvB,cAAc;8BADb,aAAa;+BAU8D,aAAa;uCAAb,aAAa;0CAAb,aAAa;2BAAb,aAAa"}
1
+ {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAiCA,0BAA0B;AAC1B;;;;;GAKG;AAkBI,6CAfI,IAAI,qGACJ;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,uCAAuC;;;;;;;;;;;;;GA0B5C;0BA7HoB,mBAAmB;oCAET,oBAAoB;8BAD1B,gBAAgB;gCAId,gCAAgC;4BAEpC,kBAAkB;qCADI,6CAA6C;0CAKrD,yBAAyB;2CACxB,0BAA0B;0CAH3B,eAAe;kCALvB,cAAc;8BADb,aAAa;+BAU8D,aAAa;uCAAb,aAAa;yBAVxF,aAAa;0CAU8D,aAAa;2BAAb,aAAa"}
@@ -1,8 +1,9 @@
1
- export function prepareRemoteChainFacade(zone: Zone, { makeCosmosOrchestrationAccount, orchestration, storageNode, timer }: {
1
+ export function prepareRemoteChainFacade(zone: Zone, { makeCosmosOrchestrationAccount, orchestration, storageNode, timer, vowTools: { allVows }, }: {
2
2
  makeCosmosOrchestrationAccount: ReturnType<typeof prepareCosmosOrchestrationAccount>;
3
3
  orchestration: Remote<OrchestrationService>;
4
4
  storageNode: Remote<StorageNode>;
5
5
  timer: Remote<TimerService>;
6
+ vowTools: VowTools;
6
7
  }): (remoteChainInfo: Readonly<{
7
8
  chainId: string;
8
9
  connections?: Record<string, IBCConnectionInfo>;
@@ -11,7 +12,7 @@ export function prepareRemoteChainFacade(zone: Zone, { makeCosmosOrchestrationAc
11
12
  denom: string;
12
13
  }>>;
13
14
  }>, connectionInfo: IBCConnectionInfo) => import("@endo/exo").Guarded<{
14
- getChainInfo(): Promise<Readonly<{
15
+ getChainInfo(): Vow<Readonly<{
15
16
  chainId: string;
16
17
  connections?: Record<string, IBCConnectionInfo>;
17
18
  icqEnabled?: boolean;
@@ -19,8 +20,8 @@ export function prepareRemoteChainFacade(zone: Zone, { makeCosmosOrchestrationAc
19
20
  denom: string;
20
21
  }>>;
21
22
  }>>;
22
- /** @returns {Promise<OrchestrationAccount<ChainInfo>>} */
23
- makeAccount(): Promise<OrchestrationAccount<ChainInfo>>;
23
+ /** @returns {Vow<OrchestrationAccount<ChainInfo>>} */
24
+ makeAccount(): Vow<OrchestrationAccount<ChainInfo>>;
24
25
  }>;
25
26
  export type MakeRemoteChainFacade = ReturnType<typeof prepareRemoteChainFacade>;
26
27
  import type { Zone } from '@agoric/base-zone';
@@ -28,7 +29,9 @@ import type { prepareCosmosOrchestrationAccount } from './cosmos-orchestration-a
28
29
  import type { OrchestrationService } from '../service.js';
29
30
  import type { Remote } from '@agoric/internal';
30
31
  import type { TimerService } from '@agoric/time';
32
+ import type { VowTools } from '@agoric/vow';
31
33
  import type { IBCConnectionInfo } from '../types.js';
34
+ import type { Vow } from '@agoric/vow';
32
35
  import type { ChainInfo } from '../types.js';
33
36
  import type { OrchestrationAccount } from '../types.js';
34
37
  //# sourceMappingURL=remote-chain-facade.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AAgCO,+CAVI,IAAI,yEACJ;IACV,8BAAkC,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACN,aAAiB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IAChD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;CAC7B;;;;;;;;;;;;;;;;IAwBE,0DAA0D;mBAA5C,OAAO,CAAC,qBAAqB,SAAS,CAAC,CAAC;GAwBzD;oCAEW,UAAU,CAAC,OAAO,wBAAwB,CAAC;0BAzElC,mBAAmB;uDAIU,mCAAmC;0CADhD,eAAe;4BAD7B,kBAAkB;kCADZ,cAAc;uCAIyC,aAAa;+BAAb,aAAa;0CAAb,aAAa"}
1
+ {"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AAkCO,+CAXI,IAAI,iGACJ;IACV,8BAAkC,EAAE,UAAU,CAC9C,wCAA8C,CACzC,CAAC;IACN,aAAiB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IAChD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;IAChC,QAAY,EAAE,QAAQ,CAAC;CACpB;;;;;;;;;;;;;;;;IA8BE,sDAAsD;mBAAxC,IAAI,qBAAqB,SAAS,CAAC,CAAC;GA6BrD;oCAEW,UAAU,CAAC,OAAO,wBAAwB,CAAC;0BAtFlC,mBAAmB;uDAKU,mCAAmC;0CADhD,eAAe;4BAF7B,kBAAkB;kCADZ,cAAc;8BAEb,aAAa;uCAGyC,aAAa;yBAHnE,aAAa;+BAGyC,aAAa;0CAAb,aAAa"}
@@ -1,6 +1,6 @@
1
1
  /** @file ChainAccount exo */
2
2
  import { makeTracer } from '@agoric/internal';
3
- import { V } from '@agoric/vow/vat.js';
3
+ import { V, watch } from '@agoric/vow/vat.js';
4
4
 
5
5
  import { ChainFacadeI } from '../typeGuards.js';
6
6
 
@@ -8,6 +8,7 @@ import { ChainFacadeI } from '../typeGuards.js';
8
8
  * @import {Zone} from '@agoric/base-zone';
9
9
  * @import {TimerService} from '@agoric/time';
10
10
  * @import {Remote} from '@agoric/internal';
11
+ * @import {Vow, VowTools} from '@agoric/vow';
11
12
  * @import {OrchestrationService} from '../service.js';
12
13
  * @import {prepareCosmosOrchestrationAccount} from './cosmos-orchestration-account.js';
13
14
  * @import {ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount} from '../types.js';
@@ -28,11 +29,18 @@ const anyVal = null;
28
29
  * orchestration: Remote<OrchestrationService>;
29
30
  * storageNode: Remote<StorageNode>;
30
31
  * timer: Remote<TimerService>;
32
+ * vowTools: VowTools;
31
33
  * }} powers
32
34
  */
33
35
  export const prepareRemoteChainFacade = (
34
36
  zone,
35
- { makeCosmosOrchestrationAccount, orchestration, storageNode, timer },
37
+ {
38
+ makeCosmosOrchestrationAccount,
39
+ orchestration,
40
+ storageNode,
41
+ timer,
42
+ vowTools: { allVows },
43
+ },
36
44
  ) =>
37
45
  zone.exoClass(
38
46
  'RemoteChainFacade',
@@ -46,33 +54,38 @@ export const prepareRemoteChainFacade = (
46
54
  return { remoteChainInfo, connectionInfo };
47
55
  },
48
56
  {
49
- async getChainInfo() {
50
- return this.state.remoteChainInfo;
57
+ getChainInfo() {
58
+ return watch(this.state.remoteChainInfo);
51
59
  },
52
60
 
53
61
  // FIXME parameterize on the remoteChainInfo to make()
54
62
  // That used to work but got lost in the migration to Exo
55
- /** @returns {Promise<OrchestrationAccount<ChainInfo>>} */
56
- async makeAccount() {
63
+ /** @returns {Vow<OrchestrationAccount<ChainInfo>>} */
64
+ makeAccount() {
57
65
  const { remoteChainInfo, connectionInfo } = this.state;
66
+ const stakingDenom = remoteChainInfo.stakingTokens?.[0]?.denom;
67
+ if (!stakingDenom) {
68
+ // FIXME methods that return vows must not throw synchronously
69
+ throw Fail`chain info lacks staking denom`;
70
+ }
58
71
 
59
- const icaAccount = await V(orchestration).makeAccount(
72
+ const icaP = V(orchestration).makeAccount(
60
73
  remoteChainInfo.chainId,
61
74
  connectionInfo.id,
62
75
  connectionInfo.counterparty.connection_id,
63
76
  );
64
77
 
65
- const address = await V(icaAccount).getAddress();
66
-
67
- const stakingDenom = remoteChainInfo.stakingTokens?.[0]?.denom;
68
- if (!stakingDenom) {
69
- throw Fail`chain info lacks staking denom`;
70
- }
71
- return makeCosmosOrchestrationAccount(address, stakingDenom, {
72
- account: icaAccount,
73
- storageNode,
74
- icqConnection: anyVal,
75
- timer,
78
+ // FIXME use watch() from vowTools
79
+ return watch(allVows([icaP, V(icaP).getAddress()]), {
80
+ onFulfilled: ([account, address]) => {
81
+ return makeCosmosOrchestrationAccount(address, stakingDenom, {
82
+ account,
83
+ storageNode,
84
+ // FIXME provide real ICQ connection
85
+ icqConnection: anyVal,
86
+ timer,
87
+ });
88
+ },
76
89
  });
77
90
  },
78
91
  },
@@ -1 +1 @@
1
- {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAGA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAiBH,8DAAkE;;;;;AAOlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH,oEAUE;AAGF,8DAAsC;AACtC,sEAAuE;AACvE,0DAAqC;AAErC,8DAAsC;;;;;;AAItC,mBAAmB;AACnB;;;GAGG"}
1
+ {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;AAiBH,8DAAkE;;;;;AAOlE,uEAUE;AAEF,iEAA4C;AAC5C,mEAQG;AACH,oEAA+C;AAC/C,sEAYG;AAEH,oEAUE;AAGF,8DAAsC;AACtC,sEAAuE;AACvE,0DAAqC;AAErC,8DAAsC;;;;;;AAItC,mBAAmB;AACnB;;;GAGG"}
package/src/typeGuards.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { AmountShape } from '@agoric/ertp';
2
+ import { VowShape } from '@agoric/vow';
2
3
  import { M } from '@endo/patterns';
3
4
 
4
5
  export const ConnectionHandlerI = M.interface('ConnectionHandler', {
@@ -89,6 +90,6 @@ export const DenomAmountShape = { denom: DenomShape, value: M.bigint() };
89
90
 
90
91
  /** @see {Chain} */
91
92
  export const ChainFacadeI = M.interface('ChainFacade', {
92
- getChainInfo: M.callWhen().returns(ChainInfoShape),
93
- makeAccount: M.callWhen().returns(M.remotable('OrchestrationAccount')),
93
+ getChainInfo: M.call().returns(VowShape),
94
+ makeAccount: M.call().returns(VowShape),
94
95
  });
@@ -1 +1 @@
1
- {"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AAwCO,0CALI,GAAG,WACH,OAAO,gBACP,mBAAmB,cACnB,UAAU;;;;;;;;;;;;;iKA2DjB,GAAa,kCAGZ,GAAG;EAIP;kCAlFY;IACZ,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,oBAAwB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IACvD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,WAAe,EAAE,OAAO,OAAO,CAAC,CAAC;CAC9B;6BAbsB,kBAAkB;gCAFf,gCAAgC;4BAIpC,aAAa;0CACC,eAAe;kCAJX,cAAc;6BAE/B,cAAc"}
1
+ {"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AAwCO,0CALI,GAAG,WACH,OAAO,gBACP,mBAAmB,cACnB,UAAU;;;;;;;;;;;;;iKA4DT,GAAa,kCAED,GACxB;EAKC;kCApFY;IACZ,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,oBAAwB,EAAE,OAAO,oBAAoB,CAAC,CAAC;IACvD,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,WAAe,EAAE,OAAO,OAAO,CAAC,CAAC;CAC9B;6BAbsB,kBAAkB;gCAFf,gCAAgC;4BAIpC,aAAa;0CACC,eAAe;kCAJX,cAAc;6BAE/B,cAAc"}
@@ -77,6 +77,7 @@ export const provideOrchestration = (
77
77
  orchestration: remotePowers.orchestrationService,
78
78
  storageNode: remotePowers.storageNode,
79
79
  timer: remotePowers.timerService,
80
+ vowTools,
80
81
  });
81
82
 
82
83
  const makeLocalChainFacade = prepareLocalChainFacade(zone, {
@@ -86,6 +87,7 @@ export const provideOrchestration = (
86
87
  storageNode: remotePowers.storageNode,
87
88
  orchestration: remotePowers.orchestrationService,
88
89
  timer: remotePowers.timerService,
90
+ vowTools,
89
91
  });
90
92
 
91
93
  const facade = makeOrchestrationFacade({