@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
|
@@ -27,16 +27,17 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
|
|
|
27
27
|
};
|
|
28
28
|
makeAccountWatcher: {
|
|
29
29
|
/**
|
|
30
|
+
* XXX Pipeline vows allVows and E
|
|
31
|
+
*
|
|
30
32
|
* @param {IcaAccount} account
|
|
31
|
-
* @param {Denom} stakingDenom
|
|
32
33
|
*/
|
|
33
|
-
onFulfilled(account: IcaAccount
|
|
34
|
-
asContinuingOffer(): {
|
|
34
|
+
onFulfilled(account: IcaAccount): Vow<import("@endo/exo").Guarded<{
|
|
35
|
+
asContinuingOffer(): Vow<{
|
|
35
36
|
publicSubscribers: {
|
|
36
37
|
account: {
|
|
37
38
|
description: string;
|
|
38
39
|
subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
39
|
-
storagePath:
|
|
40
|
+
storagePath: string;
|
|
40
41
|
};
|
|
41
42
|
};
|
|
42
43
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
@@ -48,14 +49,14 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
|
|
|
48
49
|
TransferAccount(): never;
|
|
49
50
|
}>;
|
|
50
51
|
holder: import("@endo/exo").Guarded<any>;
|
|
51
|
-
}
|
|
52
|
-
getPublicTopics(): {
|
|
52
|
+
}>;
|
|
53
|
+
getPublicTopics(): Vow<{
|
|
53
54
|
account: {
|
|
54
55
|
description: string;
|
|
55
56
|
subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
56
|
-
storagePath:
|
|
57
|
+
storagePath: string;
|
|
57
58
|
};
|
|
58
|
-
}
|
|
59
|
+
}>;
|
|
59
60
|
getAddress(): ChainAddress;
|
|
60
61
|
delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
|
|
61
62
|
getBalances(): Vow<never>;
|
|
@@ -72,18 +73,65 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
|
|
|
72
73
|
getAddressWatcher: {
|
|
73
74
|
/**
|
|
74
75
|
* @param {ChainAddress} chainAddress
|
|
75
|
-
* @param {
|
|
76
|
+
* @param {IcaAccount} account
|
|
76
77
|
*/
|
|
77
|
-
onFulfilled(chainAddress: ChainAddress,
|
|
78
|
-
|
|
78
|
+
onFulfilled(chainAddress: ChainAddress, account: IcaAccount): Vow<import("@endo/exo").Guarded<{
|
|
79
|
+
asContinuingOffer(): Vow<{
|
|
80
|
+
publicSubscribers: {
|
|
81
|
+
account: {
|
|
82
|
+
description: string;
|
|
83
|
+
subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
84
|
+
storagePath: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
88
|
+
Delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Promise<Invitation<Vow<undefined>, undefined>>;
|
|
89
|
+
Redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Promise<Invitation<Vow<undefined>, undefined>>;
|
|
90
|
+
WithdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Promise<Invitation<Vow<import("../orchestration-api.js").DenomAmount[]>, undefined>>;
|
|
91
|
+
Undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Promise<Invitation<Vow<undefined>, undefined>>;
|
|
92
|
+
CloseAccount(): never;
|
|
93
|
+
TransferAccount(): never;
|
|
94
|
+
}>;
|
|
95
|
+
holder: import("@endo/exo").Guarded<any>;
|
|
96
|
+
}>;
|
|
97
|
+
getPublicTopics(): Vow<{
|
|
98
|
+
account: {
|
|
99
|
+
description: string;
|
|
100
|
+
subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
101
|
+
storagePath: string;
|
|
102
|
+
};
|
|
103
|
+
}>;
|
|
104
|
+
getAddress(): ChainAddress;
|
|
105
|
+
delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
|
|
106
|
+
getBalances(): Vow<never>;
|
|
107
|
+
redelegate(srcValidator: import("../cosmos-api.js").CosmosValidatorAddress, dstValidator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
|
|
108
|
+
withdrawReward(validator: import("../cosmos-api.js").CosmosValidatorAddress): Vow<import("../orchestration-api.js").DenomAmount[]>;
|
|
109
|
+
getBalance(denom: import("../orchestration-api.js").DenomArg): Vow<import("../orchestration-api.js").DenomAmount>;
|
|
110
|
+
send(toAccount: any, amount: any): Vow<never>;
|
|
111
|
+
transfer(amount: any, msg: any): Vow<never>;
|
|
112
|
+
transferSteps(amount: any, msg: any): Vow<never>;
|
|
113
|
+
withdrawRewards(): Vow<never>;
|
|
114
|
+
undelegate(delegations: Omit<import("@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js").Delegation, "delegatorAddress">[]): Vow<undefined>;
|
|
115
|
+
}>>;
|
|
116
|
+
};
|
|
117
|
+
makeChildNodeWatcher: {
|
|
118
|
+
/**
|
|
119
|
+
* @param {Remote<StorageNode>} childNode
|
|
120
|
+
* @param {{
|
|
121
|
+
* account: IcaAccount;
|
|
122
|
+
* chainAddress: ChainAddress;
|
|
123
|
+
* }} ctx
|
|
124
|
+
*/
|
|
125
|
+
onFulfilled(childNode: Remote<StorageNode>, { account, chainAddress }: {
|
|
79
126
|
account: IcaAccount;
|
|
127
|
+
chainAddress: ChainAddress;
|
|
80
128
|
}): import("@endo/exo").Guarded<{
|
|
81
|
-
asContinuingOffer(): {
|
|
129
|
+
asContinuingOffer(): Vow<{
|
|
82
130
|
publicSubscribers: {
|
|
83
131
|
account: {
|
|
84
132
|
description: string;
|
|
85
133
|
subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
86
|
-
storagePath:
|
|
134
|
+
storagePath: string;
|
|
87
135
|
};
|
|
88
136
|
};
|
|
89
137
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
@@ -95,14 +143,14 @@ export function prepareRemoteChainFacade(zone: Zone, powers: RemoteChainFacadePo
|
|
|
95
143
|
TransferAccount(): never;
|
|
96
144
|
}>;
|
|
97
145
|
holder: import("@endo/exo").Guarded<any>;
|
|
98
|
-
}
|
|
99
|
-
getPublicTopics(): {
|
|
146
|
+
}>;
|
|
147
|
+
getPublicTopics(): Vow<{
|
|
100
148
|
account: {
|
|
101
149
|
description: string;
|
|
102
150
|
subscriber: globalThis.Subscriber<import("./cosmos-orchestration-account.js").ComosOrchestrationAccountNotification>;
|
|
103
|
-
storagePath:
|
|
151
|
+
storagePath: string;
|
|
104
152
|
};
|
|
105
|
-
}
|
|
153
|
+
}>;
|
|
106
154
|
getAddress(): ChainAddress;
|
|
107
155
|
delegate(validator: import("../cosmos-api.js").CosmosValidatorAddress, amount: import("../orchestration-api.js").AmountArg): Vow<undefined>;
|
|
108
156
|
getBalances(): Vow<never>;
|
|
@@ -132,11 +180,10 @@ import type { ChainInfo } from '../types.js';
|
|
|
132
180
|
import type { OrchestrationAccount } from '../types.js';
|
|
133
181
|
import type { PromiseToVow } from '../types.js';
|
|
134
182
|
import type { IcaAccount } from '../types.js';
|
|
135
|
-
import type { Denom } from '../types.js';
|
|
136
183
|
import type { ChainAddress } from '../types.js';
|
|
184
|
+
import type { Remote } from '@agoric/internal';
|
|
137
185
|
import type { prepareCosmosOrchestrationAccount } from './cosmos-orchestration-account.js';
|
|
138
186
|
import type { CosmosInterchainService } from './cosmos-interchain-service.js';
|
|
139
|
-
import type { Remote } from '@agoric/internal';
|
|
140
187
|
import type { TimerService } from '@agoric/time';
|
|
141
188
|
import type { VowTools } from '@agoric/vow';
|
|
142
189
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AA2KO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;QAhF1B,oEAAoE;uBAAtD,IAAI,aAAa,qBAAqB,SAAS,CAAC,CAAC,CAAC;;;QAuBhE;;;;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;sCArJY;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;oCAgJU,UAAU,CAAC,OAAO,wBAAwB,CAAC;0BAxKlC,mBAAmB;uCAM2F,aAAa;yBAHlH,aAAa;+BAGwF,aAAa;0CAAb,aAAa;kCAAb,aAAa;gCAAb,aAAa;kCAAb,aAAa;4BAJzH,kBAAkB;uDAGS,mCAAmC;6CAD7C,gCAAgC;kCAH3C,cAAc;8BAEb,aAAa"}
|
|
@@ -4,7 +4,7 @@ import { E } from '@endo/far';
|
|
|
4
4
|
import { M } from '@endo/patterns';
|
|
5
5
|
import { pickFacet } from '@agoric/vat-data';
|
|
6
6
|
import { VowShape } from '@agoric/vow';
|
|
7
|
-
import { ChainFacadeI } from '../typeGuards.js';
|
|
7
|
+
import { ChainAddressShape, ChainFacadeI } from '../typeGuards.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @import {Zone} from '@agoric/base-zone';
|
|
@@ -43,6 +43,8 @@ const prepareRemoteChainFacadeKit = (
|
|
|
43
43
|
{
|
|
44
44
|
makeCosmosOrchestrationAccount,
|
|
45
45
|
orchestration,
|
|
46
|
+
// TODO vstorage design https://github.com/Agoric/agoric-sdk/issues/9066
|
|
47
|
+
// consider making an `accounts` childNode
|
|
46
48
|
storageNode,
|
|
47
49
|
timer,
|
|
48
50
|
vowTools: { asVow, watch },
|
|
@@ -54,12 +56,20 @@ const prepareRemoteChainFacadeKit = (
|
|
|
54
56
|
public: ChainFacadeI,
|
|
55
57
|
makeAccountWatcher: M.interface('makeAccountWatcher', {
|
|
56
58
|
onFulfilled: M.call(M.remotable())
|
|
57
|
-
.optional(M.
|
|
59
|
+
.optional(M.arrayOf(M.undefined())) // empty context
|
|
58
60
|
.returns(VowShape),
|
|
59
61
|
}),
|
|
60
|
-
getAddressWatcher: M.interface('
|
|
62
|
+
getAddressWatcher: M.interface('getAddressWatcher', {
|
|
61
63
|
onFulfilled: M.call(M.record())
|
|
62
|
-
.optional(
|
|
64
|
+
.optional(M.remotable())
|
|
65
|
+
.returns(VowShape),
|
|
66
|
+
}),
|
|
67
|
+
makeChildNodeWatcher: M.interface('makeChildNodeWatcher', {
|
|
68
|
+
onFulfilled: M.call(M.remotable())
|
|
69
|
+
.optional({
|
|
70
|
+
account: M.remotable(),
|
|
71
|
+
chainAddress: ChainAddressShape,
|
|
72
|
+
})
|
|
63
73
|
.returns(M.remotable()),
|
|
64
74
|
}),
|
|
65
75
|
},
|
|
@@ -95,32 +105,55 @@ const prepareRemoteChainFacadeKit = (
|
|
|
95
105
|
connectionInfo.counterparty.connection_id,
|
|
96
106
|
),
|
|
97
107
|
this.facets.makeAccountWatcher,
|
|
98
|
-
stakingDenom,
|
|
99
108
|
);
|
|
100
109
|
});
|
|
101
110
|
},
|
|
102
111
|
},
|
|
103
112
|
makeAccountWatcher: {
|
|
104
113
|
/**
|
|
114
|
+
* XXX Pipeline vows allVows and E
|
|
115
|
+
*
|
|
105
116
|
* @param {IcaAccount} account
|
|
106
|
-
* @param {Denom} stakingDenom
|
|
107
117
|
*/
|
|
108
|
-
onFulfilled(account
|
|
109
|
-
return watch(
|
|
110
|
-
|
|
118
|
+
onFulfilled(account) {
|
|
119
|
+
return watch(
|
|
120
|
+
E(account).getAddress(),
|
|
121
|
+
this.facets.getAddressWatcher,
|
|
111
122
|
account,
|
|
112
|
-
|
|
123
|
+
);
|
|
113
124
|
},
|
|
114
125
|
},
|
|
115
126
|
getAddressWatcher: {
|
|
116
127
|
/**
|
|
117
128
|
* @param {ChainAddress} chainAddress
|
|
118
|
-
* @param {
|
|
129
|
+
* @param {IcaAccount} account
|
|
130
|
+
*/
|
|
131
|
+
onFulfilled(chainAddress, account) {
|
|
132
|
+
return watch(
|
|
133
|
+
E(storageNode).makeChildNode(chainAddress.value),
|
|
134
|
+
this.facets.makeChildNodeWatcher,
|
|
135
|
+
{ account, chainAddress },
|
|
136
|
+
);
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
makeChildNodeWatcher: {
|
|
140
|
+
/**
|
|
141
|
+
* @param {Remote<StorageNode>} childNode
|
|
142
|
+
* @param {{
|
|
143
|
+
* account: IcaAccount;
|
|
144
|
+
* chainAddress: ChainAddress;
|
|
145
|
+
* }} ctx
|
|
119
146
|
*/
|
|
120
|
-
onFulfilled(
|
|
147
|
+
onFulfilled(childNode, { account, chainAddress }) {
|
|
148
|
+
const { remoteChainInfo } = this.state;
|
|
149
|
+
const stakingDenom = remoteChainInfo.stakingTokens?.[0]?.denom;
|
|
150
|
+
if (!stakingDenom) {
|
|
151
|
+
throw Fail`chain info lacks staking denom`;
|
|
152
|
+
}
|
|
121
153
|
return makeCosmosOrchestrationAccount(chainAddress, stakingDenom, {
|
|
122
154
|
account,
|
|
123
|
-
|
|
155
|
+
// FIXME storage path https://github.com/Agoric/agoric-sdk/issues/9066
|
|
156
|
+
storageNode: childNode,
|
|
124
157
|
// FIXME provide real ICQ connection
|
|
125
158
|
// FIXME make Query Connection available via chain, not orchestrationAccount
|
|
126
159
|
icqConnection: anyVal,
|
package/src/facade.d.ts
CHANGED
|
@@ -1,56 +1,33 @@
|
|
|
1
|
-
export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode, orchestrationService,
|
|
1
|
+
export function makeOrchestrationFacade({ zone, timerService, zcf, storageNode, orchestrationService, makeRecorderKit, makeOrchestrator, vowTools, asyncFlowTools, }: {
|
|
2
2
|
zone: Zone;
|
|
3
3
|
timerService: Remote<TimerService>;
|
|
4
4
|
zcf: ZCF;
|
|
5
5
|
storageNode: Remote<StorageNode>;
|
|
6
6
|
orchestrationService: Remote<CosmosInterchainService>;
|
|
7
|
-
localchain: Remote<LocalChain>;
|
|
8
|
-
chainHub: import("./exos/chain-hub.js").ChainHub;
|
|
9
|
-
makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit;
|
|
10
7
|
makeRecorderKit: MakeRecorderKit;
|
|
11
|
-
|
|
12
|
-
makeLocalChainFacade: MakeLocalChainFacade;
|
|
13
|
-
makeRemoteChainFacade: MakeRemoteChainFacade;
|
|
8
|
+
makeOrchestrator: () => HostOrchestrator;
|
|
14
9
|
vowTools: VowTools;
|
|
15
10
|
asyncFlowTools: AsyncFlowTools;
|
|
16
11
|
}): {
|
|
17
|
-
/**
|
|
18
|
-
* @template GuestReturn
|
|
19
|
-
* @template HostReturn
|
|
20
|
-
* @template GuestContext
|
|
21
|
-
* @template HostContext
|
|
22
|
-
* @template {any[]} GuestArgs
|
|
23
|
-
* @template {any[]} HostArgs
|
|
24
|
-
* @param {string} durableName - the orchestration flow identity in the zone
|
|
25
|
-
* (to resume across upgrades)
|
|
26
|
-
* @param {HostContext} hostCtx - values to pass through the async flow
|
|
27
|
-
* membrane
|
|
28
|
-
* @param {(
|
|
29
|
-
* guestOrc: Orchestrator,
|
|
30
|
-
* guestCtx: GuestContext,
|
|
31
|
-
* ...args: GuestArgs
|
|
32
|
-
* ) => Promise<GuestReturn>} guestFn
|
|
33
|
-
* @returns {(...args: HostArgs) => Promise<HostReturn>} TODO returns a
|
|
34
|
-
* Promise for now for compat before use of asyncFlow. But really should
|
|
35
|
-
* be `Vow<HostReturn>`
|
|
36
|
-
*/
|
|
37
|
-
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>;
|
|
38
12
|
adminAsyncFlow: import("@endo/exo").Guarded<{
|
|
39
13
|
getFailures(): import("@endo/patterns").CopyMap<any, import("@endo/pass-style").Passable>;
|
|
40
14
|
wakeAll(): void;
|
|
41
15
|
getFlowForOutcomeVow(outcomeVow: any): any;
|
|
42
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>;
|
|
18
|
+
orchestrateAll: (guestFns: {
|
|
19
|
+
[durableName: string]: (...args: any[]) => any;
|
|
20
|
+
}, hostCtx: any) => {
|
|
21
|
+
[k: string]: (...args: any[]) => Promise<any>;
|
|
22
|
+
};
|
|
43
23
|
};
|
|
44
24
|
export type OrchestrationFacade = ReturnType<typeof makeOrchestrationFacade>;
|
|
45
25
|
import type { Zone } from '@agoric/zone';
|
|
46
26
|
import type { TimerService } from '@agoric/time';
|
|
47
27
|
import type { Remote } from '@agoric/internal';
|
|
48
28
|
import type { CosmosInterchainService } from './exos/cosmos-interchain-service.js';
|
|
49
|
-
import type { LocalChain } from '@agoric/vats/src/localchain.js';
|
|
50
|
-
import type { MakeLocalOrchestrationAccountKit } from './exos/local-orchestration-account.js';
|
|
51
29
|
import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
52
|
-
import type {
|
|
53
|
-
import type { MakeRemoteChainFacade } from './exos/remote-chain-facade.js';
|
|
30
|
+
import type { HostOrchestrator } from './exos/orchestrator.js';
|
|
54
31
|
import type { VowTools } from '@agoric/vow';
|
|
55
32
|
import type { AsyncFlowTools } from '@agoric/async-flow';
|
|
56
33
|
import type { Orchestrator } from './types.js';
|
package/src/facade.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"
|
|
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,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC1D,eAAmB,EAAE,eAAe,CAAC;IACrC,gBAAoB,EAAE,MAAM,gBAAgB,CAAC;IAC7C,QAAY,EAAE,QAAQ,CAAC;IACvB,cAAkB,EAAE,cAAc,CAAC;CAChC;;;;;;kBA8BW,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACH,SAAS,SAAhB,GAAG,EAAG,EACC,QAAQ,SAAf,GAAG,EAAG,eACT,MAAM,WAEN,WAAW,WAEX,CACV,QAAY,EAAE,YAAY,EAC1B,QAAY,EAAE,YAAY,EAC1B,GAAO,IAAI,EAAE,SAAS,KACf,OAAO,CAAC,WAAW,CAAC,KACf,CAAC,GAAG,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,UAAU,CAAC;+BA4B5C;QAAE,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;KAAE,WAClD,GAAG;yCA7BsB,OAAO,KAAY;;EA4CxD;kCAEa,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BAhHjC,cAAc;kCAEN,cAAc;4BAGpB,kBAAkB;6CACD,qCAAqC;qCAHhC,6CAA6C;sCACzD,wBAAwB;8BAH3B,aAAa;oCAFZ,oBAAoB;kCAQsD,YAAY"}
|
package/src/facade.js
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
/** @file Orchestration
|
|
1
|
+
/** @file Orchestration facade */
|
|
2
2
|
|
|
3
3
|
import { Fail } from '@endo/errors';
|
|
4
|
-
import { pickFacet } from '@agoric/vat-data';
|
|
5
|
-
import { prepareOrchestratorKit } from './exos/orchestrator.js';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* @import {AsyncFlowTools} from '@agoric/async-flow';
|
|
9
7
|
* @import {Zone} from '@agoric/zone';
|
|
10
8
|
* @import {Vow, VowTools} from '@agoric/vow';
|
|
11
9
|
* @import {TimerService} from '@agoric/time';
|
|
12
|
-
* @import {IBCConnectionID} from '@agoric/vats';
|
|
13
|
-
* @import {LocalChain} from '@agoric/vats/src/localchain.js';
|
|
14
10
|
* @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
|
|
11
|
+
* @import {HostOrchestrator} from './exos/orchestrator.js';
|
|
15
12
|
* @import {Remote} from '@agoric/internal';
|
|
16
13
|
* @import {CosmosInterchainService} from './exos/cosmos-interchain-service.js';
|
|
17
14
|
* @import {Chain, ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, Orchestrator} from './types.js';
|
|
18
|
-
* @import {MakeLocalChainFacade} from './exos/local-chain-facade.js';
|
|
19
|
-
* @import {MakeRemoteChainFacade} from './exos/remote-chain-facade.js';
|
|
20
|
-
* @import {MakeLocalOrchestrationAccountKit} from './exos/local-orchestration-account.js';
|
|
21
15
|
*/
|
|
22
16
|
|
|
23
17
|
/**
|
|
@@ -27,13 +21,8 @@ import { prepareOrchestratorKit } from './exos/orchestrator.js';
|
|
|
27
21
|
* zcf: ZCF;
|
|
28
22
|
* storageNode: Remote<StorageNode>;
|
|
29
23
|
* orchestrationService: Remote<CosmosInterchainService>;
|
|
30
|
-
* localchain: Remote<LocalChain>;
|
|
31
|
-
* chainHub: import('./exos/chain-hub.js').ChainHub;
|
|
32
|
-
* makeLocalOrchestrationAccountKit: MakeLocalOrchestrationAccountKit;
|
|
33
24
|
* makeRecorderKit: MakeRecorderKit;
|
|
34
|
-
*
|
|
35
|
-
* makeLocalChainFacade: MakeLocalChainFacade;
|
|
36
|
-
* makeRemoteChainFacade: MakeRemoteChainFacade;
|
|
25
|
+
* makeOrchestrator: () => HostOrchestrator;
|
|
37
26
|
* vowTools: VowTools;
|
|
38
27
|
* asyncFlowTools: AsyncFlowTools;
|
|
39
28
|
* }} powers
|
|
@@ -44,12 +33,8 @@ export const makeOrchestrationFacade = ({
|
|
|
44
33
|
zcf,
|
|
45
34
|
storageNode,
|
|
46
35
|
orchestrationService,
|
|
47
|
-
localchain,
|
|
48
|
-
chainHub,
|
|
49
|
-
makeLocalOrchestrationAccountKit,
|
|
50
36
|
makeRecorderKit,
|
|
51
|
-
|
|
52
|
-
makeRemoteChainFacade,
|
|
37
|
+
makeOrchestrator,
|
|
53
38
|
vowTools,
|
|
54
39
|
asyncFlowTools,
|
|
55
40
|
}) => {
|
|
@@ -59,73 +44,75 @@ export const makeOrchestrationFacade = ({
|
|
|
59
44
|
storageNode &&
|
|
60
45
|
orchestrationService &&
|
|
61
46
|
// @ts-expect-error type says defined but double check
|
|
62
|
-
makeLocalOrchestrationAccountKit &&
|
|
63
|
-
// @ts-expect-error type says defined but double check
|
|
64
47
|
makeRecorderKit &&
|
|
65
48
|
// @ts-expect-error type says defined but double check
|
|
66
|
-
|
|
49
|
+
makeOrchestrator &&
|
|
67
50
|
asyncFlowTools) ||
|
|
68
51
|
Fail`params missing`;
|
|
69
52
|
|
|
70
|
-
const makeOrchestratorKit = prepareOrchestratorKit(zone, {
|
|
71
|
-
asyncFlowTools,
|
|
72
|
-
chainHub,
|
|
73
|
-
localchain,
|
|
74
|
-
makeRecorderKit,
|
|
75
|
-
makeLocalChainFacade,
|
|
76
|
-
makeRemoteChainFacade,
|
|
77
|
-
orchestrationService,
|
|
78
|
-
storageNode,
|
|
79
|
-
timerService,
|
|
80
|
-
vowTools,
|
|
81
|
-
zcf,
|
|
82
|
-
});
|
|
83
|
-
const makeOrchestrator = pickFacet(makeOrchestratorKit, 'orchestrator');
|
|
84
|
-
|
|
85
53
|
const { prepareEndowment, asyncFlow, adminAsyncFlow } = asyncFlowTools;
|
|
86
54
|
|
|
87
55
|
const { when } = vowTools;
|
|
88
56
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const subZone = zone.subZone(durableName);
|
|
57
|
+
/**
|
|
58
|
+
* @template GuestReturn
|
|
59
|
+
* @template HostReturn
|
|
60
|
+
* @template GuestContext
|
|
61
|
+
* @template HostContext
|
|
62
|
+
* @template {any[]} GuestArgs
|
|
63
|
+
* @template {any[]} HostArgs
|
|
64
|
+
* @param {string} durableName - the orchestration flow identity in the zone
|
|
65
|
+
* (to resume across upgrades)
|
|
66
|
+
* @param {HostContext} hostCtx - values to pass through the async flow
|
|
67
|
+
* membrane
|
|
68
|
+
* @param {(
|
|
69
|
+
* 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>`
|
|
76
|
+
*/
|
|
77
|
+
const orchestrate = (durableName, hostCtx, guestFn) => {
|
|
78
|
+
const subZone = zone.subZone(durableName);
|
|
112
79
|
|
|
113
|
-
|
|
80
|
+
const hostOrc = makeOrchestrator();
|
|
114
81
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
82
|
+
const [wrappedOrc, wrappedCtx] = prepareEndowment(subZone, 'endowments', [
|
|
83
|
+
hostOrc,
|
|
84
|
+
hostCtx,
|
|
85
|
+
]);
|
|
119
86
|
|
|
120
|
-
|
|
87
|
+
const hostFn = asyncFlow(subZone, 'asyncFlow', guestFn);
|
|
121
88
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
89
|
+
const orcFn = (...args) =>
|
|
90
|
+
// TODO remove the `when` after fixing the return type
|
|
91
|
+
// to `Vow<HostReturn>`
|
|
92
|
+
when(hostFn(wrappedOrc, wrappedCtx, ...args));
|
|
93
|
+
return harden(orcFn);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Orchestrate all the guest functions.
|
|
98
|
+
*
|
|
99
|
+
* NOTE multiple calls to this with the same guestFn name will fail
|
|
100
|
+
*
|
|
101
|
+
* @param {{ [durableName: string]: (...args: any[]) => any }} guestFns
|
|
102
|
+
* @param {any} hostCtx
|
|
103
|
+
*/
|
|
104
|
+
const orchestrateAll = (guestFns, hostCtx) =>
|
|
105
|
+
Object.fromEntries(
|
|
106
|
+
Object.entries(guestFns).map(([name, guestFn]) => [
|
|
107
|
+
name,
|
|
108
|
+
orchestrate(name, hostCtx, guestFn),
|
|
109
|
+
]),
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
return {
|
|
128
113
|
adminAsyncFlow,
|
|
114
|
+
orchestrate,
|
|
115
|
+
orchestrateAll,
|
|
129
116
|
};
|
|
130
117
|
};
|
|
131
118
|
harden(makeOrchestrationFacade);
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
import type { Amount, Brand, NatAmount } from '@agoric/ertp/src/types.js';
|
|
7
7
|
import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
|
|
8
8
|
import type { Timestamp } from '@agoric/time';
|
|
9
|
+
import type { ContinuingOfferResult } from '@agoric/smart-wallet/src/types.js';
|
|
10
|
+
import type { TopicsRecord } from '@agoric/zoe/src/contractSupport/topics.js';
|
|
9
11
|
import type { ChainInfo, CosmosChainAccountMethods, CosmosChainInfo, IBCMsgTransferOptions, KnownChains } from './types.js';
|
|
10
12
|
/**
|
|
11
13
|
* A denom that designates a path to a token type on some blockchain.
|
|
@@ -125,6 +127,19 @@ export interface OrchestrationAccountI {
|
|
|
125
127
|
* @returns void
|
|
126
128
|
*/
|
|
127
129
|
transferSteps: (amount: AmountArg, msg: TransferMsg) => Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* Returns `invitationMakers` and `publicSubscribers` to the account
|
|
132
|
+
* holder's smart wallet so they can continue interacting with the account
|
|
133
|
+
* and read account state in vstorage if published.
|
|
134
|
+
*/
|
|
135
|
+
asContinuingOffer: () => Promise<ContinuingOfferResult>;
|
|
136
|
+
/**
|
|
137
|
+
* Public topics are a map to different vstorage paths and subscribers that
|
|
138
|
+
* can be shared with on or offchain clients.
|
|
139
|
+
* When returned as part of a continuing invitation, it will appear
|
|
140
|
+
* in the {@link CurrentWalletRecord} in vstorage.
|
|
141
|
+
*/
|
|
142
|
+
getPublicTopics: () => Promise<TopicsRecord>;
|
|
128
143
|
}
|
|
129
144
|
/**
|
|
130
145
|
* Internal structure for TransferMsgs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"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"}
|
package/src/orchestration-api.ts
CHANGED
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
* - must not have chain-specific types without runtime narrowing by chain id
|
|
5
5
|
* - should remain relatively stable.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
Amount,
|
|
9
|
-
Brand,
|
|
10
|
-
NatAmount,
|
|
11
|
-
Payment,
|
|
12
|
-
} from '@agoric/ertp/src/types.js';
|
|
7
|
+
import type { Amount, Brand, NatAmount } from '@agoric/ertp/src/types.js';
|
|
13
8
|
import type { LocalChainAccount } from '@agoric/vats/src/localchain.js';
|
|
14
9
|
import type { Timestamp } from '@agoric/time';
|
|
10
|
+
import type { ContinuingOfferResult } from '@agoric/smart-wallet/src/types.js';
|
|
11
|
+
import type { TopicsRecord } from '@agoric/zoe/src/contractSupport/topics.js';
|
|
12
|
+
import type { CurrentWalletRecord } from '@agoric/smart-wallet/src/smartWallet.js';
|
|
15
13
|
import type {
|
|
16
14
|
ChainInfo,
|
|
17
15
|
CosmosChainAccountMethods,
|
|
@@ -172,6 +170,20 @@ export interface OrchestrationAccountI {
|
|
|
172
170
|
* @returns void
|
|
173
171
|
*/
|
|
174
172
|
transferSteps: (amount: AmountArg, msg: TransferMsg) => Promise<void>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Returns `invitationMakers` and `publicSubscribers` to the account
|
|
176
|
+
* holder's smart wallet so they can continue interacting with the account
|
|
177
|
+
* and read account state in vstorage if published.
|
|
178
|
+
*/
|
|
179
|
+
asContinuingOffer: () => Promise<ContinuingOfferResult>;
|
|
180
|
+
/**
|
|
181
|
+
* Public topics are a map to different vstorage paths and subscribers that
|
|
182
|
+
* can be shared with on or offchain clients.
|
|
183
|
+
* When returned as part of a continuing invitation, it will appear
|
|
184
|
+
* in the {@link CurrentWalletRecord} in vstorage.
|
|
185
|
+
*/
|
|
186
|
+
getPublicTopics: () => Promise<TopicsRecord>;
|
|
175
187
|
}
|
|
176
188
|
|
|
177
189
|
/**
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export function startBasicFlows({ consume: { agoricNames, board, chainStorage, chainTimerService, cosmosInterchainService, localchain, startUpgradable, }, installation: { consume: { [contractName]: installation }, }, instance: { produce: { [contractName]: produceInstance }, }, }: BootstrapPowers): Promise<void>;
|
|
2
|
+
export function getManifestForContract({ restoreRef }: {
|
|
3
|
+
restoreRef: any;
|
|
4
|
+
}, { installKeys, ...options }: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
installKeys: any;
|
|
7
|
+
}): {
|
|
8
|
+
manifest: {
|
|
9
|
+
[x: string]: {
|
|
10
|
+
consume: {
|
|
11
|
+
agoricNames: boolean;
|
|
12
|
+
board: boolean;
|
|
13
|
+
chainStorage: boolean;
|
|
14
|
+
chainTimerService: boolean;
|
|
15
|
+
cosmosInterchainService: boolean;
|
|
16
|
+
localchain: boolean;
|
|
17
|
+
startUpgradable: boolean;
|
|
18
|
+
};
|
|
19
|
+
installation: {
|
|
20
|
+
consume: {
|
|
21
|
+
basicFlows: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
instance: {
|
|
25
|
+
produce: {
|
|
26
|
+
basicFlows: boolean;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
installations: {
|
|
32
|
+
basicFlows: any;
|
|
33
|
+
};
|
|
34
|
+
options: {
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
declare const contractName: "basicFlows";
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=start-basic-flows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-basic-flows.d.ts","sourceRoot":"","sources":["start-basic-flows.js"],"names":[],"mappings":"AAsBO,yRAFI,eAAe,iBA4CzB;AAGM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BN;AApFD,yCAAkC"}
|