@agoric/vats 0.15.2-dev-ef466d3.0 → 0.15.2-dev-31ed402.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/vats",
3
- "version": "0.15.2-dev-ef466d3.0+ef466d3",
3
+ "version": "0.15.2-dev-31ed402.0+31ed402",
4
4
  "description": "Agoric's Vat library",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -22,18 +22,18 @@
22
22
  "author": "Agoric",
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@agoric/assert": "0.6.1-dev-ef466d3.0+ef466d3",
26
- "@agoric/ertp": "0.16.3-dev-ef466d3.0+ef466d3",
27
- "@agoric/governance": "0.10.4-dev-ef466d3.0+ef466d3",
28
- "@agoric/internal": "0.3.3-dev-ef466d3.0+ef466d3",
29
- "@agoric/network": "0.1.1-dev-ef466d3.0+ef466d3",
30
- "@agoric/notifier": "0.6.3-dev-ef466d3.0+ef466d3",
31
- "@agoric/store": "0.9.3-dev-ef466d3.0+ef466d3",
32
- "@agoric/swingset-vat": "0.32.3-dev-ef466d3.0+ef466d3",
33
- "@agoric/time": "0.3.3-dev-ef466d3.0+ef466d3",
34
- "@agoric/vat-data": "0.5.3-dev-ef466d3.0+ef466d3",
35
- "@agoric/zoe": "0.26.3-dev-ef466d3.0+ef466d3",
36
- "@agoric/zone": "0.2.3-dev-ef466d3.0+ef466d3",
25
+ "@agoric/assert": "0.6.1-dev-31ed402.0+31ed402",
26
+ "@agoric/ertp": "0.16.3-dev-31ed402.0+31ed402",
27
+ "@agoric/governance": "0.10.4-dev-31ed402.0+31ed402",
28
+ "@agoric/internal": "0.3.3-dev-31ed402.0+31ed402",
29
+ "@agoric/network": "0.1.1-dev-31ed402.0+31ed402",
30
+ "@agoric/notifier": "0.6.3-dev-31ed402.0+31ed402",
31
+ "@agoric/store": "0.9.3-dev-31ed402.0+31ed402",
32
+ "@agoric/swingset-vat": "0.32.3-dev-31ed402.0+31ed402",
33
+ "@agoric/time": "0.3.3-dev-31ed402.0+31ed402",
34
+ "@agoric/vat-data": "0.5.3-dev-31ed402.0+31ed402",
35
+ "@agoric/zoe": "0.26.3-dev-31ed402.0+31ed402",
36
+ "@agoric/zone": "0.2.3-dev-31ed402.0+31ed402",
37
37
  "@endo/far": "^0.2.21",
38
38
  "@endo/import-bundle": "^0.4.1",
39
39
  "@endo/marshal": "^0.8.8",
@@ -44,7 +44,7 @@
44
44
  "jessie.js": "^0.3.2"
45
45
  },
46
46
  "devDependencies": {
47
- "@agoric/swingset-liveslots": "0.10.3-dev-ef466d3.0+ef466d3",
47
+ "@agoric/swingset-liveslots": "0.10.3-dev-31ed402.0+31ed402",
48
48
  "@endo/bundle-source": "^2.7.0",
49
49
  "@endo/init": "^0.5.59",
50
50
  "ava": "^5.3.0",
@@ -75,5 +75,5 @@
75
75
  "timeout": "20m",
76
76
  "workerThreads": false
77
77
  },
78
- "gitHead": "ef466d33286661655a3e296ef02f94fc95cf48ea"
78
+ "gitHead": "31ed40207648bb76e2b37cb82dd068fb1837fdd8"
79
79
  }
@@ -9,52 +9,14 @@ export function buildRootObject(vatPowers: import("@agoric/swingset-vat").Termin
9
9
  consumeItem: (name: any) => Promise<unknown>;
10
10
  produceItem: (name: any, resolution: any) => void;
11
11
  resetItem: (name: any) => void;
12
- messageVat: ({ name, methodName, args }: {
13
- name: any;
14
- methodName: any;
15
- args?: any[] | undefined;
16
- }) => Promise<any>;
17
- messageVatObject: ({ presence, methodName, args }: {
18
- presence: any;
19
- methodName: any;
20
- args?: any[] | undefined;
21
- }) => Promise<any>;
22
- messageVatObjectSendOnly: ({ presence, methodName, args }: {
23
- presence: any;
24
- methodName: any;
25
- args?: any[] | undefined;
26
- }) => void;
27
- awaitVatObject: ({ presence, path, rawOutput }: {
28
- presence: any;
29
- path?: any[] | undefined;
30
- rawOutput?: boolean | undefined;
31
- }) => Promise<any>;
12
+ awaitVatObject: (presence: any, path?: any[]) => Promise<any>;
32
13
  snapshotStore: <K, V>(store: MapStore<K, V>) => [K, V][];
33
14
  } & import("@endo/eventual-send").RemotableBrand<{}, {
34
15
  bootstrap: (vats: SwingsetVats, devices: SoloDevices | ChainDevices) => Promise<void>;
35
16
  consumeItem: (name: any) => Promise<unknown>;
36
17
  produceItem: (name: any, resolution: any) => void;
37
18
  resetItem: (name: any) => void;
38
- messageVat: ({ name, methodName, args }: {
39
- name: any;
40
- methodName: any;
41
- args?: any[] | undefined;
42
- }) => Promise<any>;
43
- messageVatObject: ({ presence, methodName, args }: {
44
- presence: any;
45
- methodName: any;
46
- args?: any[] | undefined;
47
- }) => Promise<any>;
48
- messageVatObjectSendOnly: ({ presence, methodName, args }: {
49
- presence: any;
50
- methodName: any;
51
- args?: any[] | undefined;
52
- }) => void;
53
- awaitVatObject: ({ presence, path, rawOutput }: {
54
- presence: any;
55
- path?: any[] | undefined;
56
- rawOutput?: boolean | undefined;
57
- }) => Promise<any>;
19
+ awaitVatObject: (presence: any, path?: any[]) => Promise<any>;
58
20
  snapshotStore: <K, V>(store: MapStore<K, V>) => [K, V][];
59
21
  }>;
60
22
  //# sourceMappingURL=boot-chain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"boot-chain.d.ts","sourceRoot":"","sources":["boot-chain.js"],"names":[],"mappings":"AAqBA,iEAAiD;AAc1C;OARC,MAAM;0BACQ,IAAI;kBAEf;IACV,gBAAoB,CAAC,EAAE,MAAM,CAAC;CAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAeH"}
1
+ {"version":3,"file":"boot-chain.d.ts","sourceRoot":"","sources":["boot-chain.js"],"names":[],"mappings":"AAqBA,iEAAiD;AAc1C;OARC,MAAM;0BACQ,IAAI;kBAEf;IACV,gBAAoB,CAAC,EAAE,MAAM,CAAC;CAC3B;;;;;;;;;;;;;;GAeH"}
@@ -11,52 +11,14 @@ export function buildRootObject(vatPowers: import("@agoric/swingset-vat").Termin
11
11
  consumeItem: (name: any) => Promise<unknown>;
12
12
  produceItem: (name: any, resolution: any) => void;
13
13
  resetItem: (name: any) => void;
14
- messageVat: ({ name, methodName, args }: {
15
- name: any;
16
- methodName: any;
17
- args?: any[] | undefined;
18
- }) => Promise<any>;
19
- messageVatObject: ({ presence, methodName, args }: {
20
- presence: any;
21
- methodName: any;
22
- args?: any[] | undefined;
23
- }) => Promise<any>;
24
- messageVatObjectSendOnly: ({ presence, methodName, args }: {
25
- presence: any;
26
- methodName: any;
27
- args?: any[] | undefined;
28
- }) => void;
29
- awaitVatObject: ({ presence, path, rawOutput }: {
30
- presence: any;
31
- path?: any[] | undefined;
32
- rawOutput?: boolean | undefined;
33
- }) => Promise<any>;
14
+ awaitVatObject: (presence: any, path?: any[]) => Promise<any>;
34
15
  snapshotStore: <K, V>(store: MapStore<K, V>) => [K, V][];
35
16
  } & import("@endo/eventual-send").RemotableBrand<{}, {
36
17
  bootstrap: (vats: SwingsetVats, devices: SoloDevices | ChainDevices) => Promise<void>;
37
18
  consumeItem: (name: any) => Promise<unknown>;
38
19
  produceItem: (name: any, resolution: any) => void;
39
20
  resetItem: (name: any) => void;
40
- messageVat: ({ name, methodName, args }: {
41
- name: any;
42
- methodName: any;
43
- args?: any[] | undefined;
44
- }) => Promise<any>;
45
- messageVatObject: ({ presence, methodName, args }: {
46
- presence: any;
47
- methodName: any;
48
- args?: any[] | undefined;
49
- }) => Promise<any>;
50
- messageVatObjectSendOnly: ({ presence, methodName, args }: {
51
- presence: any;
52
- methodName: any;
53
- args?: any[] | undefined;
54
- }) => void;
55
- awaitVatObject: ({ presence, path, rawOutput }: {
56
- presence: any;
57
- path?: any[] | undefined;
58
- rawOutput?: boolean | undefined;
59
- }) => Promise<any>;
21
+ awaitVatObject: (presence: any, path?: any[]) => Promise<any>;
60
22
  snapshotStore: <K, V>(store: MapStore<K, V>) => [K, V][];
61
23
  }>;
62
24
  //# sourceMappingURL=boot-sim.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"boot-sim.d.ts","sourceRoot":"","sources":["boot-sim.js"],"names":[],"mappings":"AAgBA;;EAGE;AAiBK;OAPC,MAAM;0BACQ,IAAI;kBAEf;IACV,gBAAoB,CAAC,EAAE,MAAM,CAAC;CAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAMH"}
1
+ {"version":3,"file":"boot-sim.d.ts","sourceRoot":"","sources":["boot-sim.js"],"names":[],"mappings":"AAgBA;;EAGE;AAiBK;OAPC,MAAM;0BACQ,IAAI;kBAEf;IACV,gBAAoB,CAAC,EAAE,MAAM,CAAC;CAC3B;;;;;;;;;;;;;;GAMH"}
@@ -10,52 +10,14 @@ export function buildRootObject(vatPowers: import("@agoric/swingset-vat").Termin
10
10
  consumeItem: (name: any) => Promise<unknown>;
11
11
  produceItem: (name: any, resolution: any) => void;
12
12
  resetItem: (name: any) => void;
13
- messageVat: ({ name, methodName, args }: {
14
- name: any;
15
- methodName: any;
16
- args?: any[] | undefined;
17
- }) => Promise<any>;
18
- messageVatObject: ({ presence, methodName, args }: {
19
- presence: any;
20
- methodName: any;
21
- args?: any[] | undefined;
22
- }) => Promise<any>;
23
- messageVatObjectSendOnly: ({ presence, methodName, args }: {
24
- presence: any;
25
- methodName: any;
26
- args?: any[] | undefined;
27
- }) => void;
28
- awaitVatObject: ({ presence, path, rawOutput }: {
29
- presence: any;
30
- path?: any[] | undefined;
31
- rawOutput?: boolean | undefined;
32
- }) => Promise<any>;
13
+ awaitVatObject: (presence: any, path?: any[]) => Promise<any>;
33
14
  snapshotStore: <K, V>(store: MapStore<K, V>) => [K, V][];
34
15
  } & import("@endo/eventual-send").RemotableBrand<{}, {
35
16
  bootstrap: (vats: SwingsetVats, devices: SoloDevices | ChainDevices) => Promise<void>;
36
17
  consumeItem: (name: any) => Promise<unknown>;
37
18
  produceItem: (name: any, resolution: any) => void;
38
19
  resetItem: (name: any) => void;
39
- messageVat: ({ name, methodName, args }: {
40
- name: any;
41
- methodName: any;
42
- args?: any[] | undefined;
43
- }) => Promise<any>;
44
- messageVatObject: ({ presence, methodName, args }: {
45
- presence: any;
46
- methodName: any;
47
- args?: any[] | undefined;
48
- }) => Promise<any>;
49
- messageVatObjectSendOnly: ({ presence, methodName, args }: {
50
- presence: any;
51
- methodName: any;
52
- args?: any[] | undefined;
53
- }) => void;
54
- awaitVatObject: ({ presence, path, rawOutput }: {
55
- presence: any;
56
- path?: any[] | undefined;
57
- rawOutput?: boolean | undefined;
58
- }) => Promise<any>;
20
+ awaitVatObject: (presence: any, path?: any[]) => Promise<any>;
59
21
  snapshotStore: <K, V>(store: MapStore<K, V>) => [K, V][];
60
22
  }>;
61
23
  //# sourceMappingURL=boot-solo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"boot-solo.d.ts","sourceRoot":"","sources":["boot-solo.js"],"names":[],"mappings":"AAqBA,iEAAkD;AAoB3C;OARC,MAAM;0BACQ,IAAI;kBAEf;IACV,iBAAqB,CAAC,EAAE,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAChE,gBAAoB,CAAC,EAAE,MAAM,CAAC;CAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAMH"}
1
+ {"version":3,"file":"boot-solo.d.ts","sourceRoot":"","sources":["boot-solo.js"],"names":[],"mappings":"AAqBA,iEAAkD;AAoB3C;OARC,MAAM;0BACQ,IAAI;kBAEf;IACV,iBAAqB,CAAC,EAAE,OAAO,MAAM,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAChE,gBAAoB,CAAC,EAAE,MAAM,CAAC;CAC3B;;;;;;;;;;;;;;GAMH"}
@@ -12,26 +12,7 @@ export function makeBootstrap(vatPowers: import("@agoric/swingset-vat").Terminat
12
12
  consumeItem: (name: any) => Promise<unknown>;
13
13
  produceItem: (name: any, resolution: any) => void;
14
14
  resetItem: (name: any) => void;
15
- messageVat: ({ name, methodName, args }: {
16
- name: any;
17
- methodName: any;
18
- args?: any[] | undefined;
19
- }) => Promise<any>;
20
- messageVatObject: ({ presence, methodName, args }: {
21
- presence: any;
22
- methodName: any;
23
- args?: any[] | undefined;
24
- }) => Promise<any>;
25
- messageVatObjectSendOnly: ({ presence, methodName, args }: {
26
- presence: any;
27
- methodName: any;
28
- args?: any[] | undefined;
29
- }) => void;
30
- awaitVatObject: ({ presence, path, rawOutput }: {
31
- presence: any;
32
- path?: any[] | undefined;
33
- rawOutput?: boolean | undefined;
34
- }) => Promise<any>;
15
+ awaitVatObject: (presence: any, path?: any[]) => Promise<any>;
35
16
  /**
36
17
  * @template K, V
37
18
  * @param {MapStore<K, V>} store
@@ -48,26 +29,7 @@ export function makeBootstrap(vatPowers: import("@agoric/swingset-vat").Terminat
48
29
  consumeItem: (name: any) => Promise<unknown>;
49
30
  produceItem: (name: any, resolution: any) => void;
50
31
  resetItem: (name: any) => void;
51
- messageVat: ({ name, methodName, args }: {
52
- name: any;
53
- methodName: any;
54
- args?: any[] | undefined;
55
- }) => Promise<any>;
56
- messageVatObject: ({ presence, methodName, args }: {
57
- presence: any;
58
- methodName: any;
59
- args?: any[] | undefined;
60
- }) => Promise<any>;
61
- messageVatObjectSendOnly: ({ presence, methodName, args }: {
62
- presence: any;
63
- methodName: any;
64
- args?: any[] | undefined;
65
- }) => void;
66
- awaitVatObject: ({ presence, path, rawOutput }: {
67
- presence: any;
68
- path?: any[] | undefined;
69
- rawOutput?: boolean | undefined;
70
- }) => Promise<any>;
32
+ awaitVatObject: (presence: any, path?: any[]) => Promise<any>;
71
33
  /**
72
34
  * @template K, V
73
35
  * @param {MapStore<K, V>} store
@@ -1 +1 @@
1
- {"version":3,"file":"lib-boot.d.ts","sourceRoot":"","sources":["lib-boot.js"],"names":[],"mappings":"AA4DO;OATC,MAAM;0BACQ,IAAI;kBAEf,OAAO,MAAM,EAAE,O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pB;kCA8KU,QAAQ,WAAW,oBAAoB,CAAC,CAAC"}
@@ -1,6 +1,5 @@
1
1
  // @ts-check
2
2
  import { E, Far } from '@endo/far';
3
- import { makePassableEncoding } from '@agoric/swingset-vat/tools/passableEncoding.js';
4
3
  import { makeHeapZone } from '@agoric/zone';
5
4
  import {
6
5
  makeVatSpace,
@@ -165,7 +164,6 @@ export const makeBootstrap = (
165
164
 
166
165
  // For testing supports
167
166
  const vatData = new Map();
168
- const { encodePassable, decodePassable } = makePassableEncoding();
169
167
 
170
168
  return Far('bootstrap', {
171
169
  /**
@@ -201,31 +199,12 @@ export const makeBootstrap = (
201
199
  },
202
200
 
203
201
  //#region testing supports
204
- messageVat: async ({ name, methodName, args = [] }) => {
205
- const vat = vatData.get(name) || Fail`unknown vat name: ${q(name)}`;
206
- const { root } = vat;
207
- const decodedArgs = args.map(decodePassable);
208
- const result = await E(root)[methodName](...decodedArgs);
209
- return encodePassable(result);
210
- },
211
- messageVatObject: async ({ presence, methodName, args = [] }) => {
212
- const object = decodePassable(presence);
213
- const decodedArgs = args.map(decodePassable);
214
- const result = await E(object)[methodName](...decodedArgs);
215
- return encodePassable(result);
216
- },
217
- /* Like `messageVatObject` but does not await return value */
218
- messageVatObjectSendOnly: ({ presence, methodName, args = [] }) => {
219
- const object = decodePassable(presence);
220
- const decodedArgs = args.map(decodePassable);
221
- void E(object)[methodName](...decodedArgs);
222
- },
223
- awaitVatObject: async ({ presence, path = [], rawOutput = false }) => {
224
- let value = await decodePassable(presence);
202
+ awaitVatObject: async (presence, path = []) => {
203
+ let value = await presence;
225
204
  for (const key of path) {
226
205
  value = await value[key];
227
206
  }
228
- return rawOutput ? value : encodePassable(value);
207
+ return value;
229
208
  },
230
209
  /**
231
210
  * @template K, V