@agoric/internal 0.3.3-dev-57802f9.0 → 0.3.3-other-dev-70beeb7.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/CHANGELOG.md +106 -0
- package/README.md +2 -7
- package/package.json +12 -19
- package/src/action-types.d.ts +0 -1
- package/src/action-types.d.ts.map +1 -1
- package/src/action-types.js +0 -1
- package/src/batched-deliver.d.ts +1 -1
- package/src/batched-deliver.d.ts.map +1 -1
- package/src/callback.d.ts +6 -14
- package/src/callback.d.ts.map +1 -1
- package/src/callback.js +7 -10
- package/src/config.d.ts +12 -12
- package/src/lib-chainStorage.d.ts +3 -2
- package/src/lib-chainStorage.d.ts.map +1 -1
- package/src/lib-chainStorage.js +35 -5
- package/src/method-tools.d.ts +0 -1
- package/src/method-tools.d.ts.map +1 -1
- package/src/method-tools.js +0 -12
- package/src/node/buffer-line-transform.d.ts +1 -1
- package/src/node/buffer-line-transform.d.ts.map +1 -1
- package/src/queue.d.ts.map +1 -1
- package/src/queue.js +1 -2
- package/src/storage-test-utils.d.ts +1 -1
- package/src/storage-test-utils.d.ts.map +1 -1
- package/src/storage-test-utils.js +5 -2
- package/src/typeGuards.d.ts +0 -2
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +0 -8
- package/src/install-ses-debug.d.ts +0 -2
- package/src/install-ses-debug.d.ts.map +0 -1
- package/src/install-ses-debug.js +0 -6
- package/src/lib-nodejs/engine-gc.d.ts +0 -3
- package/src/lib-nodejs/engine-gc.d.ts.map +0 -1
- package/src/lib-nodejs/engine-gc.js +0 -22
- package/src/lib-nodejs/gc-and-finalize.d.ts +0 -2
- package/src/lib-nodejs/gc-and-finalize.d.ts.map +0 -1
- package/src/lib-nodejs/gc-and-finalize.js +0 -91
- package/src/lib-nodejs/spawnSubprocessWorker.d.ts +0 -16
- package/src/lib-nodejs/spawnSubprocessWorker.d.ts.map +0 -1
- package/src/lib-nodejs/spawnSubprocessWorker.js +0 -87
- package/src/lib-nodejs/waitUntilQuiescent.d.ts +0 -2
- package/src/lib-nodejs/waitUntilQuiescent.d.ts.map +0 -1
- package/src/lib-nodejs/waitUntilQuiescent.js +0 -18
- package/src/lib-nodejs/worker-protocol.d.ts +0 -4
- package/src/lib-nodejs/worker-protocol.d.ts.map +0 -1
- package/src/lib-nodejs/worker-protocol.js +0 -56
- package/src/marshal.d.ts +0 -17
- package/src/marshal.d.ts.map +0 -1
- package/src/marshal.js +0 -119
- package/src/netstring.d.ts +0 -13
- package/src/netstring.d.ts.map +0 -1
- package/src/netstring.js +0 -119
- package/src/tokens.d.ts +0 -34
- package/src/tokens.d.ts.map +0 -1
- 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
|
|
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-
|
|
3
|
+
"version": "0.3.3-other-dev-70beeb7.0+70beeb7",
|
|
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
|
|
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,30 +17,23 @@
|
|
|
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/
|
|
24
|
-
"@
|
|
25
|
-
"@endo/
|
|
26
|
-
"@endo/
|
|
27
|
-
"@endo/
|
|
28
|
-
"@endo/
|
|
29
|
-
"@endo/promise-kit": "^0.2.59",
|
|
30
|
-
"@endo/stream": "^0.3.28",
|
|
23
|
+
"@agoric/zone": "0.2.3-other-dev-70beeb7.0+70beeb7",
|
|
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": "
|
|
36
|
-
"ava": "^5.
|
|
33
|
+
"@endo/init": "0.5.56",
|
|
34
|
+
"ava": "^5.2.0",
|
|
37
35
|
"tsd": "^0.28.1"
|
|
38
36
|
},
|
|
39
|
-
"ava": {
|
|
40
|
-
"require": [
|
|
41
|
-
"@endo/init/debug.js"
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
37
|
"author": "Agoric",
|
|
45
38
|
"license": "Apache-2.0",
|
|
46
39
|
"files": [
|
|
@@ -49,5 +42,5 @@
|
|
|
49
42
|
"publishConfig": {
|
|
50
43
|
"access": "public"
|
|
51
44
|
},
|
|
52
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "70beeb7e476f24cfad30fa8cd5918f04746e8839"
|
|
53
46
|
}
|
package/src/action-types.d.ts
CHANGED
|
@@ -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,
|
|
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"}
|
package/src/action-types.js
CHANGED
|
@@ -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';
|
package/src/batched-deliver.d.ts
CHANGED
|
@@ -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): (
|
|
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,
|
|
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/
|
|
9
|
-
interfaceGuard?:
|
|
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
|
-
overrides?: { [
|
|
15
|
-
}) => { [
|
|
16
|
-
export function prepareGuardedAttenuator
|
|
14
|
+
overrides?: { [K in M]?: import("./types").Callback<any> | null | undefined; } | undefined;
|
|
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/zone').Zone, interfaceGuard: InterfaceGuard, opts?: {
|
|
17
17
|
tag?: string | undefined;
|
|
18
18
|
} | undefined): MakeAttenuator<any>;
|
|
19
|
-
export type MakeAttenuator<T> =
|
|
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;
|
package/src/callback.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["callback.js"],"names":[],"mappings":"
|
|
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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import { E } from '@endo/far';
|
|
3
3
|
import { isObject, isPassableSymbol } from '@endo/marshal';
|
|
4
|
-
import { getInterfaceMethodKeys } from '@endo/patterns';
|
|
5
4
|
|
|
6
5
|
const { Fail, quote: q } = assert;
|
|
7
6
|
|
|
@@ -194,12 +193,10 @@ harden(isCallback);
|
|
|
194
193
|
* Prepare an attenuator class whose methods can be redirected via callbacks.
|
|
195
194
|
*
|
|
196
195
|
* @template {PropertyKey} M
|
|
197
|
-
* @param {import('@agoric/
|
|
196
|
+
* @param {import('@agoric/zone').Zone} zone The zone in which to allocate attenuators.
|
|
198
197
|
* @param {M[]} methodNames Methods to forward.
|
|
199
198
|
* @param {object} opts
|
|
200
|
-
* @param {
|
|
201
|
-
* [K in M]: import('@endo/patterns').MethodGuard
|
|
202
|
-
* }>} [opts.interfaceGuard] An interface guard for the
|
|
199
|
+
* @param {InterfaceGuard} [opts.interfaceGuard] An interface guard for the
|
|
203
200
|
* new attenuator.
|
|
204
201
|
* @param {string} [opts.tag] A tag for the new attenuator exoClass.
|
|
205
202
|
*/
|
|
@@ -268,7 +265,7 @@ export const prepareAttenuator = (
|
|
|
268
265
|
/**
|
|
269
266
|
* @param {object} opts
|
|
270
267
|
* @param {any} [opts.target]
|
|
271
|
-
* @param {boolean} [opts.isSync]
|
|
268
|
+
* @param {boolean} [opts.isSync=false]
|
|
272
269
|
* @param {Overrides} [opts.overrides]
|
|
273
270
|
*/
|
|
274
271
|
({
|
|
@@ -308,14 +305,14 @@ harden(prepareAttenuator);
|
|
|
308
305
|
/**
|
|
309
306
|
* Prepare an attenuator whose methodNames are derived from the interfaceGuard.
|
|
310
307
|
*
|
|
311
|
-
* @
|
|
312
|
-
* @param {
|
|
313
|
-
* @param {G} interfaceGuard
|
|
308
|
+
* @param {import('@agoric/zone').Zone} zone
|
|
309
|
+
* @param {InterfaceGuard} interfaceGuard
|
|
314
310
|
* @param {object} [opts]
|
|
315
311
|
* @param {string} [opts.tag]
|
|
316
312
|
*/
|
|
317
313
|
export const prepareGuardedAttenuator = (zone, interfaceGuard, opts = {}) => {
|
|
318
|
-
const
|
|
314
|
+
const { methodGuards } = interfaceGuard;
|
|
315
|
+
const methodNames = ownKeys(methodGuards);
|
|
319
316
|
const makeAttenuator = prepareAttenuator(zone, methodNames, {
|
|
320
317
|
...opts,
|
|
321
318
|
interfaceGuard,
|
package/src/config.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export namespace BridgeId {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
11
|
+
const depositFacet: string;
|
|
12
12
|
}
|
|
13
13
|
export namespace VBankAccount {
|
|
14
14
|
namespace reserve {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const module: string;
|
|
16
|
+
const address: string;
|
|
17
17
|
}
|
|
18
18
|
namespace provision {
|
|
19
|
-
|
|
19
|
+
const module_1: string;
|
|
20
20
|
export { module_1 as module };
|
|
21
|
-
|
|
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/
|
|
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:
|
|
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":"
|
|
1
|
+
{"version":3,"file":"lib-chainStorage.d.ts","sourceRoot":"","sources":["lib-chainStorage.js"],"names":[],"mappings":"AAmPA;;;;;;;;;;;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;IASpC,qFAAqF;wBAAnE,MAAM;;oBAA8C,WAAW;IAWjF,+CAA+C;oBAA5B,MAAM,GAAK,QAAQ,IAAI,CAAC;GAoDhD;AAUD;;;;;;;;GAQG;AACH,qDAJW,OAAO,WAAW,EAAE,IAAI,CAAC,WAAW,QAAE,aACtC,MAAM,GACJ,QAAQ,WAAW,CAAC,CAMhC;AAlOM,mCAHI,GAAG,+BAQ8B;AASrC,oCAHI,OAAO,2DASjB;AAWM,4CALI,IAAI,MAAM,EAAE,MAAM,CAAC,OACnB,MAAM,eACN,WAAW,cAAc,eAAe,EAAE,WAAW,CAAC,CAAC,aAAa,CAAC,mCAwB/E;AAgBD,qCAAqC;AACrC,uCADkB,MAAM,KAAK,IAAI,CAI/B;AAwBK,8CAFI,OAAO,cAAc,EAAE,IAAI,oDAqBiB,cAAc,KAAK,GAAG;;;;IAcvE;;;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;IASpC,qFAAqF;wBAAnE,MAAM;;oBAA8C,WAAW;IAWjF,+CAA+C;oBAA5B,MAAM,GAAK,QAAQ,IAAI,CAAC;GA0BhD;AA0DM,oDAJI,OAAO,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,cACrC,OAAO,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAC1B,OAAO,KAAK,QAAQ,IAAI,CAAC,CAQ7C;yBAvSa,WAAW,cAAc,eAAe,EAAE,WAAW,CAAC;2BACtD,KAAK,UAAU,EAAE,aAAa,CAAC;;;;;eAM/B,MAAM;iBACN,MAAM;qBACN,MAAM;;;;;;;iBAON,MAAM;YACN,CAAC,EAAE;;;;;;;;;;;;;;;qBAaI,MAAM,KAAK,QAAQ,IAAI,CAAC;;;;aAC/B,MAAM,MAAM;;;;iBACZ,MAAM,QAAQ,WAAW,CAAC;6BAChB,MAAM,YAAY;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAC,KAAK,WAAW;;;;;;aA8EhE,MAAM,QAAQ,MAAM,CAAC;;;;iBACrB,WAAW,CAAC,aAAa,CAAC;;;;qBAC1B,MAAM,YAAY;;;;;4CAmBlB,KAAK,GAAG,aAAa,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAE,MAAM;;;;gDACzE,KAAK,GAAG,kBAAkB,GAAG,QAAQ;;;;mCACtC,6BAA6B,GAAG,iCAAiC;;;;0CAChE,CAAC,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"}
|
package/src/lib-chainStorage.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
3
|
import { E } from '@endo/far';
|
|
4
|
-
import { M } from '@
|
|
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
|
|
@@ -95,7 +126,6 @@ harden(assertCapData);
|
|
|
95
126
|
// Must be nonempty and disallow (unescaped) `.`, and for simplicity
|
|
96
127
|
// (and future possibility of e.g. escaping) we currently limit to
|
|
97
128
|
// ASCII alphanumeric plus underscore and dash.
|
|
98
|
-
// Should remain consistent with golang/cosmos/x/vstorage/types/path_keys.go
|
|
99
129
|
const pathSegmentPattern = /^[a-zA-Z0-9_-]{1,100}$/;
|
|
100
130
|
|
|
101
131
|
/** @type {(name: string) => void} */
|
|
@@ -124,7 +154,7 @@ harden(assertPathSegment);
|
|
|
124
154
|
*/
|
|
125
155
|
|
|
126
156
|
/**
|
|
127
|
-
* @param {import('@agoric/
|
|
157
|
+
* @param {import('@agoric/zone').Zone} zone
|
|
128
158
|
*/
|
|
129
159
|
export const prepareChainStorageNode = zone => {
|
|
130
160
|
/**
|
|
@@ -209,7 +239,7 @@ export const prepareChainStorageNode = zone => {
|
|
|
209
239
|
return makeChainStorageNode;
|
|
210
240
|
};
|
|
211
241
|
|
|
212
|
-
const makeHeapChainStorageNode = prepareChainStorageNode(
|
|
242
|
+
const makeHeapChainStorageNode = prepareChainStorageNode(heapZone);
|
|
213
243
|
|
|
214
244
|
/**
|
|
215
245
|
* Create a heap-based root storage node for a given backing function and root path.
|
package/src/method-tools.d.ts
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"method-tools.d.ts","sourceRoot":"","sources":["method-tools.js"],"names":[],"mappings":"AAyCO,gFAoBN;AAgCM,8EAeJ"}
|
package/src/method-tools.js
CHANGED
|
@@ -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
|
|
@@ -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
|
|
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"}
|
package/src/queue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["queue.js"],"names":[],"mappings":"
|
|
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
|
|
|
@@ -17,7 +16,7 @@ export const makeWithQueue = () => {
|
|
|
17
16
|
}
|
|
18
17
|
const [thunk, resolve, reject] = queue[0];
|
|
19
18
|
// Run the thunk in a new turn.
|
|
20
|
-
|
|
19
|
+
Promise.resolve()
|
|
21
20
|
.then(thunk)
|
|
22
21
|
// Resolve or reject our caller with the thunk's value.
|
|
23
22
|
.then(resolve, reject)
|
|
@@ -83,7 +83,6 @@ export function makeMockChainStorageRoot(): {
|
|
|
83
83
|
export type TotalMap<K, V> = {
|
|
84
84
|
[Symbol.iterator]: () => IterableIterator<[K, V]>;
|
|
85
85
|
[Symbol.toStringTag]: string;
|
|
86
|
-
forEach: (callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any) => void;
|
|
87
86
|
entries: () => IterableIterator<[K, V]>;
|
|
88
87
|
keys: () => IterableIterator<K>;
|
|
89
88
|
values: () => IterableIterator<V>;
|
|
@@ -92,6 +91,7 @@ export type TotalMap<K, V> = {
|
|
|
92
91
|
set: (key: K, value: V) => Map<K, V>;
|
|
93
92
|
clear: () => void;
|
|
94
93
|
delete: (key: K) => boolean;
|
|
94
|
+
forEach: (callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any) => void;
|
|
95
95
|
} & {
|
|
96
96
|
get: (key: K) => V;
|
|
97
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-test-utils.d.ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"
|
|
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;;;;;;;;;;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,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 {
|
|
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;
|
package/src/typeGuards.d.ts
CHANGED
|
@@ -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<Record<PropertyKey, import("@endo/patterns").MethodGuard>>;
|
|
4
2
|
//# sourceMappingURL=typeGuards.d.ts.map
|
package/src/typeGuards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA,gEAA2D
|
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install-ses-debug.d.ts","sourceRoot":"","sources":["install-ses-debug.js"],"names":[],"mappings":""}
|
package/src/install-ses-debug.js
DELETED
|
@@ -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
|
-
import '@endo/init/debug.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"engine-gc.d.ts","sourceRoot":"","sources":["engine-gc.js"],"names":[],"mappings":";AAoBA,mCAAwB"}
|