@agoric/zoe 0.26.3-dev-24fb1f5.0 → 0.26.3-dev-2c28414.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/zoe",
3
- "version": "0.26.3-dev-24fb1f5.0+24fb1f5",
3
+ "version": "0.26.3-dev-2c28414.0+2c28414",
4
4
  "description": "Zoe: the Smart Contract Framework for Offer Enforcement",
5
5
  "type": "module",
6
6
  "main": "./src/zoeService/zoe.js",
@@ -43,16 +43,17 @@
43
43
  },
44
44
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
45
45
  "dependencies": {
46
- "@agoric/base-zone": "0.1.1-dev-24fb1f5.0+24fb1f5",
47
- "@agoric/ertp": "0.16.3-dev-24fb1f5.0+24fb1f5",
48
- "@agoric/internal": "0.3.3-dev-24fb1f5.0+24fb1f5",
49
- "@agoric/notifier": "0.6.3-dev-24fb1f5.0+24fb1f5",
50
- "@agoric/store": "0.9.3-dev-24fb1f5.0+24fb1f5",
51
- "@agoric/swingset-liveslots": "0.10.3-dev-24fb1f5.0+24fb1f5",
52
- "@agoric/swingset-vat": "0.32.3-dev-24fb1f5.0+24fb1f5",
53
- "@agoric/time": "0.3.3-dev-24fb1f5.0+24fb1f5",
54
- "@agoric/vat-data": "0.5.3-dev-24fb1f5.0+24fb1f5",
55
- "@agoric/zone": "0.2.3-dev-24fb1f5.0+24fb1f5",
46
+ "@agoric/base-zone": "0.1.1-dev-2c28414.0+2c28414",
47
+ "@agoric/ertp": "0.16.3-dev-2c28414.0+2c28414",
48
+ "@agoric/internal": "0.3.3-dev-2c28414.0+2c28414",
49
+ "@agoric/notifier": "0.6.3-dev-2c28414.0+2c28414",
50
+ "@agoric/store": "0.9.3-dev-2c28414.0+2c28414",
51
+ "@agoric/swingset-liveslots": "0.10.3-dev-2c28414.0+2c28414",
52
+ "@agoric/swingset-vat": "0.32.3-dev-2c28414.0+2c28414",
53
+ "@agoric/time": "0.3.3-dev-2c28414.0+2c28414",
54
+ "@agoric/vat-data": "0.5.3-dev-2c28414.0+2c28414",
55
+ "@agoric/vow": "0.1.1-dev-2c28414.0+2c28414",
56
+ "@agoric/zone": "0.2.3-dev-2c28414.0+2c28414",
56
57
  "@endo/bundle-source": "^3.2.3",
57
58
  "@endo/captp": "^4.2.0",
58
59
  "@endo/common": "^1.2.2",
@@ -69,7 +70,7 @@
69
70
  "yargs-parser": "^21.1.1"
70
71
  },
71
72
  "devDependencies": {
72
- "@agoric/kmarshal": "0.1.1-dev-24fb1f5.0+24fb1f5",
73
+ "@agoric/kmarshal": "0.1.1-dev-2c28414.0+2c28414",
73
74
  "@endo/init": "^1.1.2",
74
75
  "ava": "^5.3.0",
75
76
  "c8": "^9.1.0",
@@ -142,5 +143,5 @@
142
143
  "typeCoverage": {
143
144
  "atLeast": 84.92
144
145
  },
145
- "gitHead": "24fb1f54ab763bfefc9a01bd01a72168e78cc92b"
146
+ "gitHead": "2c28414a0ab2dd4c05bb9f6955b8d658b484253d"
146
147
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @import { Baggage } from '@agoric/vat-data';
3
+ */
4
+ /** @type {ContractMeta<typeof start>} */
5
+ export const meta: ContractMeta<typeof start>;
6
+ export function start(zcf: ZCF<{}>, _privateArgs: undefined, baggage: Baggage): {
7
+ publicFacet: import("@endo/exo").Guarded<{
8
+ getValue(): import("@agoric/vow").Vow<any>;
9
+ setValue(value: any): void;
10
+ makeGetterInvitation(): Promise<Invitation<import("@agoric/vow").Vow<any>, undefined>>;
11
+ makeSetterInvitation(): Promise<Invitation<void, {
12
+ value: unknown;
13
+ }>>;
14
+ }>;
15
+ };
16
+ import type { Baggage } from '@agoric/vat-data';
17
+ //# sourceMappingURL=valueVow.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valueVow.contract.d.ts","sourceRoot":"","sources":["valueVow.contract.js"],"names":[],"mappings":"AAGA;;GAEG;AAEH,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAGnC;AAYK,2BAJI,GAAG,CAAC,EAAE,CAAC,gBACP,SAAS,WACT,OAAO;;;;;;mBA0B4B,OAAO;;;EAWpD;6BArD2B,kBAAkB"}
@@ -0,0 +1,59 @@
1
+ import { prepareVowTools } from '@agoric/vow';
2
+ import { makeDurableZone } from '@agoric/zone/durable.js';
3
+
4
+ /**
5
+ * @import { Baggage } from '@agoric/vat-data';
6
+ */
7
+
8
+ /** @type {ContractMeta<typeof start>} */
9
+ export const meta = {
10
+ upgradability: 'canUpgrade',
11
+ };
12
+ harden(meta);
13
+
14
+ /**
15
+ * This is a simple contract to demonstrate durable vows.
16
+ *
17
+ * It provides an invitation to get a vow for a value and another invitation to set the value.
18
+ *
19
+ * @param {ZCF<{}>} zcf
20
+ * @param {undefined} _privateArgs
21
+ * @param {Baggage} baggage
22
+ */
23
+ export const start = (zcf, _privateArgs, baggage) => {
24
+ const zone = makeDurableZone(baggage);
25
+
26
+ const vowTools = prepareVowTools(zone);
27
+
28
+ const { vow, resolver } = zone.makeOnce('vowResolver', () =>
29
+ vowTools.makeVowKit(),
30
+ );
31
+
32
+ const publicFacet = zone.exo('publicFacet', undefined, {
33
+ getValue() {
34
+ return vow;
35
+ },
36
+ setValue(value) {
37
+ resolver.resolve(value);
38
+ },
39
+ makeGetterInvitation() {
40
+ return zcf.makeInvitation(seat => {
41
+ seat.exit();
42
+ return vow;
43
+ }, 'get value');
44
+ },
45
+ makeSetterInvitation() {
46
+ return zcf.makeInvitation(
47
+ /** @type {HandleOffer<void, { value: unknown }>}} */
48
+ (seat, offerArgs) => {
49
+ seat.exit();
50
+ resolver.resolve(offerArgs.value);
51
+ },
52
+ 'set value',
53
+ );
54
+ },
55
+ });
56
+
57
+ return harden({ publicFacet });
58
+ };
59
+ harden(start);