@agoric/internal 0.3.3-dev-eb7e9eb.0 → 0.3.3-u11.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/README.md +2 -7
  3. package/package.json +12 -14
  4. package/src/action-types.d.ts +0 -1
  5. package/src/action-types.d.ts.map +1 -1
  6. package/src/action-types.js +0 -1
  7. package/src/batched-deliver.d.ts +1 -1
  8. package/src/batched-deliver.d.ts.map +1 -1
  9. package/src/callback.d.ts +4 -12
  10. package/src/callback.d.ts.map +1 -1
  11. package/src/callback.js +5 -5
  12. package/src/config.d.ts +12 -12
  13. package/src/lib-chainStorage.d.ts +3 -2
  14. package/src/lib-chainStorage.d.ts.map +1 -1
  15. package/src/lib-chainStorage.js +35 -4
  16. package/src/method-tools.d.ts +0 -1
  17. package/src/method-tools.d.ts.map +1 -1
  18. package/src/method-tools.js +0 -12
  19. package/src/node/buffer-line-transform.d.ts +1 -1
  20. package/src/node/buffer-line-transform.d.ts.map +1 -1
  21. package/src/queue.d.ts.map +1 -1
  22. package/src/queue.js +0 -1
  23. package/src/storage-test-utils.d.ts +3 -5
  24. package/src/storage-test-utils.d.ts.map +1 -1
  25. package/src/storage-test-utils.js +7 -5
  26. package/src/typeGuards.d.ts +0 -2
  27. package/src/typeGuards.d.ts.map +1 -1
  28. package/src/typeGuards.js +0 -8
  29. package/src/install-ses-debug.d.ts +0 -2
  30. package/src/install-ses-debug.d.ts.map +0 -1
  31. package/src/install-ses-debug.js +0 -6
  32. package/src/lib-nodejs/engine-gc.d.ts +0 -3
  33. package/src/lib-nodejs/engine-gc.d.ts.map +0 -1
  34. package/src/lib-nodejs/engine-gc.js +0 -22
  35. package/src/lib-nodejs/gc-and-finalize.d.ts +0 -2
  36. package/src/lib-nodejs/gc-and-finalize.d.ts.map +0 -1
  37. package/src/lib-nodejs/gc-and-finalize.js +0 -91
  38. package/src/lib-nodejs/spawnSubprocessWorker.d.ts +0 -16
  39. package/src/lib-nodejs/spawnSubprocessWorker.d.ts.map +0 -1
  40. package/src/lib-nodejs/spawnSubprocessWorker.js +0 -87
  41. package/src/lib-nodejs/waitUntilQuiescent.d.ts +0 -2
  42. package/src/lib-nodejs/waitUntilQuiescent.d.ts.map +0 -1
  43. package/src/lib-nodejs/waitUntilQuiescent.js +0 -18
  44. package/src/lib-nodejs/worker-protocol.d.ts +0 -4
  45. package/src/lib-nodejs/worker-protocol.d.ts.map +0 -1
  46. package/src/lib-nodejs/worker-protocol.js +0 -56
  47. package/src/marshal.d.ts +0 -17
  48. package/src/marshal.d.ts.map +0 -1
  49. package/src/marshal.js +0 -119
  50. package/src/netstring.d.ts +0 -13
  51. package/src/netstring.d.ts.map +0 -1
  52. package/src/netstring.js +0 -119
  53. package/src/tokens.d.ts +0 -34
  54. package/src/tokens.d.ts.map +0 -1
  55. package/src/tokens.js +0 -35
package/CHANGELOG.md ADDED
@@ -0,0 +1,106 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ### [0.3.3-u11.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/internal@0.3.2...@agoric/internal@0.3.3-u11.0) (2023-08-24)
7
+
8
+ **Note:** Version bump only for package @agoric/internal
9
+
10
+
11
+
12
+
13
+
14
+ ### [0.3.2](https://github.com/Agoric/agoric-sdk/compare/@agoric/internal@0.3.1...@agoric/internal@0.3.2) (2023-06-02)
15
+
16
+ **Note:** Version bump only for package @agoric/internal
17
+
18
+
19
+
20
+
21
+
22
+ ### [0.3.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/internal@0.3.0...@agoric/internal@0.3.1) (2023-05-24)
23
+
24
+ **Note:** Version bump only for package @agoric/internal
25
+
26
+
27
+
28
+
29
+
30
+ ## [0.3.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/internal@0.2.1...@agoric/internal@0.3.0) (2023-05-19)
31
+
32
+
33
+ ### ⚠ BREAKING CHANGES
34
+
35
+ * emit smallcaps-format data in all marshallers
36
+
37
+ ### Features
38
+
39
+ * Add SwingSet configuration to purge vstorage within (re-)bootstrap ([f248e91](https://github.com/Agoric/agoric-sdk/commit/f248e9116512374fb95f789b26e27b66cd5c34ca)), closes [#7681](https://github.com/Agoric/agoric-sdk/issues/7681)
40
+ * **auction:** add an auctioneer to manage vault liquidation ([#7000](https://github.com/Agoric/agoric-sdk/issues/7000)) ([398b70f](https://github.com/Agoric/agoric-sdk/commit/398b70f7e028f957afc1582f0ee31eb2574c94d0)), closes [#6992](https://github.com/Agoric/agoric-sdk/issues/6992) [#7047](https://github.com/Agoric/agoric-sdk/issues/7047) [#7074](https://github.com/Agoric/agoric-sdk/issues/7074)
41
+ * **casting:** handle noData value encoding ([530bc41](https://github.com/Agoric/agoric-sdk/commit/530bc41854cc7f5e5749e97e87fabc6163a17864))
42
+ * **cosmic-swingset:** add after-commit action ([970a53f](https://github.com/Agoric/agoric-sdk/commit/970a53f827ded21b27525f6b0042bbc124c62d48))
43
+ * **internal:** makeFakeStorageKit supports "get" and "entries" ([6a69aab](https://github.com/Agoric/agoric-sdk/commit/6a69aab5cb54faae5af631bbc2281e4fc4ede8e0))
44
+ * **internal:** new `prepareAttenuator` leveraging callbacks ([55599df](https://github.com/Agoric/agoric-sdk/commit/55599dfe7ec43a27387ca64e8bae57be13a38115))
45
+ * emit smallcaps-format data in all marshallers ([1753df8](https://github.com/Agoric/agoric-sdk/commit/1753df83465785b5ee71b250770c9b012d750ffc)), closes [#6822](https://github.com/Agoric/agoric-sdk/issues/6822)
46
+ * **core:** HighPrioritySendersManager ([7b382e4](https://github.com/Agoric/agoric-sdk/commit/7b382e49a1521d367c5b8db18fa7efa2b77ef7e3))
47
+ * **cosmic-swingset:** basic snapshot wiring ([b1072d8](https://github.com/Agoric/agoric-sdk/commit/b1072d8b1ddabbb5f2835eb503c945fed3b6b080))
48
+ * **cosmic-swingset:** export swingStore kvData to vstorage ([be68431](https://github.com/Agoric/agoric-sdk/commit/be684315dc68ecf0cb603a8eb38ddd5418e996a6))
49
+ * **cosmic-swingset:** process highPriorityQueue actions ([182a96e](https://github.com/Agoric/agoric-sdk/commit/182a96e169c8cac7f31fbce014783fd6db72b64c))
50
+ * **cosmic-swingset:** remove unnecessary explicit activityhash ([5dcc44d](https://github.com/Agoric/agoric-sdk/commit/5dcc44d31be0c8a95a5749d768791fa35b72dbd3))
51
+ * **internal:** add BufferLineTransform ([6e7db7a](https://github.com/Agoric/agoric-sdk/commit/6e7db7af7d93500caf71d817afbb358d33ef01f6))
52
+ * **internal:** add sync tee util ([#7560](https://github.com/Agoric/agoric-sdk/issues/7560)) ([0f800a6](https://github.com/Agoric/agoric-sdk/commit/0f800a622b81c61101d96b0ad620ab3065f4b146))
53
+ * **internal:** build `chainStorage` from `zone` ([74c62da](https://github.com/Agoric/agoric-sdk/commit/74c62dae7964b488bfdf7c7ee8a9bd930074cea8))
54
+ * **internal:** iterable produces values and can be async ([cf4110f](https://github.com/Agoric/agoric-sdk/commit/cf4110f59c228e42e09254b271209a66b9faf3e0))
55
+ * **internal:** new `callback` module for durable classless callbacks ([b94d600](https://github.com/Agoric/agoric-sdk/commit/b94d60052e1043fd6fb1ce39530a6072e38ef0d9))
56
+ * **internal:** shutdown informs of interrupt signal ([2ce1e89](https://github.com/Agoric/agoric-sdk/commit/2ce1e892eb381a28c31805f48ba65511896ef406))
57
+ * assertAllDefined ([d4d6cbd](https://github.com/Agoric/agoric-sdk/commit/d4d6cbd798eee051a8a699c85cc620c6a8298258))
58
+ * board-utils ([4f80ad3](https://github.com/Agoric/agoric-sdk/commit/4f80ad3cac3e47a89834f7f98330a47141b6e235))
59
+ * type assertion for assertAllDefined ([afa7b5b](https://github.com/Agoric/agoric-sdk/commit/afa7b5bfaf4558a38bdba2c44bf91691f6db26b8))
60
+ * **store:** M.splitArray and M.splitRecord ([#6597](https://github.com/Agoric/agoric-sdk/issues/6597)) ([e7427e3](https://github.com/Agoric/agoric-sdk/commit/e7427e386bcbfbe99312b41342b1fa2e722c57c7))
61
+ * **vats:** harmonise core/boot.js and boot-psm.js ([4f6635e](https://github.com/Agoric/agoric-sdk/commit/4f6635e550b926d3ca43d9075f26fef3b810817d))
62
+
63
+
64
+ ### Bug Fixes
65
+
66
+ * **internal:** add typing to makeWithQueue ([5b1539b](https://github.com/Agoric/agoric-sdk/commit/5b1539bfc61ea4f937e2f85cbe93c7bccfc84a40))
67
+ * **internal:** Make makeFakeStorageKit value auto-wrapping depend upon `sequence: true` ([2751e76](https://github.com/Agoric/agoric-sdk/commit/2751e7626e0ca617cdb2b1d92e5d4d9315b5674a))
68
+ * **internal:** more callback typing ([e78e14d](https://github.com/Agoric/agoric-sdk/commit/e78e14d60a78d2e5f9fb9a899053bf778bb51360))
69
+ * **internal:** properly inherit from `chainStorageNode` ([134a977](https://github.com/Agoric/agoric-sdk/commit/134a977f7bc4a2fc6eff3868d4d415c8c9714b4b))
70
+ * **internal:** Restore support for passable-symbol method keys ([54271af](https://github.com/Agoric/agoric-sdk/commit/54271af10adb144fe6d562193afa473d74425854))
71
+ * **internal:** shutdown beforeExit avoids forced exit ([34c9f44](https://github.com/Agoric/agoric-sdk/commit/34c9f442f124cd7181b538cf8754c6180c863b32))
72
+ * **internal:** Validate Callback targets ([8880ada](https://github.com/Agoric/agoric-sdk/commit/8880ada791d70dd487770e8a0fa4b6b725aa8769))
73
+ * **notifier:** Add a makeDurablePublishKit "onAdvance" option ([4c62b52](https://github.com/Agoric/agoric-sdk/commit/4c62b52b94cbc9ccb3c7388f5e94589809e6d7fd)), closes [#7303](https://github.com/Agoric/agoric-sdk/issues/7303)
74
+ * adapt to deeplyFulfilled being async ([#6816](https://github.com/Agoric/agoric-sdk/issues/6816)) ([ec315e1](https://github.com/Agoric/agoric-sdk/commit/ec315e1634f6d5cdef1cddafc18777de7c04fecc))
75
+ * **telemetry:** partially undo [#6684](https://github.com/Agoric/agoric-sdk/issues/6684) ([b9fa85b](https://github.com/Agoric/agoric-sdk/commit/b9fa85b7307124e50cc3a84d3b694307cde55f54))
76
+ * avoid using top-level `require` ([57ca2db](https://github.com/Agoric/agoric-sdk/commit/57ca2dbfbadb373f97d43b2fb4e90302c9149976))
77
+ * **types:** type assertion for assertAllDefined ([25f16b2](https://github.com/Agoric/agoric-sdk/commit/25f16b2e935931b81313d2ee1d491b305088bb7a))
78
+ * track endo 1382 fix to 6570 ([#6612](https://github.com/Agoric/agoric-sdk/issues/6612)) ([7897761](https://github.com/Agoric/agoric-sdk/commit/7897761d6e19e6bbba42e7bd0bd5befb507afa08))
79
+
80
+
81
+
82
+ ### [0.2.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/internal@0.2.0...@agoric/internal@0.2.1) (2022-10-05)
83
+
84
+
85
+ ### Bug Fixes
86
+
87
+ * protect zoe from keyword collision ([#6370](https://github.com/Agoric/agoric-sdk/issues/6370)) ([02af4a0](https://github.com/Agoric/agoric-sdk/commit/02af4a07ad1f99b545d0bf525bd1ea97d74639d1))
88
+
89
+
90
+
91
+ ## 0.2.0 (2022-09-20)
92
+
93
+
94
+ ### ⚠ BREAKING CHANGES
95
+
96
+ * **SwingSet:** Representatives inherit bound methods (#5970)
97
+
98
+ ### Features
99
+
100
+ * **internal:** add async utils from loadgen ([5d9f411](https://github.com/Agoric/agoric-sdk/commit/5d9f411a124e4028cd88764084999fb1fd791609))
101
+ * **internal:** deeplyFulfilledObject ([11fd071](https://github.com/Agoric/agoric-sdk/commit/11fd071005741719286ae6a1bb6bb9a7fd1f65b7))
102
+
103
+
104
+ ### Bug Fixes
105
+
106
+ * **SwingSet:** Representatives inherit bound methods ([#5970](https://github.com/Agoric/agoric-sdk/issues/5970)) ([ba1ed62](https://github.com/Agoric/agoric-sdk/commit/ba1ed62062a63862e2eecb598b0bd1d2ac828e1f))
package/README.md CHANGED
@@ -10,16 +10,11 @@ Like all `@agoric` packages it follows Semantic Versioning. Unlike the others, i
10
10
 
11
11
  # Design
12
12
 
13
- It is meant to be a home for modules that have no Agoric-specific dependencies themselves. It does depend on a these other @agoric packages but they are all destined to migrate out of the repo,
14
-
15
- - base-zone
16
- - store
17
- - assert
18
-
19
- This package may not take dependencies on any others in this repository.
13
+ It must be the lowest agoric-sdk package in any import graph. Therefore it must never depend on another agoric-sdk package. If there's a module in an another agoric-package that has no agoric-sdk dependencies, it can be moved into this package.
20
14
 
21
15
  It must never export ambient types.
22
16
 
23
17
  It should not be imported by deep imports. Eventually this will be enforced by [`exports`](https://nodejs.org/api/packages.html#exports) but the tooling isn't ready:
24
18
  - https://github.com/import-js/eslint-plugin-import/issues/1810
25
19
  - https://github.com/microsoft/TypeScript/issues/33079 (or some related problem with JSdoc types)
20
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/internal",
3
- "version": "0.3.3-dev-eb7e9eb.0+eb7e9eb",
3
+ "version": "0.3.3-u11.0",
4
4
  "description": "Externally unsupported utilities internal to agoric-sdk",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "scripts": {
11
11
  "build": "exit 0",
12
- "prepack": "tsc --build tsconfig.build.json",
12
+ "prepack": "tsc --build jsconfig.build.json",
13
13
  "postpack": "git clean -f '*.d.ts*'",
14
14
  "test": "ava",
15
15
  "test:nyc": "exit 0",
@@ -17,23 +17,21 @@
17
17
  "lint-fix": "yarn lint:eslint --fix",
18
18
  "lint": "run-s --continue-on-error lint:*",
19
19
  "lint:eslint": "eslint .",
20
- "lint:types": "tsc"
20
+ "lint:types": "tsc -p jsconfig.json"
21
21
  },
22
22
  "dependencies": {
23
- "@agoric/assert": "0.6.1-dev-eb7e9eb.0+eb7e9eb",
24
- "@agoric/base-zone": "0.1.1-dev-eb7e9eb.0+eb7e9eb",
25
- "@endo/far": "^0.2.19",
26
- "@endo/init": "^0.5.57",
27
- "@endo/marshal": "^0.8.6",
28
- "@endo/patterns": "^0.2.3",
29
- "@endo/promise-kit": "^0.2.57",
30
- "@endo/stream": "^0.3.26",
23
+ "@agoric/zone": "^0.2.3-u11.0",
24
+ "@endo/far": "^0.2.18",
25
+ "@endo/marshal": "^0.8.5",
26
+ "@endo/patterns": "^0.2.2",
27
+ "@endo/promise-kit": "^0.2.56",
28
+ "@endo/stream": "^0.3.25",
31
29
  "anylogger": "^0.21.0",
32
30
  "jessie.js": "^0.3.2"
33
31
  },
34
32
  "devDependencies": {
35
- "@endo/init": "^0.5.57",
36
- "ava": "^5.3.0",
33
+ "@endo/init": "^0.5.56",
34
+ "ava": "^5.2.0",
37
35
  "tsd": "^0.28.1"
38
36
  },
39
37
  "author": "Agoric",
@@ -44,5 +42,5 @@
44
42
  "publishConfig": {
45
43
  "access": "public"
46
44
  },
47
- "gitHead": "eb7e9ebe52e78052e5ded601b6658896d257cab4"
45
+ "gitHead": "92b6cd72484079b0349d8ccfa4510aeb820e8d67"
48
46
  }
@@ -1,6 +1,5 @@
1
1
  export const AG_COSMOS_INIT: "AG_COSMOS_INIT";
2
2
  export const SWING_STORE_EXPORT: "SWING_STORE_EXPORT";
3
- export const ENACTED_UPGRADE: "ENACTED_UPGRADE";
4
3
  export const BEGIN_BLOCK: "BEGIN_BLOCK";
5
4
  export const CALCULATE_FEES_IN_BEANS: "CALCULATE_FEES_IN_BEANS";
6
5
  export const CORE_EVAL: "CORE_EVAL";
@@ -1 +1 @@
1
- {"version":3,"file":"action-types.d.ts","sourceRoot":"","sources":["action-types.js"],"names":[],"mappings":"AAEA,8CAA+C;AAC/C,sDAAuD;AACvD,gDAAiD;AACjD,wCAAyC;AACzC,gEAAiE;AACjE,oCAAqC;AACrC,gDAAiD;AACjD,oCAAqC;AACrC,0CAA2C;AAC3C,sDAAuD;AACvD,oCAAqC;AACrC,kDAAmD;AACnD,0DAA2D;AAC3D,4CAA6C;AAC7C,wDAAyD;AACzD,8CAA+C"}
1
+ {"version":3,"file":"action-types.d.ts","sourceRoot":"","sources":["action-types.js"],"names":[],"mappings":"AAEA,8CAA+C;AAC/C,sDAAuD;AACvD,wCAAyC;AACzC,gEAAiE;AACjE,oCAAqC;AACrC,gDAAiD;AACjD,oCAAqC;AACrC,0CAA2C;AAC3C,sDAAuD;AACvD,oCAAqC;AACrC,kDAAmD;AACnD,0DAA2D;AAC3D,4CAA6C;AAC7C,wDAAyD;AACzD,8CAA+C"}
@@ -2,7 +2,6 @@
2
2
 
3
3
  export const AG_COSMOS_INIT = 'AG_COSMOS_INIT';
4
4
  export const SWING_STORE_EXPORT = 'SWING_STORE_EXPORT';
5
- export const ENACTED_UPGRADE = 'ENACTED_UPGRADE';
6
5
  export const BEGIN_BLOCK = 'BEGIN_BLOCK';
7
6
  export const CALCULATE_FEES_IN_BEANS = 'CALCULATE_FEES_IN_BEANS';
8
7
  export const CORE_EVAL = 'CORE_EVAL';
@@ -9,7 +9,7 @@
9
9
  export function makeBatchedDeliver(deliver: DeliverMessages, { clearTimeout, setTimeout }: {
10
10
  clearTimeout: NodeJS.clearTimeout;
11
11
  setTimeout: NodeJS.setTimeout;
12
- }, batchTimeoutMs?: number): (message: any[], ackNum: number) => void;
12
+ }, batchTimeoutMs?: number): (newMessages: any[], ackNum: number) => void;
13
13
  export const DEFAULT_BATCH_TIMEOUT_MS: 1000;
14
14
  export type DeliverMessages = (message: any[], ackNum: number) => void;
15
15
  //# sourceMappingURL=batched-deliver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"batched-deliver.d.ts","sourceRoot":"","sources":["batched-deliver.js"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;GAIG;AACH,4CAJW,eAAe,gCACf;IAAE,kCAAkC;IAAC,8BAA6B;CAAE,mBACpE,MAAM,aANM,GAAG,EAAE,UAAU,MAAM,KAAK,IAAI,CA4CpD;AA/CD,4CAA6C;wCAGtB,GAAG,EAAE,UAAU,MAAM,KAAK,IAAI"}
1
+ {"version":3,"file":"batched-deliver.d.ts","sourceRoot":"","sources":["batched-deliver.js"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;GAIG;AACH,4CAJW,eAAe,gCACf;IAAE,kCAAkC;IAAC,8BAA6B;CAAE,mBACpE,MAAM,gDAsChB;AA/CD,4CAA6C;wCAGtB,GAAG,EAAE,UAAU,MAAM,KAAK,IAAI"}
package/src/callback.d.ts CHANGED
@@ -5,26 +5,18 @@ export function makeFunctionCallback<I extends (...args: unknown[]) => any, T ex
5
5
  export function makeSyncMethodCallback<I extends (...args: unknown[]) => any, P extends PropertyKey, T extends { [x in P]: (...args: [...B, ...Parameters<I>]) => ReturnType<I>; } = { [x_1 in P]: I; }, B extends unknown[] = []>(target: T, methodName: P, ...bound: B): import("./types").SyncCallback<I>;
6
6
  export function makeMethodCallback<I extends (...args: unknown[]) => any, P extends PropertyKey, T extends import("@endo/far").ERef<{ [x in P]: (...args: [...B, ...Parameters<I>]) => ReturnType<I>; }> = import("@endo/far").ERef<{ [x_1 in P]: I; }>, B extends unknown[] = []>(target: T, methodName: P, ...bound: B): import("./types").Callback<I>;
7
7
  export function isCallback(callback: any): callback is import("./types").Callback<any>;
8
- export function prepareAttenuator<M extends PropertyKey>(zone: import('@agoric/base-zone').Zone, methodNames: M[], { interfaceGuard, tag }?: {
9
- interfaceGuard?: import("@endo/patterns").InterfaceGuard<Record<string | symbol, import("@endo/patterns").MethodGuard>> | undefined;
8
+ export function prepareAttenuator<M extends PropertyKey>(zone: import('@agoric/zone').Zone, methodNames: M[], { interfaceGuard, tag }?: {
9
+ interfaceGuard?: InterfaceGuard | undefined;
10
10
  tag?: string | undefined;
11
11
  }): (args_0: {
12
12
  target?: any;
13
13
  isSync?: boolean | undefined;
14
14
  overrides?: { [K in M]?: import("./types").Callback<any> | null | undefined; } | undefined;
15
15
  }) => { [K_1 in M]: (this: any, ...args: unknown[]) => any; } & import("@endo/eventual-send").RemotableBrand<{}, { [K_1 in M]: (this: any, ...args: unknown[]) => any; }>;
16
- export function prepareGuardedAttenuator(zone: import('@agoric/base-zone').Zone, interfaceGuard: import('@endo/patterns').InterfaceGuard, opts?: {
16
+ export function prepareGuardedAttenuator(zone: import('@agoric/zone').Zone, interfaceGuard: InterfaceGuard, opts?: {
17
17
  tag?: string | undefined;
18
18
  } | undefined): MakeAttenuator<any>;
19
- export type MakeAttenuator<T> = (args_0: {
20
- target?: any;
21
- isSync?: boolean | undefined;
22
- overrides?: {
23
- [x: string]: import("./types").Callback<any> | null | undefined;
24
- [x: number]: import("./types").Callback<any> | null | undefined;
25
- [x: symbol]: import("./types").Callback<any> | null | undefined;
26
- } | undefined;
27
- }) => Farable<T>;
19
+ export type MakeAttenuator<T> = MakeAttenuator<T>;
28
20
  export type Callback<I extends (...args: unknown[]) => any> = import('./types').Callback<I>;
29
21
  export type SyncCallback<I extends (...args: unknown[]) => any> = import('./types').SyncCallback<I>;
30
22
  export type Farable<T> = import('@endo/eventual-send').RemotableBrand<{}, T> & T;
@@ -1 +1 @@
1
- {"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["callback.js"],"names":[],"mappings":"AAuDO,6CALiB,OAAO,EAAE,KAAK,GAAG,sFAWxC;AAWM,0CALiB,OAAO,EAAE,KAAK,GAAG,oGAWxC;AAaM,6DAPiB,OAAO,EAAE,KAAK,GAAG,2JAaxC;AAeM,yDATiB,OAAO,EAAE,KAAK,GAAG,2MAexC;AAiBM,2DAXiB,OAAO,EAAE,KAAK,GAAG,iOAoBxC;AAiBM,uDAXiB,OAAO,EAAE,KAAK,GAAG,iRAmBxC;AAOM,qCAHI,GAAG,+CAeb;AAcM,+DAPI,OAAO,mBAAmB,EAAE,IAAI;IAGe,cAAc;IAE/C,GAAG;;aAkEb,GAAG;;;2BAxDgB,GAAG,WAAW,OAAO,EAAE,KAAK,GAAG,4EAA/B,GAAG,WAAW,OAAO,EAAE,KAAK,GAAG,KA2FhE;AAWM,+CALI,OAAO,mBAAmB,EAAE,IAAI,kBAChC,OAAO,gBAAgB,EAAE,cAAc;;oCAYjD;;;;;;;;;MAhToE,QAAQ,CAAC,CAAC;yCAIvD,OAAO,EAAE,KAAK,GAAG,IAC5B,OAAO,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;6CAIlB,OAAO,EAAE,KAAK,GAAG,IAC5B,OAAO,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;yBAGpB,OAAO,qBAAqB,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC"}
1
+ {"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["callback.js"],"names":[],"mappings":"AAuDO,6CALiB,OAAO,EAAE,KAAK,GAAG,sFAWxC;AAWM,0CALiB,OAAO,EAAE,KAAK,GAAG,oGAWxC;AAaM,6DAPiB,OAAO,EAAE,KAAK,GAAG,2JAaxC;AAeM,yDATiB,OAAO,EAAE,KAAK,GAAG,2MAexC;AAiBM,2DAXiB,OAAO,EAAE,KAAK,GAAG,iOAoBxC;AAiBM,uDAXiB,OAAO,EAAE,KAAK,GAAG,iRAmBxC;AAOM,qCAHI,GAAG,+CAeb;AAcM,+DAPI,OAAO,cAAc,EAAE,IAAI;IAGL,cAAc;IAEtB,GAAG;;aAkEb,GAAG;;;2BAxDgB,GAAG,WAAW,OAAO,EAAE,KAAK,GAAG,4EAA/B,GAAG,WAAW,OAAO,EAAE,KAAK,GAAG,KA2FhE;AAWM,+CALI,OAAO,cAAc,EAAE,IAAI,kBAC3B,cAAc;;oCAYxB;;yCA5SuB,OAAO,EAAE,KAAK,GAAG,IAC5B,OAAO,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;6CAIlB,OAAO,EAAE,KAAK,GAAG,IAC5B,OAAO,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;yBAGpB,OAAO,qBAAqB,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC"}
package/src/callback.js CHANGED
@@ -193,10 +193,10 @@ harden(isCallback);
193
193
  * Prepare an attenuator class whose methods can be redirected via callbacks.
194
194
  *
195
195
  * @template {PropertyKey} M
196
- * @param {import('@agoric/base-zone').Zone} zone The zone in which to allocate attenuators.
196
+ * @param {import('@agoric/zone').Zone} zone The zone in which to allocate attenuators.
197
197
  * @param {M[]} methodNames Methods to forward.
198
198
  * @param {object} opts
199
- * @param {import('@endo/patterns').InterfaceGuard} [opts.interfaceGuard] An interface guard for the
199
+ * @param {InterfaceGuard} [opts.interfaceGuard] An interface guard for the
200
200
  * new attenuator.
201
201
  * @param {string} [opts.tag] A tag for the new attenuator exoClass.
202
202
  */
@@ -265,7 +265,7 @@ export const prepareAttenuator = (
265
265
  /**
266
266
  * @param {object} opts
267
267
  * @param {any} [opts.target]
268
- * @param {boolean} [opts.isSync]
268
+ * @param {boolean} [opts.isSync=false]
269
269
  * @param {Overrides} [opts.overrides]
270
270
  */
271
271
  ({
@@ -305,8 +305,8 @@ harden(prepareAttenuator);
305
305
  /**
306
306
  * Prepare an attenuator whose methodNames are derived from the interfaceGuard.
307
307
  *
308
- * @param {import('@agoric/base-zone').Zone} zone
309
- * @param {import('@endo/patterns').InterfaceGuard} interfaceGuard
308
+ * @param {import('@agoric/zone').Zone} zone
309
+ * @param {InterfaceGuard} interfaceGuard
310
310
  * @param {object} [opts]
311
311
  * @param {string} [opts.tag]
312
312
  */
package/src/config.d.ts CHANGED
@@ -1,24 +1,24 @@
1
1
  export namespace BridgeId {
2
- let BANK: string;
3
- let CORE: string;
4
- let DIBC: string;
5
- let STORAGE: string;
6
- let PROVISION: string;
7
- let PROVISION_SMART_WALLET: string;
8
- let WALLET: string;
2
+ const BANK: string;
3
+ const CORE: string;
4
+ const DIBC: string;
5
+ const STORAGE: string;
6
+ const PROVISION: string;
7
+ const PROVISION_SMART_WALLET: string;
8
+ const WALLET: string;
9
9
  }
10
10
  export namespace WalletName {
11
- let depositFacet: string;
11
+ const depositFacet: string;
12
12
  }
13
13
  export namespace VBankAccount {
14
14
  namespace reserve {
15
- let module: string;
16
- let address: string;
15
+ const module: string;
16
+ const address: string;
17
17
  }
18
18
  namespace provision {
19
- let module_1: string;
19
+ const module_1: string;
20
20
  export { module_1 as module };
21
- let address_1: string;
21
+ const address_1: string;
22
22
  export { address_1 as address };
23
23
  }
24
24
  }
@@ -51,9 +51,10 @@ export function makeChainStorageRoot(handleStorageMessage: (message: StorageMess
51
51
  export function makeStorageNodeChild(storageNodeRef: import('@endo/far').ERef<StorageNode | null>, childName: string): Promise<StorageNode>;
52
52
  export function isStreamCell(cell: any): cell is StreamCell<unknown>;
53
53
  export function assertCapData(data: unknown): asserts data is import("@endo/marshal").CapData<string>;
54
+ export function unmarshalFromVstorage(data: Map<string, string>, key: string, fromCapData: ReturnType<typeof import('@endo/marshal').makeMarshal>['fromCapData'], index?: number | undefined): any;
54
55
  /** @type {(name: string) => void} */
55
56
  export const assertPathSegment: (name: string) => void;
56
- export function prepareChainStorageNode(zone: import('@agoric/base-zone').Zone): (args_0: import("./types.js").Callback<(message: StorageMessage) => any>, args_1: string, args_2?: {
57
+ export function prepareChainStorageNode(zone: import('@agoric/zone').Zone): (args_0: import("./types.js").Callback<(message: StorageMessage) => any>, args_1: string, args_2?: {
57
58
  sequence?: boolean | undefined;
58
59
  } | undefined) => {
59
60
  getPath(): string;
@@ -173,6 +174,6 @@ export type StorageMessage = {
173
174
  args: [path: string];
174
175
  } | {
175
176
  method: StorageUpdateEntriesMessageMethod;
176
- args: StorageEntry[];
177
+ args: StorageUpdateEntriesMessageArgs;
177
178
  };
178
179
  //# sourceMappingURL=lib-chainStorage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lib-chainStorage.d.ts","sourceRoot":"","sources":["lib-chainStorage.js"],"names":[],"mappings":"AAoNA;;;;;;;;;;;GAWG;AACH,qEATqB,cAAc,KAAK,GAAG,YAGhC,MAAM;;;;IA1DX;;;OAGG;mBADa,QAAQ,WAAW,CAAC;IASpC,qFAAqF;wBAAnE,MAAM;;oBAA8C,WAAW;IAWjF,+CAA+C;oBAA5B,MAAM,GAAK,QAAQ,IAAI,CAAC;;;IAtB3C;;;OAGG;mBADa,QAAQ,WAAW,CAAC;I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AC,IAAI,EAAE,MAAM,CAAC;;;;2BACd,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;;;;8CACrC,mDAAc;;;;6BACf;IACZ,MAAU,EAAE,6BAA6B,CAAC;IAC1C,IAAQ,iBAA8B;CAClC,GAAG;IACP,MAAU,EAAE,iCAAiC,CAAC;IAC9C,IAAQ,kCAAkC;CACvC"}
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
2
 
3
3
  import { E } from '@endo/far';
4
- import { M } from '@endo/patterns';
5
- import { makeHeapZone } from '@agoric/base-zone/heap.js';
4
+ import { M, heapZone } from '@agoric/zone';
6
5
  import * as cb from './callback.js';
7
6
 
8
7
  const { Fail } = assert;
@@ -84,6 +83,38 @@ export const assertCapData = data => {
84
83
  };
85
84
  harden(assertCapData);
86
85
 
86
+ /**
87
+ * Read and unmarshal a value from a map representation of vstorage data
88
+ *
89
+ * @param {Map<string, string>} data
90
+ * @param {string} key
91
+ * @param {ReturnType<typeof import('@endo/marshal').makeMarshal>['fromCapData']} fromCapData
92
+ * @param {number} [index=-1] index of the desired value in a deserialized stream cell
93
+ */
94
+ export const unmarshalFromVstorage = (data, key, fromCapData, index = -1) => {
95
+ const serialized = data.get(key) || Fail`no data for ${key}`;
96
+ assert.typeof(serialized, 'string');
97
+
98
+ const streamCell = JSON.parse(serialized);
99
+ if (!isStreamCell(streamCell)) {
100
+ throw Fail`not a StreamCell: ${streamCell}`;
101
+ }
102
+
103
+ const { values } = streamCell;
104
+ values.length > 0 || Fail`no StreamCell values: ${streamCell}`;
105
+
106
+ const marshalled = values.at(index);
107
+ assert.typeof(marshalled, 'string');
108
+
109
+ /** @type {import("@endo/marshal").CapData<string>} */
110
+ const capData = harden(JSON.parse(marshalled));
111
+ assertCapData(capData);
112
+
113
+ const unmarshalled = fromCapData(capData);
114
+ return unmarshalled;
115
+ };
116
+ harden(unmarshalFromVstorage);
117
+
87
118
  /**
88
119
  * @typedef {object} StoredFacet
89
120
  * @property {() => Promise<string>} getPath the chain storage path at which the node was constructed
@@ -123,7 +154,7 @@ harden(assertPathSegment);
123
154
  */
124
155
 
125
156
  /**
126
- * @param {import('@agoric/base-zone').Zone} zone
157
+ * @param {import('@agoric/zone').Zone} zone
127
158
  */
128
159
  export const prepareChainStorageNode = zone => {
129
160
  /**
@@ -208,7 +239,7 @@ export const prepareChainStorageNode = zone => {
208
239
  return makeChainStorageNode;
209
240
  };
210
241
 
211
- const makeHeapChainStorageNode = prepareChainStorageNode(makeHeapZone());
242
+ const makeHeapChainStorageNode = prepareChainStorageNode(heapZone);
212
243
 
213
244
  /**
214
245
  * Create a heap-based root storage node for a given backing function and root path.
@@ -1,4 +1,3 @@
1
1
  export function getMethodNames<K extends PropertyKey>(val: Record<K, any>): K[];
2
- export function getStringMethodNames<K extends PropertyKey>(val: Record<K, any>): string[];
3
2
  export function bindAllMethods<T extends Record<PropertyKey, any>>(obj: T): T;
4
3
  //# sourceMappingURL=method-tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"method-tools.d.ts","sourceRoot":"","sources":["method-tools.js"],"names":[],"mappings":"AAyCO,gFAoBN;AAUM,kFAFM,MAAM,EAAE,CAKlB;AA+BI,8EAeJ"}
1
+ {"version":3,"file":"method-tools.d.ts","sourceRoot":"","sources":["method-tools.js"],"names":[],"mappings":"AAyCO,gFAoBN;AAgCM,8EAeJ"}
@@ -62,18 +62,6 @@ export const getMethodNames = val => {
62
62
  };
63
63
  harden(getMethodNames);
64
64
 
65
- /**
66
- * The subset of `getMethodNames` containing only string names, without symbols
67
- *
68
- * @template {PropertyKey} K
69
- * @param {Record<K, any>} val
70
- * @returns {string[]}
71
- */
72
- export const getStringMethodNames = val =>
73
- /** @type {string[]} */ (
74
- getMethodNames(val).filter(name => typeof name === 'string')
75
- );
76
-
77
65
  /**
78
66
  * TODO This function exists only to ease the
79
67
  * https://github.com/Agoric/agoric-sdk/pull/5970 transition, from all methods
@@ -37,5 +37,5 @@ export type BufferLineTransformOptions = {
37
37
  */
38
38
  breakEncoding?: BufferEncoding | undefined;
39
39
  };
40
- import { Transform } from 'node:stream';
40
+ import { Transform } from "stream";
41
41
  //# sourceMappingURL=buffer-line-transform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buffer-line-transform.d.ts","sourceRoot":"","sources":["buffer-line-transform.js"],"names":[],"mappings":";AAKA;;;;GAIG;AAEH;IACE;;;;;OAKG;IACH,oGAuBC;IAhBC,sCAAmC;IACnC,2CAAmC;IAWnC,qBAA+B;IAE/B,4BAA4B;IAC5B,SADW,MAAM,MAAM,CAAC,CACP;IAGnB;;;;;OAKG;IACH,2BAJW,GAAG,YACH,cAAc,GAAG,QAAQ,MACzB,OAAO,aAAa,EAAE,iBAAiB,QAgDjD;IAeD,2BAA2B;IAC3B,iBADY,MAAM,QAOjB;CACF;;;;;;;;;;;0BAnHyB,aAAa"}
1
+ {"version":3,"file":"buffer-line-transform.d.ts","sourceRoot":"","sources":["buffer-line-transform.js"],"names":[],"mappings":";AAKA;;;;GAIG;AAEH;IACE;;;;;OAKG;IACH,oGAuBC;IAhBC,sCAAmC;IACnC,2CAAmC;IAWnC,qBAA+B;IAE/B,4BAA4B;IAC5B,SADW,MAAM,MAAM,CAAC,CACP;IAGnB;;;;;OAKG;IACH,2BAJW,GAAG,YACH,cAAc,GAAG,QAAQ,MACzB,OAAO,aAAa,EAAE,iBAAiB,QAgDjD;IAeD,2BAA2B;IAC3B,iBADY,MAAM,QAOjB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["queue.js"],"names":[],"mappings":"AASO,uHAiDN"}
1
+ {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["queue.js"],"names":[],"mappings":"AAQO,uHAiDN"}
package/src/queue.js CHANGED
@@ -1,5 +1,4 @@
1
1
  // @jessie-check
2
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
3
2
 
4
3
  import { makePromiseKit } from '@endo/promise-kit';
5
4
 
@@ -44,10 +44,9 @@ export function makeMockChainStorageRoot(): {
44
44
  *
45
45
  * @param {string} path
46
46
  * @param {import('./lib-chainStorage.js').Marshaller} marshaller
47
- * @param {number} [index]
48
47
  * @returns {unknown}
49
48
  */
50
- getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller, index?: number | undefined) => unknown;
49
+ getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller) => unknown;
51
50
  keys: () => string[];
52
51
  getPath(): string;
53
52
  getStoreKey(): Promise<import("./lib-chainStorage.js").VStorageKey>;
@@ -64,10 +63,9 @@ export function makeMockChainStorageRoot(): {
64
63
  *
65
64
  * @param {string} path
66
65
  * @param {import('./lib-chainStorage.js').Marshaller} marshaller
67
- * @param {number} [index]
68
66
  * @returns {unknown}
69
67
  */
70
- getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller, index?: number | undefined) => unknown;
68
+ getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller) => unknown;
71
69
  keys: () => string[];
72
70
  getPath(): string;
73
71
  getStoreKey(): Promise<import("./lib-chainStorage.js").VStorageKey>;
@@ -83,7 +81,6 @@ export function makeMockChainStorageRoot(): {
83
81
  export type TotalMap<K, V> = {
84
82
  [Symbol.iterator]: () => IterableIterator<[K, V]>;
85
83
  [Symbol.toStringTag]: string;
86
- forEach: (callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any) => void;
87
84
  entries: () => IterableIterator<[K, V]>;
88
85
  keys: () => IterableIterator<K>;
89
86
  values: () => IterableIterator<V>;
@@ -92,6 +89,7 @@ export type TotalMap<K, V> = {
92
89
  set: (key: K, value: V) => Map<K, V>;
93
90
  clear: () => void;
94
91
  delete: (key: K) => boolean;
92
+ forEach: (callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any) => void;
95
93
  } & {
96
94
  get: (key: K) => V;
97
95
  };
@@ -1 +1 @@
1
- {"version":3,"file":"storage-test-utils.d.ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"AA+BO,yCAHI,MAAM,UACN,MAAM,wDAGC;AAElB;;;GAGG;AACH;;;;;EAEG;AAsBW,+CAAU,GAAG,GAAK,GAAG,CAAA;AAgC5B,6CAHI,MAAM,gBACN;;eAAwC,CAAC,CAAC;;;;;;;;;;;;;;;;;;yBAyBvC,OAAO,4BAA4B,EAAE,cAAc;;;;EAoFhE;AAIM;IAIH;;;;;;;;;;OAUG;oBAJQ,MAAM,eACN,OAAO,uBAAuB,EAAE,UAAU,iCAExC,OAAO;;;;;;;;;IATpB;;;;;;;;;;OAUG;oBAJQ,MAAM,eACN,OAAO,uBAAuB,EAAE,UAAU,iCAExC,OAAO;;;;;;;;GAWvB;;;;;;;;;;;;;;;;;;eApNiF,CAAC,KAAK,CAAC;;;6BA0L3E,WAAY,yBAAyB,CAAC;mCA2BtC,WAAW,+BAA+B,CAAC"}
1
+ {"version":3,"file":"storage-test-utils.d.ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"AAkCO,yCAHI,MAAM,UACN,MAAM,wDAGC;AAElB;;;GAGG;AACH;;;;;EAEG;AAsBW,+CAAU,GAAG,GAAK,GAAG,CAAA;AAgC5B,6CAHI,MAAM,gBACN;;eAAwC,CAAC,CAAC;;;;;;;;;;;;;;;;;;yBAyBvC,OAAO,4BAA4B,EAAE,cAAc;;;;EAoFhE;AAIM;IAIH;;;;;;;;;OASG;oBAHQ,MAAM,eACN,OAAO,uBAAuB,EAAE,UAAU,KACxC,OAAO;;;;;;;;;IARpB;;;;;;;;;OASG;oBAHQ,MAAM,eACN,OAAO,uBAAuB,EAAE,UAAU,KACxC,OAAO;;;;;;;;GAWvB;;;;;;;;;;;;;;;;;;eAnNiF,CAAC,KAAK,CAAC;;;6BA0L3E,WAAY,yBAAyB,CAAC;mCA0BtC,WAAW,+BAA+B,CAAC"}
@@ -1,9 +1,12 @@
1
1
  // @ts-check
2
2
  import { Far } from '@endo/far';
3
3
  import { makeMarshal, Remotable } from '@endo/marshal';
4
- import { unmarshalFromVstorage } from './marshal.js';
5
4
  import { makeTracer } from './debug.js';
6
- import { isStreamCell, makeChainStorageRoot } from './lib-chainStorage.js';
5
+ import {
6
+ isStreamCell,
7
+ makeChainStorageRoot,
8
+ unmarshalFromVstorage,
9
+ } from './lib-chainStorage.js';
7
10
  import { bindAllMethods } from './method-tools.js';
8
11
 
9
12
  const { Fail } = assert;
@@ -215,15 +218,14 @@ export const makeMockChainStorageRoot = () => {
215
218
  *
216
219
  * @param {string} path
217
220
  * @param {import('./lib-chainStorage.js').Marshaller} marshaller
218
- * @param {number} [index]
219
221
  * @returns {unknown}
220
222
  */
221
- getBody: (path, marshaller = defaultMarshaller, index = -1) => {
223
+ getBody: (path, marshaller = defaultMarshaller) => {
222
224
  data.size || Fail`no data in storage`;
223
225
  /** @type {ReturnType<typeof import('@endo/marshal').makeMarshal>['fromCapData']} */
224
226
  const fromCapData = (...args) =>
225
227
  Reflect.apply(marshaller.fromCapData, marshaller, args);
226
- return unmarshalFromVstorage(data, path, fromCapData, index);
228
+ return unmarshalFromVstorage(data, path, fromCapData);
227
229
  },
228
230
  keys: () => [...data.keys()],
229
231
  });
@@ -1,4 +1,2 @@
1
1
  export const StorageNodeShape: import("@endo/patterns").Matcher;
2
- /** To be used only for 'helper' facets where the calls are from trusted code. */
3
- export const UnguardedHelperI: import("@endo/patterns").InterfaceGuard<any>;
4
2
  //# sourceMappingURL=typeGuards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA,gEAA2D;AAE3D,iFAAiF;AACjF,4EAKE"}
1
+ {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA,gEAA2D"}
package/src/typeGuards.js CHANGED
@@ -3,11 +3,3 @@
3
3
  import { M } from '@endo/patterns';
4
4
 
5
5
  export const StorageNodeShape = M.remotable('StorageNode');
6
-
7
- /** To be used only for 'helper' facets where the calls are from trusted code. */
8
- export const UnguardedHelperI = M.interface(
9
- 'helper',
10
- {},
11
- // not exposed so sloppy okay
12
- { sloppy: true },
13
- );
@@ -1,2 +0,0 @@
1
- export * from "@endo/init/debug.js";
2
- //# sourceMappingURL=install-ses-debug.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"install-ses-debug.d.ts","sourceRoot":"","sources":["install-ses-debug.js"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- // This is like `@endo/init` but sacrificing safety to optimize
2
- // for debugging and testing. The difference is only the lockdown options.
3
- // The setting below are *unsafe* and should not be used in contact with
4
- // genuinely malicious code.
5
-
6
- export * from '@endo/init/debug.js';
@@ -1,3 +0,0 @@
1
- export default engineGC;
2
- declare const engineGC: () => void;
3
- //# sourceMappingURL=engine-gc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"engine-gc.d.ts","sourceRoot":"","sources":["engine-gc.js"],"names":[],"mappings":";AAoBA,mCAAwB"}