@agoric/vat-data 0.5.3-dev-1eed398.0 → 0.5.3-dev-1289bc4.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 +6 -6
- package/src/exo-utils.js +15 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/vat-data",
|
|
3
|
-
"version": "0.5.3-dev-
|
|
3
|
+
"version": "0.5.3-dev-1289bc4.0+1289bc4",
|
|
4
4
|
"description": "Safe access to VatData global",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/Agoric/agoric-sdk",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"author": "Agoric",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@agoric/assert": "0.6.1-dev-
|
|
23
|
-
"@agoric/internal": "0.3.3-dev-
|
|
24
|
-
"@agoric/store": "0.9.3-dev-
|
|
25
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
22
|
+
"@agoric/assert": "0.6.1-dev-1289bc4.0+1289bc4",
|
|
23
|
+
"@agoric/internal": "0.3.3-dev-1289bc4.0+1289bc4",
|
|
24
|
+
"@agoric/store": "0.9.3-dev-1289bc4.0+1289bc4",
|
|
25
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-1289bc4.0+1289bc4"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@endo/init": "^0.5.57",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=14.15.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "1289bc442ba74598fe765ab151031dda13327ec0"
|
|
44
44
|
}
|
package/src/exo-utils.js
CHANGED
|
@@ -4,6 +4,11 @@ import { initEmpty } from '@agoric/store';
|
|
|
4
4
|
|
|
5
5
|
import { provide, VatData as globalVatData } from './vat-data-bindings.js';
|
|
6
6
|
|
|
7
|
+
/** @typedef {import('@endo/patterns').MethodGuard} MethodGuard */
|
|
8
|
+
/**
|
|
9
|
+
* @template {Record<string | symbol, MethodGuard>} [T=Record<string | symbol, MethodGuard>]
|
|
10
|
+
* @typedef {import('@endo/patterns').InterfaceGuard<T>} InterfaceGuard
|
|
11
|
+
*/
|
|
7
12
|
/** @template L,R @typedef {import('@endo/eventual-send').RemotableBrand<L, R>} RemotableBrand */
|
|
8
13
|
/** @template T @typedef {import('@endo/far').ERef<T>} ERef */
|
|
9
14
|
/** @typedef {import('@agoric/swingset-liveslots').Baggage} Baggage */
|
|
@@ -11,6 +16,7 @@ import { provide, VatData as globalVatData } from './vat-data-bindings.js';
|
|
|
11
16
|
/** @template T @typedef {import('@agoric/swingset-liveslots').KindFacet<T>} KindFacet */
|
|
12
17
|
/** @template T @typedef {import('@agoric/swingset-liveslots').KindFacets<T>} KindFacets */
|
|
13
18
|
/** @typedef {import('@agoric/swingset-liveslots').DurableKindHandle} DurableKindHandle */
|
|
19
|
+
/** @typedef {import('@agoric/swingset-liveslots').InterfaceGuardKit} InterfaceGuardKit */
|
|
14
20
|
|
|
15
21
|
/**
|
|
16
22
|
* Make a version of the argument function that takes a kind context but
|
|
@@ -81,12 +87,11 @@ export const makeExoUtils = VatData => {
|
|
|
81
87
|
);
|
|
82
88
|
harden(prepareKindMulti);
|
|
83
89
|
|
|
84
|
-
// TODO interfaceGuard type https://github.com/Agoric/agoric-sdk/issues/6206
|
|
85
90
|
/**
|
|
86
91
|
* @template {(...args: any) => any} I init state function
|
|
87
92
|
* @template T behavior
|
|
88
93
|
* @param {string} tag
|
|
89
|
-
* @param {
|
|
94
|
+
* @param {InterfaceGuard | undefined} interfaceGuard
|
|
90
95
|
* @param {I} init
|
|
91
96
|
* @param {T & ThisType<{
|
|
92
97
|
* self: T,
|
|
@@ -106,12 +111,11 @@ export const makeExoUtils = VatData => {
|
|
|
106
111
|
});
|
|
107
112
|
harden(defineVirtualExoClass);
|
|
108
113
|
|
|
109
|
-
// TODO interfaceGuard type https://github.com/Agoric/agoric-sdk/issues/6206
|
|
110
114
|
/**
|
|
111
115
|
* @template {(...args: any) => any} I init state function
|
|
112
116
|
* @template {Record<string, Record<string | symbol, CallableFunction>>} T facets
|
|
113
117
|
* @param {string} tag
|
|
114
|
-
* @param {
|
|
118
|
+
* @param {InterfaceGuardKit | undefined} interfaceGuardKit
|
|
115
119
|
* @param {I} init
|
|
116
120
|
* @param {T & ThisType<{
|
|
117
121
|
* facets: T,
|
|
@@ -133,16 +137,15 @@ export const makeExoUtils = VatData => {
|
|
|
133
137
|
defineKindMulti(tag, init, facets, {
|
|
134
138
|
...options,
|
|
135
139
|
thisfulMethods: true,
|
|
136
|
-
|
|
140
|
+
interfaceGuardKit,
|
|
137
141
|
});
|
|
138
142
|
harden(defineVirtualExoClassKit);
|
|
139
143
|
|
|
140
|
-
// TODO interfaceGuard type https://github.com/Agoric/agoric-sdk/issues/6206
|
|
141
144
|
/**
|
|
142
145
|
* @template {(...args: any) => any} I init state function
|
|
143
146
|
* @template {Record<string | symbol, CallableFunction>} T methods
|
|
144
147
|
* @param {DurableKindHandle} kindHandle
|
|
145
|
-
* @param {
|
|
148
|
+
* @param {InterfaceGuard | undefined} interfaceGuard
|
|
146
149
|
* @param {I} init
|
|
147
150
|
* @param {T & ThisType<{
|
|
148
151
|
* self: T,
|
|
@@ -168,12 +171,11 @@ export const makeExoUtils = VatData => {
|
|
|
168
171
|
});
|
|
169
172
|
harden(defineDurableExoClass);
|
|
170
173
|
|
|
171
|
-
// TODO interfaceGuard type https://github.com/Agoric/agoric-sdk/issues/6206
|
|
172
174
|
/**
|
|
173
175
|
* @template {(...args: any) => any} I init state function
|
|
174
176
|
* @template {Record<string, Record<string | symbol, CallableFunction>>} T facets
|
|
175
177
|
* @param {DurableKindHandle} kindHandle
|
|
176
|
-
* @param {
|
|
178
|
+
* @param {InterfaceGuardKit | undefined} interfaceGuardKit
|
|
177
179
|
* @param {I} init
|
|
178
180
|
* @param {T & ThisType<{
|
|
179
181
|
* facets: T,
|
|
@@ -195,17 +197,16 @@ export const makeExoUtils = VatData => {
|
|
|
195
197
|
defineDurableKindMulti(kindHandle, init, facets, {
|
|
196
198
|
...options,
|
|
197
199
|
thisfulMethods: true,
|
|
198
|
-
|
|
200
|
+
interfaceGuardKit,
|
|
199
201
|
});
|
|
200
202
|
harden(defineDurableExoClassKit);
|
|
201
203
|
|
|
202
|
-
// TODO interfaceGuard type https://github.com/Agoric/agoric-sdk/issues/6206
|
|
203
204
|
/**
|
|
204
205
|
* @template {(...args: any) => any} I init state function
|
|
205
206
|
* @template {Record<string | symbol, CallableFunction>} T methods
|
|
206
207
|
* @param {Baggage} baggage
|
|
207
208
|
* @param {string} kindName
|
|
208
|
-
* @param {
|
|
209
|
+
* @param {InterfaceGuard | undefined} interfaceGuard
|
|
209
210
|
* @param {I} init
|
|
210
211
|
* @param {T & ThisType<{
|
|
211
212
|
* self: T,
|
|
@@ -234,13 +235,12 @@ export const makeExoUtils = VatData => {
|
|
|
234
235
|
);
|
|
235
236
|
harden(prepareExoClass);
|
|
236
237
|
|
|
237
|
-
// TODO interfaceGuard type https://github.com/Agoric/agoric-sdk/issues/6206
|
|
238
238
|
/**
|
|
239
239
|
* @template {(...args: any) => any} I init state function
|
|
240
240
|
* @template {Record<string, Record<string | symbol, CallableFunction>>} T facets
|
|
241
241
|
* @param {Baggage} baggage
|
|
242
242
|
* @param {string} kindName
|
|
243
|
-
* @param {
|
|
243
|
+
* @param {InterfaceGuardKit | undefined} interfaceGuardKit
|
|
244
244
|
* @param {I} init
|
|
245
245
|
* @param {T & ThisType<{
|
|
246
246
|
* facets: T,
|
|
@@ -269,12 +269,11 @@ export const makeExoUtils = VatData => {
|
|
|
269
269
|
);
|
|
270
270
|
harden(prepareExoClassKit);
|
|
271
271
|
|
|
272
|
-
// TODO interfaceGuard type https://github.com/Agoric/agoric-sdk/issues/6206
|
|
273
272
|
/**
|
|
274
273
|
* @template {Record<string | symbol, CallableFunction>} M methods
|
|
275
274
|
* @param {Baggage} baggage
|
|
276
275
|
* @param {string} kindName
|
|
277
|
-
* @param {
|
|
276
|
+
* @param {InterfaceGuard | undefined} interfaceGuard
|
|
278
277
|
* @param {M} methods
|
|
279
278
|
* @param {DefineKindOptions<{ self: M }>} [options]
|
|
280
279
|
* @returns {M & RemotableBrand<{}, M>}
|