@agoric/zoe 0.26.3-dev-0b6d5f3.0 → 0.26.3-dev-3915e4c.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 +198 -198
- package/package.json +14 -14
- package/src/contractSupport/recorder.d.ts +12 -15
- package/src/contractSupport/recorder.d.ts.map +1 -1
- package/src/contractSupport/recorder.js +7 -10
- package/src/contractSupport/topics.d.ts +22 -0
- package/src/contractSupport/topics.d.ts.map +1 -1
- package/src/contractSupport/topics.js +14 -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-3915e4c.0+3915e4c",
|
|
4
4
|
"description": "Zoe: the Smart Contract Framework for Offer Enforcement",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/zoeService/zoe.js",
|
|
@@ -43,17 +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/vow": "0.1.1-dev-
|
|
56
|
-
"@agoric/zone": "0.2.3-dev-
|
|
46
|
+
"@agoric/base-zone": "0.1.1-dev-3915e4c.0+3915e4c",
|
|
47
|
+
"@agoric/ertp": "0.16.3-dev-3915e4c.0+3915e4c",
|
|
48
|
+
"@agoric/internal": "0.3.3-dev-3915e4c.0+3915e4c",
|
|
49
|
+
"@agoric/notifier": "0.6.3-dev-3915e4c.0+3915e4c",
|
|
50
|
+
"@agoric/store": "0.9.3-dev-3915e4c.0+3915e4c",
|
|
51
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-3915e4c.0+3915e4c",
|
|
52
|
+
"@agoric/swingset-vat": "0.32.3-dev-3915e4c.0+3915e4c",
|
|
53
|
+
"@agoric/time": "0.3.3-dev-3915e4c.0+3915e4c",
|
|
54
|
+
"@agoric/vat-data": "0.5.3-dev-3915e4c.0+3915e4c",
|
|
55
|
+
"@agoric/vow": "0.1.1-dev-3915e4c.0+3915e4c",
|
|
56
|
+
"@agoric/zone": "0.2.3-dev-3915e4c.0+3915e4c",
|
|
57
57
|
"@endo/bundle-source": "^3.2.3",
|
|
58
58
|
"@endo/captp": "^4.2.0",
|
|
59
59
|
"@endo/common": "^1.2.2",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"yargs-parser": "^21.1.1"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@agoric/kmarshal": "0.1.1-dev-
|
|
73
|
+
"@agoric/kmarshal": "0.1.1-dev-3915e4c.0+3915e4c",
|
|
74
74
|
"@endo/init": "^1.1.2",
|
|
75
75
|
"ava": "^5.3.0",
|
|
76
76
|
"c8": "^9.1.0",
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"typeCoverage": {
|
|
144
144
|
"atLeast": 84.92
|
|
145
145
|
},
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "3915e4cfaf6b3a86d0f5d5e69a57ca5166e2d721"
|
|
147
147
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function prepareRecorder(baggage: import("@agoric/vat-data").Baggage, marshaller: ERef<Marshaller>): (publisher: globalThis.Publisher<unknown>, storageNode: import("@endo/eventual-send").DataOnly<globalThis.StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<globalThis.StorageNode>, globalThis.StorageNode>, valueShape?:
|
|
1
|
+
export function prepareRecorder(baggage: import("@agoric/vat-data").Baggage, marshaller: ERef<Marshaller>): (publisher: globalThis.Publisher<unknown>, storageNode: import("@endo/eventual-send").DataOnly<globalThis.StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<globalThis.StorageNode>, globalThis.StorageNode>, valueShape?: TypedPattern<unknown> | undefined) => import("@endo/exo").Guarded<{
|
|
2
2
|
getStorageNode(): import("@endo/eventual-send").DataOnly<globalThis.StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<globalThis.StorageNode>, globalThis.StorageNode>;
|
|
3
3
|
/**
|
|
4
4
|
* Memoizes the remote call to the storage node
|
|
@@ -24,12 +24,12 @@ export function prepareRecorder(baggage: import("@agoric/vat-data").Baggage, mar
|
|
|
24
24
|
export function defineRecorderKit({ makeRecorder, makeDurablePublishKit }: {
|
|
25
25
|
makeRecorder: MakeRecorder;
|
|
26
26
|
makeDurablePublishKit: ReturnType<typeof prepareDurablePublishKit>;
|
|
27
|
-
}): <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?:
|
|
27
|
+
}): <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: TypedPattern<T> | undefined) => RecorderKit<T>;
|
|
28
28
|
export function defineERecorderKit({ makeRecorder, makeDurablePublishKit }: {
|
|
29
29
|
makeRecorder: MakeRecorder;
|
|
30
30
|
makeDurablePublishKit: ReturnType<typeof prepareDurablePublishKit>;
|
|
31
|
-
}): <T>(storageNodeP: ERef<StorageNode>, valueShape?:
|
|
32
|
-
export function prepareRecorderKit(baggage: import("@agoric/vat-data").Baggage, marshaller: ERef<Marshaller>): <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?:
|
|
31
|
+
}): <T>(storageNodeP: ERef<StorageNode>, valueShape?: TypedPattern<T> | undefined) => EventualRecorderKit<T>;
|
|
32
|
+
export function prepareRecorderKit(baggage: import("@agoric/vat-data").Baggage, marshaller: ERef<Marshaller>): <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: TypedPattern<T> | undefined) => RecorderKit<T>;
|
|
33
33
|
export function prepareRecorderKitMakers(baggage: import("@agoric/vat-data").Baggage, marshaller: ERef<Marshaller>): {
|
|
34
34
|
makeDurablePublishKit: (options?: {
|
|
35
35
|
valueDurability?: "mandatory" | undefined;
|
|
@@ -44,7 +44,7 @@ export function prepareRecorderKitMakers(baggage: import("@agoric/vat-data").Bag
|
|
|
44
44
|
getUpdateSince(updateCount: any): any;
|
|
45
45
|
};
|
|
46
46
|
}>;
|
|
47
|
-
makeRecorder: (publisher: globalThis.Publisher<unknown>, storageNode: import("@endo/eventual-send").DataOnly<globalThis.StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<globalThis.StorageNode>, globalThis.StorageNode>, valueShape?:
|
|
47
|
+
makeRecorder: (publisher: globalThis.Publisher<unknown>, storageNode: import("@endo/eventual-send").DataOnly<globalThis.StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<globalThis.StorageNode>, globalThis.StorageNode>, valueShape?: TypedPattern<unknown> | undefined) => import("@endo/exo").Guarded<{
|
|
48
48
|
getStorageNode(): import("@endo/eventual-send").DataOnly<globalThis.StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<globalThis.StorageNode>, globalThis.StorageNode>;
|
|
49
49
|
/**
|
|
50
50
|
* Memoizes the remote call to the storage node
|
|
@@ -67,8 +67,8 @@ export function prepareRecorderKitMakers(baggage: import("@agoric/vat-data").Bag
|
|
|
67
67
|
*/
|
|
68
68
|
writeFinal(value: any): Promise<void>;
|
|
69
69
|
}>;
|
|
70
|
-
makeRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?:
|
|
71
|
-
makeERecorderKit: <T>(storageNodeP: ERef<StorageNode>, valueShape?:
|
|
70
|
+
makeRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: TypedPattern<T> | undefined) => RecorderKit<T>;
|
|
71
|
+
makeERecorderKit: <T>(storageNodeP: ERef<StorageNode>, valueShape?: TypedPattern<T> | undefined) => EventualRecorderKit<T>;
|
|
72
72
|
};
|
|
73
73
|
export function prepareMockRecorderKitMakers(): {
|
|
74
74
|
storageNode: globalThis.StorageNode & {
|
|
@@ -87,7 +87,7 @@ export function prepareMockRecorderKitMakers(): {
|
|
|
87
87
|
getUpdateSince(updateCount: any): any;
|
|
88
88
|
};
|
|
89
89
|
}>;
|
|
90
|
-
makeRecorder: (publisher: globalThis.Publisher<unknown>, storageNode: import("@endo/eventual-send").DataOnly<globalThis.StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<globalThis.StorageNode>, globalThis.StorageNode>, valueShape?:
|
|
90
|
+
makeRecorder: (publisher: globalThis.Publisher<unknown>, storageNode: import("@endo/eventual-send").DataOnly<globalThis.StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<globalThis.StorageNode>, globalThis.StorageNode>, valueShape?: TypedPattern<unknown> | undefined) => import("@endo/exo").Guarded<{
|
|
91
91
|
getStorageNode(): import("@endo/eventual-send").DataOnly<globalThis.StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<globalThis.StorageNode>, globalThis.StorageNode>;
|
|
92
92
|
/**
|
|
93
93
|
* Memoizes the remote call to the storage node
|
|
@@ -110,8 +110,8 @@ export function prepareMockRecorderKitMakers(): {
|
|
|
110
110
|
*/
|
|
111
111
|
writeFinal(value: any): Promise<void>;
|
|
112
112
|
}>;
|
|
113
|
-
makeRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?:
|
|
114
|
-
makeERecorderKit: <T>(storageNodeP: ERef<StorageNode>, valueShape?:
|
|
113
|
+
makeRecorderKit: <T>(storageNode: StorageNode | Awaited<import("@endo/far").FarRef<StorageNode>>, valueShape?: TypedPattern<T> | undefined) => RecorderKit<T>;
|
|
114
|
+
makeERecorderKit: <T>(storageNodeP: ERef<StorageNode>, valueShape?: TypedPattern<T> | undefined) => EventualRecorderKit<T>;
|
|
115
115
|
};
|
|
116
116
|
export type Recorder<T> = {
|
|
117
117
|
getStorageNode(): Awaited<import("@endo/far").FarRef<StorageNode>>;
|
|
@@ -131,13 +131,10 @@ export type MakeERecorderKit = ReturnType<typeof defineERecorderKit>;
|
|
|
131
131
|
/**
|
|
132
132
|
* Stop-gap until https://github.com/Agoric/agoric-sdk/issues/6160
|
|
133
133
|
* explictly specify the type that the Pattern will verify through a match.
|
|
134
|
-
*
|
|
135
|
-
* This is a Pattern but since that's `any`, including in the typedef turns the
|
|
136
|
-
* whole thing to `any`.
|
|
137
134
|
*/
|
|
138
|
-
export type
|
|
135
|
+
export type TypedPattern<T> = import("@endo/patterns").Pattern & {
|
|
139
136
|
validatedType?: T;
|
|
140
137
|
};
|
|
141
|
-
export type MatchedType<TM extends
|
|
138
|
+
export type MatchedType<TM extends TypedPattern<any>> = TM extends TypedPattern<infer T> ? T : never;
|
|
142
139
|
import { prepareDurablePublishKit } from '@agoric/notifier';
|
|
143
140
|
//# sourceMappingURL=recorder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["recorder.js"],"names":[],"mappings":"AA4CO,yCAHI,OAAO,kBAAkB,EAAE,OAAO,cAClC,IAAI,CAAC,UAAU,CAAC,4TA2IpB,WAAW;;IAxGZ;;;;OAIG;sBADU,OAAO,CAAC,MAAM,CAAC;IAa5B;;;;;OAKG;iBAFQ,GAAG,GACD,OAAO,CAAC,IAAI,CAAC;IAa1B;;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,CAAC;+BA+BpC,UAAU,CAAC,OAAO,kBAAkB,CAAC;;;;;yBAuEtC,CAAC,IACD,OAAO,gBAAgB,EAAE,OAAO,GAAG;IAAE,aAAa,CAAC,EAAE,CAAC,CAAA;CAAE;wBAIpC,EAAE,SAArB,YAAY,CAAC,GAAG,CAAE,IACnB,EAAE,SAAS,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK;yCA7QhB,kBAAkB"}
|
|
@@ -56,12 +56,12 @@ export const prepareRecorder = (baggage, marshaller) => {
|
|
|
56
56
|
* @template T
|
|
57
57
|
* @param {PublishKit<T>['publisher']} publisher
|
|
58
58
|
* @param {Awaited<import('@endo/far').FarRef<StorageNode>>} storageNode
|
|
59
|
-
* @param {
|
|
59
|
+
* @param {TypedPattern<T>} [valueShape]
|
|
60
60
|
*/
|
|
61
61
|
(
|
|
62
62
|
publisher,
|
|
63
63
|
storageNode,
|
|
64
|
-
valueShape = /** @type {
|
|
64
|
+
valueShape = /** @type {TypedPattern<any>} */ (M.any()),
|
|
65
65
|
) => {
|
|
66
66
|
return {
|
|
67
67
|
closed: false,
|
|
@@ -145,7 +145,7 @@ export const defineRecorderKit = ({ makeRecorder, makeDurablePublishKit }) => {
|
|
|
145
145
|
/**
|
|
146
146
|
* @template T
|
|
147
147
|
* @param {StorageNode | Awaited<import('@endo/far').FarRef<StorageNode>>} storageNode
|
|
148
|
-
* @param {
|
|
148
|
+
* @param {TypedPattern<T>} [valueShape]
|
|
149
149
|
* @returns {RecorderKit<T>}
|
|
150
150
|
*/
|
|
151
151
|
const makeRecorderKit = (storageNode, valueShape) => {
|
|
@@ -174,7 +174,7 @@ export const defineERecorderKit = ({ makeRecorder, makeDurablePublishKit }) => {
|
|
|
174
174
|
/**
|
|
175
175
|
* @template T
|
|
176
176
|
* @param {ERef<StorageNode>} storageNodeP
|
|
177
|
-
* @param {
|
|
177
|
+
* @param {TypedPattern<T>} [valueShape]
|
|
178
178
|
* @returns {EventualRecorderKit<T>}
|
|
179
179
|
*/
|
|
180
180
|
const makeERecorderKit = (storageNodeP, valueShape) => {
|
|
@@ -263,14 +263,11 @@ export const prepareMockRecorderKitMakers = () => {
|
|
|
263
263
|
* Stop-gap until https://github.com/Agoric/agoric-sdk/issues/6160
|
|
264
264
|
* explictly specify the type that the Pattern will verify through a match.
|
|
265
265
|
*
|
|
266
|
-
* This is a Pattern but since that's `any`, including in the typedef turns the
|
|
267
|
-
* whole thing to `any`.
|
|
268
|
-
*
|
|
269
266
|
* @template T
|
|
270
|
-
* @typedef {import('@endo/patterns').
|
|
267
|
+
* @typedef {import('@endo/patterns').Pattern & { validatedType?: T }} TypedPattern
|
|
271
268
|
*/
|
|
272
269
|
|
|
273
270
|
/**
|
|
274
|
-
* @template {
|
|
275
|
-
* @typedef {TM extends
|
|
271
|
+
* @template {TypedPattern<any>} TM
|
|
272
|
+
* @typedef {TM extends TypedPattern<infer T> ? T : never} MatchedType
|
|
276
273
|
*/
|
|
@@ -8,6 +8,18 @@ export const PublicTopicShape: import("@endo/patterns").Matcher;
|
|
|
8
8
|
* storagePath: ERef<string>,
|
|
9
9
|
* }} PublicTopic
|
|
10
10
|
*/
|
|
11
|
+
/**
|
|
12
|
+
* A {PublicTopic} in which the `storagePath` is always a resolved string.
|
|
13
|
+
*
|
|
14
|
+
* Useful when working with Vows and async-flow.
|
|
15
|
+
*
|
|
16
|
+
* @template {object} T topic value
|
|
17
|
+
* @typedef {{
|
|
18
|
+
* description?: string,
|
|
19
|
+
* subscriber: Subscriber<T>,
|
|
20
|
+
* storagePath: string,
|
|
21
|
+
* }} ResolvedPublicTopic
|
|
22
|
+
*/
|
|
11
23
|
export const TopicsRecordShape: import("@endo/patterns").Matcher;
|
|
12
24
|
export function makeRecorderTopic<T>(description: string, recorderKit: import("./recorder.js").RecorderKit<T> | import("./recorder.js").EventualRecorderKit<T>): PublicTopic<T>;
|
|
13
25
|
export type PublicTopic<T extends unknown> = {
|
|
@@ -15,6 +27,16 @@ export type PublicTopic<T extends unknown> = {
|
|
|
15
27
|
subscriber: Subscriber<T>;
|
|
16
28
|
storagePath: ERef<string>;
|
|
17
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* A {PublicTopic} in which the `storagePath` is always a resolved string.
|
|
32
|
+
*
|
|
33
|
+
* Useful when working with Vows and async-flow.
|
|
34
|
+
*/
|
|
35
|
+
export type ResolvedPublicTopic<T extends unknown> = {
|
|
36
|
+
description?: string;
|
|
37
|
+
subscriber: Subscriber<T>;
|
|
38
|
+
storagePath: string;
|
|
39
|
+
};
|
|
18
40
|
export type TopicsRecord = {
|
|
19
41
|
[topicName: string]: PublicTopic<unknown>;
|
|
20
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["topics.js"],"names":[],"mappings":";AAMA,gEAME;AAEF;;;;;;;GAOG;AAEH,iEAA0E;AAcnE,kCALM,CAAC,eACH,MAAM,eACN,OAAO,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC,GACrF,WAAW,CAAC,CAAC,CAAC,CAU1B;
|
|
1
|
+
{"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["topics.js"],"names":[],"mappings":";AAMA,gEAME;AAEF;;;;;;;GAOG;AAEH;;;;;;;;;;;GAWG;AAEH,iEAA0E;AAcnE,kCALM,CAAC,eACH,MAAM,eACN,OAAO,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC,GACrF,WAAW,CAAC,CAAC,CAAC,CAU1B;wBA3CqB,CAAC,oBACV;IACZ,WAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAc,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9B,WAAe,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;CAC3B;;;;;;gCAQkB,CAAC,oBACV;IACZ,WAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAc,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9B,WAAe,EAAE,MAAM,CAAC;CACrB;2BAMS;IACZ,CAAK,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CAC3C;gCAzC4B,kBAAkB"}
|
|
@@ -7,7 +7,7 @@ export { SubscriberShape };
|
|
|
7
7
|
export const PublicTopicShape = M.splitRecord(
|
|
8
8
|
{
|
|
9
9
|
subscriber: SubscriberShape,
|
|
10
|
-
storagePath: M.promise(/* string */),
|
|
10
|
+
storagePath: M.or(M.promise(/* string */), M.string()),
|
|
11
11
|
},
|
|
12
12
|
{ description: M.string() },
|
|
13
13
|
);
|
|
@@ -21,6 +21,19 @@ export const PublicTopicShape = M.splitRecord(
|
|
|
21
21
|
* }} PublicTopic
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* A {PublicTopic} in which the `storagePath` is always a resolved string.
|
|
26
|
+
*
|
|
27
|
+
* Useful when working with Vows and async-flow.
|
|
28
|
+
*
|
|
29
|
+
* @template {object} T topic value
|
|
30
|
+
* @typedef {{
|
|
31
|
+
* description?: string,
|
|
32
|
+
* subscriber: Subscriber<T>,
|
|
33
|
+
* storagePath: string,
|
|
34
|
+
* }} ResolvedPublicTopic
|
|
35
|
+
*/
|
|
36
|
+
|
|
24
37
|
export const TopicsRecordShape = M.recordOf(M.string(), PublicTopicShape);
|
|
25
38
|
|
|
26
39
|
/**
|