@agoric/internal 0.2.2-pismo-dev-0d5327f.0 → 0.3.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 +52 -0
- package/package.json +15 -7
- package/src/action-types.d.ts +16 -0
- package/src/action-types.d.ts.map +1 -0
- package/src/action-types.js +17 -0
- package/src/batched-deliver.d.ts +15 -0
- package/src/batched-deliver.d.ts.map +1 -0
- package/src/batched-deliver.js +50 -0
- package/src/callback.d.ts +23 -0
- package/src/callback.d.ts.map +1 -0
- package/src/callback.js +322 -0
- package/src/chain-storage-paths.d.ts +16 -0
- package/src/chain-storage-paths.d.ts.map +1 -0
- package/src/chain-storage-paths.js +17 -0
- package/src/config.d.ts +25 -0
- package/src/config.d.ts.map +1 -0
- package/src/config.js +20 -3
- package/src/debug.d.ts +2 -0
- package/src/debug.d.ts.map +1 -0
- package/src/debug.js +41 -0
- package/src/index.d.ts +6 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +7 -2
- package/src/lib-chainStorage.d.ts +179 -0
- package/src/lib-chainStorage.d.ts.map +1 -0
- package/src/lib-chainStorage.js +304 -0
- package/src/magic-cookie-test-only.d.ts +2 -0
- package/src/magic-cookie-test-only.d.ts.map +1 -0
- package/src/magic-cookie-test-only.js +11 -0
- package/src/method-tools.d.ts +3 -0
- package/src/method-tools.d.ts.map +1 -0
- package/src/method-tools.js +110 -0
- package/src/node/buffer-line-transform.d.ts +41 -0
- package/src/node/buffer-line-transform.d.ts.map +1 -0
- package/src/node/buffer-line-transform.js +119 -0
- package/src/node/createBundles.d.ts +4 -0
- package/src/node/createBundles.d.ts.map +1 -0
- package/src/node/createBundles.js +80 -0
- package/src/node/fs-stream.d.ts +8 -0
- package/src/node/fs-stream.d.ts.map +1 -0
- package/src/node/fs-stream.js +105 -0
- package/src/node/shutdown.d.ts +6 -0
- package/src/node/shutdown.d.ts.map +1 -0
- package/src/node/shutdown.js +81 -0
- package/src/priority-senders.d.ts +31 -0
- package/src/priority-senders.d.ts.map +1 -0
- package/src/priority-senders.js +104 -0
- package/src/queue.d.ts +2 -0
- package/src/queue.d.ts.map +1 -0
- package/src/queue.js +58 -0
- package/src/scratch.d.ts +19 -0
- package/src/scratch.d.ts.map +1 -0
- package/src/scratch.js +52 -0
- package/src/storage-test-utils.d.ts +99 -0
- package/src/storage-test-utils.d.ts.map +1 -0
- package/src/storage-test-utils.js +228 -0
- package/src/testing-utils.d.ts +2 -0
- package/src/testing-utils.d.ts.map +1 -0
- package/src/testing-utils.js +14 -0
- package/src/typeGuards.d.ts +2 -0
- package/src/typeGuards.d.ts.map +1 -0
- package/src/typeGuards.js +5 -0
- package/src/types.d.ts +20 -0
- package/src/upgrade-api.d.ts +8 -0
- package/src/upgrade-api.d.ts.map +1 -0
- package/src/upgrade-api.js +41 -0
- package/src/utils.d.ts +67 -0
- package/src/utils.d.ts.map +1 -0
- package/src/utils.js +232 -124
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,58 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.3.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/internal@0.2.1...@agoric/internal@0.3.0) (2023-05-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* emit smallcaps-format data in all marshallers
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* 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)
|
|
16
|
+
* **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)
|
|
17
|
+
* **casting:** handle noData value encoding ([530bc41](https://github.com/Agoric/agoric-sdk/commit/530bc41854cc7f5e5749e97e87fabc6163a17864))
|
|
18
|
+
* **cosmic-swingset:** add after-commit action ([970a53f](https://github.com/Agoric/agoric-sdk/commit/970a53f827ded21b27525f6b0042bbc124c62d48))
|
|
19
|
+
* **internal:** makeFakeStorageKit supports "get" and "entries" ([6a69aab](https://github.com/Agoric/agoric-sdk/commit/6a69aab5cb54faae5af631bbc2281e4fc4ede8e0))
|
|
20
|
+
* **internal:** new `prepareAttenuator` leveraging callbacks ([55599df](https://github.com/Agoric/agoric-sdk/commit/55599dfe7ec43a27387ca64e8bae57be13a38115))
|
|
21
|
+
* 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)
|
|
22
|
+
* **core:** HighPrioritySendersManager ([7b382e4](https://github.com/Agoric/agoric-sdk/commit/7b382e49a1521d367c5b8db18fa7efa2b77ef7e3))
|
|
23
|
+
* **cosmic-swingset:** basic snapshot wiring ([b1072d8](https://github.com/Agoric/agoric-sdk/commit/b1072d8b1ddabbb5f2835eb503c945fed3b6b080))
|
|
24
|
+
* **cosmic-swingset:** export swingStore kvData to vstorage ([be68431](https://github.com/Agoric/agoric-sdk/commit/be684315dc68ecf0cb603a8eb38ddd5418e996a6))
|
|
25
|
+
* **cosmic-swingset:** process highPriorityQueue actions ([182a96e](https://github.com/Agoric/agoric-sdk/commit/182a96e169c8cac7f31fbce014783fd6db72b64c))
|
|
26
|
+
* **cosmic-swingset:** remove unnecessary explicit activityhash ([5dcc44d](https://github.com/Agoric/agoric-sdk/commit/5dcc44d31be0c8a95a5749d768791fa35b72dbd3))
|
|
27
|
+
* **internal:** add BufferLineTransform ([6e7db7a](https://github.com/Agoric/agoric-sdk/commit/6e7db7af7d93500caf71d817afbb358d33ef01f6))
|
|
28
|
+
* **internal:** add sync tee util ([#7560](https://github.com/Agoric/agoric-sdk/issues/7560)) ([0f800a6](https://github.com/Agoric/agoric-sdk/commit/0f800a622b81c61101d96b0ad620ab3065f4b146))
|
|
29
|
+
* **internal:** build `chainStorage` from `zone` ([74c62da](https://github.com/Agoric/agoric-sdk/commit/74c62dae7964b488bfdf7c7ee8a9bd930074cea8))
|
|
30
|
+
* **internal:** iterable produces values and can be async ([cf4110f](https://github.com/Agoric/agoric-sdk/commit/cf4110f59c228e42e09254b271209a66b9faf3e0))
|
|
31
|
+
* **internal:** new `callback` module for durable classless callbacks ([b94d600](https://github.com/Agoric/agoric-sdk/commit/b94d60052e1043fd6fb1ce39530a6072e38ef0d9))
|
|
32
|
+
* **internal:** shutdown informs of interrupt signal ([2ce1e89](https://github.com/Agoric/agoric-sdk/commit/2ce1e892eb381a28c31805f48ba65511896ef406))
|
|
33
|
+
* assertAllDefined ([d4d6cbd](https://github.com/Agoric/agoric-sdk/commit/d4d6cbd798eee051a8a699c85cc620c6a8298258))
|
|
34
|
+
* board-utils ([4f80ad3](https://github.com/Agoric/agoric-sdk/commit/4f80ad3cac3e47a89834f7f98330a47141b6e235))
|
|
35
|
+
* type assertion for assertAllDefined ([afa7b5b](https://github.com/Agoric/agoric-sdk/commit/afa7b5bfaf4558a38bdba2c44bf91691f6db26b8))
|
|
36
|
+
* **store:** M.splitArray and M.splitRecord ([#6597](https://github.com/Agoric/agoric-sdk/issues/6597)) ([e7427e3](https://github.com/Agoric/agoric-sdk/commit/e7427e386bcbfbe99312b41342b1fa2e722c57c7))
|
|
37
|
+
* **vats:** harmonise core/boot.js and boot-psm.js ([4f6635e](https://github.com/Agoric/agoric-sdk/commit/4f6635e550b926d3ca43d9075f26fef3b810817d))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* **internal:** add typing to makeWithQueue ([5b1539b](https://github.com/Agoric/agoric-sdk/commit/5b1539bfc61ea4f937e2f85cbe93c7bccfc84a40))
|
|
43
|
+
* **internal:** Make makeFakeStorageKit value auto-wrapping depend upon `sequence: true` ([2751e76](https://github.com/Agoric/agoric-sdk/commit/2751e7626e0ca617cdb2b1d92e5d4d9315b5674a))
|
|
44
|
+
* **internal:** more callback typing ([e78e14d](https://github.com/Agoric/agoric-sdk/commit/e78e14d60a78d2e5f9fb9a899053bf778bb51360))
|
|
45
|
+
* **internal:** properly inherit from `chainStorageNode` ([134a977](https://github.com/Agoric/agoric-sdk/commit/134a977f7bc4a2fc6eff3868d4d415c8c9714b4b))
|
|
46
|
+
* **internal:** Restore support for passable-symbol method keys ([54271af](https://github.com/Agoric/agoric-sdk/commit/54271af10adb144fe6d562193afa473d74425854))
|
|
47
|
+
* **internal:** shutdown beforeExit avoids forced exit ([34c9f44](https://github.com/Agoric/agoric-sdk/commit/34c9f442f124cd7181b538cf8754c6180c863b32))
|
|
48
|
+
* **internal:** Validate Callback targets ([8880ada](https://github.com/Agoric/agoric-sdk/commit/8880ada791d70dd487770e8a0fa4b6b725aa8769))
|
|
49
|
+
* **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)
|
|
50
|
+
* adapt to deeplyFulfilled being async ([#6816](https://github.com/Agoric/agoric-sdk/issues/6816)) ([ec315e1](https://github.com/Agoric/agoric-sdk/commit/ec315e1634f6d5cdef1cddafc18777de7c04fecc))
|
|
51
|
+
* **telemetry:** partially undo [#6684](https://github.com/Agoric/agoric-sdk/issues/6684) ([b9fa85b](https://github.com/Agoric/agoric-sdk/commit/b9fa85b7307124e50cc3a84d3b694307cde55f54))
|
|
52
|
+
* avoid using top-level `require` ([57ca2db](https://github.com/Agoric/agoric-sdk/commit/57ca2dbfbadb373f97d43b2fb4e90302c9149976))
|
|
53
|
+
* **types:** type assertion for assertAllDefined ([25f16b2](https://github.com/Agoric/agoric-sdk/commit/25f16b2e935931b81313d2ee1d491b305088bb7a))
|
|
54
|
+
* track endo 1382 fix to 6570 ([#6612](https://github.com/Agoric/agoric-sdk/issues/6612)) ([7897761](https://github.com/Agoric/agoric-sdk/commit/7897761d6e19e6bbba42e7bd0bd5befb507afa08))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
6
58
|
### [0.2.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/internal@0.2.0...@agoric/internal@0.2.1) (2022-10-05)
|
|
7
59
|
|
|
8
60
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/internal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Externally unsupported utilities internal to agoric-sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "exit 0",
|
|
12
|
+
"prepack": "tsc --build jsconfig.build.json",
|
|
13
|
+
"postpack": "git clean -f '*.d.ts*'",
|
|
12
14
|
"test": "ava",
|
|
13
15
|
"test:nyc": "exit 0",
|
|
14
16
|
"test:xs": "exit 0",
|
|
@@ -18,13 +20,19 @@
|
|
|
18
20
|
"lint:types": "tsc -p jsconfig.json"
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
|
-
"@
|
|
22
|
-
"@endo/
|
|
23
|
-
"@endo/
|
|
23
|
+
"@agoric/zone": "^0.2.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",
|
|
29
|
+
"anylogger": "^0.21.0",
|
|
30
|
+
"jessie.js": "^0.3.2"
|
|
24
31
|
},
|
|
25
32
|
"devDependencies": {
|
|
26
|
-
"@endo/init": "^0.5.
|
|
27
|
-
"ava": "^
|
|
33
|
+
"@endo/init": "^0.5.56",
|
|
34
|
+
"ava": "^5.2.0",
|
|
35
|
+
"tsd": "^0.28.1"
|
|
28
36
|
},
|
|
29
37
|
"author": "Agoric",
|
|
30
38
|
"license": "Apache-2.0",
|
|
@@ -34,5 +42,5 @@
|
|
|
34
42
|
"publishConfig": {
|
|
35
43
|
"access": "public"
|
|
36
44
|
},
|
|
37
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "ea8c1c64911b4c58fb43635b25e17e3d50d0cf2a"
|
|
38
46
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const BOOTSTRAP_BLOCK: "BOOTSTRAP_BLOCK";
|
|
2
|
+
export const COSMOS_SNAPSHOT: "COSMOS_SNAPSHOT";
|
|
3
|
+
export const BEGIN_BLOCK: "BEGIN_BLOCK";
|
|
4
|
+
export const CALCULATE_FEES_IN_BEANS: "CALCULATE_FEES_IN_BEANS";
|
|
5
|
+
export const CORE_EVAL: "CORE_EVAL";
|
|
6
|
+
export const DELIVER_INBOUND: "DELIVER_INBOUND";
|
|
7
|
+
export const END_BLOCK: "END_BLOCK";
|
|
8
|
+
export const COMMIT_BLOCK: "COMMIT_BLOCK";
|
|
9
|
+
export const AFTER_COMMIT_BLOCK: "AFTER_COMMIT_BLOCK";
|
|
10
|
+
export const IBC_EVENT: "IBC_EVENT";
|
|
11
|
+
export const PLEASE_PROVISION: "PLEASE_PROVISION";
|
|
12
|
+
export const VBANK_BALANCE_UPDATE: "VBANK_BALANCE_UPDATE";
|
|
13
|
+
export const WALLET_ACTION: "WALLET_ACTION";
|
|
14
|
+
export const WALLET_SPEND_ACTION: "WALLET_SPEND_ACTION";
|
|
15
|
+
export const INSTALL_BUNDLE: "INSTALL_BUNDLE";
|
|
16
|
+
//# sourceMappingURL=action-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-types.d.ts","sourceRoot":"","sources":["action-types.js"],"names":[],"mappings":"AAEA,gDAAiD;AACjD,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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @jessie-check
|
|
2
|
+
|
|
3
|
+
export const BOOTSTRAP_BLOCK = 'BOOTSTRAP_BLOCK';
|
|
4
|
+
export const COSMOS_SNAPSHOT = 'COSMOS_SNAPSHOT';
|
|
5
|
+
export const BEGIN_BLOCK = 'BEGIN_BLOCK';
|
|
6
|
+
export const CALCULATE_FEES_IN_BEANS = 'CALCULATE_FEES_IN_BEANS';
|
|
7
|
+
export const CORE_EVAL = 'CORE_EVAL';
|
|
8
|
+
export const DELIVER_INBOUND = 'DELIVER_INBOUND';
|
|
9
|
+
export const END_BLOCK = 'END_BLOCK';
|
|
10
|
+
export const COMMIT_BLOCK = 'COMMIT_BLOCK';
|
|
11
|
+
export const AFTER_COMMIT_BLOCK = 'AFTER_COMMIT_BLOCK';
|
|
12
|
+
export const IBC_EVENT = 'IBC_EVENT';
|
|
13
|
+
export const PLEASE_PROVISION = 'PLEASE_PROVISION';
|
|
14
|
+
export const VBANK_BALANCE_UPDATE = 'VBANK_BALANCE_UPDATE';
|
|
15
|
+
export const WALLET_ACTION = 'WALLET_ACTION';
|
|
16
|
+
export const WALLET_SPEND_ACTION = 'WALLET_SPEND_ACTION';
|
|
17
|
+
export const INSTALL_BUNDLE = 'INSTALL_BUNDLE';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {(message: any[], ackNum: number) => void} DeliverMessages
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @param {DeliverMessages} deliver
|
|
6
|
+
* @param {{ clearTimeout: NodeJS.clearTimeout, setTimeout: NodeJS.setTimeout }} io
|
|
7
|
+
* @param {number} batchTimeoutMs
|
|
8
|
+
*/
|
|
9
|
+
export function makeBatchedDeliver(deliver: DeliverMessages, { clearTimeout, setTimeout }: {
|
|
10
|
+
clearTimeout: NodeJS.clearTimeout;
|
|
11
|
+
setTimeout: NodeJS.setTimeout;
|
|
12
|
+
}, batchTimeoutMs?: number): (newMessages: any[], ackNum: number) => void;
|
|
13
|
+
export const DEFAULT_BATCH_TIMEOUT_MS: 1000;
|
|
14
|
+
export type DeliverMessages = (message: any[], ackNum: number) => void;
|
|
15
|
+
//# sourceMappingURL=batched-deliver.d.ts.map
|
|
@@ -0,0 +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,gDAsChB;AA/CD,4CAA6C;wCAGtB,GAAG,EAAE,UAAU,MAAM,KAAK,IAAI"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// @jessie-check
|
|
2
|
+
|
|
3
|
+
export const DEFAULT_BATCH_TIMEOUT_MS = 1000;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {(message: any[], ackNum: number) => void} DeliverMessages
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @param {DeliverMessages} deliver
|
|
11
|
+
* @param {{ clearTimeout: NodeJS.clearTimeout, setTimeout: NodeJS.setTimeout }} io
|
|
12
|
+
* @param {number} batchTimeoutMs
|
|
13
|
+
*/
|
|
14
|
+
export function makeBatchedDeliver(
|
|
15
|
+
deliver,
|
|
16
|
+
{ clearTimeout, setTimeout },
|
|
17
|
+
batchTimeoutMs = DEFAULT_BATCH_TIMEOUT_MS,
|
|
18
|
+
) {
|
|
19
|
+
let batchedMessages = [];
|
|
20
|
+
let latestAckNum = 0;
|
|
21
|
+
let deliverTimeout;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @type {DeliverMessages}
|
|
25
|
+
*/
|
|
26
|
+
async function batchedDeliver(newMessages, ackNum) {
|
|
27
|
+
// If we have no existing messages, reset the deliver timeout.
|
|
28
|
+
//
|
|
29
|
+
// This defers sending an ack until the timeout expires or we have new
|
|
30
|
+
// messages.
|
|
31
|
+
if (!batchedMessages.length) {
|
|
32
|
+
clearTimeout(deliverTimeout);
|
|
33
|
+
deliverTimeout = setTimeout(() => {
|
|
34
|
+
// Transfer the batched messages to the deliver function.
|
|
35
|
+
const msgs = batchedMessages;
|
|
36
|
+
batchedMessages = [];
|
|
37
|
+
deliver(msgs, latestAckNum);
|
|
38
|
+
}, batchTimeoutMs);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Add new messages to the batch.
|
|
42
|
+
batchedMessages.push(...newMessages);
|
|
43
|
+
if (ackNum > latestAckNum) {
|
|
44
|
+
// Increase the latest ack.
|
|
45
|
+
latestAckNum = ackNum;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return batchedDeliver;
|
|
50
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function callSync<I extends (...args: unknown[]) => any>(callback: import("./types").SyncCallback<I>, ...args: Parameters<I>): ReturnType<I>;
|
|
2
|
+
export function callE<I extends (...args: unknown[]) => any>(callback: import("./types").Callback<I>, ...args: Parameters<I>): Promise<Awaited<ReturnType<I>>>;
|
|
3
|
+
export function makeSyncFunctionCallback<I extends (...args: unknown[]) => any, T extends (...args: [...B, ...Parameters<I>]) => ReturnType<I> = I, B extends unknown[] = []>(target: T, ...bound: B): import("./types").SyncCallback<I>;
|
|
4
|
+
export function makeFunctionCallback<I extends (...args: unknown[]) => any, T extends import("@endo/far").ERef<(...args: [...B, ...Parameters<I>]) => ReturnType<I>> = import("@endo/far").ERef<I>, B extends unknown[] = []>(target: T, ...bound: B): import("./types").Callback<I>;
|
|
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
|
+
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
|
+
export function isCallback(callback: any): callback is import("./types").Callback<any>;
|
|
8
|
+
export function prepareAttenuator<M extends PropertyKey>(zone: import('@agoric/zone').Zone, methodNames: M[], { interfaceGuard, tag }?: {
|
|
9
|
+
interfaceGuard?: InterfaceGuard | undefined;
|
|
10
|
+
tag?: string | undefined;
|
|
11
|
+
}): (args_0: {
|
|
12
|
+
target?: any;
|
|
13
|
+
isSync?: boolean | undefined;
|
|
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
|
+
tag?: string | undefined;
|
|
18
|
+
} | undefined): MakeAttenuator<any>;
|
|
19
|
+
export type MakeAttenuator<T> = MakeAttenuator<T>;
|
|
20
|
+
export type Callback<I extends (...args: unknown[]) => any> = import('./types').Callback<I>;
|
|
21
|
+
export type SyncCallback<I extends (...args: unknown[]) => any> = import('./types').SyncCallback<I>;
|
|
22
|
+
export type Farable<T> = import('@endo/eventual-send').RemotableBrand<{}, T> & T;
|
|
23
|
+
//# sourceMappingURL=callback.d.ts.map
|
|
@@ -0,0 +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,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
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { E } from '@endo/far';
|
|
3
|
+
import { isObject, isPassableSymbol } from '@endo/marshal';
|
|
4
|
+
|
|
5
|
+
const { Fail, quote: q } = assert;
|
|
6
|
+
|
|
7
|
+
const { fromEntries } = Object;
|
|
8
|
+
|
|
9
|
+
const { ownKeys: rawOwnKeys } = Reflect;
|
|
10
|
+
const ownKeys =
|
|
11
|
+
/** @type {<T extends PropertyKey>(obj: {[K in T]?: unknown}) => T[]} */ (
|
|
12
|
+
rawOwnKeys
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @template T
|
|
17
|
+
* @typedef {(...args: Parameters<ReturnType<prepareAttenuator>>) => Farable<T>} MakeAttenuator
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @template {(...args: unknown[]) => any} I
|
|
22
|
+
* @typedef {import('./types').Callback<I>} Callback
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @template {(...args: unknown[]) => any} I
|
|
27
|
+
* @typedef {import('./types').SyncCallback<I>} SyncCallback
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/** @template T @typedef {import('@endo/eventual-send').RemotableBrand<{}, T> & T} Farable */
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @param {unknown} key
|
|
34
|
+
* @returns {key is PropertyKey} FIXME: should be just `PropertyKey` but TS
|
|
35
|
+
* complains it can't be used as an index type.
|
|
36
|
+
*/
|
|
37
|
+
const isPropertyKey = key => {
|
|
38
|
+
switch (typeof key) {
|
|
39
|
+
case 'string':
|
|
40
|
+
case 'number':
|
|
41
|
+
case 'symbol':
|
|
42
|
+
return true;
|
|
43
|
+
default:
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Synchronously call a callback.
|
|
50
|
+
*
|
|
51
|
+
* @template {(...args: unknown[]) => any} I
|
|
52
|
+
* @param {SyncCallback<I>} callback
|
|
53
|
+
* @param {Parameters<I>} args
|
|
54
|
+
* @returns {ReturnType<I>}
|
|
55
|
+
*/
|
|
56
|
+
export const callSync = (callback, ...args) => {
|
|
57
|
+
const { target, methodName, bound } = callback;
|
|
58
|
+
if (methodName === undefined) {
|
|
59
|
+
return target(...bound, ...args);
|
|
60
|
+
}
|
|
61
|
+
return target[methodName](...bound, ...args);
|
|
62
|
+
};
|
|
63
|
+
harden(callSync);
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Eventual send to a callback.
|
|
67
|
+
*
|
|
68
|
+
* @template {(...args: unknown[]) => any} I
|
|
69
|
+
* @param {Callback<I>} callback
|
|
70
|
+
* @param {Parameters<I>} args
|
|
71
|
+
* @returns {Promise<Awaited<ReturnType<I>>>}
|
|
72
|
+
*/
|
|
73
|
+
export const callE = (callback, ...args) => {
|
|
74
|
+
const { target, methodName, bound } = callback;
|
|
75
|
+
if (methodName === undefined) {
|
|
76
|
+
return E(target)(...bound, ...args);
|
|
77
|
+
}
|
|
78
|
+
return E(target)[methodName](...bound, ...args);
|
|
79
|
+
};
|
|
80
|
+
harden(callE);
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Create a callback from a near function.
|
|
84
|
+
*
|
|
85
|
+
* @template {(...args: unknown[]) => any} I
|
|
86
|
+
* @template {(...args: [...B, ...Parameters<I>]) => ReturnType<I>} [T=I]
|
|
87
|
+
* @template {unknown[]} [B=[]]
|
|
88
|
+
* @param {T} target
|
|
89
|
+
* @param {B} bound
|
|
90
|
+
* @returns {SyncCallback<I>}
|
|
91
|
+
*/
|
|
92
|
+
export const makeSyncFunctionCallback = (target, ...bound) => {
|
|
93
|
+
typeof target === 'function' ||
|
|
94
|
+
Fail`sync function callback target must be a function: ${target}`;
|
|
95
|
+
/** @type {unknown} */
|
|
96
|
+
const cb = harden({ target, bound, isSync: true });
|
|
97
|
+
return /** @type {SyncCallback<I>} */ (cb);
|
|
98
|
+
};
|
|
99
|
+
harden(makeSyncFunctionCallback);
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Create a callback from a potentially far function.
|
|
103
|
+
*
|
|
104
|
+
* @template {(...args: unknown[]) => any} I
|
|
105
|
+
* @template {import('@endo/far').ERef<
|
|
106
|
+
* (...args: [...B, ...Parameters<I>]) => ReturnType<I>
|
|
107
|
+
* >} [T=import('@endo/far').ERef<I>]
|
|
108
|
+
* @template {unknown[]} [B=[]]
|
|
109
|
+
* @param {T} target
|
|
110
|
+
* @param {B} bound
|
|
111
|
+
* @returns {Callback<I>}
|
|
112
|
+
*/
|
|
113
|
+
export const makeFunctionCallback = (target, ...bound) => {
|
|
114
|
+
isObject(target) ||
|
|
115
|
+
Fail`function callback target must be a function presence: ${target}`;
|
|
116
|
+
/** @type {unknown} */
|
|
117
|
+
const cb = harden({ target, bound });
|
|
118
|
+
return /** @type {Callback<I>} */ (cb);
|
|
119
|
+
};
|
|
120
|
+
harden(makeFunctionCallback);
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Create a callback from a near method.
|
|
124
|
+
*
|
|
125
|
+
* @template {(...args: unknown[]) => any} I
|
|
126
|
+
* @template {PropertyKey} P
|
|
127
|
+
* @template {{
|
|
128
|
+
* [x in P]: (...args: [...B, ...Parameters<I>]) => ReturnType<I>
|
|
129
|
+
* }} [T={ [x in P]: I }]
|
|
130
|
+
* @template {unknown[]} [B=[]]
|
|
131
|
+
* @param {T} target
|
|
132
|
+
* @param {P} methodName
|
|
133
|
+
* @param {B} bound
|
|
134
|
+
* @returns {SyncCallback<I>}
|
|
135
|
+
*/
|
|
136
|
+
export const makeSyncMethodCallback = (target, methodName, ...bound) => {
|
|
137
|
+
isObject(target) ||
|
|
138
|
+
Fail`sync method callback target must be an object: ${target}`;
|
|
139
|
+
typeof methodName === 'string' ||
|
|
140
|
+
isPassableSymbol(methodName) ||
|
|
141
|
+
Fail`method name must be a string or passable symbol: ${methodName}`;
|
|
142
|
+
/** @type {unknown} */
|
|
143
|
+
const cb = harden({ target, methodName, bound, isSync: true });
|
|
144
|
+
return /** @type {SyncCallback<I>} */ (cb);
|
|
145
|
+
};
|
|
146
|
+
harden(makeSyncMethodCallback);
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Create a callback from a potentially far method.
|
|
150
|
+
*
|
|
151
|
+
* @template {(...args: unknown[]) => any} I
|
|
152
|
+
* @template {PropertyKey} P
|
|
153
|
+
* @template {import('@endo/far').ERef<{
|
|
154
|
+
* [x in P]: (...args: [...B, ...Parameters<I>]) => ReturnType<I>
|
|
155
|
+
* }>} [T=import('@endo/far').ERef<{ [x in P]: I }>]
|
|
156
|
+
* @template {unknown[]} [B=[]]
|
|
157
|
+
* @param {T} target
|
|
158
|
+
* @param {P} methodName
|
|
159
|
+
* @param {B} bound
|
|
160
|
+
* @returns {Callback<I>}
|
|
161
|
+
*/
|
|
162
|
+
export const makeMethodCallback = (target, methodName, ...bound) => {
|
|
163
|
+
isObject(target) || Fail`method callback target must be an object: ${target}`;
|
|
164
|
+
typeof methodName === 'string' ||
|
|
165
|
+
isPassableSymbol(methodName) ||
|
|
166
|
+
Fail`method name must be a string or passable symbol: ${methodName}`;
|
|
167
|
+
/** @type {unknown} */
|
|
168
|
+
const cb = harden({ target, methodName, bound });
|
|
169
|
+
return /** @type {Callback<I>} */ (cb);
|
|
170
|
+
};
|
|
171
|
+
harden(makeMethodCallback);
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @param {any} callback
|
|
175
|
+
* @returns {callback is Callback<any>}
|
|
176
|
+
*/
|
|
177
|
+
export const isCallback = callback => {
|
|
178
|
+
if (!isObject(callback)) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
const { target, methodName, bound } = callback;
|
|
182
|
+
return (
|
|
183
|
+
isObject(target) &&
|
|
184
|
+
(methodName === undefined ||
|
|
185
|
+
typeof methodName === 'string' ||
|
|
186
|
+
isPassableSymbol(methodName)) &&
|
|
187
|
+
Array.isArray(bound)
|
|
188
|
+
);
|
|
189
|
+
};
|
|
190
|
+
harden(isCallback);
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Prepare an attenuator class whose methods can be redirected via callbacks.
|
|
194
|
+
*
|
|
195
|
+
* @template {PropertyKey} M
|
|
196
|
+
* @param {import('@agoric/zone').Zone} zone The zone in which to allocate attenuators.
|
|
197
|
+
* @param {M[]} methodNames Methods to forward.
|
|
198
|
+
* @param {object} opts
|
|
199
|
+
* @param {InterfaceGuard} [opts.interfaceGuard] An interface guard for the
|
|
200
|
+
* new attenuator.
|
|
201
|
+
* @param {string} [opts.tag] A tag for the new attenuator exoClass.
|
|
202
|
+
*/
|
|
203
|
+
export const prepareAttenuator = (
|
|
204
|
+
zone,
|
|
205
|
+
methodNames,
|
|
206
|
+
{ interfaceGuard, tag = 'Attenuator' } = {},
|
|
207
|
+
) => {
|
|
208
|
+
/**
|
|
209
|
+
* @typedef {(this: any, ...args: unknown[]) => any} Method
|
|
210
|
+
* @typedef {{ [K in M]?: Callback<any> | null}} Overrides
|
|
211
|
+
* @typedef {{ [K in M]: (this: any, ...args: unknown[]) => any }} Methods
|
|
212
|
+
*/
|
|
213
|
+
const methods = /** @type {Methods} */ (
|
|
214
|
+
fromEntries(
|
|
215
|
+
methodNames.map(key => {
|
|
216
|
+
// Only allow the `PropertyKey` type for the target method key.
|
|
217
|
+
if (!isPropertyKey(key)) {
|
|
218
|
+
throw Fail`key ${q(key)} is not a PropertyKey`;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const m = /** @type {Methods} */ ({
|
|
222
|
+
// Explicitly use concise method syntax to preserve `this` but prevent
|
|
223
|
+
// constructor behavior.
|
|
224
|
+
/** @type {Method} */
|
|
225
|
+
[key](...args) {
|
|
226
|
+
// Support both synchronous and async callbacks.
|
|
227
|
+
const cb = this.state.cbs[key];
|
|
228
|
+
if (!cb) {
|
|
229
|
+
const err = assert.error(
|
|
230
|
+
`unimplemented ${q(tag)} method ${q(key)}`,
|
|
231
|
+
);
|
|
232
|
+
if (this.state.isSync) {
|
|
233
|
+
throw err;
|
|
234
|
+
}
|
|
235
|
+
return Promise.reject(err);
|
|
236
|
+
}
|
|
237
|
+
if (cb.isSync) {
|
|
238
|
+
return callSync(cb, ...args);
|
|
239
|
+
}
|
|
240
|
+
return callE(cb, ...args);
|
|
241
|
+
},
|
|
242
|
+
})[key];
|
|
243
|
+
return /** @type {const} */ ([key, m]);
|
|
244
|
+
}),
|
|
245
|
+
)
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Create an exo object whose behavior is composed from a default target
|
|
250
|
+
* and/or individual method override callbacks.
|
|
251
|
+
*
|
|
252
|
+
* @param {object} opts
|
|
253
|
+
* @param {unknown} [opts.target] The target for any methods that
|
|
254
|
+
* weren't specified in `opts.overrides`.
|
|
255
|
+
* @param {boolean} [opts.isSync=false] Whether the target should be treated
|
|
256
|
+
* as synchronously available.
|
|
257
|
+
* @param {Overrides} [opts.overrides] Set individual
|
|
258
|
+
* callbacks for methods (whose names must be defined in the
|
|
259
|
+
* `prepareAttenuator` or `prepareGuardedAttenuator` call). Nullish overrides
|
|
260
|
+
* mean to throw.
|
|
261
|
+
*/
|
|
262
|
+
const makeAttenuator = zone.exoClass(
|
|
263
|
+
tag,
|
|
264
|
+
interfaceGuard,
|
|
265
|
+
/**
|
|
266
|
+
* @param {object} opts
|
|
267
|
+
* @param {any} [opts.target]
|
|
268
|
+
* @param {boolean} [opts.isSync=false]
|
|
269
|
+
* @param {Overrides} [opts.overrides]
|
|
270
|
+
*/
|
|
271
|
+
({
|
|
272
|
+
target = null,
|
|
273
|
+
isSync = false,
|
|
274
|
+
overrides = /** @type {Overrides} */ ({}),
|
|
275
|
+
}) => {
|
|
276
|
+
const cbs = /** @type {Overrides} */ ({});
|
|
277
|
+
|
|
278
|
+
const remaining = new Set(methodNames);
|
|
279
|
+
for (const key of ownKeys(overrides)) {
|
|
280
|
+
remaining.has(key) ||
|
|
281
|
+
Fail`${q(tag)} overrides[${q(key)}] not allowed by methodNames`;
|
|
282
|
+
|
|
283
|
+
remaining.delete(key);
|
|
284
|
+
const cb = overrides[key];
|
|
285
|
+
cb == null ||
|
|
286
|
+
isCallback(cb) ||
|
|
287
|
+
Fail`${q(tag)} overrides[${q(key)}] is not a callback; got ${cb}`;
|
|
288
|
+
cbs[key] = cb;
|
|
289
|
+
}
|
|
290
|
+
for (const key of remaining) {
|
|
291
|
+
if (isSync) {
|
|
292
|
+
cbs[key] = makeSyncMethodCallback(target, key);
|
|
293
|
+
} else {
|
|
294
|
+
cbs[key] = makeMethodCallback(target, key);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return harden({ cbs, isSync });
|
|
298
|
+
},
|
|
299
|
+
/** @type {Methods} */ (methods),
|
|
300
|
+
);
|
|
301
|
+
return makeAttenuator;
|
|
302
|
+
};
|
|
303
|
+
harden(prepareAttenuator);
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Prepare an attenuator whose methodNames are derived from the interfaceGuard.
|
|
307
|
+
*
|
|
308
|
+
* @param {import('@agoric/zone').Zone} zone
|
|
309
|
+
* @param {InterfaceGuard} interfaceGuard
|
|
310
|
+
* @param {object} [opts]
|
|
311
|
+
* @param {string} [opts.tag]
|
|
312
|
+
*/
|
|
313
|
+
export const prepareGuardedAttenuator = (zone, interfaceGuard, opts = {}) => {
|
|
314
|
+
const { methodGuards } = interfaceGuard;
|
|
315
|
+
const methodNames = ownKeys(methodGuards);
|
|
316
|
+
const makeAttenuator = prepareAttenuator(zone, methodNames, {
|
|
317
|
+
...opts,
|
|
318
|
+
interfaceGuard,
|
|
319
|
+
});
|
|
320
|
+
return /** @type {MakeAttenuator<any>} */ (makeAttenuator);
|
|
321
|
+
};
|
|
322
|
+
harden(prepareGuardedAttenuator);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These identify top-level paths for SwingSet chain storage
|
|
3
|
+
* (and serve as prefixes).
|
|
4
|
+
* To avoid collisions, they should remain synchronized with
|
|
5
|
+
* golang/cosmos/x/swingset/keeper/keeper.go
|
|
6
|
+
*/
|
|
7
|
+
export const ACTION_QUEUE: "actionQueue";
|
|
8
|
+
export const HIGH_PRIORITY_QUEUE: "highPriorityQueue";
|
|
9
|
+
export const HIGH_PRIORITY_SENDERS: "highPrioritySenders";
|
|
10
|
+
export const BEANSOWING: "beansOwing";
|
|
11
|
+
export const EGRESS: "egress";
|
|
12
|
+
export const MAILBOX: "mailbox";
|
|
13
|
+
export const BUNDLES: "bundles";
|
|
14
|
+
export const CUSTOM: "published";
|
|
15
|
+
export const SWING_STORE: "swingStore";
|
|
16
|
+
//# sourceMappingURL=chain-storage-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain-storage-paths.d.ts","sourceRoot":"","sources":["chain-storage-paths.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,yCAA0C;AAC1C,sDAAuD;AACvD,0DAA2D;AAC3D,sCAAuC;AACvC,8BAA+B;AAC/B,gCAAiC;AACjC,gCAAiC;AACjC,iCAAkC;AAClC,uCAAwC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @jessie-check
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* These identify top-level paths for SwingSet chain storage
|
|
5
|
+
* (and serve as prefixes).
|
|
6
|
+
* To avoid collisions, they should remain synchronized with
|
|
7
|
+
* golang/cosmos/x/swingset/keeper/keeper.go
|
|
8
|
+
*/
|
|
9
|
+
export const ACTION_QUEUE = 'actionQueue';
|
|
10
|
+
export const HIGH_PRIORITY_QUEUE = 'highPriorityQueue';
|
|
11
|
+
export const HIGH_PRIORITY_SENDERS = 'highPrioritySenders';
|
|
12
|
+
export const BEANSOWING = 'beansOwing';
|
|
13
|
+
export const EGRESS = 'egress';
|
|
14
|
+
export const MAILBOX = 'mailbox';
|
|
15
|
+
export const BUNDLES = 'bundles';
|
|
16
|
+
export const CUSTOM = 'published';
|
|
17
|
+
export const SWING_STORE = 'swingStore';
|
package/src/config.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export namespace BridgeId {
|
|
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
|
+
}
|
|
10
|
+
export namespace WalletName {
|
|
11
|
+
const depositFacet: string;
|
|
12
|
+
}
|
|
13
|
+
export namespace VBankAccount {
|
|
14
|
+
namespace reserve {
|
|
15
|
+
const module: string;
|
|
16
|
+
const address: string;
|
|
17
|
+
}
|
|
18
|
+
namespace provision {
|
|
19
|
+
const module_1: string;
|
|
20
|
+
export { module_1 as module };
|
|
21
|
+
const address_1: string;
|
|
22
|
+
export { address_1 as address };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.js"],"names":[],"mappings":""}
|