@agoric/orchestration 0.1.1-dev-67275c2.0 → 0.1.1-dev-2e66067.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/index.d.ts +2 -0
- package/index.js +3 -0
- package/package.json +17 -17
- package/src/chain-info.d.ts +11 -2
- package/src/chain-info.d.ts.map +1 -1
- package/src/chain-info.js +16 -4
- package/src/cosmos-api.d.ts +38 -10
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.ts +39 -10
- package/src/examples/auto-stake-it.contract.d.ts +5 -16
- package/src/examples/auto-stake-it.contract.d.ts.map +1 -1
- package/src/examples/auto-stake-it.contract.js +1 -16
- package/src/examples/basic-flows.contract.d.ts.map +1 -1
- package/src/examples/basic-flows.contract.js +1 -2
- package/src/examples/send-anywhere.contract.d.ts +3 -30
- package/src/examples/send-anywhere.contract.d.ts.map +1 -1
- package/src/examples/send-anywhere.contract.js +1 -17
- package/src/examples/staking-combinations.contract.d.ts +1 -1
- package/src/examples/staking-combinations.contract.d.ts.map +1 -1
- package/src/examples/staking-combinations.contract.js +1 -1
- package/src/examples/swap.contract.d.ts +2 -2
- package/src/examples/swap.contract.d.ts.map +1 -1
- package/src/examples/swap.contract.js +1 -1
- package/src/examples/unbond.contract.d.ts +1 -1
- package/src/examples/unbond.contract.d.ts.map +1 -1
- package/src/examples/unbond.contract.js +1 -1
- package/src/examples/unbond.flows.js +1 -1
- package/src/exos/chain-hub-admin.d.ts +8 -4
- package/src/exos/chain-hub-admin.d.ts.map +1 -1
- package/src/exos/chain-hub-admin.js +15 -2
- package/src/exos/chain-hub.d.ts +1 -1
- package/src/exos/chain-hub.d.ts.map +1 -1
- package/src/exos/chain-hub.js +5 -1
- package/src/exos/cosmos-interchain-service.d.ts +70 -19
- package/src/exos/cosmos-interchain-service.d.ts.map +1 -1
- package/src/exos/cosmos-interchain-service.js +13 -6
- package/src/exos/cosmos-orchestration-account.d.ts +5 -0
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +2 -0
- package/src/exos/exo-interfaces.d.ts +27 -0
- package/src/exos/exo-interfaces.d.ts.map +1 -0
- package/src/exos/exo-interfaces.ts +35 -0
- package/src/exos/ica-account-kit.d.ts +3 -1
- package/src/exos/ica-account-kit.d.ts.map +1 -1
- package/src/exos/ica-account-kit.js +7 -1
- package/src/exos/icq-connection-kit.d.ts.map +1 -1
- package/src/exos/icq-connection-kit.js +3 -0
- package/src/exos/local-chain-facade.d.ts +4 -1
- package/src/exos/local-chain-facade.d.ts.map +1 -1
- package/src/exos/local-chain-facade.js +6 -1
- package/src/exos/local-orchestration-account.d.ts +3 -0
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +2 -0
- package/src/exos/orchestrator.d.ts +1 -1
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +1 -1
- package/src/exos/remote-chain-facade.d.ts +1 -1
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +1 -1
- package/src/facade.d.ts +1 -1
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +1 -1
- package/src/orchestration-api.d.ts +45 -8
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.ts +51 -7
- package/src/typeGuards.d.ts +19 -7
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +15 -2
- package/src/types.d.ts +1 -0
- package/src/types.d.ts.map +1 -1
- package/src/types.ts +1 -0
- package/src/utils/start-helper.d.ts +1 -1
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +9 -2
- package/src/vat-orchestration.d.ts +4 -1
- package/src/vat-orchestration.d.ts.map +1 -1
- package/src/vat-orchestration.js +14 -2
|
@@ -53,12 +53,14 @@ const EVow$ = shape => M.or(Vow$(shape), M.promise(/* shape */));
|
|
|
53
53
|
*/
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
+
* @private
|
|
56
57
|
* @typedef {{
|
|
57
58
|
* topicKit: RecorderKit<LocalChainAccountNotification>;
|
|
58
59
|
* packetTools: PacketTools;
|
|
59
60
|
* account: LocalChainAccount;
|
|
60
61
|
* address: ChainAddress;
|
|
61
62
|
* }} State
|
|
63
|
+
* Internal to the LocalOrchestrationAccount exo
|
|
62
64
|
*/
|
|
63
65
|
|
|
64
66
|
const HolderI = M.interface('holder', {
|
|
@@ -105,7 +105,7 @@ import type { HostInterface } from '@agoric/async-flow';
|
|
|
105
105
|
import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
106
106
|
import type { MakeLocalChainFacade } from './local-chain-facade.js';
|
|
107
107
|
import type { MakeRemoteChainFacade } from './remote-chain-facade.js';
|
|
108
|
-
import type { CosmosInterchainService } from './
|
|
108
|
+
import type { CosmosInterchainService } from './exo-interfaces.js';
|
|
109
109
|
import type { TimerService } from '@agoric/time';
|
|
110
110
|
import type { VowTools } from '@agoric/vow';
|
|
111
111
|
import type { ActualChainInfo } from './chain-hub.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["orchestrator.js"],"names":[],"mappings":"AAmCA,0BAA0B;AAC1B;;;;;GAKG;AA0II,0CAhBI,IAAI,UACJ;IACV,cAAkB,EAAE,cAAc,CAAC;IACnC,QAAY,EAAE,QAAQ,CAAC;IACvB,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,WAAe,EAAE,QAAQ,CAAC,MAAM,EAAE,yBAAoB,CAAC,CAAC;IACxD,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;IAC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ED;;;;;;WAMG;0HADQ,MAAM;;;;;;;QASjB,+CAA+C;;;;;;;;;;QAoB/C,mDAAmD;;QAanD,+CAA+C;kBAApC,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;;GAIhD"}
|
package/src/exos/orchestrator.js
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
* @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
|
|
25
25
|
* @import {Remote} from '@agoric/internal';
|
|
26
26
|
* @import {PickFacet} from '@agoric/swingset-liveslots';
|
|
27
|
-
* @import {CosmosInterchainService} from './
|
|
27
|
+
* @import {CosmosInterchainService} from './exo-interfaces.js';
|
|
28
28
|
* @import {MakeLocalChainFacade} from './local-chain-facade.js';
|
|
29
29
|
* @import {MakeRemoteChainFacade} from './remote-chain-facade.js';
|
|
30
30
|
* @import {Chain, ChainInfo, IBCConnectionInfo, Orchestrator} from '../types.js';
|
|
@@ -142,7 +142,7 @@ import type { LocalIbcAddress } from '@agoric/vats/tools/ibc-utils.js';
|
|
|
142
142
|
import type { RemoteIbcAddress } from '@agoric/vats/tools/ibc-utils.js';
|
|
143
143
|
import type { Remote } from '@agoric/internal';
|
|
144
144
|
import type { prepareCosmosOrchestrationAccount } from './cosmos-orchestration-account.js';
|
|
145
|
-
import type { CosmosInterchainService } from './
|
|
145
|
+
import type { CosmosInterchainService } from './exo-interfaces.js';
|
|
146
146
|
import type { TimerService } from '@agoric/time';
|
|
147
147
|
import type { VowTools } from '@agoric/vow';
|
|
148
148
|
import type { CosmosChainInfo } from '../types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-chain-facade.d.ts","sourceRoot":"","sources":["remote-chain-facade.js"],"names":[],"mappings":"AAwQO,+CAHI,IAAI,UACJ,uBAAuB;;;;;;;;;;;;;;;;QAhJ1B,4CAA4C;;QAK5C,2CAA2C;;QA0B3C;;;;WAIG;;;;QAuBH;;WAEG;8CADQ,CAAC,UAAU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qB;kCAJhC,cAAc;8BAEb,aAAa;qCAIwD,aAAa"}
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
* @import {Remote} from '@agoric/internal';
|
|
21
21
|
* @import {Vow, VowTools} from '@agoric/vow';
|
|
22
22
|
* @import {LocalIbcAddress, RemoteIbcAddress} from '@agoric/vats/tools/ibc-utils.js';
|
|
23
|
-
* @import {CosmosInterchainService} from './
|
|
23
|
+
* @import {CosmosInterchainService} from './exo-interfaces.js';
|
|
24
24
|
* @import {prepareCosmosOrchestrationAccount} from './cosmos-orchestration-account.js';
|
|
25
25
|
* @import {CosmosChainInfo, IBCConnectionInfo, ChainAddress, IcaAccount, Chain, ICQConnection} from '../types.js';
|
|
26
26
|
*/
|
package/src/facade.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export type OrchestrationFacade = ReturnType<typeof makeOrchestrationFacade>;
|
|
|
22
22
|
import type { Zone } from '@agoric/zone';
|
|
23
23
|
import type { TimerService } from '@agoric/time';
|
|
24
24
|
import type { Remote } from '@agoric/internal';
|
|
25
|
-
import type { CosmosInterchainService } from './exos/
|
|
25
|
+
import type { CosmosInterchainService } from './exos/exo-interfaces.js';
|
|
26
26
|
import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
27
27
|
import type { HostOrchestrator } from './exos/orchestrator.js';
|
|
28
28
|
import type { VowTools } from '@agoric/vow';
|
package/src/facade.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAyCO,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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AAC;IACvB,cAAkB,EAAE,cAAc,CAAC;CAChC;kBA4BW,EAAE,EACsC,EAAE,SAA1C,kBAAmB,eAAe,EAAE,CAAC,CAAE,eACzC,MAAM,WAEN,EAAE,WACF,EAAE,KACA,YAAY,CAAC,EAAE,CAAC;qBA4BM,EAAE,SAAvB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAE,EAG5B,GAAG,SAFI;QACZ,CAAK,WAAW,EAAE,MAAM,GAAG,kBAAkB,eAAe,EAAE,CAAC,CAAC,CAAC;KAC7D,YAEM,GAAG,WACH,EAAE,KACA,GAAG,CAAc,IAAT,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAE;EAgCxD;;;;yBA1HgC,EAAE,SAAtB,iBAAmB,IACnB,EAAE,SAAS,CACvB,GAAO,EAAE,YAAY,EACrB,GAAO,EAAE,GAAG,EACZ,GAAO,IAAI,EAAE,MAAM,EAAE,KACd,OAAO,CAAC,MAAM,EAAE,CAAC,GAClB,CAAC,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,GAClC,KAAK;kCAqHE,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BAzIjC,cAAc;kCAEN,cAAc;4BAGpB,kBAAkB;6CACD,0BAA0B;qCAHrB,6CAA6C;sCACzD,wBAAwB;8BAH3B,aAAa;oCAFsB,oBAAoB;oCAApB,oBAAoB;uCAQuC,YAAY;kCAAZ,YAAY;8BARvE,oBAAoB;yBAEvD,aAAa"}
|
package/src/facade.js
CHANGED
|
@@ -9,7 +9,7 @@ import { assertAllDefined, deepMapObject } from '@agoric/internal';
|
|
|
9
9
|
* @import {RecorderKit, MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js'.
|
|
10
10
|
* @import {HostOrchestrator} from './exos/orchestrator.js';
|
|
11
11
|
* @import {Remote} from '@agoric/internal';
|
|
12
|
-
* @import {CosmosInterchainService} from './exos/
|
|
12
|
+
* @import {CosmosInterchainService} from './exos/exo-interfaces.js';
|
|
13
13
|
* @import {Chain, ChainInfo, CosmosChainInfo, IBCConnectionInfo, OrchestrationAccount, OrchestrationFlow, Orchestrator} from './types.js';
|
|
14
14
|
*/
|
|
15
15
|
|
|
@@ -46,6 +46,11 @@ export type ChainAddress = {
|
|
|
46
46
|
value: string;
|
|
47
47
|
encoding: 'bech32' | 'ethereum';
|
|
48
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Object that controls an account on a particular chain.
|
|
51
|
+
*
|
|
52
|
+
* The methods available depend on the chain and its capabilities.
|
|
53
|
+
*/
|
|
49
54
|
export type OrchestrationAccount<CI extends ChainInfo> = OrchestrationAccountI & (CI extends CosmosChainInfo ? CI['chainId'] extends `agoric${string}` ? CosmosChainAccountMethods<CI> & LocalAccountMethods : CosmosChainAccountMethods<CI> : {});
|
|
50
55
|
/**
|
|
51
56
|
* An object for access the core functions of a remote chain.
|
|
@@ -78,7 +83,15 @@ export interface DenomInfo<HoldingChain extends keyof KnownChains, IssuingChain
|
|
|
78
83
|
* Provided in the callback to `orchestrate()`.
|
|
79
84
|
*/
|
|
80
85
|
export interface Orchestrator {
|
|
86
|
+
/**
|
|
87
|
+
* Get a Chain object for working with the given chain.
|
|
88
|
+
*
|
|
89
|
+
* @param {C} chainName name of the chain in KnownChains or the ChainHub backing the Orchestrator
|
|
90
|
+
*/
|
|
81
91
|
getChain: <C extends string>(chainName: C) => Promise<Chain<C extends keyof KnownChains ? KnownChains[C] : any> & (C extends 'agoric' ? AgoricChainMethods : {})>;
|
|
92
|
+
/**
|
|
93
|
+
* Make a new local (Agoric) ChainAccount
|
|
94
|
+
*/
|
|
82
95
|
makeLocalAccount: () => Promise<LocalChainAccount>;
|
|
83
96
|
/**
|
|
84
97
|
* For a denom, return information about a denom including the equivalent
|
|
@@ -153,6 +166,26 @@ export interface OrchestrationAccountI {
|
|
|
153
166
|
*/
|
|
154
167
|
getPublicTopics: () => Promise<Record<string, ResolvedPublicTopic<unknown>>>;
|
|
155
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Flows to orchestrate are regular Javascript functions but have some
|
|
171
|
+
* constraints to fulfill the requirements of resumability after termination of
|
|
172
|
+
* the enclosing vat. Some requirements for each orchestration flow:
|
|
173
|
+
* - must not close over any values that could change between invocations
|
|
174
|
+
* - must satisfy the `OrchestrationFlow` interface
|
|
175
|
+
* - must be hardened
|
|
176
|
+
* - must not use `E()` (eventual send)
|
|
177
|
+
*
|
|
178
|
+
* The call to `orchestrate` using a flow function in reincarnations of the vat
|
|
179
|
+
* must have the same `durableName` as before. To help enforce these
|
|
180
|
+
* constraints, we recommend:
|
|
181
|
+
*
|
|
182
|
+
* - keeping flows in a `.flows.js` module
|
|
183
|
+
* - importing them all with `import * as flows` to get a single object keyed by
|
|
184
|
+
* the export name
|
|
185
|
+
* - using `orchestrateAll` to treat each export name as the `durableName` of
|
|
186
|
+
* the flow
|
|
187
|
+
* - adopting `@agoric/eslint-config` that has rules to help detect problems
|
|
188
|
+
*/
|
|
156
189
|
export interface OrchestrationFlow<CT = unknown> {
|
|
157
190
|
(orc: Orchestrator, ctx: CT, ...args: Passable[]): Promise<unknown>;
|
|
158
191
|
}
|
|
@@ -161,24 +194,28 @@ export interface OrchestrationFlow<CT = unknown> {
|
|
|
161
194
|
* The type must be able to express transfers across different chains and transports.
|
|
162
195
|
*
|
|
163
196
|
* NOTE Expected to change, so consider an opaque structure.
|
|
197
|
+
* @internal
|
|
164
198
|
*/
|
|
165
|
-
export
|
|
199
|
+
export interface TransferMsg {
|
|
166
200
|
toAccount: ChainAddress;
|
|
167
201
|
timeout?: Timestamp;
|
|
168
202
|
next?: TransferMsg;
|
|
169
203
|
data?: object;
|
|
170
|
-
}
|
|
171
|
-
|
|
204
|
+
}
|
|
205
|
+
/** @alpha */
|
|
206
|
+
export interface AfterAction {
|
|
172
207
|
destChain: string;
|
|
173
208
|
destAddress: ChainAddress;
|
|
174
|
-
}
|
|
175
|
-
|
|
209
|
+
}
|
|
210
|
+
/** @alpha */
|
|
211
|
+
export interface SwapExact {
|
|
176
212
|
amountIn: Amount;
|
|
177
213
|
amountOut: Amount;
|
|
178
|
-
}
|
|
179
|
-
|
|
214
|
+
}
|
|
215
|
+
/** @alpha */
|
|
216
|
+
export interface SwapMaxSlippage {
|
|
180
217
|
amountIn: Amount;
|
|
181
218
|
brandOut: Brand;
|
|
182
219
|
slippage: number;
|
|
183
|
-
}
|
|
220
|
+
}
|
|
184
221
|
//# sourceMappingURL=orchestration-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-api.d.ts","sourceRoot":"","sources":["orchestration-api.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EACZ,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,yBAAyB,EACzB,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE1E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAI3B;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;AAE5C;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC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= {
|
|
|
68
68
|
encoding: 'bech32' | 'ethereum';
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Object that controls an account on a particular chain.
|
|
73
|
+
*
|
|
74
|
+
* The methods available depend on the chain and its capabilities.
|
|
75
|
+
*/
|
|
71
76
|
export type OrchestrationAccount<CI extends ChainInfo> = OrchestrationAccountI &
|
|
72
77
|
(CI extends CosmosChainInfo
|
|
73
78
|
? CI['chainId'] extends `agoric${string}`
|
|
@@ -119,6 +124,11 @@ export interface DenomInfo<
|
|
|
119
124
|
* Provided in the callback to `orchestrate()`.
|
|
120
125
|
*/
|
|
121
126
|
export interface Orchestrator {
|
|
127
|
+
/**
|
|
128
|
+
* Get a Chain object for working with the given chain.
|
|
129
|
+
*
|
|
130
|
+
* @param {C} chainName name of the chain in KnownChains or the ChainHub backing the Orchestrator
|
|
131
|
+
*/
|
|
122
132
|
getChain: <C extends string>(
|
|
123
133
|
chainName: C,
|
|
124
134
|
) => Promise<
|
|
@@ -126,7 +136,11 @@ export interface Orchestrator {
|
|
|
126
136
|
(C extends 'agoric' ? AgoricChainMethods : {})
|
|
127
137
|
>;
|
|
128
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Make a new local (Agoric) ChainAccount
|
|
141
|
+
*/
|
|
129
142
|
makeLocalAccount: () => Promise<LocalChainAccount>;
|
|
143
|
+
|
|
130
144
|
/**
|
|
131
145
|
* For a denom, return information about a denom including the equivalent
|
|
132
146
|
* local Brand, the Chain on which the denom is held, and the Chain that
|
|
@@ -139,7 +153,7 @@ export interface Orchestrator {
|
|
|
139
153
|
>(
|
|
140
154
|
denom: Denom,
|
|
141
155
|
) => DenomInfo<HoldingChain, IssuingChain>;
|
|
142
|
-
|
|
156
|
+
|
|
143
157
|
/**
|
|
144
158
|
* Convert an amount described in native data to a local, structured Amount.
|
|
145
159
|
* @param amount - the described amount
|
|
@@ -220,6 +234,26 @@ export interface OrchestrationAccountI {
|
|
|
220
234
|
getPublicTopics: () => Promise<Record<string, ResolvedPublicTopic<unknown>>>;
|
|
221
235
|
}
|
|
222
236
|
|
|
237
|
+
/**
|
|
238
|
+
* Flows to orchestrate are regular Javascript functions but have some
|
|
239
|
+
* constraints to fulfill the requirements of resumability after termination of
|
|
240
|
+
* the enclosing vat. Some requirements for each orchestration flow:
|
|
241
|
+
* - must not close over any values that could change between invocations
|
|
242
|
+
* - must satisfy the `OrchestrationFlow` interface
|
|
243
|
+
* - must be hardened
|
|
244
|
+
* - must not use `E()` (eventual send)
|
|
245
|
+
*
|
|
246
|
+
* The call to `orchestrate` using a flow function in reincarnations of the vat
|
|
247
|
+
* must have the same `durableName` as before. To help enforce these
|
|
248
|
+
* constraints, we recommend:
|
|
249
|
+
*
|
|
250
|
+
* - keeping flows in a `.flows.js` module
|
|
251
|
+
* - importing them all with `import * as flows` to get a single object keyed by
|
|
252
|
+
* the export name
|
|
253
|
+
* - using `orchestrateAll` to treat each export name as the `durableName` of
|
|
254
|
+
* the flow
|
|
255
|
+
* - adopting `@agoric/eslint-config` that has rules to help detect problems
|
|
256
|
+
*/
|
|
223
257
|
export interface OrchestrationFlow<CT = unknown> {
|
|
224
258
|
(orc: Orchestrator, ctx: CT, ...args: Passable[]): Promise<unknown>;
|
|
225
259
|
}
|
|
@@ -229,18 +263,28 @@ export interface OrchestrationFlow<CT = unknown> {
|
|
|
229
263
|
* The type must be able to express transfers across different chains and transports.
|
|
230
264
|
*
|
|
231
265
|
* NOTE Expected to change, so consider an opaque structure.
|
|
266
|
+
* @internal
|
|
232
267
|
*/
|
|
233
|
-
export
|
|
268
|
+
export interface TransferMsg {
|
|
234
269
|
toAccount: ChainAddress;
|
|
235
270
|
timeout?: Timestamp;
|
|
236
271
|
next?: TransferMsg;
|
|
237
272
|
data?: object;
|
|
238
|
-
}
|
|
273
|
+
}
|
|
239
274
|
|
|
240
|
-
|
|
241
|
-
export
|
|
242
|
-
|
|
275
|
+
/** @alpha */
|
|
276
|
+
export interface AfterAction {
|
|
277
|
+
destChain: string;
|
|
278
|
+
destAddress: ChainAddress;
|
|
279
|
+
}
|
|
280
|
+
/** @alpha */
|
|
281
|
+
export interface SwapExact {
|
|
282
|
+
amountIn: Amount;
|
|
283
|
+
amountOut: Amount;
|
|
284
|
+
}
|
|
285
|
+
/** @alpha */
|
|
286
|
+
export interface SwapMaxSlippage {
|
|
243
287
|
amountIn: Amount;
|
|
244
288
|
brandOut: Brand;
|
|
245
289
|
slippage: number;
|
|
246
|
-
}
|
|
290
|
+
}
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {TypedPattern} from '@agoric/internal';
|
|
3
|
-
* @import {ChainAddress, CosmosAssetInfo, Chain, ChainInfo, CosmosChainInfo, DenomAmount, DenomDetail, DenomInfo} from './types.js';
|
|
3
|
+
* @import {ChainAddress, CosmosAssetInfo, Chain, ChainInfo, CosmosChainInfo, DenomAmount, DenomDetail, DenomInfo, AmountArg} from './types.js';
|
|
4
|
+
* @import {Any as Proto3Msg} from '@agoric/cosmic-proto/google/protobuf/any.js';
|
|
4
5
|
* @import {Delegation} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
|
|
5
6
|
* @import {TxBody} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
6
7
|
* @import {TypedJson} from '@agoric/cosmic-proto';
|
|
@@ -16,16 +17,19 @@ export const OutboundConnectionHandlerI: import("@endo/patterns").InterfaceGuard
|
|
|
16
17
|
}>;
|
|
17
18
|
/** @type {TypedPattern<ChainAddress>} */
|
|
18
19
|
export const ChainAddressShape: TypedPattern<ChainAddress>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
let value: import("@endo/patterns").Matcher;
|
|
22
|
-
}
|
|
20
|
+
/** @type {TypedPattern<Proto3Msg>} */
|
|
21
|
+
export const Proto3Shape: TypedPattern<Proto3Msg>;
|
|
23
22
|
/** @type {TypedPattern<Delegation>} */
|
|
24
23
|
export const DelegationShape: TypedPattern<Delegation>;
|
|
24
|
+
/** @internal */
|
|
25
25
|
export const IBCTransferOptionsShape: import("@endo/patterns").Matcher;
|
|
26
|
+
/** @internal */
|
|
26
27
|
export const IBCChannelIDShape: import("@endo/patterns").Matcher;
|
|
28
|
+
/** @internal */
|
|
27
29
|
export const IBCChannelInfoShape: import("@endo/patterns").Matcher;
|
|
30
|
+
/** @internal */
|
|
28
31
|
export const IBCConnectionIDShape: import("@endo/patterns").Matcher;
|
|
32
|
+
/** @internal */
|
|
29
33
|
export const IBCConnectionInfoShape: import("@endo/patterns").Matcher;
|
|
30
34
|
/** @type {TypedPattern<CosmosAssetInfo>} */
|
|
31
35
|
export const CosmosAssetInfoShape: TypedPattern<CosmosAssetInfo>;
|
|
@@ -39,7 +43,9 @@ export const DenomShape: import("@endo/patterns").Matcher;
|
|
|
39
43
|
export const DenomInfoShape: TypedPattern<DenomInfo<any, any>>;
|
|
40
44
|
/** @type {TypedPattern<DenomAmount>} */
|
|
41
45
|
export const DenomAmountShape: TypedPattern<DenomAmount>;
|
|
42
|
-
|
|
46
|
+
/** @type {TypedPattern<AmountArg>} */
|
|
47
|
+
export const AmountArgShape: TypedPattern<AmountArg>;
|
|
48
|
+
/** Approximately @see RequestQuery */
|
|
43
49
|
export const ICQMsgShape: import("@endo/patterns").Matcher;
|
|
44
50
|
/** @type {TypedPattern<TypedJson>} */
|
|
45
51
|
export const TypedJsonShape: TypedPattern<TypedJson>;
|
|
@@ -51,15 +57,21 @@ export namespace TimestampProtoShape {
|
|
|
51
57
|
let seconds: import("@endo/patterns").Matcher;
|
|
52
58
|
let nanos: import("@endo/patterns").Matcher;
|
|
53
59
|
}
|
|
54
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* see {@link TxBody} for more details
|
|
62
|
+
*
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
55
65
|
export const TxBodyOptsShape: import("@endo/patterns").Matcher;
|
|
56
66
|
import type { ChainAddress } from './types.js';
|
|
57
67
|
import type { TypedPattern } from '@agoric/internal';
|
|
68
|
+
import type { Any as Proto3Msg } from '@agoric/cosmic-proto/google/protobuf/any.js';
|
|
58
69
|
import type { Delegation } from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
|
|
59
70
|
import type { CosmosAssetInfo } from './types.js';
|
|
60
71
|
import type { CosmosChainInfo } from './types.js';
|
|
61
72
|
import type { ChainInfo } from './types.js';
|
|
62
73
|
import type { DenomInfo } from './types.js';
|
|
63
74
|
import type { DenomAmount } from './types.js';
|
|
75
|
+
import type { AmountArg } from './types.js';
|
|
64
76
|
import type { TypedJson } from '@agoric/cosmic-proto';
|
|
65
77
|
//# sourceMappingURL=typeGuards.d.ts.map
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH;;;;GAIG;AACH;;;GAQE;AAEF,yCAAyC;AACzC,gCADW,aAAa,YAAY,CAAC,CAKnC;AAEF,sCAAsC;AACtC,0BADW,aAAa,SAAS,CAAC,CAIhC;AAGF,uCAAuC;AACvC,8BADW,aAAa,UAAU,CAAC,CAIhC;AAEH,gBAAgB;AAChB,uEAUE;AAEF,gBAAgB;AAChB,iEAA4C;AAC5C,gBAAgB;AAChB,mEAQG;AACH,gBAAgB;AAChB,oEAA+C;AAC/C,gBAAgB;AAChB,sEAYG;AAEH,4CAA4C;AAC5C,mCADW,aAAa,eAAe,CAAC,CASrC;AAEH,4CAA4C;AAC5C,mCADW,aAAa,eAAe,CAAC,CAWtC;AAEF,sCAAsC;AACtC,6BADW,aAAa,SAAS,CAAC,CAG/B;AACH,sEAAuE;AACvE,0DAAqC;AAErC,gDAAgD;AAChD,6BADW,aAAa,UAAU,GAAG,EAAE,GAAG,CAAC,CAAC,CAM1C;AAEF,wCAAwC;AACxC,+BADW,aAAa,WAAW,CAAC,CACqC;AAEzE,sCAAsC;AACtC,6BADW,aAAa,SAAS,CAAC,CACgC;AAElE,sCAAsC;AACtC,2DAGE;AAEF,sCAAsC;AACtC,6BADW,aAAa,SAAS,CAAC,CACmC;;;;;;;;;AAcrE;;;;GAIG;AACH,+DAQE;kCAnKiI,YAAY;kCADhH,kBAAkB;sCAEd,6CAA6C;gCACnD,wDAAwD;qCAF8C,YAAY;qCAAZ,YAAY;+BAAZ,YAAY;+BAAZ,YAAY;iCAAZ,YAAY;+BAAZ,YAAY;+BAInH,sBAAsB"}
|
package/src/typeGuards.js
CHANGED
|
@@ -4,7 +4,8 @@ import { M } from '@endo/patterns';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @import {TypedPattern} from '@agoric/internal';
|
|
7
|
-
* @import {ChainAddress, CosmosAssetInfo, Chain, ChainInfo, CosmosChainInfo, DenomAmount, DenomDetail, DenomInfo} from './types.js';
|
|
7
|
+
* @import {ChainAddress, CosmosAssetInfo, Chain, ChainInfo, CosmosChainInfo, DenomAmount, DenomDetail, DenomInfo, AmountArg} from './types.js';
|
|
8
|
+
* @import {Any as Proto3Msg} from '@agoric/cosmic-proto/google/protobuf/any.js';
|
|
8
9
|
* @import {Delegation} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
|
|
9
10
|
* @import {TxBody} from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
10
11
|
* @import {TypedJson} from '@agoric/cosmic-proto';
|
|
@@ -32,6 +33,7 @@ export const ChainAddressShape = {
|
|
|
32
33
|
value: M.string(),
|
|
33
34
|
};
|
|
34
35
|
|
|
36
|
+
/** @type {TypedPattern<Proto3Msg>} */
|
|
35
37
|
export const Proto3Shape = {
|
|
36
38
|
typeUrl: M.string(),
|
|
37
39
|
value: M.string(),
|
|
@@ -44,6 +46,7 @@ export const DelegationShape = harden({
|
|
|
44
46
|
shares: M.string(), // TODO: bigint?
|
|
45
47
|
});
|
|
46
48
|
|
|
49
|
+
/** @internal */
|
|
47
50
|
export const IBCTransferOptionsShape = M.splitRecord(
|
|
48
51
|
{},
|
|
49
52
|
{
|
|
@@ -56,7 +59,9 @@ export const IBCTransferOptionsShape = M.splitRecord(
|
|
|
56
59
|
},
|
|
57
60
|
);
|
|
58
61
|
|
|
62
|
+
/** @internal */
|
|
59
63
|
export const IBCChannelIDShape = M.string();
|
|
64
|
+
/** @internal */
|
|
60
65
|
export const IBCChannelInfoShape = M.splitRecord({
|
|
61
66
|
portId: M.string(),
|
|
62
67
|
channelId: IBCChannelIDShape,
|
|
@@ -66,7 +71,9 @@ export const IBCChannelInfoShape = M.splitRecord({
|
|
|
66
71
|
state: M.scalar(), // XXX
|
|
67
72
|
version: M.string(),
|
|
68
73
|
});
|
|
74
|
+
/** @internal */
|
|
69
75
|
export const IBCConnectionIDShape = M.string();
|
|
76
|
+
/** @internal */
|
|
70
77
|
export const IBCConnectionInfoShape = M.splitRecord({
|
|
71
78
|
id: IBCConnectionIDShape,
|
|
72
79
|
client_id: M.string(),
|
|
@@ -123,8 +130,10 @@ export const DenomInfoShape = {
|
|
|
123
130
|
/** @type {TypedPattern<DenomAmount>} */
|
|
124
131
|
export const DenomAmountShape = { denom: DenomShape, value: M.bigint() };
|
|
125
132
|
|
|
133
|
+
/** @type {TypedPattern<AmountArg>} */
|
|
126
134
|
export const AmountArgShape = M.or(AmountShape, DenomAmountShape);
|
|
127
135
|
|
|
136
|
+
/** Approximately @see RequestQuery */
|
|
128
137
|
export const ICQMsgShape = M.splitRecord(
|
|
129
138
|
{ path: M.string(), data: M.string() },
|
|
130
139
|
{ height: M.string(), prove: M.boolean() },
|
|
@@ -145,7 +154,11 @@ export const chainFacadeMethods = harden({
|
|
|
145
154
|
*/
|
|
146
155
|
export const TimestampProtoShape = { seconds: M.nat(), nanos: M.number() };
|
|
147
156
|
|
|
148
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* see {@link TxBody} for more details
|
|
159
|
+
*
|
|
160
|
+
* @internal
|
|
161
|
+
*/
|
|
149
162
|
export const TxBodyOptsShape = M.splitRecord(
|
|
150
163
|
{},
|
|
151
164
|
{
|
package/src/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type * from './ethereum-api.js';
|
|
|
5
5
|
export type * from './exos/ica-account-kit.js';
|
|
6
6
|
export type * from './exos/local-chain-facade.js';
|
|
7
7
|
export type * from './exos/icq-connection-kit.js';
|
|
8
|
+
export type * from './exos/exo-interfaces.js';
|
|
8
9
|
export type * from './orchestration-api.js';
|
|
9
10
|
export type * from './exos/cosmos-interchain-service.js';
|
|
10
11
|
export type * from './exos/chain-hub.js';
|
package/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,wBAAwB,CAAC"}
|
package/src/types.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type * from './ethereum-api.js';
|
|
|
6
6
|
export type * from './exos/ica-account-kit.js';
|
|
7
7
|
export type * from './exos/local-chain-facade.js';
|
|
8
8
|
export type * from './exos/icq-connection-kit.js';
|
|
9
|
+
export type * from './exos/exo-interfaces.js';
|
|
9
10
|
export type * from './orchestration-api.js';
|
|
10
11
|
export type * from './exos/cosmos-interchain-service.js';
|
|
11
12
|
export type * from './exos/chain-hub.js';
|
|
@@ -85,7 +85,7 @@ import type { Baggage } from '@agoric/vat-data';
|
|
|
85
85
|
import type { Zone } from '@agoric/zone';
|
|
86
86
|
import type { LocalChain } from '@agoric/vats/src/localchain.js';
|
|
87
87
|
import type { Remote } from '@agoric/vow';
|
|
88
|
-
import type { CosmosInterchainService } from '../exos/
|
|
88
|
+
import type { CosmosInterchainService } from '../exos/exo-interfaces.js';
|
|
89
89
|
import type { TimerService } from '@agoric/time';
|
|
90
90
|
import type { NameHub } from '@agoric/vats';
|
|
91
91
|
//# sourceMappingURL=start-helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AA6CO,
|
|
1
|
+
{"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AA6CO,0CANI,GAAG,WACH,OAAO,gBACP,mBAAmB,cACnB,UAAU;+BAqGR,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;wCAnEH,GAAG;;+BAjDT,GAAG,+EAOa,GAAG,yCAAyC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuItE;AA8BM,kCAdgC,EAAE,SAA3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAE,EAGhC,EAAE,SAFM,mBAAmB,GAAG;IACnC,UAAc,EAAE,UAAU,CAAC;CACvB,EACQ,CAAC,cACH,CACV,GAAO,EAAE,GAAG,CAAC,EAAE,CAAC,EAChB,WAAe,EAAE,EAAE,EACnB,IAAQ,EAAE,IAAI,EACd,KAAS,EAAE,kBAAkB,KACtB,OAAO,CAAC,CAAC,CAAC,GACL,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAYzE;kCAxLU;IACZ,UAAc,EAAE,OAAO,UAAU,CAAC,CAAC;IACnC,oBAAwB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IAC1D,WAAe,EAAE,OAAO,WAAW,CAAC,CAAC;IACrC,YAAgB,EAAE,OAAO,YAAY,CAAC,CAAC;IACvC,WAAe,EAAE,OAAO,OAAO,CAAC,CAAC;CAC9B;iCA8IU,IAAI,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,EAAE,MAAM,CAAC;6BA5JzC,kBAAkB;0BAGrB,cAAc;gCALR,gCAAgC;4BAIpC,aAAa;6CAEI,2BAA2B;kCAL1B,cAAc;6BAE/B,cAAc"}
|
|
@@ -12,14 +12,13 @@ import { makeOrchestrationFacade } from '../facade.js';
|
|
|
12
12
|
import { makeZoeTools } from './zoe-tools.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @import {PromiseKit} from '@endo/promise-kit'
|
|
16
15
|
* @import {LocalChain} from '@agoric/vats/src/localchain.js';
|
|
17
16
|
* @import {TimerService, TimerBrand} from '@agoric/time';
|
|
18
17
|
* @import {Baggage} from '@agoric/vat-data';
|
|
19
18
|
* @import {NameHub} from '@agoric/vats';
|
|
20
19
|
* @import {Remote} from '@agoric/vow';
|
|
21
20
|
* @import {Zone} from '@agoric/zone';
|
|
22
|
-
* @import {CosmosInterchainService} from '../exos/
|
|
21
|
+
* @import {CosmosInterchainService} from '../exos/exo-interfaces.js';
|
|
23
22
|
*/
|
|
24
23
|
|
|
25
24
|
/**
|
|
@@ -42,6 +41,7 @@ import { makeZoeTools } from './zoe-tools.js';
|
|
|
42
41
|
* @param {Baggage} baggage
|
|
43
42
|
* @param {OrchestrationPowers} remotePowers
|
|
44
43
|
* @param {Marshaller} marshaller
|
|
44
|
+
* @internal
|
|
45
45
|
*/
|
|
46
46
|
export const provideOrchestration = (
|
|
47
47
|
zcf,
|
|
@@ -176,6 +176,13 @@ harden(provideOrchestration);
|
|
|
176
176
|
* Simplifies contract functions for Orchestration by wrapping a simpler
|
|
177
177
|
* function with all the tools it needs in order to use Orchestration.
|
|
178
178
|
*
|
|
179
|
+
* @example
|
|
180
|
+
*
|
|
181
|
+
* ```js
|
|
182
|
+
* const contract = (zcf, privateArgs, zone, tools) => { ... };
|
|
183
|
+
* export const start = withOrchestration(contract);
|
|
184
|
+
* ```
|
|
185
|
+
*
|
|
179
186
|
* @template {Record<string, unknown>} CT
|
|
180
187
|
* @template {OrchestrationPowers & {
|
|
181
188
|
* marshaller: Marshaller;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export function buildRootObject(
|
|
1
|
+
export function buildRootObject(vatPowers: VatPowers & {
|
|
2
|
+
D: DProxy;
|
|
3
|
+
}, vatParameters: never, baggage: Baggage): {
|
|
2
4
|
/** @param {Partial<OrchestrationPowers>} [initialPowers] */
|
|
3
5
|
makeCosmosInterchainService(initialPowers?: Partial<OrchestrationPowers> | undefined): import("@endo/exo").Guarded<{
|
|
4
6
|
makeAccount(chainId: string, hostConnectionId: import("@agoric/vats").IBCConnectionID, controllerConnectionId: import("@agoric/vats").IBCConnectionID, opts?: import("./utils/address.js").ICAChannelAddressOpts | undefined): import("@agoric/vow").Vow<import("./cosmos-api.js").IcaAccount>;
|
|
@@ -12,5 +14,6 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
|
|
|
12
14
|
}>;
|
|
13
15
|
}>;
|
|
14
16
|
export type OrchestrationVat = ReturnType<typeof buildRootObject>;
|
|
17
|
+
import type { Baggage } from '@agoric/vat-data';
|
|
15
18
|
import type { OrchestrationPowers } from './exos/cosmos-interchain-service.js';
|
|
16
19
|
//# sourceMappingURL=vat-orchestration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vat-orchestration.d.ts","sourceRoot":"","sources":["vat-orchestration.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vat-orchestration.d.ts","sourceRoot":"","sources":["vat-orchestration.js"],"names":[],"mappings":"AAmBO,2CANI,SAAS,GAAG;IACtB,CAAK,EAAE,MAAM,CAAC;CACX,iBACO,KAAK,WACL,OAAO;IAWd,4DAA4D;;;;;;IAA5D,4DAA4D;;;;;GAK/D;+BAEa,UAAU,CAAC,OAAO,eAAe,CAAC;6BA7BtB,kBAAkB;yCACN,qCAAqC"}
|
package/src/vat-orchestration.js
CHANGED
|
@@ -3,9 +3,21 @@ import { prepareSwingsetVowTools } from '@agoric/vow/vat.js';
|
|
|
3
3
|
import { makeDurableZone } from '@agoric/zone/durable.js';
|
|
4
4
|
import { prepareCosmosInterchainService } from './exos/cosmos-interchain-service.js';
|
|
5
5
|
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @import {Baggage} from '@agoric/vat-data';
|
|
8
|
+
* @import {OrchestrationPowers} from './exos/cosmos-interchain-service.js';
|
|
9
|
+
*/
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Build root object of the Orchestration vat.
|
|
13
|
+
*
|
|
14
|
+
* @param {VatPowers & {
|
|
15
|
+
* D: DProxy;
|
|
16
|
+
* }} vatPowers
|
|
17
|
+
* @param {never} vatParameters
|
|
18
|
+
* @param {Baggage} baggage
|
|
19
|
+
*/
|
|
20
|
+
export const buildRootObject = (vatPowers, vatParameters, baggage) => {
|
|
9
21
|
const zone = makeDurableZone(baggage);
|
|
10
22
|
const vowTools = prepareSwingsetVowTools(zone.subZone('VowTools'));
|
|
11
23
|
const makeCosmosInterchainService = prepareCosmosInterchainService(
|