@agoric/orchestration 0.1.1-dev-0006934.0 → 0.1.1-dev-12ce494.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 +16 -16
- package/src/examples/basic-flows.contract.d.ts +11 -0
- package/src/examples/basic-flows.contract.d.ts.map +1 -0
- package/src/examples/basic-flows.contract.js +72 -0
- package/src/examples/sendAnywhere.contract.d.ts +20 -1
- package/src/examples/sendAnywhere.contract.d.ts.map +1 -1
- package/src/examples/sendAnywhere.contract.js +25 -67
- package/src/examples/sendAnywhereFlows.d.ts +24 -0
- package/src/examples/sendAnywhereFlows.d.ts.map +1 -0
- package/src/examples/sendAnywhereFlows.js +59 -0
- package/src/examples/stakeBld.contract.d.ts +20 -17
- package/src/examples/stakeBld.contract.d.ts.map +1 -1
- package/src/examples/stakeBld.contract.js +4 -12
- package/src/examples/stakeIca.contract.d.ts +9 -9
- package/src/examples/swapExample.contract.d.ts.map +1 -1
- package/src/examples/swapExample.contract.js +13 -15
- package/src/exos/cosmos-orchestration-account.d.ts +9 -9
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +27 -21
- package/src/exos/local-chain-facade.d.ts +71 -5
- package/src/exos/local-chain-facade.d.ts.map +1 -1
- package/src/exos/local-chain-facade.js +26 -2
- package/src/exos/local-orchestration-account.d.ts +27 -4
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +31 -10
- package/src/exos/orchestrator.d.ts +5 -0
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +8 -0
- package/src/exos/remote-chain-facade.d.ts +66 -19
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +46 -13
- package/src/facade.d.ts +9 -32
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +59 -72
- package/src/orchestration-api.d.ts +15 -0
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.ts +18 -6
- package/src/proposals/start-basic-flows.d.ts +40 -0
- package/src/proposals/start-basic-flows.d.ts.map +1 -0
- package/src/proposals/start-basic-flows.js +97 -0
- package/src/proposals/start-stakeAtom.d.ts +9 -9
- package/src/proposals/start-stakeBld.d.ts +20 -17
- package/src/proposals/start-stakeBld.d.ts.map +1 -1
- package/src/proposals/start-stakeOsmo.d.ts +9 -9
- package/src/utils/orchestrationAccount.d.ts +2 -0
- package/src/utils/orchestrationAccount.js +9 -0
- package/src/utils/start-helper.d.ts +48 -2
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +35 -9
- package/src/utils/zoe-tools.d.ts +48 -0
- package/src/utils/zoe-tools.d.ts.map +1 -0
- package/src/utils/zoe-tools.js +64 -0
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { StorageNodeShape } from '@agoric/internal';
|
|
2
2
|
import { TimerServiceShape } from '@agoric/time';
|
|
3
|
-
import {
|
|
4
|
-
import { deeplyFulfilled } from '@endo/marshal';
|
|
5
|
-
import { M, objectMap } from '@endo/patterns';
|
|
3
|
+
import { M } from '@endo/patterns';
|
|
6
4
|
import { orcUtils } from '../utils/orc.js';
|
|
7
5
|
import { withOrchestration } from '../utils/start-helper.js';
|
|
8
6
|
|
|
9
7
|
/**
|
|
10
|
-
* @import {Orchestrator,
|
|
8
|
+
* @import {Orchestrator, CosmosValidatorAddress} from '../types.js'
|
|
11
9
|
* @import {TimerService} from '@agoric/time';
|
|
12
10
|
* @import {LocalChain} from '@agoric/vats/src/localchain.js';
|
|
13
11
|
* @import {Remote} from '@agoric/internal';
|
|
@@ -20,13 +18,13 @@ import { withOrchestration } from '../utils/start-helper.js';
|
|
|
20
18
|
/**
|
|
21
19
|
* @param {Orchestrator} orch
|
|
22
20
|
* @param {object} ctx
|
|
23
|
-
* @param {
|
|
21
|
+
* @param {OrchestrationTools['zoeTools']['localTransfer']} ctx.localTransfer
|
|
24
22
|
* @param {ZCFSeat} seat
|
|
25
23
|
* @param {object} offerArgs
|
|
26
24
|
* @param {Amount<'nat'>} offerArgs.staked
|
|
27
25
|
* @param {CosmosValidatorAddress} offerArgs.validator
|
|
28
26
|
*/
|
|
29
|
-
const stackAndSwapFn = async (orch, {
|
|
27
|
+
const stackAndSwapFn = async (orch, { localTransfer }, seat, offerArgs) => {
|
|
30
28
|
const { give } = seat.getProposal();
|
|
31
29
|
|
|
32
30
|
const omni = await orch.getChain('omniflixhub');
|
|
@@ -40,13 +38,9 @@ const stackAndSwapFn = async (orch, { zcf }, seat, offerArgs) => {
|
|
|
40
38
|
const omniAddress = omniAccount.getAddress();
|
|
41
39
|
|
|
42
40
|
// deposit funds from user seat to LocalChainAccount
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// @ts-expect-error payment is ERef<Payment> which happens to work but isn't officially supported
|
|
47
|
-
localAccount.deposit(payment),
|
|
48
|
-
),
|
|
49
|
-
);
|
|
41
|
+
// TODO localTransfer type returns vow but in the guest context it should be a promise
|
|
42
|
+
// @ts-expect-error XXX localAccount type
|
|
43
|
+
await localTransfer(seat, localAccount, give);
|
|
50
44
|
seat.exit();
|
|
51
45
|
|
|
52
46
|
// build swap instructions with orcUtils library
|
|
@@ -104,7 +98,7 @@ export const makeNatAmountShape = (brand, min) =>
|
|
|
104
98
|
* @param {Zone} zone
|
|
105
99
|
* @param {OrchestrationTools} tools
|
|
106
100
|
*/
|
|
107
|
-
const contract = async (zcf, privateArgs, zone, { orchestrate }) => {
|
|
101
|
+
const contract = async (zcf, privateArgs, zone, { orchestrate, zoeTools }) => {
|
|
108
102
|
const { brands } = zcf.getTerms();
|
|
109
103
|
|
|
110
104
|
/** deprecated historical example */
|
|
@@ -114,7 +108,11 @@ const contract = async (zcf, privateArgs, zone, { orchestrate }) => {
|
|
|
114
108
|
* { staked: Amount<'nat'>; validator: CosmosValidatorAddress }
|
|
115
109
|
* >}
|
|
116
110
|
*/
|
|
117
|
-
const swapAndStakeHandler = orchestrate(
|
|
111
|
+
const swapAndStakeHandler = orchestrate(
|
|
112
|
+
'LSTTia',
|
|
113
|
+
{ zcf, localTransfer: zoeTools.localTransfer },
|
|
114
|
+
stackAndSwapFn,
|
|
115
|
+
);
|
|
118
116
|
|
|
119
117
|
const publicFacet = zone.exo('publicFacet', undefined, {
|
|
120
118
|
makeSwapAndStakeInvitation() {
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
*/
|
|
15
15
|
/** @see {OrchestrationAccountI} */
|
|
16
16
|
export const IcaAccountHolderI: import("@endo/patterns").InterfaceGuard<{
|
|
17
|
-
asContinuingOffer: import("@endo/patterns").MethodGuard;
|
|
18
|
-
getPublicTopics: import("@endo/patterns").MethodGuard;
|
|
19
17
|
delegate: import("@endo/patterns").MethodGuard;
|
|
20
18
|
redelegate: import("@endo/patterns").MethodGuard;
|
|
21
19
|
withdrawReward: import("@endo/patterns").MethodGuard;
|
|
@@ -27,8 +25,10 @@ export const IcaAccountHolderI: import("@endo/patterns").InterfaceGuard<{
|
|
|
27
25
|
send: import("@endo/patterns").MethodGuard;
|
|
28
26
|
transfer: import("@endo/patterns").MethodGuard;
|
|
29
27
|
transferSteps: import("@endo/patterns").MethodGuard;
|
|
28
|
+
asContinuingOffer: import("@endo/patterns").MethodGuard;
|
|
29
|
+
getPublicTopics: import("@endo/patterns").MethodGuard;
|
|
30
30
|
}>;
|
|
31
|
-
export function prepareCosmosOrchestrationAccountKit(zone: Zone, makeRecorderKit: MakeRecorderKit, { watch, asVow }: VowTools, zcf: ZCF): (chainAddress: ChainAddress, bondDenom: string, io: {
|
|
31
|
+
export function prepareCosmosOrchestrationAccountKit(zone: Zone, makeRecorderKit: MakeRecorderKit, { watch, asVow, when }: VowTools, zcf: ZCF): (chainAddress: ChainAddress, bondDenom: string, io: {
|
|
32
32
|
account: IcaAccount;
|
|
33
33
|
storageNode: Remote<StorageNode>;
|
|
34
34
|
icqConnection: ICQConnection | undefined;
|
|
@@ -93,12 +93,12 @@ export function prepareCosmosOrchestrationAccountKit(zone: Zone, makeRecorderKit
|
|
|
93
93
|
TransferAccount(): never;
|
|
94
94
|
};
|
|
95
95
|
holder: {
|
|
96
|
-
asContinuingOffer(): {
|
|
96
|
+
asContinuingOffer(): Vow<{
|
|
97
97
|
publicSubscribers: {
|
|
98
98
|
account: {
|
|
99
99
|
description: string;
|
|
100
100
|
subscriber: globalThis.Subscriber<ComosOrchestrationAccountNotification>;
|
|
101
|
-
storagePath:
|
|
101
|
+
storagePath: string;
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
104
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
@@ -126,14 +126,14 @@ export function prepareCosmosOrchestrationAccountKit(zone: Zone, makeRecorderKit
|
|
|
126
126
|
TransferAccount(): never;
|
|
127
127
|
}>;
|
|
128
128
|
holder: import("@endo/exo").Guarded<any>;
|
|
129
|
-
}
|
|
130
|
-
getPublicTopics(): {
|
|
129
|
+
}>;
|
|
130
|
+
getPublicTopics(): Vow<{
|
|
131
131
|
account: {
|
|
132
132
|
description: string;
|
|
133
133
|
subscriber: globalThis.Subscriber<ComosOrchestrationAccountNotification>;
|
|
134
|
-
storagePath:
|
|
134
|
+
storagePath: string;
|
|
135
135
|
};
|
|
136
|
-
}
|
|
136
|
+
}>;
|
|
137
137
|
/** @returns {ChainAddress} */
|
|
138
138
|
getAddress(): ChainAddress;
|
|
139
139
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmos-orchestration-account.d.ts","sourceRoot":"","sources":["cosmos-orchestration-account.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cosmos-orchestration-account.d.ts","sourceRoot":"","sources":["cosmos-orchestration-account.js"],"names":[],"mappings":"AAmDA;;;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;;;QAe3B,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;;;;;;;;;;;;;gBApDH;;;mBAGG;oCAFQ,sBAAsB,UACtB,SAAS;gBAUpB;;;;mBAIG;yCAHQ,sBAAsB,gBACtB,sBAAsB,UACtB,SAAS;gBAYpB,gDAAgD;0CAApC,sBAAsB;gBASlC,kEAAkE;wCAAtD,IAAI,CAAC,UAAU,EAAE,kBAAkB,CAAC,EAAE;;gBAYlD;;;;mBAIG;;;;;;;;;;;;QAwCH,8BAA8B;sBAAhB,YAAY;QAI1B;;;;;WAKG;4BAFQ,sBAAsB,UACtB,SAAS;;QAwBpB;;;;;;WAMG;iCAHQ,sBAAsB,gBACtB,sBAAsB,UACtB,SAAS;QA0BpB;;;WAGG;kCAFQ,sBAAsB,GACpB,IAAI,WAAW,EAAE,CAAC;QAiB/B;;;WAGG;0BAFQ,QAAQ,GACN,IAAI,WAAW,CAAC;;;;;QA0C7B,kEAAkE;gCAAtD,IAAI,CAAC,UAAU,EAAE,kBAAkB,CAAC,EAAE;;GA6BzD;AAmBM,wDAVI,IAAI,mBACJ,eAAe,YACf,QAAQ,OACR,GAAG,GACD,CACZ,GAAO,IAAI,EAAE,UAAU,CACvB,UAAgB,CAAC,OAAO,oCAAoC,CAAC,CACxD,KACE,6BAA6B,CAAC,QAAQ,CAAC,CAe9C;;kBA/da,YAAY;;oBAIb;IACZ,QAAY,EAAE,YAAY,qCAAqC,CAAC,CAAC;IACjE,OAAW,EAAE,UAAU,CAAC;IACxB,YAAgB,EAAE,YAAY,CAAC;IAC/B,aAAiB,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7C,SAAa,EAAE,MAAM,CAAC;IACtB,KAAS,EAAE,OAAO,YAAY,CAAC,CAAC;CAC7B;4CAubS,UAAU,CACtB,UAAc,CAAC,OAAO,oCAAoC,CAAC,CACxD;yCA4BU,6BAA6B,CAAC,QAAQ,CAAC;0BA3e9B,cAAc;qCANU,6CAA6C;8BAK5D,aAAa;kCANqH,aAAa;gCAAb,aAAa;4BAItJ,kBAAkB;mCAJuH,aAAa;kCAKhJ,cAAc;+BALqH,aAAa;0BAExJ,kDAAkD;mCAMzC,+CAA+C;8BACpD,sBAAsB;iCATiH,aAAa;yBAM/I,aAAa;4CANqH,aAAa;gCAGlJ,wDAAwD;8BAH6E,aAAa;iCAChI,6CAA6C"}
|
|
@@ -22,7 +22,6 @@ import { makeTracer } from '@agoric/internal';
|
|
|
22
22
|
import { Shape as NetworkShape } from '@agoric/network';
|
|
23
23
|
import { M } from '@agoric/vat-data';
|
|
24
24
|
import { VowShape } from '@agoric/vow';
|
|
25
|
-
import { TopicsRecordShape } from '@agoric/zoe/src/contractSupport/index.js';
|
|
26
25
|
import {
|
|
27
26
|
AmountArgShape,
|
|
28
27
|
ChainAddressShape,
|
|
@@ -69,12 +68,6 @@ const { Vow$ } = NetworkShape; // TODO #9611
|
|
|
69
68
|
/** @see {OrchestrationAccountI} */
|
|
70
69
|
export const IcaAccountHolderI = M.interface('IcaAccountHolder', {
|
|
71
70
|
...orchestrationAccountMethods,
|
|
72
|
-
asContinuingOffer: M.call().returns({
|
|
73
|
-
publicSubscribers: M.any(),
|
|
74
|
-
invitationMakers: M.any(),
|
|
75
|
-
holder: M.any(),
|
|
76
|
-
}),
|
|
77
|
-
getPublicTopics: M.call().returns(TopicsRecordShape),
|
|
78
71
|
delegate: M.call(ChainAddressShape, AmountArgShape).returns(VowShape),
|
|
79
72
|
redelegate: M.call(
|
|
80
73
|
ChainAddressShape,
|
|
@@ -105,11 +98,11 @@ const toDenomAmount = c => ({ denom: c.denom, value: BigInt(c.amount) });
|
|
|
105
98
|
export const prepareCosmosOrchestrationAccountKit = (
|
|
106
99
|
zone,
|
|
107
100
|
makeRecorderKit,
|
|
108
|
-
{ watch, asVow },
|
|
101
|
+
{ watch, asVow, when },
|
|
109
102
|
zcf,
|
|
110
103
|
) => {
|
|
111
104
|
const makeCosmosOrchestrationAccountKit = zone.exoClassKit(
|
|
112
|
-
'
|
|
105
|
+
'Cosmos Orchestration Account Holder',
|
|
113
106
|
{
|
|
114
107
|
helper: M.interface('helper', {
|
|
115
108
|
owned: M.call().returns(M.remotable()),
|
|
@@ -317,21 +310,34 @@ export const prepareCosmosOrchestrationAccountKit = (
|
|
|
317
310
|
},
|
|
318
311
|
holder: {
|
|
319
312
|
asContinuingOffer() {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
holder,
|
|
313
|
+
// getPublicTopics resolves promptly (same run), so we don't need a watcher
|
|
314
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
315
|
+
return asVow(async () => {
|
|
316
|
+
await null;
|
|
317
|
+
const { holder, invitationMakers } = this.facets;
|
|
318
|
+
return harden({
|
|
319
|
+
// getPublicTopics returns a vow, for membrane compatibility.
|
|
320
|
+
// it's safe to unwrap to a promise and get the result as we
|
|
321
|
+
// expect this complete in the same run
|
|
322
|
+
publicSubscribers: await when(holder.getPublicTopics()),
|
|
323
|
+
invitationMakers,
|
|
324
|
+
holder,
|
|
325
|
+
});
|
|
325
326
|
});
|
|
326
327
|
},
|
|
327
328
|
getPublicTopics() {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
329
|
+
// getStoragePath resolves promptly (same run), so we don't need a watcher
|
|
330
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
331
|
+
return asVow(async () => {
|
|
332
|
+
await null;
|
|
333
|
+
const { topicKit } = this.state;
|
|
334
|
+
return harden({
|
|
335
|
+
account: {
|
|
336
|
+
description: PUBLIC_TOPICS.account[0],
|
|
337
|
+
subscriber: topicKit.subscriber,
|
|
338
|
+
storagePath: await topicKit.recorder.getStoragePath(),
|
|
339
|
+
},
|
|
340
|
+
});
|
|
335
341
|
});
|
|
336
342
|
},
|
|
337
343
|
|
|
@@ -29,16 +29,82 @@ export function prepareLocalChainFacade(zone: Zone, powers: LocalChainFacadePowe
|
|
|
29
29
|
/**
|
|
30
30
|
* @param {[LocalChainAccount, ChainAddress['value']]} results
|
|
31
31
|
*/
|
|
32
|
-
onFulfilled([account, address]: [LocalChainAccount, ChainAddress["value"]]): import("@endo/exo").Guarded<{
|
|
32
|
+
onFulfilled([account, address]: [LocalChainAccount, ChainAddress["value"]]): Vow<import("@endo/exo").Guarded<{
|
|
33
|
+
asContinuingOffer(): Vow<{
|
|
34
|
+
publicSubscribers: {
|
|
35
|
+
account: {
|
|
36
|
+
description: string;
|
|
37
|
+
subscriber: globalThis.Subscriber<import("./local-orchestration-account.js").LocalChainAccountNotification>;
|
|
38
|
+
storagePath: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
42
|
+
Delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<Vow<Record<unknown, unknown>>, undefined>>;
|
|
43
|
+
Undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<Vow<import("@agoric/time").TimestampRecord>, undefined>>;
|
|
44
|
+
CloseAccount(): never;
|
|
45
|
+
}>;
|
|
46
|
+
holder: import("@endo/exo").Guarded<any>;
|
|
47
|
+
}>;
|
|
33
48
|
getBalance(denom: import("../orchestration-api.js").DenomArg): Vow<import("../orchestration-api.js").DenomAmount>;
|
|
34
49
|
getBalances(): Vow<never>;
|
|
35
|
-
getPublicTopics(): {
|
|
50
|
+
getPublicTopics(): Vow<{
|
|
36
51
|
account: {
|
|
37
52
|
description: string;
|
|
38
53
|
subscriber: globalThis.Subscriber<import("./local-orchestration-account.js").LocalChainAccountNotification>;
|
|
39
|
-
storagePath:
|
|
54
|
+
storagePath: string;
|
|
40
55
|
};
|
|
41
|
-
}
|
|
56
|
+
}>;
|
|
57
|
+
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Vow<Record<unknown, unknown>>;
|
|
58
|
+
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Vow<void | import("@agoric/time").TimestampRecord>;
|
|
59
|
+
deposit(payment: globalThis.Payment<"nat">, optAmountShape?: globalThis.Pattern): Vow<import("@agoric/ertp/src/types.js").NatAmount | Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
|
|
60
|
+
withdraw(amount: import("@agoric/ertp/src/types.js").NatAmount): Vow<globalThis.Payment<"nat"> | Vow<globalThis.Payment<"nat">>>;
|
|
61
|
+
executeTx(messages: {
|
|
62
|
+
'@type': string;
|
|
63
|
+
}[]): Vow<import("@agoric/cosmic-proto").JsonSafe<{
|
|
64
|
+
'@type': string;
|
|
65
|
+
}>[]>;
|
|
66
|
+
getAddress(): ChainAddress;
|
|
67
|
+
send(toAccount: any, amount: any): Vow<never>;
|
|
68
|
+
transfer(amount: import("../orchestration-api.js").AmountArg, destination: ChainAddress, opts?: import("../cosmos-api.js").IBCMsgTransferOptions | undefined): Vow<void>;
|
|
69
|
+
transferSteps(amount: import("../orchestration-api.js").AmountArg, msg: import("../orchestration-api.js").TransferMsg): Vow<void>;
|
|
70
|
+
}>>;
|
|
71
|
+
};
|
|
72
|
+
makeChildNodeWatcher: {
|
|
73
|
+
/**
|
|
74
|
+
* @param {Remote<StorageNode>} childNode
|
|
75
|
+
* @param {{
|
|
76
|
+
* account: LocalChainAccount;
|
|
77
|
+
* address: ChainAddress['value'];
|
|
78
|
+
* }} ctx
|
|
79
|
+
*/
|
|
80
|
+
onFulfilled(childNode: Remote<StorageNode>, { account, address }: {
|
|
81
|
+
account: LocalChainAccount;
|
|
82
|
+
address: ChainAddress["value"];
|
|
83
|
+
}): import("@endo/exo").Guarded<{
|
|
84
|
+
asContinuingOffer(): Vow<{
|
|
85
|
+
publicSubscribers: {
|
|
86
|
+
account: {
|
|
87
|
+
description: string;
|
|
88
|
+
subscriber: globalThis.Subscriber<import("./local-orchestration-account.js").LocalChainAccountNotification>;
|
|
89
|
+
storagePath: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
93
|
+
Delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<Vow<Record<unknown, unknown>>, undefined>>;
|
|
94
|
+
Undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<Vow<import("@agoric/time").TimestampRecord>, undefined>>;
|
|
95
|
+
CloseAccount(): never;
|
|
96
|
+
}>;
|
|
97
|
+
holder: import("@endo/exo").Guarded<any>;
|
|
98
|
+
}>;
|
|
99
|
+
getBalance(denom: import("../orchestration-api.js").DenomArg): Vow<import("../orchestration-api.js").DenomAmount>;
|
|
100
|
+
getBalances(): Vow<never>;
|
|
101
|
+
getPublicTopics(): Vow<{
|
|
102
|
+
account: {
|
|
103
|
+
description: string;
|
|
104
|
+
subscriber: globalThis.Subscriber<import("./local-orchestration-account.js").LocalChainAccountNotification>;
|
|
105
|
+
storagePath: string;
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
42
108
|
delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Vow<Record<unknown, unknown>>;
|
|
43
109
|
undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Vow<void | import("@agoric/time").TimestampRecord>;
|
|
44
110
|
deposit(payment: globalThis.Payment<"nat">, optAmountShape?: globalThis.Pattern): Vow<import("@agoric/ertp/src/types.js").NatAmount | Vow<import("@agoric/ertp/src/types.js").NatAmount>>;
|
|
@@ -72,9 +138,9 @@ import type { OrchestrationAccount } from '../types.js';
|
|
|
72
138
|
import type { PromiseToVow } from '../types.js';
|
|
73
139
|
import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
|
|
74
140
|
import type { ChainAddress } from '../types.js';
|
|
141
|
+
import type { Remote } from '@agoric/internal';
|
|
75
142
|
import type { MakeLocalOrchestrationAccountKit } from './local-orchestration-account.js';
|
|
76
143
|
import type { CosmosInterchainService } from './cosmos-interchain-service.js';
|
|
77
|
-
import type { Remote } from '@agoric/internal';
|
|
78
144
|
import type { TimerService } from '@agoric/time';
|
|
79
145
|
import type { LocalChain } from '@agoric/vats/src/localchain.js';
|
|
80
146
|
import type { VowTools } from '@agoric/vow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-chain-facade.d.ts","sourceRoot":"","sources":["local-chain-facade.js"],"names":[],"mappings":"AAkIO,8CAHI,IAAI,UACJ,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;QAtDzB,oEAAoE;uBAAtD,IAAI,aAAa,qBAAqB,SAAS,CAAC,CAAC,CAAC;;;QAchE;;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;qCAjHY;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;mCA6GU,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BA/HjC,mBAAmB;uCAOwE,aAAa;yBAH/F,aAAa;+BAGqE,aAAa;0CAAb,aAAa;kCAAb,aAAa;uCAJ/E,gCAAgC;kCAIkC,aAAa;4BALtG,kBAAkB;sDAIQ,kCAAkC;6CAD3C,gCAAgC;kCAJ3C,cAAc;gCAEG,gCAAgC;8BAChD,aAAa"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { E } from '@endo/far';
|
|
3
3
|
import { M } from '@endo/patterns';
|
|
4
4
|
import { pickFacet } from '@agoric/vat-data';
|
|
5
|
+
import { VowShape } from '@agoric/vow';
|
|
5
6
|
|
|
6
7
|
import { ChainFacadeI } from '../typeGuards.js';
|
|
7
8
|
|
|
@@ -36,6 +37,8 @@ const prepareLocalChainFacadeKit = (
|
|
|
36
37
|
{
|
|
37
38
|
makeLocalOrchestrationAccountKit,
|
|
38
39
|
localchain,
|
|
40
|
+
// TODO vstorage design https://github.com/Agoric/agoric-sdk/issues/9066
|
|
41
|
+
// consider making an `accounts` childNode
|
|
39
42
|
storageNode,
|
|
40
43
|
vowTools: { allVows, watch },
|
|
41
44
|
},
|
|
@@ -44,9 +47,14 @@ const prepareLocalChainFacadeKit = (
|
|
|
44
47
|
'LocalChainFacade',
|
|
45
48
|
{
|
|
46
49
|
public: ChainFacadeI,
|
|
47
|
-
makeAccountWatcher: M.interface('
|
|
50
|
+
makeAccountWatcher: M.interface('makeAccountWatcher', {
|
|
48
51
|
onFulfilled: M.call([M.remotable('LCA Account'), M.string()])
|
|
49
52
|
.optional(M.arrayOf(M.undefined())) // empty context
|
|
53
|
+
.returns(VowShape),
|
|
54
|
+
}),
|
|
55
|
+
makeChildNodeWatcher: M.interface('makeChildNodeWatcher', {
|
|
56
|
+
onFulfilled: M.call(M.remotable())
|
|
57
|
+
.optional({ account: M.remotable(), address: M.string() }) // empty context
|
|
50
58
|
.returns(M.remotable()),
|
|
51
59
|
}),
|
|
52
60
|
},
|
|
@@ -82,6 +90,22 @@ const prepareLocalChainFacadeKit = (
|
|
|
82
90
|
* @param {[LocalChainAccount, ChainAddress['value']]} results
|
|
83
91
|
*/
|
|
84
92
|
onFulfilled([account, address]) {
|
|
93
|
+
return watch(
|
|
94
|
+
E(storageNode).makeChildNode(address),
|
|
95
|
+
this.facets.makeChildNodeWatcher,
|
|
96
|
+
{ account, address },
|
|
97
|
+
);
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
makeChildNodeWatcher: {
|
|
101
|
+
/**
|
|
102
|
+
* @param {Remote<StorageNode>} childNode
|
|
103
|
+
* @param {{
|
|
104
|
+
* account: LocalChainAccount;
|
|
105
|
+
* address: ChainAddress['value'];
|
|
106
|
+
* }} ctx
|
|
107
|
+
*/
|
|
108
|
+
onFulfilled(childNode, { account, address }) {
|
|
85
109
|
const { localChainInfo } = this.state;
|
|
86
110
|
const { holder } = makeLocalOrchestrationAccountKit({
|
|
87
111
|
account,
|
|
@@ -91,7 +115,7 @@ const prepareLocalChainFacadeKit = (
|
|
|
91
115
|
chainId: localChainInfo.chainId,
|
|
92
116
|
}),
|
|
93
117
|
// FIXME storage path https://github.com/Agoric/agoric-sdk/issues/9066
|
|
94
|
-
storageNode,
|
|
118
|
+
storageNode: childNode,
|
|
95
119
|
});
|
|
96
120
|
return holder;
|
|
97
121
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function prepareLocalOrchestrationAccountKit(zone: Zone, makeRecorderKit: MakeRecorderKit, zcf: ZCF, timerService: Remote<TimerService>, { watch, allVows, asVow }: VowTools, chainHub: ChainHub): (args_0: {
|
|
1
|
+
export function prepareLocalOrchestrationAccountKit(zone: Zone, makeRecorderKit: MakeRecorderKit, zcf: ZCF, timerService: Remote<TimerService>, { watch, allVows, asVow, when }: VowTools, chainHub: ChainHub): (args_0: {
|
|
2
2
|
account: LocalChainAccount;
|
|
3
3
|
address: ChainAddress;
|
|
4
4
|
storageNode: Remote<StorageNode>;
|
|
@@ -88,6 +88,29 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, makeRecorderKit:
|
|
|
88
88
|
onFulfilled(natAmount: Amount<"nat">, denom: DenomAmount["denom"]): DenomAmount;
|
|
89
89
|
};
|
|
90
90
|
holder: {
|
|
91
|
+
asContinuingOffer(): Vow<{
|
|
92
|
+
publicSubscribers: {
|
|
93
|
+
account: {
|
|
94
|
+
description: string;
|
|
95
|
+
subscriber: globalThis.Subscriber<LocalChainAccountNotification>;
|
|
96
|
+
storagePath: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
100
|
+
/**
|
|
101
|
+
* @param {string} validatorAddress
|
|
102
|
+
* @param {Amount<'nat'>} ertpAmount
|
|
103
|
+
*/
|
|
104
|
+
Delegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<Vow<Record<unknown, unknown>>, undefined>>;
|
|
105
|
+
/**
|
|
106
|
+
* @param {string} validatorAddress
|
|
107
|
+
* @param {Amount<'nat'>} ertpAmount
|
|
108
|
+
*/
|
|
109
|
+
Undelegate(validatorAddress: string, ertpAmount: Amount<"nat">): Promise<Invitation<Vow<TimestampRecord>, undefined>>;
|
|
110
|
+
CloseAccount(): never;
|
|
111
|
+
}>;
|
|
112
|
+
holder: import("@endo/exo").Guarded<any>;
|
|
113
|
+
}>;
|
|
91
114
|
/**
|
|
92
115
|
* TODO: balance lookups for non-vbank assets
|
|
93
116
|
*
|
|
@@ -95,13 +118,13 @@ export function prepareLocalOrchestrationAccountKit(zone: Zone, makeRecorderKit:
|
|
|
95
118
|
*/
|
|
96
119
|
getBalance(denom: import("@agoric/orchestration").DenomArg): Vow<DenomAmount>;
|
|
97
120
|
getBalances(): Vow<never>;
|
|
98
|
-
getPublicTopics(): {
|
|
121
|
+
getPublicTopics(): Vow<{
|
|
99
122
|
account: {
|
|
100
123
|
description: string;
|
|
101
124
|
subscriber: globalThis.Subscriber<LocalChainAccountNotification>;
|
|
102
|
-
storagePath:
|
|
125
|
+
storagePath: string;
|
|
103
126
|
};
|
|
104
|
-
}
|
|
127
|
+
}>;
|
|
105
128
|
/**
|
|
106
129
|
* @param {string} validatorAddress
|
|
107
130
|
* @param {Amount<'nat'>} ertpAmount
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-orchestration-account.d.ts","sourceRoot":"","sources":["local-orchestration-account.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-orchestration-account.d.ts","sourceRoot":"","sources":["local-orchestration-account.js"],"names":[],"mappings":"AAwEO,0DAPI,IAAI,mBACJ,eAAe,OACf,GAAG,gBACH,OAAO,YAAY,CAAC,mCACpB,QAAQ,YACR,QAAQ;aA6DJ,iBAAiB;aACjB,YAAY;iBACZ,OAAO,WAAW,CAAC;;;QAc1B;;;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;;;;;;;;;;;;gBAvIxB;;;mBAGG;2CAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;gBAYxB;;;mBAGG;6CAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;;;;;QA8IxB;;;;WAIG;;;;;;;;;;QAmCH;;;WAGG;mCAFQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC;QAqBxB;;;;WAIG;qCAHQ,MAAM,cACN,MAAM,CAAC,KAAK,CAAC,GACX,IAAI,IAAI,GAAG,eAAe,CAAC;QAoBxC;;;;WAIG;QACH,yDAAyD;;QAOzD,0DAA0D;;QAI1D,2DAA2D;;;;;;QAI3D,sDAAsD;;;QAWtD;;;;;;;;WAQG;yBAPQ,SAAS,eAET,YAAY,6CAIV,IAAI,IAAI,CAAC;QA8BtB,uEAAuE;;;GAW9E;;aA9aa,MAAM;;oBAIP;IACZ,QAAY,EAAE,YAAY,6BAA6B,CAAC,CAAC;IACzD,OAAW,EAAE,iBAAiB,CAAC;IAC/B,OAAW,EAAE,YAAY,CAAC;CACvB;+CAuaU,UAAU,CAAC,OAAO,mCAAmC,CAAC;2CACtD,UAAU,CAAC,gCAAgC,CAAC;0BA/bnC,cAAc;qCADU,6CAA6C;kCAGhC,cAAc;4BADjD,kBAAkB;8BAEC,aAAa;8BAE9B,gBAAgB;uCARP,gCAAgC;kCAC4E,uBAAuB;yBAK3H,aAAa;qCADG,cAAc;+BAEpC,sBAAsB;8BAAtB,sBAAsB;+BANoF,uBAAuB;uCAAvB,uBAAuB;2CAAvB,uBAAuB;iCAAvB,uBAAuB;+BAAvB,uBAAuB;iCACxH,6CAA6C"}
|
|
@@ -5,7 +5,6 @@ import { makeTracer } from '@agoric/internal';
|
|
|
5
5
|
import { Shape as NetworkShape } from '@agoric/network';
|
|
6
6
|
import { M } from '@agoric/vat-data';
|
|
7
7
|
import { VowShape } from '@agoric/vow';
|
|
8
|
-
import { TopicsRecordShape } from '@agoric/zoe/src/contractSupport/index.js';
|
|
9
8
|
import { E } from '@endo/far';
|
|
10
9
|
import {
|
|
11
10
|
ChainAddressShape,
|
|
@@ -51,7 +50,6 @@ const { Vow$ } = NetworkShape; // TODO #9611
|
|
|
51
50
|
|
|
52
51
|
const HolderI = M.interface('holder', {
|
|
53
52
|
...orchestrationAccountMethods,
|
|
54
|
-
getPublicTopics: M.call().returns(TopicsRecordShape),
|
|
55
53
|
delegate: M.call(M.string(), AmountShape).returns(VowShape),
|
|
56
54
|
undelegate: M.call(M.string(), AmountShape).returns(VowShape),
|
|
57
55
|
deposit: M.call(PaymentShape).returns(VowShape),
|
|
@@ -77,7 +75,7 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
77
75
|
makeRecorderKit,
|
|
78
76
|
zcf,
|
|
79
77
|
timerService,
|
|
80
|
-
{ watch, allVows, asVow },
|
|
78
|
+
{ watch, allVows, asVow, when },
|
|
81
79
|
chainHub,
|
|
82
80
|
) => {
|
|
83
81
|
const timestampHelper = makeTimestampHelper(timerService);
|
|
@@ -140,6 +138,8 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
140
138
|
// must be the fully synchronous maker because the kit is held in durable state
|
|
141
139
|
// @ts-expect-error XXX Patterns
|
|
142
140
|
const topicKit = makeRecorderKit(storageNode, PUBLIC_TOPICS.account[1]);
|
|
141
|
+
// TODO determine what goes in vstorage https://github.com/Agoric/agoric-sdk/issues/9066
|
|
142
|
+
void E(topicKit.recorder).write('');
|
|
143
143
|
|
|
144
144
|
return { account, address, topicKit };
|
|
145
145
|
},
|
|
@@ -287,6 +287,22 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
287
287
|
},
|
|
288
288
|
},
|
|
289
289
|
holder: {
|
|
290
|
+
asContinuingOffer() {
|
|
291
|
+
// getPublicTopics resolves promptly (same run), so we don't need a watcher
|
|
292
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
293
|
+
return asVow(async () => {
|
|
294
|
+
await null;
|
|
295
|
+
const { holder, invitationMakers } = this.facets;
|
|
296
|
+
return harden({
|
|
297
|
+
// getPublicTopics returns a vow, for membrane compatibility.
|
|
298
|
+
// it's safe to unwrap to a promise and get the result as we
|
|
299
|
+
// expect this complete in the same run
|
|
300
|
+
publicSubscribers: await when(holder.getPublicTopics()),
|
|
301
|
+
invitationMakers,
|
|
302
|
+
holder,
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
},
|
|
290
306
|
/**
|
|
291
307
|
* TODO: balance lookups for non-vbank assets
|
|
292
308
|
*
|
|
@@ -312,13 +328,18 @@ export const prepareLocalOrchestrationAccountKit = (
|
|
|
312
328
|
},
|
|
313
329
|
|
|
314
330
|
getPublicTopics() {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
331
|
+
// getStoragePath resolves promptly (same run), so we don't need a watcher
|
|
332
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
333
|
+
return asVow(async () => {
|
|
334
|
+
await null;
|
|
335
|
+
const { topicKit } = this.state;
|
|
336
|
+
return harden({
|
|
337
|
+
account: {
|
|
338
|
+
description: PUBLIC_TOPICS.account[0],
|
|
339
|
+
subscriber: topicKit.subscriber,
|
|
340
|
+
storagePath: await topicKit.recorder.getStoragePath(),
|
|
341
|
+
},
|
|
342
|
+
});
|
|
322
343
|
});
|
|
323
344
|
},
|
|
324
345
|
/**
|
|
@@ -71,6 +71,11 @@ export function prepareOrchestratorKit(zone: Zone, { chainHub, localchain, makeL
|
|
|
71
71
|
asAmount: () => never;
|
|
72
72
|
};
|
|
73
73
|
}>;
|
|
74
|
+
/**
|
|
75
|
+
* Host side of the Orchestrator interface. (Methods return vows instead of
|
|
76
|
+
* promises as the interface within the guest function.)
|
|
77
|
+
*/
|
|
78
|
+
export type HostOrchestrator = ReturnType<ReturnType<typeof prepareOrchestratorKit>>["orchestrator"];
|
|
74
79
|
import type { Zone } from '@agoric/base-zone';
|
|
75
80
|
import type { AsyncFlowTools } from '@agoric/async-flow';
|
|
76
81
|
import type { ChainHub } from './chain-hub.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAmCA,0BAA0B;AAC1B;;;;;GAKG;AAkBI,6CAfI,IAAI,+FACJ;IACV,cAAkB,EAAE,cAAc,CAAC;IACnC,QAAY,EAAE,QAAQ,CAAC;IACvB,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,eAAmB,EAAE,eAAe,CAAC;IACrC,oBAAwB,EAAE,oBAAoB,CAAC;IAC/C,qBAAyB,EAAE,qBAAqB,CAAC;IACjD,oBAAwB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC1D,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,QAAY,EAAE,QAAQ,CAAC;IACvB,GAAO,EAAE,GAAG,CAAC;CACV;IAmCE,2DAA2D;;QAEzD,yCAAyC;;;;;;;;;;;;;IAK3C;;;OAGG;;QAED;;;;;WAKG;;;;;;;;;;;;;;QAMH,qDAAqD;;;;;;;;;;;;;GAwB1D;
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAmCA,0BAA0B;AAC1B;;;;;GAKG;AAkBI,6CAfI,IAAI,+FACJ;IACV,cAAkB,EAAE,cAAc,CAAC;IACnC,QAAY,EAAE,QAAQ,CAAC;IACvB,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,eAAmB,EAAE,eAAe,CAAC;IACrC,oBAAwB,EAAE,oBAAoB,CAAC;IAC/C,qBAAyB,EAAE,qBAAqB,CAAC;IACjD,oBAAwB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC1D,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,QAAY,EAAE,QAAQ,CAAC;IACvB,GAAO,EAAE,GAAG,CAAC;CACV;IAmCE,2DAA2D;;QAEzD,yCAAyC;;;;;;;;;;;;;IAK3C;;;OAGG;;QAED;;;;;WAKG;;;;;;;;;;;;;;QAMH,qDAAqD;;;;;;;;;;;;;GAwB1D;;;;;+BAMU,UAAU,CACtB,UAAc,CAAC,OAAO,sBAAsB,CAAC,CAC1C,CAAC,cAAc,CAAC;0BApIG,mBAAmB;oCAET,oBAAoB;8BAD1B,gBAAgB;gCAId,gCAAgC;4BAEpC,kBAAkB;qCADI,6CAA6C;0CAKrD,yBAAyB;2CACxB,0BAA0B;6CAHxB,gCAAgC;kCAL3C,cAAc;8BADb,aAAa;+BAU4E,aAAa;uCAAb,aAAa;yBAVtG,aAAa;0CAU4E,aAAa;kCAAb,aAAa;2BAAb,aAAa"}
|
package/src/exos/orchestrator.js
CHANGED
|
@@ -139,3 +139,11 @@ export const prepareOrchestratorKit = (
|
|
|
139
139
|
},
|
|
140
140
|
);
|
|
141
141
|
harden(prepareOrchestratorKit);
|
|
142
|
+
/**
|
|
143
|
+
* Host side of the Orchestrator interface. (Methods return vows instead of
|
|
144
|
+
* promises as the interface within the guest function.)
|
|
145
|
+
*
|
|
146
|
+
* @typedef {ReturnType<
|
|
147
|
+
* ReturnType<typeof prepareOrchestratorKit>
|
|
148
|
+
* >['orchestrator']} HostOrchestrator
|
|
149
|
+
*/
|