@agoric/zoe 0.26.3-dev-3fc8884.0 → 0.26.3-dev-115adc4.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-3fc8884.0+3fc8884",
3
+ "version": "0.26.3-dev-115adc4.0+115adc4",
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-3fc8884.0+3fc8884",
47
- "@agoric/ertp": "0.16.3-dev-3fc8884.0+3fc8884",
48
- "@agoric/internal": "0.3.3-dev-3fc8884.0+3fc8884",
49
- "@agoric/notifier": "0.6.3-dev-3fc8884.0+3fc8884",
50
- "@agoric/store": "0.9.3-dev-3fc8884.0+3fc8884",
51
- "@agoric/swingset-liveslots": "0.10.3-dev-3fc8884.0+3fc8884",
52
- "@agoric/swingset-vat": "0.32.3-dev-3fc8884.0+3fc8884",
53
- "@agoric/time": "0.3.3-dev-3fc8884.0+3fc8884",
54
- "@agoric/vat-data": "0.5.3-dev-3fc8884.0+3fc8884",
55
- "@agoric/zone": "0.2.3-dev-3fc8884.0+3fc8884",
46
+ "@agoric/base-zone": "0.1.1-dev-115adc4.0+115adc4",
47
+ "@agoric/ertp": "0.16.3-dev-115adc4.0+115adc4",
48
+ "@agoric/internal": "0.3.3-dev-115adc4.0+115adc4",
49
+ "@agoric/notifier": "0.6.3-dev-115adc4.0+115adc4",
50
+ "@agoric/store": "0.9.3-dev-115adc4.0+115adc4",
51
+ "@agoric/swingset-liveslots": "0.10.3-dev-115adc4.0+115adc4",
52
+ "@agoric/swingset-vat": "0.32.3-dev-115adc4.0+115adc4",
53
+ "@agoric/time": "0.3.3-dev-115adc4.0+115adc4",
54
+ "@agoric/vat-data": "0.5.3-dev-115adc4.0+115adc4",
55
+ "@agoric/vow": "0.1.1-dev-115adc4.0+115adc4",
56
+ "@agoric/zone": "0.2.3-dev-115adc4.0+115adc4",
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-3fc8884.0+3fc8884",
73
+ "@agoric/kmarshal": "0.1.1-dev-115adc4.0+115adc4",
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": "3fc888475e96c8253241f6b06f0384b82002dd9a"
146
+ "gitHead": "115adc43d43da84e64a8f0046a9fd5e4e577bb06"
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);
@@ -21,7 +21,7 @@ export function makeDurableZoeKit({ zoeBaggage, vatAdminSvc, shutdownZoeVat, fee
21
21
  feeIssuerConfig?: FeeIssuerConfig | undefined;
22
22
  zcfSpec?: ZCFSpec | undefined;
23
23
  }): {
24
- zoeService: ZoeService;
24
+ zoeService: import("@endo/exo").Guarded<ZoeService>;
25
25
  zoeConfigFacet: import("@endo/exo").Guarded<{
26
26
  updateZcfBundleId(bundleId: any): void;
27
27
  }>;
@@ -46,7 +46,7 @@ export function makeDurableZoeKit({ zoeBaggage, vatAdminSvc, shutdownZoeVat, fee
46
46
  * @param {ZCFSpec} [zcfSpec] - Pointer to the contract facet bundle.
47
47
  */
48
48
  export function makeZoeKit(vatAdminSvc?: VatAdminSvc | Promise<VatAdminSvc> | undefined, shutdownZoeVat?: import("@agoric/swingset-vat").ShutdownWithFailure | undefined, feeIssuerConfig?: FeeIssuerConfig | undefined, zcfSpec?: ZCFSpec | undefined): {
49
- zoeService: ZoeService;
49
+ zoeService: import("@endo/exo").Guarded<ZoeService>;
50
50
  zoeConfigFacet: import("@endo/exo").Guarded<{
51
51
  updateZcfBundleId(bundleId: any): void;
52
52
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"zoe.d.ts","sourceRoot":"","sources":["zoe.js"],"names":[],"mappings":"qBAgSa,UAAU,CAAC,OAAO,iBAAiB,CAAC;AAjQjD,gDAAgD;AAEhD;;;;;;;;;;;;;GAaG;AACH,0GAVG;IAAyB,UAAU,EAA3B,OAAO;IACsC,WAAW;IAGK,cAAc;IAGjD,eAAe;IACvB,OAAO;CACnC;;;;;IA8MG,4BAA4B;mBAAjB,aAAa;;EAK3B;AAED;;;;;;;;;;;;;;;GAeG;AACH;;;;;IAvBI,4BAA4B;mBAAjB,aAAa;;EA8BxB;6BA3PuB,kBAAkB"}
1
+ {"version":3,"file":"zoe.d.ts","sourceRoot":"","sources":["zoe.js"],"names":[],"mappings":"qBAoSa,UAAU,CAAC,OAAO,iBAAiB,CAAC;AArQjD,gDAAgD;AAEhD;;;;;;;;;;;;;GAaG;AACH,0GAVG;IAAyB,UAAU,EAA3B,OAAO;IACsC,WAAW;IAGK,cAAc;IAGjD,eAAe;IACvB,OAAO;CACnC;;;;;IAkNG,4BAA4B;mBAAjB,aAAa;;EAK3B;AAED;;;;;;;;;;;;;;;GAeG;AACH;;;;;IAvBI,4BAA4B;mBAAjB,aAAa;;EA8BxB;6BA/PuB,kBAAkB"}
@@ -194,58 +194,62 @@ const makeDurableZoeKit = ({
194
194
  },
195
195
  });
196
196
 
197
- /** @type {ZoeService} */
198
- const zoeService = prepareExo(zoeBaggage, 'ZoeService', ZoeServiceI, {
199
- install(bundleId, bundleLabel) {
200
- return dataAccess.installBundle(bundleId, bundleLabel);
201
- },
202
- installBundleID(bundleId, bundleLabel) {
203
- return dataAccess.installBundleID(bundleId, bundleLabel);
204
- },
205
- startInstance,
206
- offer,
197
+ const zoeService = prepareExo(
198
+ zoeBaggage,
199
+ 'ZoeService',
200
+ ZoeServiceI,
201
+ /** @type {ZoeService} */ ({
202
+ install(bundleId, bundleLabel) {
203
+ return dataAccess.installBundle(bundleId, bundleLabel);
204
+ },
205
+ installBundleID(bundleId, bundleLabel) {
206
+ return dataAccess.installBundleID(bundleId, bundleLabel);
207
+ },
208
+ startInstance,
209
+ offer,
207
210
 
208
- // The functions below are getters only and have no impact on
209
- // state within Zoe
210
- getOfferFilter(instance) {
211
- return dataAccess.getOfferFilter(instance);
212
- },
213
- async getInvitationIssuer() {
214
- return dataAccess.getInvitationIssuer();
215
- },
216
- async getFeeIssuer() {
217
- return feeMintKit.feeMint.getFeeIssuer();
218
- },
211
+ // The functions below are getters only and have no impact on
212
+ // state within Zoe
213
+ getOfferFilter(instance) {
214
+ return dataAccess.getOfferFilter(instance);
215
+ },
216
+ async getInvitationIssuer() {
217
+ return dataAccess.getInvitationIssuer();
218
+ },
219
+ async getFeeIssuer() {
220
+ return feeMintKit.feeMint.getFeeIssuer();
221
+ },
219
222
 
220
- getBrands(instance) {
221
- return dataAccess.getBrands(instance);
222
- },
223
- getIssuers(instance) {
224
- return dataAccess.getIssuers(instance);
225
- },
226
- getPublicFacet(instance) {
227
- return dataAccess.getPublicFacet(instance);
228
- },
229
- getTerms(instance) {
230
- return dataAccess.getTerms(instance);
231
- },
232
- getInstallationForInstance(instance) {
233
- return dataAccess.getInstallation(instance);
234
- },
235
- getBundleIDFromInstallation(installation) {
236
- return dataAccess.getBundleIDFromInstallation(installation);
237
- },
238
- getInstallation,
223
+ getBrands(instance) {
224
+ return dataAccess.getBrands(instance);
225
+ },
226
+ getIssuers(instance) {
227
+ return dataAccess.getIssuers(instance);
228
+ },
229
+ getPublicFacet(instance) {
230
+ return dataAccess.getPublicFacet(instance);
231
+ },
232
+ getTerms(instance) {
233
+ return dataAccess.getTerms(instance);
234
+ },
235
+ getInstallationForInstance(instance) {
236
+ return dataAccess.getInstallation(instance);
237
+ },
238
+ getBundleIDFromInstallation(installation) {
239
+ return dataAccess.getBundleIDFromInstallation(installation);
240
+ },
241
+ getInstallation,
239
242
 
240
- getInstance(invitation) {
241
- return getInstance(invitation);
242
- },
243
- getConfiguration,
244
- getInvitationDetails,
245
- getProposalShapeForInvitation(invitation) {
246
- return dataAccess.getProposalShapeForInvitation(invitation);
247
- },
248
- });
243
+ getInstance(invitation) {
244
+ return getInstance(invitation);
245
+ },
246
+ getConfiguration,
247
+ getInvitationDetails,
248
+ getProposalShapeForInvitation(invitation) {
249
+ return dataAccess.getProposalShapeForInvitation(invitation);
250
+ },
251
+ }),
252
+ );
249
253
 
250
254
  return harden({
251
255
  zoeService,
@@ -1,19 +1,19 @@
1
1
  export function makeZoeKitForTest(vatAdminSvc?: VatAdminSvc | undefined): {
2
- zoeService: ZoeService;
2
+ zoeService: import("@endo/exo").Guarded<ZoeService>;
3
3
  zoeConfigFacet: import("@endo/exo").Guarded<{
4
4
  updateZcfBundleId(bundleId: any): void;
5
5
  }>;
6
6
  feeMintAccess: FeeMintAccess;
7
7
  setVatAdminService: ((lateVatAdminSvc: any) => void) & import("@endo/captp").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (lateVatAdminSvc: any) => void>;
8
8
  };
9
- export function makeZoeForTest(vatAdminSvc?: VatAdminSvc | undefined): ZoeService;
9
+ export function makeZoeForTest(vatAdminSvc?: VatAdminSvc | undefined): import("@endo/exo").Guarded<ZoeService>;
10
10
  export function setUpZoeForTest<T extends unknown = unknown>({ setJig, feeIssuerConfig, vatAdminSvc, useNearRemote, }?: {
11
11
  setJig?: ((jig: T) => void) | undefined;
12
12
  feeIssuerConfig?: FeeIssuerConfig | undefined;
13
13
  vatAdminSvc?: VatAdminSvc | undefined;
14
14
  useNearRemote?: boolean | undefined;
15
15
  }): Promise<{
16
- zoe: ZoeService;
16
+ zoe: import("@endo/exo").Guarded<ZoeService>;
17
17
  feeMintAccessP: FeeMintAccess;
18
18
  bundleAndInstall: (path: string) => Promise<Installation>;
19
19
  vatAdminSvc: VatAdminSvc;
@@ -1 +1 @@
1
- {"version":3,"file":"setup-zoe.d.ts","sourceRoot":"","sources":["setup-zoe.js"],"names":[],"mappings":"AAUO;;;;;;;EAKN;AAKM,kFACoC;AAYpC,gCAPgB,CAAC,uFAErB;IAAmC,MAAM,UAA3B,CAAC,KAAK,IAAI;IACU,eAAe;IACnB,WAAW;IACf,aAAa;CAAC;;;6BA2B9B,MAAM,KACJ,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;GAiBnC"}
1
+ {"version":3,"file":"setup-zoe.d.ts","sourceRoot":"","sources":["setup-zoe.js"],"names":[],"mappings":"AAUO;;;;;;;EAKN;AAKM,+GACoC;AAYpC,gCAPgB,CAAC,uFAErB;IAAmC,MAAM,UAA3B,CAAC,KAAK,IAAI;IACU,eAAe;IACnB,WAAW;IACf,aAAa;CAAC;;;6BA2B9B,MAAM,KACJ,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;GAiBnC"}