@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/bundles/bundle-contractFacet-js-meta.json +85 -85
- package/bundles/bundle-contractFacet.js +1 -1
- package/package.json +14 -13
- package/src/contracts/valueVow.contract.d.ts +17 -0
- package/src/contracts/valueVow.contract.d.ts.map +1 -0
- package/src/contracts/valueVow.contract.js +59 -0
- package/src/zoeService/zoe.d.ts +2 -2
- package/src/zoeService/zoe.d.ts.map +1 -1
- package/src/zoeService/zoe.js +53 -49
- package/tools/setup-zoe.d.ts +3 -3
- package/tools/setup-zoe.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/zoe",
|
|
3
|
-
"version": "0.26.3-dev-
|
|
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-
|
|
47
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
48
|
-
"@agoric/internal": "0.3.3-dev-
|
|
49
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
50
|
-
"@agoric/store": "0.9.3-dev-
|
|
51
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
52
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
53
|
-
"@agoric/time": "0.3.3-dev-
|
|
54
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
55
|
-
"@agoric/
|
|
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-
|
|
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": "
|
|
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);
|
package/src/zoeService/zoe.d.ts
CHANGED
|
@@ -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":"
|
|
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"}
|
package/src/zoeService/zoe.js
CHANGED
|
@@ -194,58 +194,62 @@ const makeDurableZoeKit = ({
|
|
|
194
194
|
},
|
|
195
195
|
});
|
|
196
196
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
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
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
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
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
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,
|
package/tools/setup-zoe.d.ts
CHANGED
|
@@ -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;
|
package/tools/setup-zoe.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-zoe.d.ts","sourceRoot":"","sources":["setup-zoe.js"],"names":[],"mappings":"AAUO;;;;;;;EAKN;AAKM
|
|
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"}
|