@agoric/zoe 0.26.3-dev-79a22bb.0.79a22bb → 0.26.3-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 +14 -14
- package/src/contractSupport/durability.d.ts.map +1 -1
- package/src/contractSupport/durability.js +1 -2
- package/src/contractSupport/topics.d.ts +3 -3
- package/src/contractSupport/topics.d.ts.map +1 -1
- package/src/contractSupport/topics.js +3 -3
- package/src/contracts/auction/index.d.ts +10 -10
- package/src/contracts/auction/index.d.ts.map +1 -1
- package/src/contracts/auction/index.js +2 -1
- package/src/contracts/priceAggregatorTypes.d.ts +1 -1
- package/src/contracts/priceAggregatorTypes.d.ts.map +1 -1
- package/src/contracts/priceAggregatorTypes.js +1 -1
- package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
- package/src/contracts/scaledPriceAuthority.js +2 -1
- package/src/contracts/valueVow.contract.d.ts +1 -3
- package/src/contracts/valueVow.contract.d.ts.map +1 -1
- package/src/contracts/valueVow.contract.js +6 -5
- package/src/internal-types.d.ts +4 -3
- package/src/internal-types.d.ts.map +1 -1
- package/src/internal-types.js +2 -2
- package/src/issuerRecord.d.ts +6 -2
- package/src/issuerRecord.d.ts.map +1 -1
- package/src/issuerRecord.js +2 -2
- package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
- package/src/zoeService/originalZoeSeat.js +0 -3
- package/src/zoeService/startInstance.d.ts.map +1 -1
- package/src/zoeService/startInstance.js +111 -109
- package/src/zoeService/zoeSeat.d.ts.map +1 -1
- package/src/zoeService/zoeSeat.js +0 -3
- package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
- package/src/zoeService/zoeStorageManager.js +52 -49
- package/tools/fakeVatAdmin.d.ts +0 -4
- package/tools/fakeVatAdmin.d.ts.map +1 -1
- package/tools/fakeVatAdmin.js +55 -49
- package/tools/setup-zoe.d.ts +1 -1
- package/tools/setup-zoe.d.ts.map +1 -1
- package/tools/setup-zoe.js +2 -2
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-3294e0c.0.3294e0c",
|
|
4
4
|
"description": "Zoe: the Smart Contract Framework for Offer Enforcement",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/zoeService/zoe.js",
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@agoric/base-zone": "0.1.1-dev-
|
|
44
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
45
|
-
"@agoric/internal": "0.3.3-dev-
|
|
46
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
47
|
-
"@agoric/store": "0.9.3-dev-
|
|
48
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
49
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
50
|
-
"@agoric/time": "0.3.3-dev-
|
|
51
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
52
|
-
"@agoric/vow": "0.1.1-dev-
|
|
53
|
-
"@agoric/zone": "0.2.3-dev-
|
|
43
|
+
"@agoric/base-zone": "0.1.1-dev-3294e0c.0.3294e0c",
|
|
44
|
+
"@agoric/ertp": "0.16.3-dev-3294e0c.0.3294e0c",
|
|
45
|
+
"@agoric/internal": "0.3.3-dev-3294e0c.0.3294e0c",
|
|
46
|
+
"@agoric/notifier": "0.6.3-dev-3294e0c.0.3294e0c",
|
|
47
|
+
"@agoric/store": "0.9.3-dev-3294e0c.0.3294e0c",
|
|
48
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-3294e0c.0.3294e0c",
|
|
49
|
+
"@agoric/swingset-vat": "0.32.3-dev-3294e0c.0.3294e0c",
|
|
50
|
+
"@agoric/time": "0.3.3-dev-3294e0c.0.3294e0c",
|
|
51
|
+
"@agoric/vat-data": "0.5.3-dev-3294e0c.0.3294e0c",
|
|
52
|
+
"@agoric/vow": "0.1.1-dev-3294e0c.0.3294e0c",
|
|
53
|
+
"@agoric/zone": "0.2.3-dev-3294e0c.0.3294e0c",
|
|
54
54
|
"@endo/bundle-source": "^4.1.2",
|
|
55
55
|
"@endo/captp": "^4.4.8",
|
|
56
56
|
"@endo/common": "^1.2.13",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"yargs-parser": "^21.1.1"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@agoric/kmarshal": "0.1.1-dev-
|
|
70
|
+
"@agoric/kmarshal": "0.1.1-dev-3294e0c.0.3294e0c",
|
|
71
71
|
"@endo/init": "^1.1.12",
|
|
72
72
|
"ava": "^7.0.0",
|
|
73
73
|
"c8": "^10.1.3",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"typeCoverage": {
|
|
98
98
|
"atLeast": 84.84
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "3294e0c1e81f8d145c6b57624d080908b935f524"
|
|
101
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durability.d.ts","sourceRoot":"","sources":["durability.js"],"names":[],"mappings":"AAoBO,qCAJW,CAAC,SAAN,EAAI,EACM,CAAC,SAAV,OAAQ,QACX,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,eASA,CAAC,
|
|
1
|
+
{"version":3,"file":"durability.d.ts","sourceRoot":"","sources":["durability.js"],"names":[],"mappings":"AAoBO,qCAJW,CAAC,SAAN,EAAI,EACM,CAAC,SAAV,OAAQ,QACX,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,eASA,CAAC,CAUxB;AAWM,sCALI,GAAG,WACH,OAAO,QACP,MAAM,GACJ,OAAO,CAInB;AAiCM,2BALwC,CAAC,SAAlC,MAAM,CAAC,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC,CAAE,WACnC,SAAS,MAAM,EAAE,GAAG,CAAC,UACrB,CAAC,GACC,OAAO,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAE,CAAC,CAuBlE;AAgBM,iCAPwB,CAAC,SAAnB,MAAO,KAAK,GAAG,CAAE,YACnB,OAAO,OACP,MAAM,aACN,CAAC,cACD,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,GACrC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAc3C;yBA7H8B,aAAa;6BADlB,4BAA4B;6BACvB,aAAa;0BACrB,aAAa;8BAHT,4BAA4B"}
|
|
@@ -29,8 +29,7 @@ export const makeEphemeraProvider = init => {
|
|
|
29
29
|
*/
|
|
30
30
|
return key => {
|
|
31
31
|
if (extant.has(key)) {
|
|
32
|
-
|
|
33
|
-
return extant.get(key);
|
|
32
|
+
return /** @type {E} */ (extant.get(key));
|
|
34
33
|
}
|
|
35
34
|
const newEph = init(key);
|
|
36
35
|
extant.set(key, newEph);
|
|
@@ -21,7 +21,7 @@ export const PublicTopicShape: import("@endo/patterns").Matcher;
|
|
|
21
21
|
* }} ResolvedPublicTopic
|
|
22
22
|
*/
|
|
23
23
|
export const TopicsRecordShape: import("@endo/patterns").Matcher;
|
|
24
|
-
export function makeRecorderTopic<T>(description: string, recorderKit: RecorderKit<T> | EventualRecorderKit<T>): PublicTopic<T>;
|
|
24
|
+
export function makeRecorderTopic<T extends unknown>(description: string, recorderKit: RecorderKit<T> | EventualRecorderKit<T>): PublicTopic<T>;
|
|
25
25
|
export type PublicTopic<T extends unknown> = {
|
|
26
26
|
description?: string;
|
|
27
27
|
subscriber: Subscriber<T>;
|
|
@@ -38,10 +38,10 @@ export type ResolvedPublicTopic<T extends unknown> = {
|
|
|
38
38
|
storagePath: string;
|
|
39
39
|
};
|
|
40
40
|
export type TopicsRecord = {
|
|
41
|
-
[topicName: string]: PublicTopic<
|
|
41
|
+
[topicName: string]: PublicTopic<any>;
|
|
42
42
|
};
|
|
43
43
|
export type ResolvedTopicsRecord = {
|
|
44
|
-
[topicName: string]: ResolvedPublicTopic<
|
|
44
|
+
[topicName: string]: ResolvedPublicTopic<any>;
|
|
45
45
|
};
|
|
46
46
|
import { SubscriberShape } from '@agoric/notifier';
|
|
47
47
|
import type { RecorderKit } from './recorder.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["topics.js"],"names":[],"mappings":";AAcA,gEAME;AAEF;;;;;;;GAOG;AAEH;;;;;;;;;;;GAWG;AAEH,iEAA0E;AAoBnE,
|
|
1
|
+
{"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["topics.js"],"names":[],"mappings":";AAcA,gEAME;AAEF;;;;;;;GAOG;AAEH;;;;;;;;;;;GAWG;AAEH,iEAA0E;AAoBnE,kCALe,CAAC,+BACZ,MAAM,eACN,YAAY,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC,GACrC,WAAW,CAAC,CAAC,CAAC,CAU1B;wBAjDqB,CAAC,oBACV;IACR,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;IAC1B,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC;CAC3B;;;;;;gCAQkB,CAAC,oBACV;IACR,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB;2BAMS;IACZ,CAAK,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;CACvC;mCAIS;IACZ,CAAK,SAAS,EAAE,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;CAC/C;gCAvD4B,kBAAkB;iCAOpB,eAAe;yCACP,eAAe;gCAFxB,kBAAkB;0BAGxB,aAAa;4BAJX,kBAAkB"}
|
|
@@ -46,18 +46,18 @@ export const TopicsRecordShape = M.recordOf(M.string(), PublicTopicShape);
|
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* @typedef {{
|
|
49
|
-
* [topicName: string]: PublicTopic<
|
|
49
|
+
* [topicName: string]: PublicTopic<any>,
|
|
50
50
|
* }} TopicsRecord
|
|
51
51
|
*/
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* @typedef {{
|
|
55
|
-
* [topicName: string]: ResolvedPublicTopic<
|
|
55
|
+
* [topicName: string]: ResolvedPublicTopic<any>,
|
|
56
56
|
* }} ResolvedTopicsRecord
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
* @template T
|
|
60
|
+
* @template {object} T
|
|
61
61
|
* @param {string} description
|
|
62
62
|
* @param {RecorderKit<T> | EventualRecorderKit<T>} recorderKit
|
|
63
63
|
* @returns {PublicTopic<T>}
|
|
@@ -23,13 +23,13 @@ export const SECOND_PRICE: "second-price";
|
|
|
23
23
|
*
|
|
24
24
|
* @param {ZCF<{
|
|
25
25
|
* timeAuthority: TimerService,
|
|
26
|
-
* winnerPriceOption?: FIRST_PRICE | SECOND_PRICE,
|
|
26
|
+
* winnerPriceOption?: typeof FIRST_PRICE | typeof SECOND_PRICE,
|
|
27
27
|
* bidDuration: bigint,
|
|
28
28
|
* }>} zcf
|
|
29
29
|
*/
|
|
30
30
|
export function start(zcf: ZCF<{
|
|
31
31
|
timeAuthority: TimerService;
|
|
32
|
-
winnerPriceOption?:
|
|
32
|
+
winnerPriceOption?: typeof FIRST_PRICE | typeof SECOND_PRICE;
|
|
33
33
|
bidDuration: bigint;
|
|
34
34
|
}>): {
|
|
35
35
|
creatorInvitation: Promise<import("@agoric/zoe").Invitation<{
|
|
@@ -37,8 +37,8 @@ export function start(zcf: ZCF<{
|
|
|
37
37
|
getSessionDetails: () => {
|
|
38
38
|
auctionedAssets: any;
|
|
39
39
|
minimumBid: any;
|
|
40
|
-
winnerPriceOption:
|
|
41
|
-
closesAfter:
|
|
40
|
+
winnerPriceOption: "first-price" | "second-price";
|
|
41
|
+
closesAfter: import("@agoric/time").Timestamp | null;
|
|
42
42
|
bidDuration: bigint;
|
|
43
43
|
timeAuthority: TimerService;
|
|
44
44
|
bids: string | any[];
|
|
@@ -48,8 +48,8 @@ export function start(zcf: ZCF<{
|
|
|
48
48
|
getSessionDetails: () => {
|
|
49
49
|
auctionedAssets: any;
|
|
50
50
|
minimumBid: any;
|
|
51
|
-
winnerPriceOption:
|
|
52
|
-
closesAfter:
|
|
51
|
+
winnerPriceOption: "first-price" | "second-price";
|
|
52
|
+
closesAfter: import("@agoric/time").Timestamp | null;
|
|
53
53
|
bidDuration: bigint;
|
|
54
54
|
timeAuthority: TimerService;
|
|
55
55
|
bids: string | any[];
|
|
@@ -60,8 +60,8 @@ export function start(zcf: ZCF<{
|
|
|
60
60
|
getSessionDetails: () => {
|
|
61
61
|
auctionedAssets: any;
|
|
62
62
|
minimumBid: any;
|
|
63
|
-
winnerPriceOption:
|
|
64
|
-
closesAfter:
|
|
63
|
+
winnerPriceOption: "first-price" | "second-price";
|
|
64
|
+
closesAfter: import("@agoric/time").Timestamp | null;
|
|
65
65
|
bidDuration: bigint;
|
|
66
66
|
timeAuthority: TimerService;
|
|
67
67
|
bids: string | any[];
|
|
@@ -71,8 +71,8 @@ export function start(zcf: ZCF<{
|
|
|
71
71
|
getSessionDetails: () => {
|
|
72
72
|
auctionedAssets: any;
|
|
73
73
|
minimumBid: any;
|
|
74
|
-
winnerPriceOption:
|
|
75
|
-
closesAfter:
|
|
74
|
+
winnerPriceOption: "first-price" | "second-price";
|
|
75
|
+
closesAfter: import("@agoric/time").Timestamp | null;
|
|
76
76
|
bidDuration: bigint;
|
|
77
77
|
timeAuthority: TimerService;
|
|
78
78
|
bids: string | any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,0BAAoB,aAAa,CAAC;AAClC,2BAAqB,cAAc,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,2BANW,IAAI;IACZ,aAAa,EAAE,YAAY,CAAC;IAC5B,iBAAiB,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAgBA;;;GAGG;AAEH,0BAAoB,aAAa,CAAC;AAClC,2BAAqB,cAAc,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,2BANW,IAAI;IACZ,aAAa,EAAE,YAAY,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,WAAW,GAAG,OAAO,YAAY,CAAC;IAC7D,WAAW,EAAE,MAAM,CAAC;CACnB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0HJ;kCAtJ8B,cAAc;yBACT,aAAa"}
|
|
@@ -41,7 +41,7 @@ const SECOND_PRICE = 'second-price';
|
|
|
41
41
|
*
|
|
42
42
|
* @param {ZCF<{
|
|
43
43
|
* timeAuthority: TimerService,
|
|
44
|
-
* winnerPriceOption?: FIRST_PRICE | SECOND_PRICE,
|
|
44
|
+
* winnerPriceOption?: typeof FIRST_PRICE | typeof SECOND_PRICE,
|
|
45
45
|
* bidDuration: bigint,
|
|
46
46
|
* }>} zcf
|
|
47
47
|
*/
|
|
@@ -60,6 +60,7 @@ const start = zcf => {
|
|
|
60
60
|
let sellSeat;
|
|
61
61
|
let isTimerStarted = false;
|
|
62
62
|
let isClosed = false;
|
|
63
|
+
/** @type {import('@agoric/time').Timestamp | null} */
|
|
63
64
|
let closesAfter = null;
|
|
64
65
|
|
|
65
66
|
const bidSeats = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceAggregatorTypes.d.ts","sourceRoot":"","sources":["priceAggregatorTypes.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priceAggregatorTypes.d.ts","sourceRoot":"","sources":["priceAggregatorTypes.js"],"names":[],"mappings":"wBACa,CAAC;;;;YAEA,MAAM,OAAO,CAAC,IAAI,CAAC;;;;gBAEnB,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;;wBAa7B,EAAE,GAAG,MAAM;iCAIX,IAAI,CAAC,uBAAuB,EAAE,cAAc,GAAG,aAAa,CAAC;0BAI7D,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CAClB;;;;;;;;yBAMU,CAAC,KAAK,EAAE,WAAW,KAAK,KAAK,UAAU,CAAC;;;;WAExC,CAAC,KAAK,EAAE,WAAW,KAAK,KAAK,OAAO,CAAC;;wFAOtC,KAAK,UAAU,CAAC;;;;;;;;oBAMf,MAAM,mBAAmB;;;;4BAEzB,wCAAwC;;;;4BAExC,MAAM,OAAO,CAAC,UAAU,CAAC;;;mBAMzB,aAAa;;;gBAKb,CAAC,aAAa,EAAE,uBAAuB,KAC7C,kBAAkB;;;kBAKZ,kBAAkB;iBAClB,iBAAiB;cACjB,QAAQ;;;WAKR,OAAO;;;;;;;aAMP,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC;;;;aAEzD,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI;;;;aAE7C,CAAC,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,MAAM,GAAG,SAAS,KACtC,IAAI;;6CAjF8B,sBAAsB;gCACnC,mBAAmB;0BAGzB,aAAa;yCAFY,aAAa;8BAAb,aAAa;4BACpC,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaledPriceAuthority.d.ts","sourceRoot":"","sources":["scaledPriceAuthority.js"],"names":[],"mappings":"AAyCO,6BALI,IAAI,wBAAwB,CAAC,eAC7B,MAAM,WACN,OAAO;;;;
|
|
1
|
+
{"version":3,"file":"scaledPriceAuthority.d.ts","sourceRoot":"","sources":["scaledPriceAuthority.js"],"names":[],"mappings":"AAyCO,6BALI,IAAI,wBAAwB,CAAC,eAC7B,MAAM,WACN,OAAO;;;;GA4DjB;;0BA7Ea,KAAK,cAAc,CAAC;;;;aACpB,KAAK;;;;cACL,KAAK;;;;;;yBAVG,aAAa;6BACT,kBAAkB;oCAFiD,4BAA4B;0BAIlG,aAAa;2BADZ,cAAc"}
|
|
@@ -58,7 +58,8 @@ export const prepare = async (zcf, privateArgs, baggage) => {
|
|
|
58
58
|
quoteMint,
|
|
59
59
|
// If the priceAuthority is overridden in privateArgs, use that version
|
|
60
60
|
sourcePriceAuthority:
|
|
61
|
-
privateArgs?.newPriceAuthority ||
|
|
61
|
+
/** @type {any} */ (privateArgs)?.newPriceAuthority ||
|
|
62
|
+
sourcePriceAuthority,
|
|
62
63
|
sourceBrandIn,
|
|
63
64
|
sourceBrandOut,
|
|
64
65
|
actualBrandIn,
|
|
@@ -9,9 +9,7 @@ export function start(zcf: ZCF<{}>, _privateArgs: undefined, baggage: Baggage):
|
|
|
9
9
|
getValue(): import("@agoric/vow").Vow<any>;
|
|
10
10
|
setValue(value: any): void;
|
|
11
11
|
makeGetterInvitation(): Promise<import("@agoric/zoe").Invitation<import("@agoric/vow").Vow<any>, undefined>>;
|
|
12
|
-
makeSetterInvitation(): Promise<import("@agoric/zoe").Invitation<
|
|
13
|
-
value: unknown;
|
|
14
|
-
}>>;
|
|
12
|
+
makeSetterInvitation(): Promise<import("@agoric/zoe").Invitation<any, undefined>>;
|
|
15
13
|
}>;
|
|
16
14
|
};
|
|
17
15
|
import type { ContractMeta } from '@agoric/zoe';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueVow.contract.d.ts","sourceRoot":"","sources":["valueVow.contract.js"],"names":[],"mappings":"AAGA;;;GAGG;AAEH,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAGnC;AAYK,2BAJI,IAAI,EAAE,CAAC,gBACP,SAAS,WACT,OAAO
|
|
1
|
+
{"version":3,"file":"valueVow.contract.d.ts","sourceRoot":"","sources":["valueVow.contract.js"],"names":[],"mappings":"AAGA;;;GAGG;AAEH,yCAAyC;AACzC,mBADW,aAAa,OAAO,KAAK,CAAC,CAGnC;AAYK,2BAJI,IAAI,EAAE,CAAC,gBACP,SAAS,WACT,OAAO;;;;;;;EA0CjB;kCA3DgD,aAAa;yBAAb,aAAa;6BAClC,kBAAkB"}
|
|
@@ -49,11 +49,12 @@ export const start = (zcf, _privateArgs, baggage) => {
|
|
|
49
49
|
},
|
|
50
50
|
makeSetterInvitation() {
|
|
51
51
|
return zcf.makeInvitation(
|
|
52
|
-
/** @type {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
/** @type {any} */ (
|
|
53
|
+
(seat, offerArgs) => {
|
|
54
|
+
seat.exit();
|
|
55
|
+
resolver.resolve(offerArgs.value);
|
|
56
|
+
}
|
|
57
|
+
),
|
|
57
58
|
'set value',
|
|
58
59
|
);
|
|
59
60
|
},
|
package/src/internal-types.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export type ZoeSeatAdminKit = {
|
|
|
22
22
|
/**
|
|
23
23
|
* Make the Zoe seat admin, user seat and a notifier
|
|
24
24
|
*/
|
|
25
|
-
export type MakeZoeSeatAdminKit = (initialAllocation: Allocation, instanceAdminHelper: InstanceAdminHelper, proposal: ProposalRecord, withdrawFacet: WithdrawFacet, exitObj: ERef<ExitObj>, offerResult?: ERef<unknown>, baggage
|
|
25
|
+
export type MakeZoeSeatAdminKit = (initialAllocation: Allocation, instanceAdminHelper: InstanceAdminHelper, proposal: ProposalRecord, withdrawFacet: WithdrawFacet, exitObj: ERef<ExitObj>, offerResult?: ERef<unknown>, baggage?: Baggage | undefined) => ZoeSeatAdminKit;
|
|
26
26
|
export type ZoeSeatAdminExit = (completion?: Completion) => void;
|
|
27
27
|
export type ZoeSeatAdminMethods = {
|
|
28
28
|
replaceAllocation: (allocation: Allocation) => void;
|
|
@@ -35,6 +35,7 @@ export type ZoeSeatAdminMethods = {
|
|
|
35
35
|
getExitSubscriber: () => Subscriber<AmountKeywordRecord>;
|
|
36
36
|
};
|
|
37
37
|
export type ZoeSeatAdmin = RemotableObject & ZoeSeatAdminMethods;
|
|
38
|
+
export type GetAssetKind = (brand: Brand) => AssetKind;
|
|
38
39
|
export type HandleOfferResult = {
|
|
39
40
|
offerResultPromise: Promise<Passable>;
|
|
40
41
|
exitObj: ExitObj;
|
|
@@ -171,6 +172,8 @@ import type { ShutdownWithFailure } from '@agoric/swingset-vat';
|
|
|
171
172
|
import type { AmountKeywordRecord } from '@agoric/zoe';
|
|
172
173
|
import type { Subscriber } from '@agoric/notifier';
|
|
173
174
|
import type { RemotableObject } from '@endo/pass-style';
|
|
175
|
+
import type { Brand } from '@agoric/ertp';
|
|
176
|
+
import type { AssetKind } from '@agoric/ertp';
|
|
174
177
|
import type { Passable } from '@endo/pass-style';
|
|
175
178
|
import type { InvitationHandle } from './types.js';
|
|
176
179
|
import type { Instance } from '@agoric/zoe';
|
|
@@ -184,13 +187,11 @@ import type { Keyword } from '@agoric/zoe';
|
|
|
184
187
|
import type { ZoeIssuerRecord } from './types-index.js';
|
|
185
188
|
import type { FeeMintAccess } from './zoeService/types.js';
|
|
186
189
|
import type { IssuerKit } from '@agoric/ertp';
|
|
187
|
-
import type { AssetKind } from '@agoric/ertp';
|
|
188
190
|
import type { AdditionalDisplayInfo } from '@agoric/ertp';
|
|
189
191
|
import type { IssuerRecord } from '@agoric/ertp';
|
|
190
192
|
import type { Amount } from '@agoric/ertp';
|
|
191
193
|
import type { InstanceRecord } from './zoeService/utils.js';
|
|
192
194
|
import type { ZCFSeat } from '@agoric/zoe';
|
|
193
195
|
import type { Handle } from '@agoric/zoe';
|
|
194
|
-
import type { Brand } from '@agoric/ertp';
|
|
195
196
|
import type { AnyTerms } from './types.js';
|
|
196
197
|
//# sourceMappingURL=internal-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";cAoBc,cAAc;uBACd,UAAU;gBACV,UAAU;gBACV,MAAM;;;;;4CAOT,UAAU,KACR,qBAAqB;;sBAKpB,CAAC,UAAU,EAAE,UAAU,KAAK,qBAAqB;;;sBAKjD,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI;eACpC,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO;;;cAKvC,QAAQ;kBACR,YAAY;;;;;sDAMf,UAAU,uBACV,mBAAmB,YACnB,cAAc,iBACd,aAAa,WACb,KAAK,OAAO,CAAC,gBACb,KAAK,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":"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"}
|
package/src/internal-types.js
CHANGED
|
@@ -58,7 +58,7 @@ export {};
|
|
|
58
58
|
* @param {WithdrawFacet} withdrawFacet
|
|
59
59
|
* @param {ERef<ExitObj>} exitObj
|
|
60
60
|
* @param {ERef<unknown>} [offerResult]
|
|
61
|
-
* @param {Baggage} baggage
|
|
61
|
+
* @param {Baggage} [baggage]
|
|
62
62
|
* @returns {ZoeSeatAdminKit}
|
|
63
63
|
*/
|
|
64
64
|
|
|
@@ -81,7 +81,7 @@ export {};
|
|
|
81
81
|
*/
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
* @
|
|
84
|
+
* @typedef {(brand: Brand) => AssetKind} GetAssetKind
|
|
85
85
|
*/
|
|
86
86
|
|
|
87
87
|
/**
|
package/src/issuerRecord.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @param {IssuerRecord<any>} issuerRecord
|
|
3
|
+
* @returns {asserts issuerRecord is Required<IssuerRecord<any>>}
|
|
4
|
+
*/
|
|
2
5
|
export function assertFullIssuerRecord(issuerRecord: IssuerRecord<any>): asserts issuerRecord is Required<IssuerRecord<any>>;
|
|
6
|
+
export function makeIssuerRecord<K extends AssetKind>(brand: Brand<K>, issuer: Issuer<K>, displayInfo: DisplayInfo<K>): ZoeIssuerRecord<K>;
|
|
7
|
+
import type { IssuerRecord } from '@agoric/ertp';
|
|
3
8
|
import type { AssetKind } from '@agoric/ertp';
|
|
4
9
|
import type { Brand } from '@agoric/ertp';
|
|
5
10
|
import type { Issuer } from '@agoric/ertp';
|
|
6
11
|
import type { DisplayInfo } from '@agoric/ertp';
|
|
7
12
|
import type { ZoeIssuerRecord } from './types-index.js';
|
|
8
|
-
import type { IssuerRecord } from '@agoric/ertp';
|
|
9
13
|
//# sourceMappingURL=issuerRecord.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuerRecord.d.ts","sourceRoot":"","sources":["issuerRecord.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"issuerRecord.d.ts","sourceRoot":"","sources":["issuerRecord.js"],"names":[],"mappings":"AAyBA;;;GAGG;AACH,qDAHW,aAAa,GAAG,CAAC,GACf,QAAQ,YAAY,IAAI,QAAQ,CAAC,aAAa,GAAG,CAAC,CAAC,CAM/D;AAhBM,iCANkB,CAAC,SAAb,SAAW,SACb,MAAM,CAAC,CAAC,UACR,OAAO,CAAC,CAAC,eACT,YAAY,CAAC,CAAC,GACZ,gBAAgB,CAAC,CAAC,CAQ3B;kCApBkE,cAAc;+BAAd,cAAc;2BAAd,cAAc;4BAAd,cAAc;iCAAd,cAAc;qCAClD,kBAAkB"}
|
package/src/issuerRecord.js
CHANGED
|
@@ -27,8 +27,8 @@ export const makeIssuerRecord = (brand, issuer, displayInfo) =>
|
|
|
27
27
|
* @param {IssuerRecord<any>} issuerRecord
|
|
28
28
|
* @returns {asserts issuerRecord is Required<IssuerRecord<any>>}
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export function assertFullIssuerRecord(issuerRecord) {
|
|
31
31
|
if (!issuerRecord.displayInfo) {
|
|
32
32
|
throw Fail`full IssuerRecord requires displayInfo`;
|
|
33
33
|
}
|
|
34
|
-
}
|
|
34
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"originalZoeSeat.d.ts","sourceRoot":"","sources":["originalZoeSeat.js"],"names":[],"mappings":";;;;;;;;;;AAwCA;;;;;;;;;;GAGG;;;;;;;;;;;;AA+CI,oDAHI,OAAO,yBACP,MAAM,WAAW,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"originalZoeSeat.d.ts","sourceRoot":"","sources":["originalZoeSeat.js"],"names":[],"mappings":";;;;;;;;;;AAwCA;;;;;;;;;;GAGG;;;;;;;;;;;;AA+CI,oDAHI,OAAO,yBACP,MAAM,WAAW,GAAG,CAAC,QAiR/B;6BAxVyB,kBAAkB;gCACf,kBAAkB"}
|
|
@@ -111,9 +111,6 @@ export const declareOldZoeSeatAdminKind = (baggage, makeDurablePublishKit) => {
|
|
|
111
111
|
// the kit here. When resolveExitAndResult() is called, it saves
|
|
112
112
|
// state.offerResult and resolves the promise if it exists, then removes the
|
|
113
113
|
// table entry.
|
|
114
|
-
/**
|
|
115
|
-
* @typedef {WeakMap<ZCFSeat, unknown>}
|
|
116
|
-
*/
|
|
117
114
|
const ephemeralOfferResultStore = new WeakMap();
|
|
118
115
|
|
|
119
116
|
// notice that this returns a maker function which we drop on the floor.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"AA8CO,uDANI,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,oBAAoB,CAAC,oBAC/E,MAAM,KAAK,SAAS,CAAC,uBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,cACzB,OAAO,GACL,aAAa,
|
|
1
|
+
{"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"AA8CO,uDANI,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,oBAAoB,CAAC,oBAC/E,MAAM,KAAK,SAAS,CAAC,uBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,cACzB,OAAO,GACL,aAAa,CAuWzB;uCAnX8D,qBAAqB;+BARxD,sBAAsB;0BAY3B,aAAa;6BAdV,kBAAkB;mCAIZ,YAAY"}
|
|
@@ -288,115 +288,117 @@ export const makeStartInstance = (
|
|
|
288
288
|
},
|
|
289
289
|
);
|
|
290
290
|
|
|
291
|
-
/**
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
291
|
+
const startInstance = /** @type {StartInstance} */ (
|
|
292
|
+
async (
|
|
293
|
+
installationP,
|
|
294
|
+
uncleanIssuerKeywordRecord = harden({}),
|
|
295
|
+
// @ts-expect-error FIXME may not match the expected terms of SF
|
|
296
|
+
customTerms = harden({}),
|
|
297
|
+
privateArgs = undefined,
|
|
298
|
+
instanceLabel = '',
|
|
299
|
+
) => {
|
|
300
|
+
const { installation, bundle, bundleCap } =
|
|
301
|
+
await E(startInstanceAccess).unwrapInstallation(installationP);
|
|
302
|
+
// AWAIT ///
|
|
303
|
+
|
|
304
|
+
const contractBundleCap = bundle || bundleCap;
|
|
305
|
+
assert(contractBundleCap);
|
|
306
|
+
|
|
307
|
+
if (privateArgs !== undefined) {
|
|
308
|
+
const passStyle = passStyleOf(privateArgs);
|
|
309
|
+
passStyle === 'copyRecord' ||
|
|
310
|
+
Fail`privateArgs must be a pass-by-copy record, but instead was a ${q(
|
|
311
|
+
passStyle,
|
|
312
|
+
)}: ${privateArgs}`;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const instanceHandle = makeInstanceHandle();
|
|
316
|
+
|
|
317
|
+
const zoeInstanceStorageManager = await E(
|
|
318
|
+
startInstanceAccess,
|
|
319
|
+
).makeZoeInstanceStorageManager(
|
|
320
|
+
installation,
|
|
321
|
+
customTerms,
|
|
322
|
+
uncleanIssuerKeywordRecord,
|
|
323
|
+
instanceHandle,
|
|
324
|
+
contractBundleCap,
|
|
325
|
+
instanceLabel,
|
|
326
|
+
);
|
|
327
|
+
// AWAIT ///
|
|
328
|
+
|
|
329
|
+
const adminNode = zoeInstanceStorageManager.getAdminNode();
|
|
330
|
+
const zcfRoot = /** @type {ZCFRoot} */ (
|
|
331
|
+
zoeInstanceStorageManager.getRoot()
|
|
332
|
+
);
|
|
333
|
+
|
|
334
|
+
/** @type {InstanceAdmin} */
|
|
335
|
+
const instanceAdmin = instanceAdminMaker(
|
|
336
|
+
instanceHandle,
|
|
337
|
+
zoeInstanceStorageManager,
|
|
338
|
+
adminNode,
|
|
339
|
+
);
|
|
340
|
+
zoeInstanceStorageManager.initInstanceAdmin(
|
|
341
|
+
instanceHandle,
|
|
342
|
+
instanceAdmin,
|
|
343
|
+
);
|
|
344
|
+
|
|
345
|
+
void watchForAdminNodeDone(adminNode, instanceAdmin);
|
|
346
|
+
|
|
347
|
+
/** @type {ZoeInstanceAdmin} */
|
|
348
|
+
// @ts-expect-error XXX saveIssuer
|
|
349
|
+
const zoeInstanceAdminForZcf = makeZoeInstanceAdmin(
|
|
350
|
+
zoeInstanceStorageManager,
|
|
351
|
+
instanceAdmin,
|
|
352
|
+
seatHandleToZoeSeatAdmin,
|
|
353
|
+
adminNode,
|
|
354
|
+
);
|
|
355
|
+
|
|
356
|
+
// At this point, the contract will start executing. All must be ready
|
|
357
|
+
|
|
358
|
+
const {
|
|
359
|
+
creatorFacet = makeEmptyCreatorFacet(),
|
|
360
|
+
publicFacet = makeEmptyPublicFacet(),
|
|
361
|
+
creatorInvitation: creatorInvitationP,
|
|
362
|
+
handleOfferObj,
|
|
363
|
+
} = await E(zcfRoot).startZcf(
|
|
364
|
+
zoeInstanceAdminForZcf,
|
|
365
|
+
zoeInstanceStorageManager.getInstanceRecord(),
|
|
366
|
+
zoeInstanceStorageManager.getIssuerRecords(),
|
|
367
|
+
/** @type {any} */ (privateArgs),
|
|
368
|
+
);
|
|
369
|
+
|
|
370
|
+
instanceAdmin.initDelayedState(handleOfferObj, publicFacet);
|
|
371
|
+
|
|
372
|
+
// creatorInvitation can be undefined, but if it is defined,
|
|
373
|
+
// let's make sure it is an invitation.
|
|
374
|
+
return E.when(
|
|
375
|
+
Promise.all([
|
|
376
|
+
creatorInvitationP,
|
|
377
|
+
creatorInvitationP !== undefined &&
|
|
378
|
+
zoeInstanceStorageManager
|
|
379
|
+
.getInvitationIssuer()
|
|
380
|
+
.isLive(creatorInvitationP),
|
|
381
|
+
]),
|
|
382
|
+
([creatorInvitation, isLiveResult]) => {
|
|
383
|
+
creatorInvitation === undefined ||
|
|
384
|
+
isLiveResult ||
|
|
385
|
+
Fail`The contract did not correctly return a creatorInvitation`;
|
|
386
|
+
|
|
387
|
+
const adminFacet = makeAdminFacet(adminNode, contractBundleCap);
|
|
388
|
+
|
|
389
|
+
// Actually returned to the user.
|
|
390
|
+
return harden({
|
|
391
|
+
creatorFacet,
|
|
392
|
+
|
|
393
|
+
// TODO (#5775) deprecate this return value from contracts.
|
|
394
|
+
creatorInvitation,
|
|
395
|
+
instance: instanceHandle,
|
|
396
|
+
publicFacet,
|
|
397
|
+
adminFacet,
|
|
398
|
+
});
|
|
399
|
+
},
|
|
400
|
+
);
|
|
315
401
|
}
|
|
316
|
-
|
|
317
|
-
const instanceHandle = makeInstanceHandle();
|
|
318
|
-
|
|
319
|
-
const zoeInstanceStorageManager = await E(
|
|
320
|
-
startInstanceAccess,
|
|
321
|
-
).makeZoeInstanceStorageManager(
|
|
322
|
-
installation,
|
|
323
|
-
customTerms,
|
|
324
|
-
uncleanIssuerKeywordRecord,
|
|
325
|
-
instanceHandle,
|
|
326
|
-
contractBundleCap,
|
|
327
|
-
instanceLabel,
|
|
328
|
-
);
|
|
329
|
-
// AWAIT ///
|
|
330
|
-
|
|
331
|
-
const adminNode = zoeInstanceStorageManager.getAdminNode();
|
|
332
|
-
/** @type {ZCFRoot} */
|
|
333
|
-
const zcfRoot = zoeInstanceStorageManager.getRoot();
|
|
334
|
-
|
|
335
|
-
/** @type {InstanceAdmin} */
|
|
336
|
-
const instanceAdmin = instanceAdminMaker(
|
|
337
|
-
instanceHandle,
|
|
338
|
-
zoeInstanceStorageManager,
|
|
339
|
-
adminNode,
|
|
340
|
-
);
|
|
341
|
-
zoeInstanceStorageManager.initInstanceAdmin(instanceHandle, instanceAdmin);
|
|
342
|
-
|
|
343
|
-
void watchForAdminNodeDone(adminNode, instanceAdmin);
|
|
344
|
-
|
|
345
|
-
/** @type {ZoeInstanceAdmin} */
|
|
346
|
-
// @ts-expect-error XXX saveIssuer
|
|
347
|
-
const zoeInstanceAdminForZcf = makeZoeInstanceAdmin(
|
|
348
|
-
zoeInstanceStorageManager,
|
|
349
|
-
instanceAdmin,
|
|
350
|
-
seatHandleToZoeSeatAdmin,
|
|
351
|
-
adminNode,
|
|
352
|
-
);
|
|
353
|
-
|
|
354
|
-
// At this point, the contract will start executing. All must be ready
|
|
355
|
-
|
|
356
|
-
const {
|
|
357
|
-
creatorFacet = makeEmptyCreatorFacet(),
|
|
358
|
-
publicFacet = makeEmptyPublicFacet(),
|
|
359
|
-
creatorInvitation: creatorInvitationP,
|
|
360
|
-
handleOfferObj,
|
|
361
|
-
} = await E(zcfRoot).startZcf(
|
|
362
|
-
zoeInstanceAdminForZcf,
|
|
363
|
-
zoeInstanceStorageManager.getInstanceRecord(),
|
|
364
|
-
zoeInstanceStorageManager.getIssuerRecords(),
|
|
365
|
-
privateArgs,
|
|
366
|
-
);
|
|
367
|
-
|
|
368
|
-
instanceAdmin.initDelayedState(handleOfferObj, publicFacet);
|
|
369
|
-
|
|
370
|
-
// creatorInvitation can be undefined, but if it is defined,
|
|
371
|
-
// let's make sure it is an invitation.
|
|
372
|
-
// @ts-expect-error cast
|
|
373
|
-
return E.when(
|
|
374
|
-
Promise.all([
|
|
375
|
-
creatorInvitationP,
|
|
376
|
-
creatorInvitationP !== undefined &&
|
|
377
|
-
zoeInstanceStorageManager
|
|
378
|
-
.getInvitationIssuer()
|
|
379
|
-
.isLive(creatorInvitationP),
|
|
380
|
-
]),
|
|
381
|
-
([creatorInvitation, isLiveResult]) => {
|
|
382
|
-
creatorInvitation === undefined ||
|
|
383
|
-
isLiveResult ||
|
|
384
|
-
Fail`The contract did not correctly return a creatorInvitation`;
|
|
385
|
-
|
|
386
|
-
const adminFacet = makeAdminFacet(adminNode, contractBundleCap);
|
|
387
|
-
|
|
388
|
-
// Actually returned to the user.
|
|
389
|
-
return harden({
|
|
390
|
-
creatorFacet,
|
|
391
|
-
|
|
392
|
-
// TODO (#5775) deprecate this return value from contracts.
|
|
393
|
-
creatorInvitation,
|
|
394
|
-
instance: instanceHandle,
|
|
395
|
-
publicFacet,
|
|
396
|
-
adminFacet,
|
|
397
|
-
});
|
|
398
|
-
},
|
|
399
|
-
);
|
|
400
|
-
};
|
|
402
|
+
);
|
|
401
403
|
return harden(startInstance);
|
|
402
404
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoeSeat.d.ts","sourceRoot":"","sources":["zoeSeat.js"],"names":[],"mappings":"AA8DO,iDAFI,OAAO,
|
|
1
|
+
{"version":3,"file":"zoeSeat.d.ts","sourceRoot":"","sources":["zoeSeat.js"],"names":[],"mappings":"AA8DO,iDAFI,OAAO,uBAuWL,UAAU,YACV,cAAc,uBACd,mBAAmB,iBACnB,aAAa,YACb,KAAK,OAAO,CAAC,2BACb,OAAO;;;;;;;;;;;;;;;;QA3IZ,wCAAwC;8DAA5B,iBAAiB;;;;EAoKpC;6BA/ayB,kBAAkB;gCAMf,UAAU;oCACG,aAAa;yCANjB,sBAAsB;mCAC5B,sBAAsB;6BAE5B,sBAAsB;0BAIzB,aAAa;uCALA,sBAAsB"}
|
|
@@ -90,9 +90,6 @@ export const makeZoeSeatAdminFactory = baggage => {
|
|
|
90
90
|
// the kit here. When resolveExitAndResult() is called, it saves
|
|
91
91
|
// state.offerResult and resolves the promise if it exists, then removes the
|
|
92
92
|
// table entry.
|
|
93
|
-
/**
|
|
94
|
-
* @typedef {WeakMap<ZCFSeat, unknown>}
|
|
95
|
-
*/
|
|
96
93
|
const ephemeralOfferResultStore = new WeakMap();
|
|
97
94
|
|
|
98
95
|
const makeZoeSeatAdmin = prepareExoClassKit(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoeStorageManager.d.ts","sourceRoot":"","sources":["zoeStorageManager.js"],"names":[],"mappings":"AA0EO,oDAXI,YAAY,qBAEZ,iBAAiB,kBACjB,mBAAmB,WACnB;IACL,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,KAAK,CAAC;CAC3B,cACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;kBAHZ,CAAC;qBACD,CAAF;oBAA0B,CAAC;;;;;;;
|
|
1
|
+
{"version":3,"file":"zoeStorageManager.d.ts","sourceRoot":"","sources":["zoeStorageManager.js"],"names":[],"mappings":"AA0EO,oDAXI,YAAY,qBAEZ,iBAAiB,kBACjB,mBAAmB,WACnB;IACL,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,KAAK,CAAC;CAC3B,cACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;kBAHZ,CAAC;qBACD,CAAF;oBAA0B,CAAC;;;;;;;GAgb9B;kCA9c8B,qBAAqB;uCAChB,qBAAqB;yCACnB,sBAAsB;qCAC1B,qBAAqB;4BAI9B,cAAc;2BACf,cAAc;6BAVZ,kBAAkB;mDAOI,qBAAqB"}
|
|
@@ -368,61 +368,64 @@ export const makeZoeStorageManager = (
|
|
|
368
368
|
);
|
|
369
369
|
const makeInstanceRecord = makeInstanceRecordStorage(zoeBaggage);
|
|
370
370
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
371
|
+
const makeZoeInstanceStorageManager =
|
|
372
|
+
/** @type {MakeZoeInstanceStorageManager} */ (
|
|
373
|
+
async (
|
|
374
|
+
installation,
|
|
375
|
+
customTerms,
|
|
376
|
+
uncleanIssuerKeywordRecord,
|
|
377
|
+
instance,
|
|
378
|
+
contractBundleCap,
|
|
379
|
+
instanceLabel,
|
|
380
|
+
) => {
|
|
381
|
+
// Clean the issuerKeywordRecord we receive in `startInstance`
|
|
382
|
+
// from the user, and save the issuers in Zoe if they are not
|
|
383
|
+
// already stored there
|
|
384
|
+
const { issuers, brands } =
|
|
385
|
+
await issuerStorage.storeIssuerKeywordRecord(
|
|
386
|
+
uncleanIssuerKeywordRecord,
|
|
387
|
+
);
|
|
386
388
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
389
|
+
// Create purses for the issuers if they do not already exist
|
|
390
|
+
await Promise.all(
|
|
391
|
+
Object.entries(issuers).map(([keyword, issuer]) =>
|
|
392
|
+
escrowStorage.createPurse(issuer, brands[keyword]),
|
|
393
|
+
),
|
|
394
|
+
);
|
|
393
395
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
396
|
+
// The instanceRecord is what the contract code is parameterized
|
|
397
|
+
// with: the particular terms, issuers, and brands used in a
|
|
398
|
+
// contract instance based on the installation. A user can query
|
|
399
|
+
// Zoe to find out the installation, terms, issuers, and brands
|
|
400
|
+
// for a contract instance. Contract code has similar query
|
|
401
|
+
// capabilities from the ZCF side.
|
|
400
402
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
403
|
+
const instanceRecord = makeInstanceRecord(
|
|
404
|
+
harden({
|
|
405
|
+
installation,
|
|
406
|
+
instance,
|
|
407
|
+
terms: {
|
|
408
|
+
...customTerms,
|
|
409
|
+
issuers,
|
|
410
|
+
brands,
|
|
411
|
+
},
|
|
412
|
+
}),
|
|
413
|
+
);
|
|
412
414
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
415
|
+
const bundleLabel = installation.getBundleLabel();
|
|
416
|
+
const contractLabel = instanceLabel
|
|
417
|
+
? `${bundleLabel}-${instanceLabel}`
|
|
418
|
+
: bundleLabel;
|
|
417
419
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
const { root, adminNode } = await createZCFVat(
|
|
421
|
+
contractBundleCap,
|
|
422
|
+
contractLabel,
|
|
423
|
+
);
|
|
424
|
+
// @ts-expect-error checked cast
|
|
425
|
+
return makeInstanceStorageManager(instanceRecord, adminNode, root)
|
|
426
|
+
.instanceStorageManager;
|
|
427
|
+
}
|
|
421
428
|
);
|
|
422
|
-
// @ts-expect-error checked cast
|
|
423
|
-
return makeInstanceStorageManager(instanceRecord, adminNode, root)
|
|
424
|
-
.instanceStorageManager;
|
|
425
|
-
};
|
|
426
429
|
|
|
427
430
|
const getInvitationIssuer = () => invitationIssuer;
|
|
428
431
|
|
package/tools/fakeVatAdmin.d.ts
CHANGED
|
@@ -5,14 +5,12 @@ declare const fakeVatAdmin: {
|
|
|
5
5
|
waitForBundleCap: (bundleID: any) => Promise<any>;
|
|
6
6
|
getNamedBundleCap: (name: any) => Promise<any>;
|
|
7
7
|
getBundleIDByName: (name: any) => Promise<string>;
|
|
8
|
-
/** @type {(bundleCap: BundleCap, options?: Partial<DynamicVatOptions>) => Promise<CreateVatResults>} */
|
|
9
8
|
createVat: (bundleCap: BundleCap, options?: Partial<DynamicVatOptions>) => Promise<CreateVatResults>;
|
|
10
9
|
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
11
10
|
getBundleCap: (bundleID: any) => Promise<any>;
|
|
12
11
|
waitForBundleCap: (bundleID: any) => Promise<any>;
|
|
13
12
|
getNamedBundleCap: (name: any) => Promise<any>;
|
|
14
13
|
getBundleIDByName: (name: any) => Promise<string>;
|
|
15
|
-
/** @type {(bundleCap: BundleCap, options?: Partial<DynamicVatOptions>) => Promise<CreateVatResults>} */
|
|
16
14
|
createVat: (bundleCap: BundleCap, options?: Partial<DynamicVatOptions>) => Promise<CreateVatResults>;
|
|
17
15
|
}>;
|
|
18
16
|
/**
|
|
@@ -25,14 +23,12 @@ export function makeFakeVatAdmin(testContextSetter?: (...args: any) => unknown,
|
|
|
25
23
|
waitForBundleCap: (bundleID: any) => Promise<any>;
|
|
26
24
|
getNamedBundleCap: (name: any) => Promise<any>;
|
|
27
25
|
getBundleIDByName: (name: any) => Promise<string>;
|
|
28
|
-
/** @type {(bundleCap: BundleCap, options?: Partial<DynamicVatOptions>) => Promise<CreateVatResults>} */
|
|
29
26
|
createVat: (bundleCap: BundleCap, options?: Partial<DynamicVatOptions>) => Promise<CreateVatResults>;
|
|
30
27
|
} & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
31
28
|
getBundleCap: (bundleID: any) => Promise<any>;
|
|
32
29
|
waitForBundleCap: (bundleID: any) => Promise<any>;
|
|
33
30
|
getNamedBundleCap: (name: any) => Promise<any>;
|
|
34
31
|
getBundleIDByName: (name: any) => Promise<string>;
|
|
35
|
-
/** @type {(bundleCap: BundleCap, options?: Partial<DynamicVatOptions>) => Promise<CreateVatResults>} */
|
|
36
32
|
createVat: (bundleCap: BundleCap, options?: Partial<DynamicVatOptions>) => Promise<CreateVatResults>;
|
|
37
33
|
}>;
|
|
38
34
|
vatAdminState: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fakeVatAdmin.d.ts","sourceRoot":"","sources":["fakeVatAdmin.js"],"names":[],"mappings":"AAuBA,+BAA4C;;
|
|
1
|
+
{"version":3,"file":"fakeVatAdmin.d.ts","sourceRoot":"","sources":["fakeVatAdmin.js"],"names":[],"mappings":"AAuBA,+BAA4C;;AAsM5C;;;;;eA3IiB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,gBAAgB,CAAC;;;;;;eAAzF,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,gBAAgB,CAAC;GA2I5D;AApM9C;;;GAGG;AACH,qDAHW,CAAC,GAAG,IAAI,KAAA,KAAK,OAAO,eACpB,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO;;;;;;mBAuDjB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,gBAAgB,CAAC;;;;;;mBAAzF,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,gBAAgB,CAAC;;;;;;QAoEtG;;;WAGG;4BAFQ,MAAM,UACN,mBAAmB,GAAG,UAAU;QAW3C;;;WAGG;+BAFQ,MAAM,UACN,mBAAmB,GAAG,UAAU;;QAa3C;;;WAGG;4BAFQ,MAAM,UACN,mBAAmB,GAAG,UAAU;;;;;;kCA/IkB,MAAM;;;;;EAiLtE;+BAxMsE,sBAAsB;uCACzD,sBAAsB;sCACvB,sBAAsB;yCAFc,sBAAsB;gCAAtB,sBAAsB"}
|
package/tools/fakeVatAdmin.js
CHANGED
|
@@ -79,56 +79,62 @@ function makeFakeVatAdmin(testContextSetter = undefined, makeRemote = x => x) {
|
|
|
79
79
|
getBundleIDByName: name => {
|
|
80
80
|
return Promise.resolve().then(() => nameToBundleID.get(name));
|
|
81
81
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
exitVat,
|
|
102
|
-
});
|
|
103
|
-
const vatBaggage = makeScalarBigMapStore('fake vat baggage', {
|
|
104
|
-
durable: true,
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
// XXX Notice that this call isn't wrapping vatParams. We (BW, CH) tried
|
|
108
|
-
// doing this, but backed out when it got complex.
|
|
109
|
-
//
|
|
110
|
-
// const ns = await evalContractBundle(zcfBundle);
|
|
111
|
-
// const ns2 = makeRemote(
|
|
112
|
-
// Far('wrappedRoot', {
|
|
113
|
-
// buildRootObject: vp => ns.buildRootObject(vpow, vp, vatBaggage),
|
|
114
|
-
// }),
|
|
115
|
-
// );
|
|
116
|
-
const rootP = makeRemote(
|
|
117
|
-
buildTestRootObject(vpow, vatParameters, vatBaggage),
|
|
118
|
-
);
|
|
119
|
-
return E.when(rootP, root =>
|
|
120
|
-
harden({
|
|
121
|
-
root,
|
|
122
|
-
adminNode: Far('adminNode', {
|
|
123
|
-
done: () => {
|
|
124
|
-
return exitKit.promise;
|
|
82
|
+
createVat:
|
|
83
|
+
/** @type {(bundleCap: BundleCap, options?: Partial<DynamicVatOptions>) => Promise<CreateVatResults>} */ (
|
|
84
|
+
(bundleCap, { vatParameters = {} } = {}) => {
|
|
85
|
+
bundleCap === zcfBundleCap || Fail`fakeVatAdmin only knows ZCF`;
|
|
86
|
+
const testJigKit = reservedTestJigs.shift() || makePromiseKit();
|
|
87
|
+
handlePKitWarning(testJigKit);
|
|
88
|
+
const exitKit = makePromiseKit();
|
|
89
|
+
handlePKitWarning(exitKit);
|
|
90
|
+
const exitVat = completion => {
|
|
91
|
+
exitMessage = completion;
|
|
92
|
+
hasExited = true;
|
|
93
|
+
exitWithFailure = false;
|
|
94
|
+
exitKit.resolve(completion);
|
|
95
|
+
};
|
|
96
|
+
const vpow = harden({
|
|
97
|
+
...fakeVatPowers,
|
|
98
|
+
testJigSetter: jig => {
|
|
99
|
+
testContextSetter?.(jig);
|
|
100
|
+
testJigKit.resolve(jig);
|
|
125
101
|
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
102
|
+
exitVat,
|
|
103
|
+
});
|
|
104
|
+
const vatBaggage = makeScalarBigMapStore('fake vat baggage', {
|
|
105
|
+
durable: true,
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// XXX Notice that this call isn't wrapping vatParams. We (BW, CH) tried
|
|
109
|
+
// doing this, but backed out when it got complex.
|
|
110
|
+
//
|
|
111
|
+
// const ns = await evalContractBundle(zcfBundle);
|
|
112
|
+
// const ns2 = makeRemote(
|
|
113
|
+
// Far('wrappedRoot', {
|
|
114
|
+
// buildRootObject: vp => ns.buildRootObject(vpow, vp, vatBaggage),
|
|
115
|
+
// }),
|
|
116
|
+
// );
|
|
117
|
+
const rootP = makeRemote(
|
|
118
|
+
buildTestRootObject(
|
|
119
|
+
vpow,
|
|
120
|
+
/** @type {any} */ (vatParameters),
|
|
121
|
+
vatBaggage,
|
|
122
|
+
),
|
|
123
|
+
);
|
|
124
|
+
return E.when(rootP, root =>
|
|
125
|
+
harden({
|
|
126
|
+
root,
|
|
127
|
+
adminNode: Far('adminNode', {
|
|
128
|
+
done: () => {
|
|
129
|
+
return exitKit.promise;
|
|
130
|
+
},
|
|
131
|
+
terminateWithFailure: () => {},
|
|
132
|
+
upgrade: (_bundleCap, _options) => Fail`upgrade not faked`,
|
|
133
|
+
}),
|
|
134
|
+
}),
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
),
|
|
132
138
|
});
|
|
133
139
|
const criticalVatKey = harden({});
|
|
134
140
|
const vatPowers = harden({
|
package/tools/setup-zoe.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export function setUpZoeForTest<T extends unknown = any>({ setJig, feeIssuerConf
|
|
|
15
15
|
}): Promise<{
|
|
16
16
|
zoe: import("@endo/exo").Guarded<import("../src/types-index.js").ZoeService>;
|
|
17
17
|
feeMintAccessP: import("../src/types-index.js").FeeMintAccess;
|
|
18
|
-
bundleAndInstall: (pathOrExports: object, bundleId?: string) => Promise<Installation>;
|
|
18
|
+
bundleAndInstall: (pathOrExports: string | object, bundleId?: string) => Promise<Installation>;
|
|
19
19
|
vatAdminSvc: VatAdminSvc;
|
|
20
20
|
vatAdminState: {
|
|
21
21
|
getExitMessage: () => any;
|
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":"AAqBO,gDAFI,WAAW;;;;;;;EAOrB;AAKM,6CAFI,WAAW,2EAGqB;AAapC,gCAPgB,CAAC,mFAErB;IAAmC,MAAM,UAA3B,CAAC,KAAK,IAAI;IACU,eAAe;IACnB,WAAW;IACf,aAAa;CAAC;;;sCA6D9B,MAAM,
|
|
1
|
+
{"version":3,"file":"setup-zoe.d.ts","sourceRoot":"","sources":["setup-zoe.js"],"names":[],"mappings":"AAqBO,gDAFI,WAAW;;;;;;;EAOrB;AAKM,6CAFI,WAAW,2EAGqB;AAapC,gCAPgB,CAAC,mFAErB;IAAmC,MAAM,UAA3B,CAAC,KAAK,IAAI;IACU,eAAe;IACnB,WAAW;IACf,aAAa;CAAC;;;sCA6D9B,MAAM,GAAG,MAAM,aACf,MAAM,KACJ,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;GAoBnC;iCArH8D,sBAAsB;qCACrC,uBAAuB;kCAAvB,uBAAuB;yCADR,sBAAsB;gCAAtB,sBAAsB"}
|
package/tools/setup-zoe.js
CHANGED
|
@@ -68,7 +68,7 @@ export const setUpZoeForTest = async ({
|
|
|
68
68
|
);
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
-
* @param {object} pathOrExports
|
|
71
|
+
* @param {string | object} pathOrExports
|
|
72
72
|
* @returns {Promise<EndoZipBase64Bundle | TestBundle>}
|
|
73
73
|
*/
|
|
74
74
|
const bundleModule = async pathOrExports => {
|
|
@@ -102,7 +102,7 @@ export const setUpZoeForTest = async ({
|
|
|
102
102
|
* and return an Installation. The bundleID is random and should not be relied
|
|
103
103
|
* upon in tests of this variety.
|
|
104
104
|
*
|
|
105
|
-
* @param {object} pathOrExports
|
|
105
|
+
* @param {string | object} pathOrExports
|
|
106
106
|
* @param {string} [bundleId]
|
|
107
107
|
* @returns {Promise<Installation>}
|
|
108
108
|
*/
|