@agoric/orchestration 0.1.1-dev-989aa19.0 → 0.1.1-dev-9274bc7.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 (56) hide show
  1. package/package.json +18 -16
  2. package/src/chain-info.js +1 -1
  3. package/src/examples/stakeBld.contract.d.ts +10 -20
  4. package/src/examples/stakeBld.contract.d.ts.map +1 -1
  5. package/src/examples/stakeBld.contract.js +4 -2
  6. package/src/examples/stakeIca.contract.d.ts +9 -9
  7. package/src/examples/stakeIca.contract.d.ts.map +1 -1
  8. package/src/examples/stakeIca.contract.js +4 -1
  9. package/src/exos/chain-account-kit.d.ts +10 -1
  10. package/src/exos/chain-account-kit.d.ts.map +1 -1
  11. package/src/exos/chain-account-kit.js +35 -13
  12. package/src/exos/chain-hub.d.ts +2392 -0
  13. package/src/{utils/chainHub.d.ts.map → exos/chain-hub.d.ts.map} +1 -1
  14. package/src/{utils/chainHub.js → exos/chain-hub.js} +69 -9
  15. package/src/exos/cosmos-orchestration-account.d.ts +50 -15
  16. package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
  17. package/src/exos/cosmos-orchestration-account.js +113 -57
  18. package/src/exos/icq-connection-kit.d.ts +10 -1
  19. package/src/exos/icq-connection-kit.d.ts.map +1 -1
  20. package/src/exos/icq-connection-kit.js +27 -11
  21. package/src/exos/local-chain-facade.d.ts +46 -9
  22. package/src/exos/local-chain-facade.d.ts.map +1 -1
  23. package/src/exos/local-chain-facade.js +1 -1
  24. package/src/exos/local-orchestration-account.d.ts +115 -2343
  25. package/src/exos/local-orchestration-account.d.ts.map +1 -1
  26. package/src/exos/local-orchestration-account.js +185 -56
  27. package/src/exos/orchestrator.d.ts +9 -2313
  28. package/src/exos/orchestrator.d.ts.map +1 -1
  29. package/src/exos/orchestrator.js +1 -1
  30. package/src/exos/remote-chain-facade.d.ts +6 -6
  31. package/src/facade.d.ts +48 -11
  32. package/src/facade.d.ts.map +1 -1
  33. package/src/facade.js +2 -2
  34. package/src/proposals/orchestration-proposal.d.ts +36 -6
  35. package/src/proposals/orchestration-proposal.js +1 -1
  36. package/src/proposals/start-stakeAtom.d.ts +9 -9
  37. package/src/proposals/start-stakeAtom.d.ts.map +1 -1
  38. package/src/proposals/start-stakeAtom.js +5 -6
  39. package/src/proposals/start-stakeBld.d.ts +10 -20
  40. package/src/proposals/start-stakeBld.d.ts.map +1 -1
  41. package/src/proposals/start-stakeOsmo.d.ts +9 -9
  42. package/src/proposals/start-stakeOsmo.d.ts.map +1 -1
  43. package/src/proposals/start-stakeOsmo.js +5 -6
  44. package/src/service.d.ts +92 -9
  45. package/src/service.d.ts.map +1 -1
  46. package/src/service.js +143 -66
  47. package/src/utils/start-helper.d.ts +8 -2320
  48. package/src/utils/start-helper.d.ts.map +1 -1
  49. package/src/utils/start-helper.js +5 -2
  50. package/src/utils/time.d.ts +2 -0
  51. package/src/utils/time.d.ts.map +1 -1
  52. package/src/utils/time.js +2 -0
  53. package/src/vat-orchestration.d.ts +36 -6
  54. package/src/vat-orchestration.d.ts.map +1 -1
  55. package/src/vat-orchestration.js +3 -0
  56. package/src/utils/chainHub.d.ts +0 -2404
@@ -1 +1 @@
1
- {"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AAwCO,0CALI,GAAG,kCAEH,mBAAmB,cACnB,UAAU;;;;;;;;;;kDA6CV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BApDZ;;;;;;;;+BAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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OAAO,kEAEF,OAAQ,WAAU,IAAK,qBAGH,IAAK;EAatC;;;;;8BAEkH,MAAM,KAAK,CAAC;6BAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;6BAAwjB,OAAO,KAAK,CAAC;;;2BAA6rB,EAAE;;;;;;;oBAAqjG,CAAC;;;uBAA6lB,EAAE;;;;;;;;;;;;;;;;;6BAvF7jL,kBAAkB;4BAEnB,aAAa;kCAHK,cAAc;6BAE/B,cAAc"}
1
+ {"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AAwCO,0CALI,GAAG,kCAEH,mBAAmB,cACnB,UAAU;;;;;;;;;;kDAmE6kB,CAAC;;kCAAu2B,SAAQ;YAAE,gBAAgB;SAAE,UAAwB,SAAQ;YAAE,gBAAgB;SAAE;;;uEArBnhD,OAAO,kEAE4B,OAAQ,WAC5C,IAAK,qBAGH,IAAK;EAaZ;;;;;8BAE8E,MAAM,KAAK,CAAC;6BAA6gB,QAAQ,KAAK,CAAC,mBAA6B,OAAO;6BAAwjB,OAAO,KAAK,CAAC;;;2BAA6rB,EAAE;;;;;;;oBAAqjG,CAAC;;;uBAA6lB,EAAE;;;;;;;;;;;;;;;;;6BA1FzhL,kBAAkB;4BAEnB,aAAa;kCAHK,cAAc;6BAE/B,cAAc"}
@@ -4,7 +4,7 @@ import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport/record
4
4
  import { makeDurableZone } from '@agoric/zone/durable.js';
5
5
  import { prepareLocalOrchestrationAccountKit } from '../exos/local-orchestration-account.js';
6
6
  import { makeOrchestrationFacade } from '../facade.js';
7
- import { makeChainHub } from './chainHub.js';
7
+ import { makeChainHub } from '../exos/chain-hub.js';
8
8
  import { prepareRemoteChainFacade } from '../exos/remote-chain-facade.js';
9
9
  import { prepareCosmosOrchestrationAccount } from '../exos/cosmos-orchestration-account.js';
10
10
  import { prepareLocalChainFacade } from '../exos/local-chain-facade.js';
@@ -48,16 +48,18 @@ export const provideOrchestration = (
48
48
 
49
49
  const chainHub = makeChainHub(remotePowers.agoricNames);
50
50
 
51
+ const vowTools = prepareVowTools(zone.subZone('vows'));
52
+
51
53
  const { makeRecorderKit } = prepareRecorderKitMakers(baggage, marshaller);
52
54
  const makeLocalOrchestrationAccountKit = prepareLocalOrchestrationAccountKit(
53
55
  zone,
54
56
  makeRecorderKit,
55
57
  zcf,
56
58
  remotePowers.timerService,
59
+ vowTools,
57
60
  chainHub,
58
61
  );
59
62
 
60
- const vowTools = prepareVowTools(zone.subZone('vows'));
61
63
  const asyncFlowTools = prepareAsyncFlowTools(zone.subZone('asyncFlow'), {
62
64
  vowTools,
63
65
  });
@@ -66,6 +68,7 @@ export const provideOrchestration = (
66
68
  // FIXME what zone?
67
69
  zone,
68
70
  makeRecorderKit,
71
+ vowTools,
69
72
  zcf,
70
73
  );
71
74
 
@@ -1,6 +1,8 @@
1
1
  /** @param {Remote<TimerService>} timer */
2
2
  export function makeTimestampHelper(timer: Remote<TimerService>): {
3
3
  /**
4
+ * XXX do this need to be resumable / use Vows?
5
+ *
4
6
  * Takes the current time from ChainTimerService and adds a relative time to
5
7
  * determine a timeout timestamp in nanoseconds. Useful for
6
8
  * {@link MsgTransfer.timeoutTimestamp}.
@@ -1 +1 @@
1
- {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.js"],"names":[],"mappings":"AAWA,0CAA0C;AAC1C;IAUI;;;;;;;;OAQG;0EAFU,OAAO,CAAC,MAAM,CAAC;EAiB/B;AA1CD;;;GAGG;AAEH,qCAAsC;AACtC,iDAAqD;AA+C9C,oCAHI,IAAI,GACF,MAAM,CAE2D;8BAThE,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;kCA3CE,cAAc;4BACpD,kBAAkB;wCADoB,cAAc"}
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.js"],"names":[],"mappings":"AAWA,0CAA0C;AAC1C;IAUI;;;;;;;;;;OAUG;0EAFU,OAAO,CAAC,MAAM,CAAC;EAiB/B;AA5CD;;;GAGG;AAEH,qCAAsC;AACtC,iDAAqD;AAiD9C,oCAHI,IAAI,GACF,MAAM,CAE2D;8BAThE,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;kCA7CE,cAAc;4BACpD,kBAAkB;wCADoB,cAAc"}
package/src/utils/time.js CHANGED
@@ -21,6 +21,8 @@ export function makeTimestampHelper(timer) {
21
21
 
22
22
  return harden({
23
23
  /**
24
+ * XXX do this need to be resumable / use Vows?
25
+ *
24
26
  * Takes the current time from ChainTimerService and adds a relative time to
25
27
  * determine a timeout timestamp in nanoseconds. Useful for
26
28
  * {@link MsgTransfer.timeoutTimestamp}.
@@ -1,9 +1,24 @@
1
1
  export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
2
2
  /** @param {Partial<OrchestrationPowers>} [initialPowers] */
3
3
  makeOrchestrationKit(initialPowers?: Partial<OrchestrationPowers> | undefined): import("@endo/exo").GuardedKit<{
4
- self: {
5
- allocateICAControllerPort(): Promise<import("@agoric/network").Port>;
6
- allocateICQControllerPort(): Promise<import("@agoric/network").Port>;
4
+ requestICAChannelWatcher: {
5
+ onFulfilled(port: import("@agoric/network").Port, { chainId, remoteConnAddr }: {
6
+ chainId: string;
7
+ remoteConnAddr: `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
8
+ }): import("@agoric/vow").Vow<any>;
9
+ };
10
+ requestICQChannelWatcher: {
11
+ onFulfilled(port: import("@agoric/network").Port, { remoteConnAddr, controllerConnectionId }: {
12
+ remoteConnAddr: `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
13
+ controllerConnectionId: `connection-${number}`;
14
+ }): import("@agoric/vow").Vow<any>;
15
+ };
16
+ channelOpenWatcher: {
17
+ onFulfilled(_connection: import("@agoric/network").Connection, { connectionKit, returnFacet, saveICQConnection }: {
18
+ connectionKit: import("./service.js").ConnectionKit;
19
+ returnFacet: string;
20
+ saveICQConnection?: `connection-${number}` | undefined;
21
+ }): any;
7
22
  };
8
23
  public: {
9
24
  makeAccount(chainId: string, hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("./cosmos-api.js").IcaAccount>;
@@ -17,9 +32,24 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
17
32
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
18
33
  /** @param {Partial<OrchestrationPowers>} [initialPowers] */
19
34
  makeOrchestrationKit(initialPowers?: Partial<OrchestrationPowers> | undefined): import("@endo/exo").GuardedKit<{
20
- self: {
21
- allocateICAControllerPort(): Promise<import("@agoric/network").Port>;
22
- allocateICQControllerPort(): Promise<import("@agoric/network").Port>;
35
+ requestICAChannelWatcher: {
36
+ onFulfilled(port: import("@agoric/network").Port, { chainId, remoteConnAddr }: {
37
+ chainId: string;
38
+ remoteConnAddr: `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
39
+ }): import("@agoric/vow").Vow<any>;
40
+ };
41
+ requestICQChannelWatcher: {
42
+ onFulfilled(port: import("@agoric/network").Port, { remoteConnAddr, controllerConnectionId }: {
43
+ remoteConnAddr: `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
44
+ controllerConnectionId: `connection-${number}`;
45
+ }): import("@agoric/vow").Vow<any>;
46
+ };
47
+ channelOpenWatcher: {
48
+ onFulfilled(_connection: import("@agoric/network").Connection, { connectionKit, returnFacet, saveICQConnection }: {
49
+ connectionKit: import("./service.js").ConnectionKit;
50
+ returnFacet: string;
51
+ saveICQConnection?: `connection-${number}` | undefined;
52
+ }): any;
23
53
  };
24
54
  public: {
25
55
  makeAccount(chainId: string, hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`): Promise<import("./cosmos-api.js").IcaAccount>;
@@ -1 +1 @@
1
- {"version":3,"file":"vat-orchestration.d.ts","sourceRoot":"","sources":["vat-orchestration.js"],"names":[],"mappings":"AAMO;IAOH,4DAA4D;;;;;;;;;;;;;;;;IAA5D,4DAA4D;;;;;;;;;;;;;;;GAK/D;+BAEa,UAAU,CAAC,OAAO,eAAe,CAAC;yCAhBT,cAAc"}
1
+ {"version":3,"file":"vat-orchestration.d.ts","sourceRoot":"","sources":["vat-orchestration.js"],"names":[],"mappings":"AAOO;IASH,4DAA4D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA5D,4DAA4D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK/D;+BAEa,UAAU,CAAC,OAAO,eAAe,CAAC;yCAlBT,cAAc"}
@@ -1,4 +1,5 @@
1
1
  import { Far } from '@endo/far';
2
+ import { prepareVowTools } from '@agoric/vow/vat.js';
2
3
  import { makeDurableZone } from '@agoric/zone/durable.js';
3
4
  import { prepareOrchestrationTools } from './service.js';
4
5
 
@@ -6,8 +7,10 @@ import { prepareOrchestrationTools } from './service.js';
6
7
 
7
8
  export const buildRootObject = (_vatPowers, _args, baggage) => {
8
9
  const zone = makeDurableZone(baggage);
10
+ const vowTools = prepareVowTools(zone.subZone('VowTools'));
9
11
  const { makeOrchestrationKit } = prepareOrchestrationTools(
10
12
  zone.subZone('orchestration'),
13
+ vowTools,
11
14
  );
12
15
 
13
16
  return Far('OrchestrationVat', {