@agoric/vats 0.15.2-dev-412bc11.0.412bc11 → 0.15.2-dev-23d1f97.0.23d1f97

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-412bc11.0.412bc11",
3
+ "version": "0.15.2-dev-23d1f97.0.23d1f97",
4
4
  "description": "Agoric's Vat library",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -22,19 +22,19 @@
22
22
  "author": "Agoric",
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@agoric/cosmic-proto": "0.4.1-dev-412bc11.0.412bc11",
26
- "@agoric/ertp": "0.16.3-dev-412bc11.0.412bc11",
27
- "@agoric/governance": "0.10.4-dev-412bc11.0.412bc11",
28
- "@agoric/internal": "0.3.3-dev-412bc11.0.412bc11",
29
- "@agoric/network": "0.1.1-dev-412bc11.0.412bc11",
30
- "@agoric/notifier": "0.6.3-dev-412bc11.0.412bc11",
31
- "@agoric/store": "0.9.3-dev-412bc11.0.412bc11",
32
- "@agoric/swingset-vat": "0.32.3-dev-412bc11.0.412bc11",
33
- "@agoric/time": "0.3.3-dev-412bc11.0.412bc11",
34
- "@agoric/vat-data": "0.5.3-dev-412bc11.0.412bc11",
35
- "@agoric/vow": "0.1.1-dev-412bc11.0.412bc11",
36
- "@agoric/zoe": "0.26.3-dev-412bc11.0.412bc11",
37
- "@agoric/zone": "0.2.3-dev-412bc11.0.412bc11",
25
+ "@agoric/cosmic-proto": "0.4.1-dev-23d1f97.0.23d1f97",
26
+ "@agoric/ertp": "0.16.3-dev-23d1f97.0.23d1f97",
27
+ "@agoric/governance": "0.10.4-dev-23d1f97.0.23d1f97",
28
+ "@agoric/internal": "0.3.3-dev-23d1f97.0.23d1f97",
29
+ "@agoric/network": "0.1.1-dev-23d1f97.0.23d1f97",
30
+ "@agoric/notifier": "0.6.3-dev-23d1f97.0.23d1f97",
31
+ "@agoric/store": "0.9.3-dev-23d1f97.0.23d1f97",
32
+ "@agoric/swingset-vat": "0.32.3-dev-23d1f97.0.23d1f97",
33
+ "@agoric/time": "0.3.3-dev-23d1f97.0.23d1f97",
34
+ "@agoric/vat-data": "0.5.3-dev-23d1f97.0.23d1f97",
35
+ "@agoric/vow": "0.1.1-dev-23d1f97.0.23d1f97",
36
+ "@agoric/zoe": "0.26.3-dev-23d1f97.0.23d1f97",
37
+ "@agoric/zone": "0.2.3-dev-23d1f97.0.23d1f97",
38
38
  "@endo/errors": "^1.2.13",
39
39
  "@endo/far": "^1.1.14",
40
40
  "@endo/import-bundle": "^1.5.2",
@@ -47,7 +47,7 @@
47
47
  "jessie.js": "^0.3.4"
48
48
  },
49
49
  "devDependencies": {
50
- "@agoric/swingset-liveslots": "0.10.3-dev-412bc11.0.412bc11",
50
+ "@agoric/swingset-liveslots": "0.10.3-dev-23d1f97.0.23d1f97",
51
51
  "@endo/bundle-source": "^4.1.2",
52
52
  "@endo/init": "^1.1.12",
53
53
  "ava": "^5.3.0",
@@ -79,5 +79,5 @@
79
79
  "typeCoverage": {
80
80
  "atLeast": 90.22
81
81
  },
82
- "gitHead": "412bc11a50bd7a9712ca431e1d7c7d300be6e130"
82
+ "gitHead": "23d1f97395927dd824b387374ac98c0d1b638258"
83
83
  }
@@ -1,6 +1,7 @@
1
1
  /**
2
- * @import {ERemote} from '@agoric/internal';
2
+ * @import {ERemote, TypedPattern} from '@agoric/internal';
3
3
  * @import {RemotableObject} from '@endo/pass-style';
4
+ * @import {CapData} from '@endo/marshal';
4
5
  * @import {Key} from '@endo/patterns';
5
6
  */
6
7
  export const DEFAULT_CRC_DIGITS: 2;
@@ -48,9 +49,9 @@ export function prepareBoardKit(baggage: import("@agoric/vat-data").Baggage): (i
48
49
  * getId(), "publishing" previously un-mapped objects.
49
50
  */
50
51
  getPublishingMarshaller(): import("@endo/exo").Guarded<{
51
- toCapData(val: any): import("@endo/marshal").CapData<string>;
52
+ toCapData(val: any): CapData<string>;
52
53
  fromCapData(data: any): any;
53
- serialize(data: any): import("@endo/marshal").CapData<string>;
54
+ serialize(data: any): CapData<string>;
54
55
  unserialize(data: any): any;
55
56
  }>;
56
57
  /**
@@ -62,26 +63,26 @@ export function prepareBoardKit(baggage: import("@agoric/vat-data").Baggage): (i
62
63
  * preserving object identity.
63
64
  */
64
65
  getReadonlyMarshaller(): import("@endo/exo").Guarded<{
65
- toCapData(val: any): import("@endo/marshal").CapData<string | null>;
66
+ toCapData(val: any): CapData<string | null>;
66
67
  fromCapData(data: any): any;
67
- serialize(data: any): import("@endo/marshal").CapData<string | null>;
68
+ serialize(data: any): CapData<string | null>;
68
69
  unserialize(data: any): any;
69
70
  }>;
70
71
  };
71
72
  readonlyMarshaller: {
72
- toCapData(val: any): import("@endo/marshal").CapData<string | null>;
73
+ toCapData(val: any): CapData<string | null>;
73
74
  fromCapData(data: any): any;
74
- serialize(data: any): import("@endo/marshal").CapData<string | null>;
75
+ serialize(data: any): CapData<string | null>;
75
76
  unserialize(data: any): any;
76
77
  };
77
78
  publishingMarshaller: {
78
- toCapData(val: any): import("@endo/marshal").CapData<string>;
79
+ toCapData(val: any): CapData<string>;
79
80
  fromCapData(data: any): any;
80
- serialize(data: any): import("@endo/marshal").CapData<string>;
81
+ serialize(data: any): CapData<string>;
81
82
  unserialize(data: any): any;
82
83
  };
83
84
  }>;
84
- export function prepareRecorderFactory(zone: import("@agoric/zone").Zone): (label: string, marshaller: ERemote<Marshaller>) => <T>(storageNode: import("@agoric/internal").Remote<StorageNode>, valueShape?: import("@agoric/internal").TypedPattern<T> | undefined) => RecorderKit<T>;
85
+ export function prepareRecorderFactory(zone: import("@agoric/zone").Zone): (label: string, marshaller: ERemote<Marshaller>) => <T>(storageNode: import("@agoric/internal").Remote<StorageNode>, valueShape?: TypedPattern<T> | undefined) => RecorderKit<T>;
85
86
  /**
86
87
  * For a value with a known id in the board, we can use that board id as a slot
87
88
  * to preserve identity when marshaling.
@@ -98,7 +99,9 @@ export type BoardId = string;
98
99
  */
99
100
  export type BoardState = ReturnType<typeof initDurableBoardState>;
100
101
  import type { RemotableObject } from '@endo/pass-style';
102
+ import type { CapData } from '@endo/marshal';
101
103
  import type { ERemote } from '@agoric/internal';
104
+ import type { TypedPattern } from '@agoric/internal';
102
105
  /**
103
106
  * @typedef {ReturnType<typeof initDurableBoardState>} BoardState // TODO: use
104
107
  * Key from @agoric/store when available
@@ -1 +1 @@
1
- {"version":3,"file":"lib-board.d.ts","sourceRoot":"","sources":["lib-board.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AAEH,iCAAkC,CAAC,CAAC;AACpC,6BAA8B,QAAQ,CAAC;AAiOhC,yCAHI,OAAO,kBAAkB,EAAE,OAAO;;;;;QAWrC;;;;;;;;;;;;WAYG;qBADQ,eAAe;QAK1B;;;WAGG;qBAFQ,OAAO;QAMlB;;;;;;;;;WASG;wBADW,MAAM,EAAA;QAiBpB,mCAAmC;iBAAvB,eAAe;;QAS3B;;;WAGG;;;;;;;QAIH;;;;;;;WAOG;;;;;;;;;;;;;;;;;;;;GAuCV;AAGM,6CADK,OAAO,cAAc,EAAE,IAAI,WAS1B,MAAM,cACN,QAAQ,UAAU,CAAC,6JAY/B;;;;;;;;;;sBA3UY,MAAM;;;;;yBAmBN,UAAU,CAAC,OAAO,qBAAqB,CAAC;qCA5DnB,kBAAkB;6BAD1B,kBAAkB;AA4D5C;;;GAGG;AAGH;;;;;;;;GAQG;AACH,sDANW,MAAM,GAAG,MAAM,0BAEvB;IAAyB,MAAM;IACN,SAAS;CAEpC;;;;;;EA2BA"}
1
+ {"version":3,"file":"lib-board.d.ts","sourceRoot":"","sources":["lib-board.js"],"names":[],"mappings":"AAkBA;;;;;GAKG;AAEH,iCAAkC,CAAC,CAAC;AACpC,6BAA8B,QAAQ,CAAC;AAgOhC,yCAHI,OAAO,kBAAkB,EAAE,OAAO;;;;;QAWrC;;;;;;;;;;;;WAYG;qBADQ,eAAe;QAK1B;;;WAGG;qBAFQ,OAAO;QAMlB;;;;;;;;;WASG;wBADW,MAAM,EAAA;QAiBpB,mCAAmC;iBAAvB,eAAe;;QAS3B;;;WAGG;;;;;;;QAIH;;;;;;;WAOG;;;;;;;;;;;;;;;;;;;;GAuCV;AAGM,6CADK,OAAO,cAAc,EAAE,IAAI,WAS1B,MAAM,cACN,QAAQ,UAAU,CAAC,kIAY/B;;;;;;;;;;sBArUY,MAAM;;;;;yBAmBN,UAAU,CAAC,OAAO,qBAAqB,CAAC;qCAlEnB,kBAAkB;6BAC1B,eAAe;6BAFD,kBAAkB;kCAAlB,kBAAkB;AAkE1D;;;GAGG;AAGH;;;;;;;;GAQG;AACH,sDANW,MAAM,GAAG,MAAM,0BAEvB;IAAyB,MAAM;IACN,SAAS;CAEpC;;;;;;EA2BA"}
package/src/lib-board.js CHANGED
@@ -10,15 +10,16 @@ import {
10
10
  defineRecorderKit,
11
11
  prepareRecorder,
12
12
  } from '@agoric/zoe/src/contractSupport/recorder.js';
13
- import { E, Far } from '@endo/far';
13
+ import { E } from '@endo/far';
14
14
  import { isRemotable, makeMarshal } from '@endo/marshal';
15
15
 
16
- import { CapDataShape } from '@agoric/internal/src/marshal.js';
16
+ import { makeInaccessibleVal } from '@agoric/internal/src/marshal/inaccessible-val.js';
17
17
  import { crc6 } from './crc.js';
18
18
 
19
19
  /**
20
- * @import {ERemote} from '@agoric/internal';
20
+ * @import {ERemote, TypedPattern} from '@agoric/internal';
21
21
  * @import {RemotableObject} from '@endo/pass-style';
22
+ * @import {CapData} from '@endo/marshal';
22
23
  * @import {Key} from '@endo/patterns';
23
24
  */
24
25
 
@@ -26,6 +27,11 @@ export const DEFAULT_CRC_DIGITS = 2;
26
27
  export const DEFAULT_PREFIX = 'board0';
27
28
 
28
29
  //#region Interface Guards
30
+
31
+ // TODO move CapDataShape to Endo
32
+ /** @type {TypedPattern<CapData<any>>} */
33
+ const CapDataShape = { body: M.string(), slots: M.array() };
34
+
29
35
  const MarshalI = M.interface('Marshaller', {
30
36
  toCapData: M.call(M.any()).returns(CapDataShape),
31
37
  serialize: M.call(M.any()).returns(CapDataShape),
@@ -182,9 +188,6 @@ const getValue = (id, { prefix, crcDigits, idToVal }) => {
182
188
 
183
189
  /** @param {BoardState} state */
184
190
  const makeSlotToVal = state => {
185
- const ifaceAllegedPrefix = 'Alleged: ';
186
- const ifaceInaccessiblePrefix = 'SEVERED: ';
187
-
188
191
  /**
189
192
  * @param {BoardId} slot
190
193
  * @param {string} iface
@@ -196,10 +199,7 @@ const makeSlotToVal = state => {
196
199
  }
197
200
 
198
201
  // Private object.
199
- if (typeof iface === 'string' && iface.startsWith(ifaceAllegedPrefix)) {
200
- iface = iface.slice(ifaceAllegedPrefix.length);
201
- }
202
- return Far(`${ifaceInaccessiblePrefix}${iface}`, {});
202
+ return makeInaccessibleVal(iface);
203
203
  };
204
204
  return slotToVal;
205
205
  };
@@ -1 +1 @@
1
- {"version":3,"file":"vat-bridge.d.ts","sourceRoot":"","sources":["vat-bridge.js"],"names":[],"mappings":"AAOA;yDAea,IAAI,CAAC,OAAO,YAAY,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC,YACzD,MAAM,YACN,MAAM;;;;oBA0BkjJ,CAAC;;;;;;yDA5BzjJ,IAAI,CAAC,OAAO,YAAY,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC,YACzD,MAAM,YACN,MAAM;;;;oBA0BkjJ,CAAC;;;;;GADrkJ"}
1
+ {"version":3,"file":"vat-bridge.d.ts","sourceRoot":"","sources":["vat-bridge.js"],"names":[],"mappings":"AAOA;yDAea,IAAI,CAAC,OAAO,YAAY,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC,YACzD,MAAM,YACN,MAAM;;;;oBA0BqhJ,CAAC;;;;;;yDA5B5hJ,IAAI,CAAC,OAAO,YAAY,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC,YACzD,MAAM,YACN,MAAM;;;;oBA0BqhJ,CAAC;;;;;GADxiJ"}
@@ -1,4 +1,4 @@
1
- export * from "@agoric/internal/src/marshal.js";
1
+ export * from "@agoric/internal/src/marshal/board-client-utils.js";
2
2
  export function makeAgoricNamesRemotesFromFakeStorage(fakeStorageKit: import("@agoric/internal/src/storage-test-utils.js").FakeStorageKit): AgoricNamesRemotes;
3
3
  export function makeFakeBoard(initSequence?: bigint | number, options?: {
4
4
  prefix?: string | undefined;
@@ -23,15 +23,15 @@ export function makeFakeBoard(initSequence?: bigint | number, options?: {
23
23
  }>;
24
24
  }>;
25
25
  export type VBankAssetDetail = {
26
- brand: import("@agoric/internal/src/marshal.js").BoardRemote;
26
+ brand: import("@agoric/internal/src/marshal/board-client-utils.js").BoardRemote;
27
27
  denom: string;
28
28
  displayInfo: DisplayInfo;
29
- issuer: import("@agoric/internal/src/marshal.js").BoardRemote;
29
+ issuer: import("@agoric/internal/src/marshal/board-client-utils.js").BoardRemote;
30
30
  issuerName: string;
31
31
  proposedName: string;
32
32
  };
33
33
  export type AgoricNamesRemotes = {
34
- brand: Record<string, import("@agoric/internal/src/marshal.js").BoardRemote>;
34
+ brand: Record<string, import("@agoric/internal/src/marshal/board-client-utils.js").BoardRemote>;
35
35
  instance: Record<string, Instance>;
36
36
  installation: Record<string, Installation>;
37
37
  issuer: Record<string, Issuer>;
@@ -1 +1 @@
1
- {"version":3,"file":"board-utils.d.ts","sourceRoot":"","sources":["board-utils.js"],"names":[],"mappings":";AA2CO,sEAHI,OAAO,4CAA4C,EAAE,cAAc,GACjE,kBAAkB,CA0C9B;AAYM,6CALI,MAAM,GAAG,MAAM,YAEvB;IAAyB,MAAM;IACN,SAAS;CAAC;;;;;;;;;;;;;;;;;;GAKrC;+BA5FY;IACR,KAAK,EAAE,OAAO,iCAAiC,EAAE,WAAW,CAAC;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,OAAO,iCAAiC,EAAE,WAAW,CAAC;IAC9D,UAAU,EA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C,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;iCAxBkC,cAAc;8BADoB,aAAa;kCAAb,aAAa;4BAC/C,cAAc"}
@@ -5,10 +5,10 @@
5
5
 
6
6
  /**
7
7
  * @typedef {{
8
- * brand: import('@agoric/internal/src/marshal.js').BoardRemote;
8
+ * brand: import('@agoric/internal/src/marshal/board-client-utils.js').BoardRemote;
9
9
  * denom: string;
10
10
  * displayInfo: DisplayInfo;
11
- * issuer: import('@agoric/internal/src/marshal.js').BoardRemote;
11
+ * issuer: import('@agoric/internal/src/marshal/board-client-utils.js').BoardRemote;
12
12
  * issuerName: string;
13
13
  * proposedName: string;
14
14
  * }} VBankAssetDetail
@@ -17,7 +17,7 @@
17
17
  * @typedef {{
18
18
  * brand: Record<
19
19
  * string,
20
- * import('@agoric/internal/src/marshal.js').BoardRemote
20
+ * import('@agoric/internal/src/marshal/board-client-utils.js').BoardRemote
21
21
  * >;
22
22
  * instance: Record<string, Instance>;
23
23
  * installation: Record<string, Installation>;
@@ -30,12 +30,12 @@
30
30
  import {
31
31
  slotToBoardRemote,
32
32
  unmarshalFromVstorage,
33
- } from '@agoric/internal/src/marshal.js';
33
+ } from '@agoric/internal/src/marshal/board-client-utils.js';
34
34
  import { makeScalarBigMapStore } from '@agoric/vat-data';
35
35
  import { makeMarshal } from '@endo/marshal';
36
36
  import { prepareBoardKit } from '../src/lib-board.js';
37
37
 
38
- export * from '@agoric/internal/src/marshal.js';
38
+ export * from '@agoric/internal/src/marshal/board-client-utils.js';
39
39
 
40
40
  /**
41
41
  * @param {import('@agoric/internal/src/storage-test-utils.js').FakeStorageKit} fakeStorageKit