@agoric/orchestration 0.1.1-dev-ad7f655.0 → 0.1.1-dev-f991204.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/send-anywhere.contract.d.ts.map +1 -1
- package/src/examples/send-anywhere.contract.js +0 -1
- package/src/examples/staking-combinations.contract.d.ts.map +1 -1
- package/src/examples/staking-combinations.contract.js +0 -1
- package/src/examples/swap.contract.d.ts.map +1 -1
- package/src/examples/swap.contract.js +0 -1
- package/src/examples/unbond.contract.d.ts.map +1 -1
- package/src/examples/unbond.contract.js +7 -2
- package/src/examples/unbond.flows.d.ts +3 -2
- package/src/examples/unbond.flows.d.ts.map +1 -1
- package/src/examples/unbond.flows.js +4 -4
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +7 -0
- package/src/types.d.ts +8 -0
- package/src/types.d.ts.map +1 -1
- package/src/types.ts +9 -0
- package/src/utils/start-helper.d.ts +1 -0
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +5 -0
- package/src/utils/zcf-tools.d.ts +5 -0
- package/src/utils/zcf-tools.d.ts.map +1 -0
- package/src/utils/zcf-tools.js +35 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/orchestration",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-f991204.0+f991204",
|
|
4
4
|
"description": "Chain abstraction for Agoric's orchestration clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@agoric/async-flow": "0.1.1-dev-
|
|
37
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
38
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
39
|
-
"@agoric/internal": "0.3.3-dev-
|
|
40
|
-
"@agoric/network": "0.1.1-dev-
|
|
41
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
42
|
-
"@agoric/store": "0.9.3-dev-
|
|
43
|
-
"@agoric/time": "0.3.3-dev-
|
|
44
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
45
|
-
"@agoric/vats": "0.15.2-dev-
|
|
46
|
-
"@agoric/vow": "0.1.1-dev-
|
|
47
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
48
|
-
"@agoric/zone": "0.2.3-dev-
|
|
36
|
+
"@agoric/async-flow": "0.1.1-dev-f991204.0+f991204",
|
|
37
|
+
"@agoric/cosmic-proto": "0.4.1-dev-f991204.0+f991204",
|
|
38
|
+
"@agoric/ertp": "0.16.3-dev-f991204.0+f991204",
|
|
39
|
+
"@agoric/internal": "0.3.3-dev-f991204.0+f991204",
|
|
40
|
+
"@agoric/network": "0.1.1-dev-f991204.0+f991204",
|
|
41
|
+
"@agoric/notifier": "0.6.3-dev-f991204.0+f991204",
|
|
42
|
+
"@agoric/store": "0.9.3-dev-f991204.0+f991204",
|
|
43
|
+
"@agoric/time": "0.3.3-dev-f991204.0+f991204",
|
|
44
|
+
"@agoric/vat-data": "0.5.3-dev-f991204.0+f991204",
|
|
45
|
+
"@agoric/vats": "0.15.2-dev-f991204.0+f991204",
|
|
46
|
+
"@agoric/vow": "0.1.1-dev-f991204.0+f991204",
|
|
47
|
+
"@agoric/zoe": "0.26.3-dev-f991204.0+f991204",
|
|
48
|
+
"@agoric/zone": "0.2.3-dev-f991204.0+f991204",
|
|
49
49
|
"@endo/base64": "^1.0.7",
|
|
50
50
|
"@endo/errors": "^1.2.5",
|
|
51
51
|
"@endo/far": "^1.1.5",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@noble/hashes": "^1.5.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
57
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-f991204.0+f991204",
|
|
58
58
|
"@chain-registry/client": "^1.47.4",
|
|
59
59
|
"@cosmjs/amino": "^0.32.3",
|
|
60
60
|
"@cosmjs/proto-signing": "^0.32.3",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"typeCoverage": {
|
|
95
95
|
"atLeast": 97.6
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "f9912043e32cb8e3ca6e704a5c244ef2cb0a8de5"
|
|
98
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-anywhere.contract.d.ts","sourceRoot":"","sources":["send-anywhere.contract.js"],"names":[],"mappings":"AAQA;;;GAGG;AAEH,qEAKE;
|
|
1
|
+
{"version":3,"file":"send-anywhere.contract.d.ts","sourceRoot":"","sources":["send-anywhere.contract.js"],"names":[],"mappings":"AAQA;;;GAGG;AAEH,qEAKE;AAqDF;gBA7CiB,UAAU;;;;;;;;;;;;;;;;;;;GA6CsB;yCA7DS,0BAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staking-combinations.contract.d.ts","sourceRoot":"","sources":["staking-combinations.contract.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"staking-combinations.contract.d.ts","sourceRoot":"","sources":["staking-combinations.contract.js"],"names":[],"mappings":"AA8JA;gBAzHiB,UAAU;;;;;;;;;;;;;;;;;;GAyHsB;yCA1IS,0BAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap.contract.d.ts","sourceRoot":"","sources":["swap.contract.js"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AAEH,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAWnC;AASK,0CAHI,KAAK;;;EAIsC;
|
|
1
|
+
{"version":3,"file":"swap.contract.d.ts","sourceRoot":"","sources":["swap.contract.js"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AAEH,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAWnC;AASK,0CAHI,KAAK;;;EAIsC;AAgDtD;iBAxCkB,OAAO,OAAO,CAAC;gBAChB,OAAO,UAAU,CAAC;0BACR,OAAO,uBAAuB,CAAC;iBACxC,OAAO,WAAW,CAAC;kBAClB,OAAO,YAAY,CAAC;gBACtB,UAAU;;;;;;;;GAmCsB;6BA1EvB,cAAc;4BAFf,kBAAkB;gCADd,gCAAgC;6CAEnB,2BAA2B;kCAHtC,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unbond.contract.d.ts","sourceRoot":"","sources":["unbond.contract.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unbond.contract.d.ts","sourceRoot":"","sources":["unbond.contract.js"],"names":[],"mappings":"AAwDA;iBArCkB,OAAO,OAAO,CAAC;gBAChB,OAAO,UAAU,CAAC;0BACR,OAAO,uBAAuB,CAAC;iBACxC,OAAO,WAAW,CAAC;gBACpB,UAAU;kBACR,OAAO,YAAY,CAAC;;;;;GAgCU;6BAjDvB,cAAc;4BACf,kBAAkB;gCAFd,gCAAgC;6CAInB,2BAA2B;kCALtC,cAAc"}
|
|
@@ -27,8 +27,13 @@ import * as flows from './unbond.flows.js';
|
|
|
27
27
|
* @param {Zone} zone
|
|
28
28
|
* @param {OrchestrationTools} tools
|
|
29
29
|
*/
|
|
30
|
-
const contract = async (
|
|
31
|
-
|
|
30
|
+
const contract = async (
|
|
31
|
+
zcf,
|
|
32
|
+
privateArgs,
|
|
33
|
+
zone,
|
|
34
|
+
{ orchestrateAll, zcfTools },
|
|
35
|
+
) => {
|
|
36
|
+
const { unbondAndTransfer } = orchestrateAll(flows, { zcfTools });
|
|
32
37
|
|
|
33
38
|
const publicFacet = zone.exo('publicFacet', undefined, {
|
|
34
39
|
makeUnbondAndTransferInvitation() {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export function unbondAndTransfer(orch: Orchestrator, {
|
|
2
|
-
|
|
1
|
+
export function unbondAndTransfer(orch: Orchestrator, { zcfTools }: {
|
|
2
|
+
zcfTools: ZcfTools;
|
|
3
3
|
}): Promise<void>;
|
|
4
4
|
import type { Orchestrator } from '../types.js';
|
|
5
|
+
import type { ZcfTools } from '../types.js';
|
|
5
6
|
//# sourceMappingURL=unbond.flows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unbond.flows.d.ts","sourceRoot":"","sources":["unbond.flows.js"],"names":[],"mappings":"AAcO,wCAJI,YAAY,
|
|
1
|
+
{"version":3,"file":"unbond.flows.d.ts","sourceRoot":"","sources":["unbond.flows.js"],"names":[],"mappings":"AAcO,wCAJI,YAAY,gBAEpB;IAAsB,QAAQ,EAAtB,QAAQ;CAClB,iBAwBA;kCAhCqF,aAAa;8BAAb,aAAa"}
|
|
@@ -3,17 +3,17 @@ import { makeTracer } from '@agoric/internal';
|
|
|
3
3
|
const trace = makeTracer('UnbondAndTransfer');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* @import {Orchestrator, OrchestrationFlow, CosmosDelegationResponse} from '../types.js'
|
|
6
|
+
* @import {Orchestrator, OrchestrationFlow, CosmosDelegationResponse, ZcfTools} from '../types.js'
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @satisfies {OrchestrationFlow}
|
|
11
11
|
* @param {Orchestrator} orch
|
|
12
12
|
* @param {object} ctx
|
|
13
|
-
* @param {
|
|
13
|
+
* @param {ZcfTools} ctx.zcfTools
|
|
14
14
|
*/
|
|
15
|
-
export const unbondAndTransfer = async (orch, {
|
|
16
|
-
trace('
|
|
15
|
+
export const unbondAndTransfer = async (orch, { zcfTools }) => {
|
|
16
|
+
trace('zcfTools within the membrane', zcfTools);
|
|
17
17
|
// Osmosis is one of the few chains with icqEnabled
|
|
18
18
|
const osmosis = await orch.getChain('osmosis');
|
|
19
19
|
const osmoDenom = (await osmosis.getChainInfo()).stakingTokens[0].denom;
|
package/src/facade.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAyCO,sKAZI;IACN,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,OAAO,YAAY,CAAC,CAAC;IACnC,GAAG,EAAE,GAAG,CAAC;IACT,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,oBAAoB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACtD,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;IACzC,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,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;
|
|
1
|
+
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.js"],"names":[],"mappings":"AAyCO,sKAZI;IACN,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,OAAO,YAAY,CAAC,CAAC;IACnC,GAAG,EAAE,GAAG,CAAC;IACT,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,oBAAoB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACtD,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;IACzC,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,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;qBAmCM,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;;;;yBAjIgC,EAAE,SAAtB,iBAAmB,IACnB,EAAE,SAAS,CACnB,GAAG,EAAE,YAAY,EACjB,GAAG,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;kCA4HE,UAAU,CAAC,OAAO,uBAAuB,CAAC;0BAhJjC,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
|
@@ -78,6 +78,13 @@ export const makeOrchestrationFacade = ({
|
|
|
78
78
|
const [wrappedCtx] = prepareEndowment(subZone, 'endowments', [hostCtx]);
|
|
79
79
|
const hostFn = asyncFlow(subZone, 'asyncFlow', guestFn);
|
|
80
80
|
|
|
81
|
+
deepMapObject(
|
|
82
|
+
wrappedCtx,
|
|
83
|
+
val =>
|
|
84
|
+
val === zcf &&
|
|
85
|
+
assert.fail('do not use zcf in orchestration context; try zcfTools'),
|
|
86
|
+
);
|
|
87
|
+
|
|
81
88
|
// cast because return could be arbitrary subtype
|
|
82
89
|
const orcFn = /** @type {HostForGuest<GF>} */ (
|
|
83
90
|
(...args) => {
|
package/src/types.d.ts
CHANGED
|
@@ -10,4 +10,12 @@ export type * from './orchestration-api.js';
|
|
|
10
10
|
export type * from './exos/cosmos-interchain-service.js';
|
|
11
11
|
export type * from './exos/chain-hub.js';
|
|
12
12
|
export type * from './vat-orchestration.js';
|
|
13
|
+
/**
|
|
14
|
+
* ({@link ZCF})-like tools for use in {@link OrchestrationFlow}s.
|
|
15
|
+
*/
|
|
16
|
+
export interface ZcfTools {
|
|
17
|
+
assertUniqueKeyword: ZCF['assertUniqueKeyword'];
|
|
18
|
+
atomicRearrange: ZCF['atomicRearrange'];
|
|
19
|
+
makeInvitation: ZCF['makeInvitation'];
|
|
20
|
+
}
|
|
13
21
|
//# sourceMappingURL=types.d.ts.map
|
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,0BAA0B,CAAC;AAC9C,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;AAE5C;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,mBAAmB,EAAE,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAChD,eAAe,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACxC,cAAc,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACvC"}
|
package/src/types.ts
CHANGED
|
@@ -11,3 +11,12 @@ export type * from './orchestration-api.js';
|
|
|
11
11
|
export type * from './exos/cosmos-interchain-service.js';
|
|
12
12
|
export type * from './exos/chain-hub.js';
|
|
13
13
|
export type * from './vat-orchestration.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* ({@link ZCF})-like tools for use in {@link OrchestrationFlow}s.
|
|
17
|
+
*/
|
|
18
|
+
export interface ZcfTools {
|
|
19
|
+
assertUniqueKeyword: ZCF['assertUniqueKeyword'];
|
|
20
|
+
atomicRearrange: ZCF['atomicRearrange'];
|
|
21
|
+
makeInvitation: ZCF['makeInvitation'];
|
|
22
|
+
}
|
|
@@ -69,6 +69,7 @@ export function provideOrchestration(zcf: ZCF, baggage: Baggage, remotePowers: O
|
|
|
69
69
|
allWokenP: Promise<void>;
|
|
70
70
|
prepareEndowment: (zone: Zone, tag: string, e: unknown) => any;
|
|
71
71
|
};
|
|
72
|
+
zcfTools: import("@agoric/async-flow").HostInterface<import("../types.js").ZcfTools>;
|
|
72
73
|
zoeTools: {
|
|
73
74
|
localTransfer: (srcSeat: ZCFSeat, localAccount: import("../cosmos-api.js").LocalAccountMethods, amounts: AmountKeywordRecord) => import("@agoric/vow").Vow<void>;
|
|
74
75
|
withdrawToSeat: (localAccount: import("../cosmos-api.js").LocalAccountMethods, destSeat: ZCFSeat, amounts: AmountKeywordRecord) => import("@agoric/vow").Vow<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start-helper.d.ts","sourceRoot":"","sources":["start-helper.js"],"names":[],"mappings":"AA8CO,0CANI,GAAG,WACH,OAAO,gBACP,mBAAmB,cACnB,UAAU;+BA6GR,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA7EgB,GAAG;;+BA/C5B,GAAG,+EAOa,GAAG,yCAAyC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiJtE;AA8BM,kCAdgC,EAAE,SAA3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAE,EAGhC,EAAE,SAFM,mBAAmB,GAAG;IAC/B,UAAU,EAAE,UAAU,CAAC;CACvB,EACQ,CAAC,cACH,CACN,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EACZ,WAAW,EAAE,EAAE,EACf,IAAI,EAAE,IAAI,EACV,KAAK,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;kCAlMU;IACR,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,oBAAoB,EAAE,OAAO,uBAAuB,CAAC,CAAC;IACtD,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,YAAY,EAAE,OAAO,YAAY,CAAC,CAAC;IACnC,WAAW,EAAE,OAAO,OAAO,CAAC,CAAC;CAC9B;iCAwJU,IAAI,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,EAAE,MAAM,CAAC;6BAtKzC,kBAAkB;0BAGrB,cAAc;gCALR,gCAAgC;4BAIpC,aAAa;6CAEI,2BAA2B;kCAL1B,cAAc;6BAE/B,cAAc"}
|
|
@@ -10,6 +10,7 @@ import { prepareOrchestrator } from '../exos/orchestrator.js';
|
|
|
10
10
|
import { prepareRemoteChainFacade } from '../exos/remote-chain-facade.js';
|
|
11
11
|
import { makeOrchestrationFacade } from '../facade.js';
|
|
12
12
|
import { makeZoeTools } from './zoe-tools.js';
|
|
13
|
+
import { makeZcfTools } from './zcf-tools.js';
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* @import {LocalChain} from '@agoric/vats/src/localchain.js';
|
|
@@ -76,6 +77,8 @@ export const provideOrchestration = (
|
|
|
76
77
|
|
|
77
78
|
const zoeTools = makeZoeTools(zcf, vowTools);
|
|
78
79
|
|
|
80
|
+
const zcfTools = makeZcfTools(zcf, vowTools);
|
|
81
|
+
|
|
79
82
|
const { makeRecorderKit } = prepareRecorderKitMakers(baggage, marshaller);
|
|
80
83
|
const makeLocalOrchestrationAccountKit = prepareLocalOrchestrationAccountKit(
|
|
81
84
|
zones.orchestration,
|
|
@@ -164,12 +167,14 @@ export const provideOrchestration = (
|
|
|
164
167
|
const defaultOrchestrateKit = makeOrchestrateKit(
|
|
165
168
|
zones.contract.subZone('orchestration'),
|
|
166
169
|
);
|
|
170
|
+
|
|
167
171
|
return {
|
|
168
172
|
...defaultOrchestrateKit,
|
|
169
173
|
makeOrchestrateKit,
|
|
170
174
|
chainHub,
|
|
171
175
|
vowTools,
|
|
172
176
|
asyncFlowTools,
|
|
177
|
+
zcfTools,
|
|
173
178
|
zoeTools,
|
|
174
179
|
zone: zones.contract,
|
|
175
180
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function makeZcfTools(zcf: ZCF, vowTools: VowTools): HostInterface<ZcfTools>;
|
|
2
|
+
import type { VowTools } from '@agoric/vow';
|
|
3
|
+
import type { ZcfTools } from '../types.js';
|
|
4
|
+
import type { HostInterface } from '@agoric/async-flow';
|
|
5
|
+
//# sourceMappingURL=zcf-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zcf-tools.d.ts","sourceRoot":"","sources":["zcf-tools.js"],"names":[],"mappings":"AAeO,kCAJI,GAAG,YACH,QAAQ,GACN,cAAc,QAAQ,CAAC,CAqBhC;8BAhCuB,aAAa;8BACb,aAAa;mCAFR,oBAAoB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {HostInterface} from '@agoric/async-flow';
|
|
3
|
+
* @import {VowTools} from '@agoric/vow';
|
|
4
|
+
* @import {ZcfTools} from '../types.js';
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { M, mustMatch } from '@endo/patterns';
|
|
8
|
+
|
|
9
|
+
const HandlerShape = M.remotable('OfferHandler');
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @param {ZCF} zcf
|
|
13
|
+
* @param {VowTools} vowTools
|
|
14
|
+
* @returns {HostInterface<ZcfTools>}
|
|
15
|
+
*/
|
|
16
|
+
export const makeZcfTools = (zcf, vowTools) =>
|
|
17
|
+
harden({
|
|
18
|
+
makeInvitation(offerHandler, description, customDetails, proposalShape) {
|
|
19
|
+
mustMatch(offerHandler, HandlerShape);
|
|
20
|
+
return vowTools.watch(
|
|
21
|
+
zcf.makeInvitation(
|
|
22
|
+
offerHandler,
|
|
23
|
+
description,
|
|
24
|
+
customDetails,
|
|
25
|
+
proposalShape,
|
|
26
|
+
),
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
atomicRearrange(transfers) {
|
|
30
|
+
zcf.atomicRearrange(transfers);
|
|
31
|
+
},
|
|
32
|
+
assertUniqueKeyword(keyword) {
|
|
33
|
+
zcf.assertUniqueKeyword(keyword);
|
|
34
|
+
},
|
|
35
|
+
});
|