@agoric/pegasus 0.7.13-dev-79a22bb.0.79a22bb → 0.7.13-dev-3294e0c.0.3294e0c
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 +13 -13
- package/src/contract.js +27 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/pegasus",
|
|
3
|
-
"version": "0.7.13-dev-
|
|
3
|
+
"version": "0.7.13-dev-3294e0c.0.3294e0c",
|
|
4
4
|
"description": "Peg-as-us contract",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/pegasus.js",
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
32
|
-
"@agoric/internal": "0.3.3-dev-
|
|
33
|
-
"@agoric/network": "0.1.1-dev-
|
|
34
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
35
|
-
"@agoric/store": "0.9.3-dev-
|
|
36
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
37
|
-
"@agoric/vats": "0.15.2-dev-
|
|
38
|
-
"@agoric/vow": "0.1.1-dev-
|
|
39
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
40
|
-
"@agoric/zone": "0.2.3-dev-
|
|
31
|
+
"@agoric/ertp": "0.16.3-dev-3294e0c.0.3294e0c",
|
|
32
|
+
"@agoric/internal": "0.3.3-dev-3294e0c.0.3294e0c",
|
|
33
|
+
"@agoric/network": "0.1.1-dev-3294e0c.0.3294e0c",
|
|
34
|
+
"@agoric/notifier": "0.6.3-dev-3294e0c.0.3294e0c",
|
|
35
|
+
"@agoric/store": "0.9.3-dev-3294e0c.0.3294e0c",
|
|
36
|
+
"@agoric/swingset-vat": "0.32.3-dev-3294e0c.0.3294e0c",
|
|
37
|
+
"@agoric/vats": "0.15.2-dev-3294e0c.0.3294e0c",
|
|
38
|
+
"@agoric/vow": "0.1.1-dev-3294e0c.0.3294e0c",
|
|
39
|
+
"@agoric/zoe": "0.26.3-dev-3294e0c.0.3294e0c",
|
|
40
|
+
"@agoric/zone": "0.2.3-dev-3294e0c.0.3294e0c",
|
|
41
41
|
"@endo/bundle-source": "^4.1.2",
|
|
42
42
|
"@endo/captp": "^4.4.8",
|
|
43
43
|
"@endo/errors": "^1.2.13",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@endo/promise-kit": "^1.1.13"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
50
|
+
"@agoric/vat-data": "0.5.3-dev-3294e0c.0.3294e0c",
|
|
51
51
|
"ava": "^7.0.0",
|
|
52
52
|
"c8": "^10.1.3",
|
|
53
53
|
"import-meta-resolve": "^4.1.0"
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"typeCoverage": {
|
|
73
73
|
"atLeast": 91.21
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "3294e0c1e81f8d145c6b57624d080908b935f524"
|
|
76
76
|
}
|
package/src/contract.js
CHANGED
|
@@ -11,31 +11,35 @@ import { makePegasus } from './pegasus.js';
|
|
|
11
11
|
* @import {BoardDepositFacet} from './types.js';
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
export const start =
|
|
15
|
+
/**
|
|
16
|
+
* @type {ContractStartFn<Pegasus, never, {}, {
|
|
17
|
+
* board: Remote<BoardDepositFacet>,
|
|
18
|
+
* namesByAddress: Remote<NameHub>
|
|
19
|
+
* }>}
|
|
20
|
+
*/
|
|
21
|
+
(
|
|
22
|
+
/** @type {unknown} */ (
|
|
23
|
+
(zcf, privateArgs, baggage) => {
|
|
24
|
+
const zone = makeDurableZone(baggage);
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
const whenZone = zone.subZone('when');
|
|
27
|
+
const { when } = prepareVowTools(whenZone);
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
const { board, namesByAddress } = privateArgs;
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
// start requires that the object passed in must be durable. Given that we
|
|
32
|
+
// haven't made pegasus durable yet, we'll wrap its non-durable methods within
|
|
33
|
+
// an exo object to workaround this requirement.
|
|
34
|
+
// @ts-expect-error makePegasus returns a remotable object
|
|
35
|
+
const publicFacet = zone.exo('PublicFacet', undefined, {
|
|
36
|
+
...makePegasus({ zcf, board, namesByAddress, when }),
|
|
37
|
+
});
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
return harden({
|
|
40
|
+
publicFacet,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
);
|
|
41
45
|
harden(start);
|