@agoric/internal 0.3.3-u11.0 → 0.3.3-upgrade-16-dev-8879538.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 (77) hide show
  1. package/README.md +7 -2
  2. package/exported.js +2 -0
  3. package/package.json +32 -16
  4. package/src/batched-deliver.d.ts +6 -6
  5. package/src/batched-deliver.d.ts.map +1 -1
  6. package/src/batched-deliver.js +6 -3
  7. package/src/callback.d.ts +23 -16
  8. package/src/callback.d.ts.map +1 -1
  9. package/src/callback.js +19 -25
  10. package/src/config.d.ts +21 -12
  11. package/src/config.d.ts.map +1 -1
  12. package/src/config.js +10 -2
  13. package/src/debug.d.ts +1 -1
  14. package/src/index.d.ts +3 -0
  15. package/src/index.js +7 -1
  16. package/src/install-ses-debug.d.ts +2 -0
  17. package/src/install-ses-debug.d.ts.map +1 -0
  18. package/src/install-ses-debug.js +6 -0
  19. package/src/lib-chainStorage.d.ts +25 -45
  20. package/src/lib-chainStorage.d.ts.map +1 -1
  21. package/src/lib-chainStorage.js +16 -41
  22. package/src/lib-nodejs/engine-gc.d.ts +3 -0
  23. package/src/lib-nodejs/engine-gc.d.ts.map +1 -0
  24. package/src/lib-nodejs/engine-gc.js +22 -0
  25. package/src/lib-nodejs/gc-and-finalize.d.ts +2 -0
  26. package/src/lib-nodejs/gc-and-finalize.d.ts.map +1 -0
  27. package/src/lib-nodejs/gc-and-finalize.js +91 -0
  28. package/src/lib-nodejs/spawnSubprocessWorker.d.ts +15 -0
  29. package/src/lib-nodejs/spawnSubprocessWorker.d.ts.map +1 -0
  30. package/src/lib-nodejs/spawnSubprocessWorker.js +87 -0
  31. package/src/lib-nodejs/waitUntilQuiescent.d.ts +2 -0
  32. package/src/lib-nodejs/waitUntilQuiescent.d.ts.map +1 -0
  33. package/src/lib-nodejs/waitUntilQuiescent.js +18 -0
  34. package/src/lib-nodejs/worker-protocol.d.ts +4 -0
  35. package/src/lib-nodejs/worker-protocol.d.ts.map +1 -0
  36. package/src/lib-nodejs/worker-protocol.js +56 -0
  37. package/src/marshal.d.ts +19 -0
  38. package/src/marshal.d.ts.map +1 -0
  39. package/src/marshal.js +132 -0
  40. package/src/method-tools.d.ts +1 -0
  41. package/src/method-tools.d.ts.map +1 -1
  42. package/src/method-tools.js +12 -0
  43. package/src/netstring.d.ts +25 -0
  44. package/src/netstring.d.ts.map +1 -0
  45. package/src/netstring.js +127 -0
  46. package/src/node/buffer-line-transform.d.ts +2 -3
  47. package/src/node/buffer-line-transform.d.ts.map +1 -1
  48. package/src/node/createBundles.d.ts.map +1 -1
  49. package/src/node/createBundles.js +9 -2
  50. package/src/node/fs-stream.d.ts.map +1 -1
  51. package/src/node/fs-stream.js +1 -2
  52. package/src/priority-senders.d.ts +1 -1
  53. package/src/priority-senders.d.ts.map +1 -1
  54. package/src/queue.d.ts +1 -1
  55. package/src/queue.d.ts.map +1 -1
  56. package/src/queue.js +5 -6
  57. package/src/scratch.d.ts +1 -1
  58. package/src/scratch.d.ts.map +1 -1
  59. package/src/storage-test-utils.d.ts +34 -75
  60. package/src/storage-test-utils.d.ts.map +1 -1
  61. package/src/storage-test-utils.js +27 -14
  62. package/src/tagged.d.ts +155 -0
  63. package/src/tokens.d.ts +34 -0
  64. package/src/tokens.d.ts.map +1 -0
  65. package/src/tokens.js +35 -0
  66. package/src/typeGuards.d.ts +2 -0
  67. package/src/typeGuards.d.ts.map +1 -1
  68. package/src/typeGuards.js +8 -0
  69. package/src/types.d.ts +37 -0
  70. package/src/types.js +2 -0
  71. package/src/upgrade-api.d.ts +13 -4
  72. package/src/upgrade-api.d.ts.map +1 -1
  73. package/src/upgrade-api.js +26 -18
  74. package/src/utils.d.ts +5 -13
  75. package/src/utils.d.ts.map +1 -1
  76. package/src/utils.js +9 -164
  77. package/CHANGELOG.md +0 -106
package/README.md CHANGED
@@ -10,11 +10,16 @@ Like all `@agoric` packages it follows Semantic Versioning. Unlike the others, i
10
10
 
11
11
  # Design
12
12
 
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.
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.
14
20
 
15
21
  It must never export ambient types.
16
22
 
17
23
  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:
18
24
  - https://github.com/import-js/eslint-plugin-import/issues/1810
19
25
  - https://github.com/microsoft/TypeScript/issues/33079 (or some related problem with JSdoc types)
20
-
package/exported.js ADDED
@@ -0,0 +1,2 @@
1
+ // Dummy file for .d.ts twin to declare ambients
2
+ export {};
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@agoric/internal",
3
- "version": "0.3.3-u11.0",
3
+ "version": "0.3.3-upgrade-16-dev-8879538.0+8879538",
4
4
  "description": "Externally unsupported utilities internal to agoric-sdk",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "engines": {
8
- "node": ">=14.15.0"
8
+ "node": "^18.12 || ^20.9"
9
9
  },
10
10
  "scripts": {
11
11
  "build": "exit 0",
12
- "prepack": "tsc --build jsconfig.build.json",
12
+ "prepack": "tsc --build tsconfig.build.json",
13
13
  "postpack": "git clean -f '*.d.ts*'",
14
14
  "test": "ava",
15
15
  "test:nyc": "exit 0",
@@ -17,30 +17,46 @@
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 -p jsconfig.json"
20
+ "lint:types": "tsc"
21
21
  },
22
22
  "dependencies": {
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",
23
+ "@agoric/assert": "0.6.1-upgrade-16-dev-8879538.0+8879538",
24
+ "@agoric/base-zone": "0.1.1-upgrade-16-dev-8879538.0+8879538",
25
+ "@endo/common": "^1.2.2",
26
+ "@endo/far": "^1.1.2",
27
+ "@endo/init": "^1.1.2",
28
+ "@endo/marshal": "^1.5.0",
29
+ "@endo/pass-style": "^1.4.0",
30
+ "@endo/patterns": "^1.4.0",
31
+ "@endo/promise-kit": "^1.1.2",
32
+ "@endo/stream": "^1.2.2",
29
33
  "anylogger": "^0.21.0",
30
- "jessie.js": "^0.3.2"
34
+ "jessie.js": "^0.3.4"
31
35
  },
32
36
  "devDependencies": {
33
- "@endo/init": "^0.5.56",
34
- "ava": "^5.2.0",
35
- "tsd": "^0.28.1"
37
+ "@endo/init": "^1.1.2",
38
+ "ava": "^5.3.0",
39
+ "tsd": "^0.30.7"
40
+ },
41
+ "ava": {
42
+ "require": [
43
+ "@endo/init/debug.js"
44
+ ],
45
+ "files": [
46
+ "test/**/*.test.*"
47
+ ]
36
48
  },
37
49
  "author": "Agoric",
38
50
  "license": "Apache-2.0",
39
51
  "files": [
40
- "src"
52
+ "src",
53
+ "exported.js"
41
54
  ],
42
55
  "publishConfig": {
43
56
  "access": "public"
44
57
  },
45
- "gitHead": "92b6cd72484079b0349d8ccfa4510aeb820e8d67"
58
+ "typeCoverage": {
59
+ "atLeast": 93.81
60
+ },
61
+ "gitHead": "8879538cd1d125a08346f02dd5701d0d70c90bb8"
46
62
  }
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @typedef {(message: any[], ackNum: number) => void} DeliverMessages
2
+ * @typedef {(message: unknown[], ackNum: number) => Promise<void>} DeliverMessages
3
3
  */
4
4
  /**
5
5
  * @param {DeliverMessages} deliver
6
- * @param {{ clearTimeout: NodeJS.clearTimeout, setTimeout: NodeJS.setTimeout }} io
6
+ * @param {{ clearTimeout: import('node:timers').clearTimeout, setTimeout: import('node:timers').setTimeout }} io
7
7
  * @param {number} batchTimeoutMs
8
8
  */
9
9
  export function makeBatchedDeliver(deliver: DeliverMessages, { clearTimeout, setTimeout }: {
10
- clearTimeout: NodeJS.clearTimeout;
11
- setTimeout: NodeJS.setTimeout;
12
- }, batchTimeoutMs?: number): (newMessages: any[], ackNum: number) => void;
10
+ clearTimeout: typeof clearTimeout;
11
+ setTimeout: typeof setTimeout;
12
+ }, batchTimeoutMs?: number): (message: unknown[], ackNum: number) => Promise<void>;
13
13
  export const DEFAULT_BATCH_TIMEOUT_MS: 1000;
14
- export type DeliverMessages = (message: any[], ackNum: number) => void;
14
+ export type DeliverMessages = (message: unknown[], ackNum: number) => Promise<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,gDAsChB;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":"AAKA;;GAEG;AAEH;;;;GAIG;AACH,4CAJW,eAAe,gCACf;IAAE,YAAY,sBAAqC;IAAC,UAAU,oBAAkC;CAAE,mBAClG,MAAM,aANM,OAAO,EAAE,UAAU,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CA8CjE;AAjDD,4CAA6C;8BAGhC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC"}
@@ -1,14 +1,15 @@
1
1
  // @jessie-check
2
+ // @ts-check
2
3
 
3
4
  export const DEFAULT_BATCH_TIMEOUT_MS = 1000;
4
5
 
5
6
  /**
6
- * @typedef {(message: any[], ackNum: number) => void} DeliverMessages
7
+ * @typedef {(message: unknown[], ackNum: number) => Promise<void>} DeliverMessages
7
8
  */
8
9
 
9
10
  /**
10
11
  * @param {DeliverMessages} deliver
11
- * @param {{ clearTimeout: NodeJS.clearTimeout, setTimeout: NodeJS.setTimeout }} io
12
+ * @param {{ clearTimeout: import('node:timers').clearTimeout, setTimeout: import('node:timers').setTimeout }} io
12
13
  * @param {number} batchTimeoutMs
13
14
  */
14
15
  export function makeBatchedDeliver(
@@ -16,8 +17,10 @@ export function makeBatchedDeliver(
16
17
  { clearTimeout, setTimeout },
17
18
  batchTimeoutMs = DEFAULT_BATCH_TIMEOUT_MS,
18
19
  ) {
20
+ /** @type {unknown[]} */
19
21
  let batchedMessages = [];
20
22
  let latestAckNum = 0;
23
+ /** @type {NodeJS.Timeout} */
21
24
  let deliverTimeout;
22
25
 
23
26
  /**
@@ -34,7 +37,7 @@ export function makeBatchedDeliver(
34
37
  // Transfer the batched messages to the deliver function.
35
38
  const msgs = batchedMessages;
36
39
  batchedMessages = [];
37
- deliver(msgs, latestAckNum);
40
+ void deliver(msgs, latestAckNum);
38
41
  }, batchTimeoutMs);
39
42
  }
40
43
 
package/src/callback.d.ts CHANGED
@@ -1,23 +1,30 @@
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;
1
+ export function callSync<I extends (...args: unknown[]) => any>(callback: SyncCallback<I>, ...args: Parameters<I>): ReturnType<I>;
2
+ export function callE<I extends (...args: unknown[]) => any>(callback: 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): SyncCallback<I>;
4
+ export function makeFunctionCallback<I extends (...args: unknown[]) => any, T extends ERef<(...args: [...B, ...Parameters<I>]) => ReturnType<I>> = ERef<I>, B extends unknown[] = []>(target: T, ...bound: B): 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): SyncCallback<I>;
6
+ export function makeMethodCallback<I extends (...args: unknown[]) => any, P extends PropertyKey, T extends ERef<{ [x in P]: (...args: [...B, ...Parameters<I>]) => ReturnType<I>; }> = ERef<{ [x_1 in P]: I; }>, B extends unknown[] = []>(target: T, methodName: P, ...bound: B): Callback<I>;
7
+ export function isCallback(callback: any): callback is 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<{ [K in M]: import("@endo/patterns").MethodGuard; }> | undefined;
10
10
  tag?: string | undefined;
11
11
  }): (args_0: {
12
12
  target?: any;
13
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?: {
14
+ overrides?: { [K_1 in M]?: Callback<any> | null | undefined; } | undefined;
15
+ }) => import("@endo/exo").Guarded<{ [K_2 in M]: (this: any, ...args: unknown[]) => any; }>;
16
+ export function prepareGuardedAttenuator<G extends import("@endo/patterns").InterfaceGuard<Record<PropertyKey, import("@endo/patterns").MethodGuard>>>(zone: import("@agoric/base-zone").Zone, interfaceGuard: G, opts?: {
17
17
  tag?: string | undefined;
18
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;
19
+ export type MakeAttenuator<T extends import("@endo/exo").Methods> = (...args: Parameters<ReturnType<(<M extends PropertyKey>(zone: import("@agoric/base-zone").Zone, methodNames: M[], { interfaceGuard, tag }?: {
20
+ interfaceGuard?: import("@endo/patterns").InterfaceGuard<{ [K in M]: import("@endo/patterns").MethodGuard; }> | undefined;
21
+ tag?: string | undefined;
22
+ }) => (args_0: {
23
+ target?: any;
24
+ isSync?: boolean | undefined;
25
+ overrides?: { [K_1 in M]?: Callback<any> | null | undefined; } | undefined;
26
+ }) => import("@endo/exo").Guarded<{ [K_2 in M]: (this: any, ...args: unknown[]) => any; }>)>>) => import("@endo/exo").Farable<T>;
27
+ import type { SyncCallback } from './types.js';
28
+ import type { Callback } from './types.js';
29
+ import type { ERef } from '@endo/far';
23
30
  //# sourceMappingURL=callback.d.ts.map
@@ -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,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"}
1
+ {"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["callback.js"],"names":[],"mappings":"AA+CO,yBAFiB,CAAC,mBAHD,O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qCAHI,GAAG,6BAeb;AAgBM,kCARI,CAAC,4BADD,OAAO,mBAAmB,EAAE,IAAI,eAChC,CAAC,EAAE;IAID,cAAc;IAEF,GAAG;;aAkEb,GAAG;;;uDAxDgB,GAAG,WAAW,OAAO,EAAE,KAAK,GAAG,KA2FhE;AAYM,yCAJI,CAAC,mHADD,OAAO,mBAAmB,EAAE,IAAI,kBAChC,CAAC;;gBAUQ,cAAc,CAAC,GAAG,CAAC,CACtC;2BAtSgG,CAAC,wCAArF,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,UAAU,GAwKjC,CAAC,4BADD,OAAO,mBAAmB,EAAE,IAAI,eAChC,CAAC,EAAE;IAID,cAAc;IAEF,GAAG;;;;;uDAUM,GAAG,WAAW,OAAO,EAAE,cAxLM,CAAC,KAAK,OAAO,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;kCAdvD,YAAY;8BAAZ,YAAY;0BAD9B,WAAW"}
package/src/callback.js CHANGED
@@ -1,6 +1,10 @@
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
+
6
+ /** @import { ERef } from '@endo/far' */
7
+ /** @import { Callback, SyncCallback } from './types.js' */
4
8
 
5
9
  const { Fail, quote: q } = assert;
6
10
 
@@ -13,22 +17,10 @@ const ownKeys =
13
17
  );
14
18
 
15
19
  /**
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
20
+ * @template {import('@endo/exo').Methods} T
21
+ * @typedef {(...args: Parameters<ReturnType<prepareAttenuator>>) => import('@endo/exo').Farable<T>} MakeAttenuator
28
22
  */
29
23
 
30
- /** @template T @typedef {import('@endo/eventual-send').RemotableBrand<{}, T> & T} Farable */
31
-
32
24
  /**
33
25
  * @param {unknown} key
34
26
  * @returns {key is PropertyKey} FIXME: should be just `PropertyKey` but TS
@@ -102,9 +94,9 @@ harden(makeSyncFunctionCallback);
102
94
  * Create a callback from a potentially far function.
103
95
  *
104
96
  * @template {(...args: unknown[]) => any} I
105
- * @template {import('@endo/far').ERef<
97
+ * @template {ERef<
106
98
  * (...args: [...B, ...Parameters<I>]) => ReturnType<I>
107
- * >} [T=import('@endo/far').ERef<I>]
99
+ * >} [T=ERef<I>]
108
100
  * @template {unknown[]} [B=[]]
109
101
  * @param {T} target
110
102
  * @param {B} bound
@@ -150,9 +142,9 @@ harden(makeSyncMethodCallback);
150
142
  *
151
143
  * @template {(...args: unknown[]) => any} I
152
144
  * @template {PropertyKey} P
153
- * @template {import('@endo/far').ERef<{
145
+ * @template {ERef<{
154
146
  * [x in P]: (...args: [...B, ...Parameters<I>]) => ReturnType<I>
155
- * }>} [T=import('@endo/far').ERef<{ [x in P]: I }>]
147
+ * }>} [T=ERef<{ [x in P]: I }>]
156
148
  * @template {unknown[]} [B=[]]
157
149
  * @param {T} target
158
150
  * @param {P} methodName
@@ -193,10 +185,12 @@ harden(isCallback);
193
185
  * Prepare an attenuator class whose methods can be redirected via callbacks.
194
186
  *
195
187
  * @template {PropertyKey} M
196
- * @param {import('@agoric/zone').Zone} zone The zone in which to allocate attenuators.
188
+ * @param {import('@agoric/base-zone').Zone} zone The zone in which to allocate attenuators.
197
189
  * @param {M[]} methodNames Methods to forward.
198
190
  * @param {object} opts
199
- * @param {InterfaceGuard} [opts.interfaceGuard] An interface guard for the
191
+ * @param {import('@endo/patterns').InterfaceGuard<{
192
+ * [K in M]: import('@endo/patterns').MethodGuard
193
+ * }>} [opts.interfaceGuard] An interface guard for the
200
194
  * new attenuator.
201
195
  * @param {string} [opts.tag] A tag for the new attenuator exoClass.
202
196
  */
@@ -265,7 +259,7 @@ export const prepareAttenuator = (
265
259
  /**
266
260
  * @param {object} opts
267
261
  * @param {any} [opts.target]
268
- * @param {boolean} [opts.isSync=false]
262
+ * @param {boolean} [opts.isSync]
269
263
  * @param {Overrides} [opts.overrides]
270
264
  */
271
265
  ({
@@ -305,14 +299,14 @@ harden(prepareAttenuator);
305
299
  /**
306
300
  * Prepare an attenuator whose methodNames are derived from the interfaceGuard.
307
301
  *
308
- * @param {import('@agoric/zone').Zone} zone
309
- * @param {InterfaceGuard} interfaceGuard
302
+ * @template {import('@endo/patterns').InterfaceGuard} G
303
+ * @param {import('@agoric/base-zone').Zone} zone
304
+ * @param {G} interfaceGuard
310
305
  * @param {object} [opts]
311
306
  * @param {string} [opts.tag]
312
307
  */
313
308
  export const prepareGuardedAttenuator = (zone, interfaceGuard, opts = {}) => {
314
- const { methodGuards } = interfaceGuard;
315
- const methodNames = ownKeys(methodGuards);
309
+ const methodNames = getInterfaceMethodKeys(interfaceGuard);
316
310
  const makeAttenuator = prepareAttenuator(zone, methodNames, {
317
311
  ...opts,
318
312
  interfaceGuard,
package/src/config.d.ts CHANGED
@@ -1,25 +1,34 @@
1
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;
2
+ let BANK: "bank";
3
+ let CORE: "core";
4
+ let DIBC: "dibc";
5
+ let STORAGE: "storage";
6
+ let PROVISION: "provision";
7
+ let PROVISION_SMART_WALLET: "provisionWallet";
8
+ let VLOCALCHAIN: "vlocalchain";
9
+ let VTRANSFER: "vtransfer";
10
+ let WALLET: "wallet";
11
+ }
12
+ export namespace CosmosInitKeyToBridgeId {
13
+ import vbankPort = BANK;
14
+ export { vbankPort };
15
+ import vibcPort = DIBC;
16
+ export { vibcPort };
9
17
  }
10
18
  export namespace WalletName {
11
- const depositFacet: string;
19
+ let depositFacet: string;
12
20
  }
13
21
  export namespace VBankAccount {
14
22
  namespace reserve {
15
- const module: string;
16
- const address: string;
23
+ let module: string;
24
+ let address: string;
17
25
  }
18
26
  namespace provision {
19
- const module_1: string;
27
+ let module_1: string;
20
28
  export { module_1 as module };
21
- const address_1: string;
29
+ let address_1: string;
22
30
  export { address_1 as address };
23
31
  }
24
32
  }
33
+ export type BridgeIdValue = (typeof BridgeId)[keyof typeof BridgeId];
25
34
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA4Bc,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC"}
package/src/config.js CHANGED
@@ -14,16 +14,24 @@
14
14
  /**
15
15
  * Event source ids used by the bridge device.
16
16
  */
17
- export const BridgeId = {
17
+ export const BridgeId = /** @type {const} */ ({
18
18
  BANK: 'bank',
19
19
  CORE: 'core',
20
20
  DIBC: 'dibc',
21
21
  STORAGE: 'storage',
22
22
  PROVISION: 'provision',
23
23
  PROVISION_SMART_WALLET: 'provisionWallet',
24
+ VLOCALCHAIN: 'vlocalchain',
25
+ VTRANSFER: 'vtransfer',
24
26
  WALLET: 'wallet',
25
- };
27
+ });
26
28
  harden(BridgeId);
29
+ /** @typedef {(typeof BridgeId)[keyof typeof BridgeId]} BridgeIdValue */
30
+
31
+ export const CosmosInitKeyToBridgeId = {
32
+ vbankPort: BridgeId.BANK,
33
+ vibcPort: BridgeId.DIBC,
34
+ };
27
35
 
28
36
  export const WalletName = {
29
37
  depositFacet: 'depositFacet',
package/src/debug.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export function makeTracer(name: string, enable?: boolean | 'verbose'): (..._args: any[]) => void;
1
+ export function makeTracer(name: string, enable?: boolean | "verbose"): (..._args: any[]) => void;
2
2
  //# sourceMappingURL=debug.d.ts.map
package/src/index.d.ts CHANGED
@@ -3,4 +3,7 @@ export * from "./debug.js";
3
3
  export * from "./utils.js";
4
4
  export * from "./method-tools.js";
5
5
  export * from "./typeGuards.js";
6
+ export * from "./types.js";
7
+ export { objectMap } from "@endo/common/object-map.js";
8
+ export { fromUniqueEntries } from "@endo/common/from-unique-entries.js";
6
9
  //# sourceMappingURL=index.d.ts.map
package/src/index.js CHANGED
@@ -1,9 +1,15 @@
1
1
  // @jessie-check
2
2
 
3
- /// <reference types="ses"/>
3
+ /// <reference types="ses" />
4
4
 
5
5
  export * from './config.js';
6
6
  export * from './debug.js';
7
7
  export * from './utils.js';
8
8
  export * from './method-tools.js';
9
9
  export * from './typeGuards.js';
10
+
11
+ // eslint-disable-next-line import/export -- just types
12
+ export * from './types.js';
13
+
14
+ export { objectMap } from '@endo/common/object-map.js';
15
+ export { fromUniqueEntries } from '@endo/common/from-unique-entries.js';
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=install-ses-debug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-ses-debug.d.ts","sourceRoot":"","sources":["install-ses-debug.js"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
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';
@@ -12,7 +12,7 @@
12
12
  */
13
13
  export function makeChainStorageRoot(handleStorageMessage: (message: StorageMessage) => any, rootPath: string, rootOptions?: {
14
14
  sequence?: boolean | undefined;
15
- } | undefined): {
15
+ } | undefined): import("@endo/exo").Guarded<{
16
16
  getPath(): string;
17
17
  /**
18
18
  * @deprecated use getPath
@@ -21,21 +21,8 @@ export function makeChainStorageRoot(handleStorageMessage: (message: StorageMess
21
21
  getStoreKey(): Promise<VStorageKey>;
22
22
  /** @type {(name: string, childNodeOptions?: {sequence?: boolean}) => StorageNode} */
23
23
  makeChildNode(name: string, childNodeOptions?: {
24
- sequence?: boolean | undefined;
25
- } | undefined): StorageNode;
26
- /** @type {(value: string) => Promise<void>} */
27
- setValue(value: string): Promise<void>;
28
- } & import("@endo/eventual-send").RemotableBrand<{}, {
29
- getPath(): string;
30
- /**
31
- * @deprecated use getPath
32
- * @type {() => Promise<VStorageKey>}
33
- */
34
- getStoreKey(): Promise<VStorageKey>;
35
- /** @type {(name: string, childNodeOptions?: {sequence?: boolean}) => StorageNode} */
36
- makeChildNode(name: string, childNodeOptions?: {
37
- sequence?: boolean | undefined;
38
- } | undefined): StorageNode;
24
+ sequence?: boolean;
25
+ }): StorageNode;
39
26
  /** @type {(value: string) => Promise<void>} */
40
27
  setValue(value: string): Promise<void>;
41
28
  }>;
@@ -44,19 +31,18 @@ export function makeChainStorageRoot(handleStorageMessage: (message: StorageMess
44
31
  * falling back to an inert object with the correct interface (but incomplete
45
32
  * behavior) when that is unavailable.
46
33
  *
47
- * @param {import('@endo/far').ERef<StorageNode?>} storageNodeRef
34
+ * @param {ERef<StorageNode?>} storageNodeRef
48
35
  * @param {string} childName
49
36
  * @returns {Promise<StorageNode>}
50
37
  */
51
- export function makeStorageNodeChild(storageNodeRef: import('@endo/far').ERef<StorageNode | null>, childName: string): Promise<StorageNode>;
52
- export function isStreamCell(cell: any): cell is StreamCell<unknown>;
38
+ export function makeStorageNodeChild(storageNodeRef: ERef<StorageNode | null>, childName: string): Promise<StorageNode>;
39
+ export function isStreamCell(cell: any): cell is StreamCell;
53
40
  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;
55
41
  /** @type {(name: string) => void} */
56
42
  export const assertPathSegment: (name: string) => void;
57
- export function prepareChainStorageNode(zone: import('@agoric/zone').Zone): (args_0: import("./types.js").Callback<(message: StorageMessage) => any>, args_1: string, args_2?: {
43
+ export function prepareChainStorageNode(zone: import("@agoric/base-zone").Zone): (messenger: import("./types.js").Callback<(message: StorageMessage) => any>, path: string, args_2?: {
58
44
  sequence?: boolean | undefined;
59
- } | undefined) => {
45
+ } | undefined) => import("@endo/exo").Guarded<{
60
46
  getPath(): string;
61
47
  /**
62
48
  * @deprecated use getPath
@@ -65,27 +51,19 @@ export function prepareChainStorageNode(zone: import('@agoric/zone').Zone): (arg
65
51
  getStoreKey(): Promise<VStorageKey>;
66
52
  /** @type {(name: string, childNodeOptions?: {sequence?: boolean}) => StorageNode} */
67
53
  makeChildNode(name: string, childNodeOptions?: {
68
- sequence?: boolean | undefined;
69
- } | undefined): StorageNode;
70
- /** @type {(value: string) => Promise<void>} */
71
- setValue(value: string): Promise<void>;
72
- } & import("@endo/eventual-send").RemotableBrand<{}, {
73
- getPath(): string;
74
- /**
75
- * @deprecated use getPath
76
- * @type {() => Promise<VStorageKey>}
77
- */
78
- getStoreKey(): Promise<VStorageKey>;
79
- /** @type {(name: string, childNodeOptions?: {sequence?: boolean}) => StorageNode} */
80
- makeChildNode(name: string, childNodeOptions?: {
81
- sequence?: boolean | undefined;
82
- } | undefined): StorageNode;
54
+ sequence?: boolean;
55
+ }): StorageNode;
83
56
  /** @type {(value: string) => Promise<void>} */
84
57
  setValue(value: string): Promise<void>;
85
58
  }>;
86
- export function makeSerializeToStorage(storageNode: import('@endo/far').ERef<StorageNode>, marshaller: import('@endo/far').ERef<Marshaller>): (value: unknown) => Promise<void>;
87
- export type Marshaller = ReturnType<typeof import('@endo/marshal').makeMarshal>;
88
- export type Unserializer = Pick<Marshaller, 'fromCapData'>;
59
+ export function makeSerializeToStorage(storageNode: ERef<StorageNode>, marshaller: ERef<{
60
+ toCapData: import("@endo/marshal").ToCapData<unknown>;
61
+ fromCapData: import("@endo/marshal").FromCapData<unknown>;
62
+ serialize: import("@endo/marshal").ToCapData<unknown>;
63
+ unserialize: import("@endo/marshal").FromCapData<unknown>;
64
+ }>): (value: PassableCap) => Promise<void>;
65
+ export type Marshaller = ReturnType<typeof import("@endo/marshal").makeMarshal>;
66
+ export type Unserializer = Pick<Marshaller, "fromCapData">;
89
67
  /**
90
68
  * Defined by vstorageStoreKey in vstorage.go
91
69
  */
@@ -136,7 +114,7 @@ export type StoredFacet = {
136
114
  /**
137
115
  * DEPRECATED use getPath
138
116
  */
139
- getStoreKey: StorageNode['getStoreKey'];
117
+ getStoreKey: StorageNode["getStoreKey"];
140
118
  /**
141
119
  * get the unserializer for the stored data
142
120
  */
@@ -145,11 +123,11 @@ export type StoredFacet = {
145
123
  /**
146
124
  * Must match the switch in vstorage.go using `vstorageMessage` type
147
125
  */
148
- export type StorageGetByPathMessageMethod = 'get' | 'getStoreKey' | 'has' | 'children' | 'entries' | 'values' | 'size';
126
+ export type StorageGetByPathMessageMethod = "get" | "getStoreKey" | "has" | "children" | "entries" | "values" | "size";
149
127
  /**
150
128
  * Must match the switch in vstorage.go using `vstorageMessage` type
151
129
  */
152
- export type StorageUpdateEntriesMessageMethod = 'set' | 'setWithoutNotify' | 'append';
130
+ export type StorageUpdateEntriesMessageMethod = "set" | "setWithoutNotify" | "append";
153
131
  /**
154
132
  * Must match the switch in vstorage.go using `vstorageMessage` type
155
133
  */
@@ -165,15 +143,17 @@ export type StorageEntry = [path: string, value?: string | null];
165
143
  /**
166
144
  * Must match the switch in vstorage.go using `vstorageMessage` type
167
145
  */
168
- export type StorageUpdateEntriesMessageArgs = [path: string, value?: string | null | undefined][];
146
+ export type StorageUpdateEntriesMessageArgs = StorageEntry[];
169
147
  /**
170
148
  * Must match the switch in vstorage.go using `vstorageMessage` type
171
149
  */
172
150
  export type StorageMessage = {
173
151
  method: StorageGetByPathMessageMethod;
174
- args: [path: string];
152
+ args: StorageGetByPathMessageArgs;
175
153
  } | {
176
154
  method: StorageUpdateEntriesMessageMethod;
177
155
  args: StorageUpdateEntriesMessageArgs;
178
156
  };
157
+ import type { ERef } from '@endo/far';
158
+ import type { PassableCap } from '@endo/marshal';
179
159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