@agoric/internal 0.3.3-upgrade-18-dev-6ddbef0.0 → 0.3.3-upgrade-19-dev-2a71f04.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 (60) hide show
  1. package/README.md +4 -4
  2. package/package.json +16 -15
  3. package/src/action-types.d.ts +49 -5
  4. package/src/action-types.d.ts.map +1 -1
  5. package/src/action-types.js +74 -17
  6. package/src/batched-deliver.d.ts.map +1 -1
  7. package/src/callback.d.ts +1 -1
  8. package/src/callback.d.ts.map +1 -1
  9. package/src/chain-storage-paths.d.ts.map +1 -1
  10. package/src/chain-utils.d.ts +25 -0
  11. package/src/chain-utils.d.ts.map +1 -0
  12. package/src/chain-utils.js +57 -0
  13. package/src/errors.d.ts +1 -1
  14. package/src/errors.d.ts.map +1 -1
  15. package/src/index.d.ts +3 -1
  16. package/src/index.js +3 -1
  17. package/src/js-utils.d.ts +15 -0
  18. package/src/js-utils.d.ts.map +1 -0
  19. package/src/js-utils.js +116 -0
  20. package/src/lib-chainStorage.d.ts +1 -23
  21. package/src/lib-chainStorage.d.ts.map +1 -1
  22. package/src/lib-nodejs/ava-unhandled-rejection.d.ts +13 -0
  23. package/src/lib-nodejs/ava-unhandled-rejection.d.ts.map +1 -0
  24. package/src/lib-nodejs/ava-unhandled-rejection.js +66 -0
  25. package/src/lib-nodejs/engine-gc.d.ts +1 -1
  26. package/src/marshal.d.ts +8 -2
  27. package/src/marshal.d.ts.map +1 -1
  28. package/src/marshal.js +7 -0
  29. package/src/natural-sort.d.ts +2 -0
  30. package/src/natural-sort.d.ts.map +1 -0
  31. package/src/natural-sort.js +48 -0
  32. package/src/netstring.d.ts +2 -2
  33. package/src/netstring.d.ts.map +1 -1
  34. package/src/netstring.js +1 -0
  35. package/src/node/buffer-line-transform.d.ts +3 -3
  36. package/src/node/buffer-line-transform.d.ts.map +1 -1
  37. package/src/node/fs-stream.js +2 -2
  38. package/src/node/shutdown.d.ts.map +1 -1
  39. package/src/node/shutdown.js +0 -1
  40. package/src/priority-senders.d.ts +1 -0
  41. package/src/priority-senders.d.ts.map +1 -1
  42. package/src/priority-senders.js +3 -0
  43. package/src/queue.d.ts +1 -1
  44. package/src/queue.d.ts.map +1 -1
  45. package/src/{utils.d.ts → ses-utils.d.ts} +3 -8
  46. package/src/ses-utils.d.ts.map +1 -0
  47. package/src/{utils.js → ses-utils.js} +16 -72
  48. package/src/storage-test-utils.d.ts +12 -4
  49. package/src/storage-test-utils.d.ts.map +1 -1
  50. package/src/storage-test-utils.js +81 -16
  51. package/src/tagged.d.ts +4 -1
  52. package/src/testing-utils.js +1 -1
  53. package/src/tokens.d.ts.map +1 -1
  54. package/src/typeGuards.d.ts +15 -0
  55. package/src/typeGuards.d.ts.map +1 -1
  56. package/src/typeGuards.js +12 -0
  57. package/src/types.d.ts +1 -1
  58. package/src/types.d.ts.map +1 -1
  59. package/src/types.ts +1 -1
  60. package/src/utils.d.ts.map +0 -1
package/README.md CHANGED
@@ -10,11 +10,11 @@ Like all `@agoric` packages it follows Semantic Versioning. Unlike the others, i
10
10
 
11
11
  # Design
12
12
 
13
- It is meant to be a home for modules that have no Agoric-specific dependencies themselves. It does depend on a these other @agoric packages but they are all destined to migrate out of the repo,
13
+ It is meant to be a home for modules that have no dependencies on other packages in this repository, except for the following packages that do not theirselves depend upon any other @agoric packages and may be destined for migration elsewhere:
14
14
 
15
- - base-zone
16
- - store
17
- - assert
15
+ - [base-zone](../base-zone)
16
+ - [store](../store)
17
+ - [cosmic-proto](../cosmic-proto)
18
18
 
19
19
  This package may not take dependencies on any others in this repository.
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/internal",
3
- "version": "0.3.3-upgrade-18-dev-6ddbef0.0+6ddbef0",
3
+ "version": "0.3.3-upgrade-19-dev-2a71f04.0+2a71f04",
4
4
  "description": "Externally unsupported utilities internal to agoric-sdk",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -20,22 +20,23 @@
20
20
  "lint:types": "tsc"
21
21
  },
22
22
  "dependencies": {
23
- "@agoric/base-zone": "0.1.1-upgrade-18-dev-6ddbef0.0+6ddbef0",
24
- "@endo/common": "^1.2.7",
25
- "@endo/errors": "^1.2.7",
26
- "@endo/far": "^1.1.8",
27
- "@endo/init": "^1.1.6",
28
- "@endo/marshal": "^1.6.1",
29
- "@endo/pass-style": "^1.4.6",
30
- "@endo/patterns": "^1.4.6",
31
- "@endo/promise-kit": "^1.1.7",
32
- "@endo/stream": "^1.2.7",
23
+ "@agoric/base-zone": "0.1.1-upgrade-19-dev-2a71f04.0+2a71f04",
24
+ "@endo/common": "^1.2.9",
25
+ "@endo/errors": "^1.2.9",
26
+ "@endo/far": "^1.1.10",
27
+ "@endo/init": "^1.1.8",
28
+ "@endo/marshal": "^1.6.3",
29
+ "@endo/pass-style": "^1.4.8",
30
+ "@endo/patterns": "^1.4.8",
31
+ "@endo/promise-kit": "^1.1.9",
32
+ "@endo/stream": "^1.2.9",
33
33
  "anylogger": "^0.21.0",
34
34
  "jessie.js": "^0.3.4"
35
35
  },
36
36
  "devDependencies": {
37
- "@endo/exo": "^1.5.6",
38
- "@endo/init": "^1.1.6",
37
+ "@agoric/cosmic-proto": "0.4.1-upgrade-19-dev-2a71f04.0+2a71f04",
38
+ "@endo/exo": "^1.5.8",
39
+ "@endo/init": "^1.1.8",
39
40
  "ava": "^5.3.0",
40
41
  "tsd": "^0.31.1"
41
42
  },
@@ -57,7 +58,7 @@
57
58
  "access": "public"
58
59
  },
59
60
  "typeCoverage": {
60
- "atLeast": 93.42
61
+ "atLeast": 93.04
61
62
  },
62
- "gitHead": "6ddbef09f18c18f205e8d166c363ff4884115ce9"
63
+ "gitHead": "2a71f04176f1a27be8e0356595d3dcd62f6d9186"
63
64
  }
@@ -1,18 +1,62 @@
1
+ /**
2
+ * Types of messages used for communication between a cosmos-sdk blockchain node
3
+ * and its paired swingset VM, especially for the ABCI lifecycle. See:
4
+ *
5
+ * - https://github.com/tendermint/tendermint/blob/v0.34.x/spec/abci/abci.md#block-execution
6
+ * - ../../../golang/cosmos/vm/action.go
7
+ * - ../../../golang/cosmos/app/app.go
8
+ * - ../../../golang/cosmos/x/swingset/abci.go
9
+ * - ../../../golang/cosmos/x/swingset/keeper/swing_store_exports_handler.go
10
+ * - ../../cosmic-swingset/src/chain-main.js
11
+ * - ../../cosmic-swingset/src/launch-chain.js
12
+ */
13
+ export type SwingsetMessageType = (typeof SwingsetMessageType)[keyof typeof SwingsetMessageType];
14
+ export namespace SwingsetMessageType {
15
+ let AG_COSMOS_INIT: "AG_COSMOS_INIT";
16
+ let BEGIN_BLOCK: "BEGIN_BLOCK";
17
+ let END_BLOCK: "END_BLOCK";
18
+ let COMMIT_BLOCK: "COMMIT_BLOCK";
19
+ let AFTER_COMMIT_BLOCK: "AFTER_COMMIT_BLOCK";
20
+ let SWING_STORE_EXPORT: "SWING_STORE_EXPORT";
21
+ }
1
22
  export const AG_COSMOS_INIT: "AG_COSMOS_INIT";
2
- export const SWING_STORE_EXPORT: "SWING_STORE_EXPORT";
3
23
  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
24
  export const END_BLOCK: "END_BLOCK";
8
25
  export const COMMIT_BLOCK: "COMMIT_BLOCK";
9
26
  export const AFTER_COMMIT_BLOCK: "AFTER_COMMIT_BLOCK";
27
+ export const SWING_STORE_EXPORT: "SWING_STORE_EXPORT";
28
+ /**
29
+ * Types of "action" messages consumed by the swingset VM from actionQueue or
30
+ * highPriorityQueue during END_BLOCK. See:
31
+ *
32
+ * - ../../../golang/cosmos/x/swingset/keeper/msg_server.go
33
+ * - ../../../golang/cosmos/x/swingset/keeper/proposal.go
34
+ * - ../../../golang/cosmos/x/vbank/vbank.go
35
+ * - ../../../golang/cosmos/x/vibc/handler.go
36
+ * - ../../../golang/cosmos/x/vibc/keeper/triggers.go
37
+ * - ../../../golang/cosmos/x/vibc/types/ibc_module.go
38
+ */
39
+ export type QueuedActionType = (typeof QueuedActionType)[keyof typeof QueuedActionType];
40
+ export namespace QueuedActionType {
41
+ let CORE_EVAL: "CORE_EVAL";
42
+ let DELIVER_INBOUND: "DELIVER_INBOUND";
43
+ let IBC_EVENT: "IBC_EVENT";
44
+ let INSTALL_BUNDLE: "INSTALL_BUNDLE";
45
+ let PLEASE_PROVISION: "PLEASE_PROVISION";
46
+ let VBANK_BALANCE_UPDATE: "VBANK_BALANCE_UPDATE";
47
+ let WALLET_ACTION: "WALLET_ACTION";
48
+ let WALLET_SPEND_ACTION: "WALLET_SPEND_ACTION";
49
+ let VTRANSFER_IBC_EVENT: "VTRANSFER_IBC_EVENT";
50
+ let KERNEL_UPGRADE_EVENTS: "KERNEL_UPGRADE_EVENTS";
51
+ }
52
+ export const CORE_EVAL: "CORE_EVAL";
53
+ export const DELIVER_INBOUND: "DELIVER_INBOUND";
10
54
  export const IBC_EVENT: "IBC_EVENT";
55
+ export const INSTALL_BUNDLE: "INSTALL_BUNDLE";
11
56
  export const PLEASE_PROVISION: "PLEASE_PROVISION";
12
57
  export const VBANK_BALANCE_UPDATE: "VBANK_BALANCE_UPDATE";
13
58
  export const WALLET_ACTION: "WALLET_ACTION";
14
59
  export const WALLET_SPEND_ACTION: "WALLET_SPEND_ACTION";
15
- export const INSTALL_BUNDLE: "INSTALL_BUNDLE";
16
60
  export const VTRANSFER_IBC_EVENT: "VTRANSFER_IBC_EVENT";
17
61
  export const KERNEL_UPGRADE_EVENTS: "KERNEL_UPGRADE_EVENTS";
18
62
  //# sourceMappingURL=action-types.d.ts.map
@@ -1 +1 @@
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;AAC/C,wDAAyD;AACzD,4DAA6D"}
1
+ {"version":3,"file":"action-types.d.ts","sourceRoot":"","sources":["action-types.js"],"names":[],"mappings":";;;;;;;;;;;;kCAcU,CAAC,OAAO,mBAAmB,EAAE,MAAM,OAAO,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;+BAiC9D,CAAC,OAAO,gBAAgB,EAAE,MAAM,OAAO,gBAAgB,CAAC"}
@@ -1,19 +1,76 @@
1
1
  // @jessie-check
2
2
 
3
- export const AG_COSMOS_INIT = 'AG_COSMOS_INIT';
4
- export const SWING_STORE_EXPORT = 'SWING_STORE_EXPORT';
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';
18
- export const VTRANSFER_IBC_EVENT = 'VTRANSFER_IBC_EVENT';
19
- export const KERNEL_UPGRADE_EVENTS = 'KERNEL_UPGRADE_EVENTS';
3
+ /**
4
+ * Types of messages used for communication between a cosmos-sdk blockchain node
5
+ * and its paired swingset VM, especially for the ABCI lifecycle. See:
6
+ *
7
+ * - https://github.com/tendermint/tendermint/blob/v0.34.x/spec/abci/abci.md#block-execution
8
+ * - ../../../golang/cosmos/vm/action.go
9
+ * - ../../../golang/cosmos/app/app.go
10
+ * - ../../../golang/cosmos/x/swingset/abci.go
11
+ * - ../../../golang/cosmos/x/swingset/keeper/swing_store_exports_handler.go
12
+ * - ../../cosmic-swingset/src/chain-main.js
13
+ * - ../../cosmic-swingset/src/launch-chain.js
14
+ *
15
+ * @enum {(typeof SwingsetMessageType)[keyof typeof SwingsetMessageType]}
16
+ */
17
+ export const SwingsetMessageType = /** @type {const} */ ({
18
+ AG_COSMOS_INIT: 'AG_COSMOS_INIT', // used to synchronize at process launch
19
+ BEGIN_BLOCK: 'BEGIN_BLOCK',
20
+ END_BLOCK: 'END_BLOCK',
21
+ COMMIT_BLOCK: 'COMMIT_BLOCK',
22
+ AFTER_COMMIT_BLOCK: 'AFTER_COMMIT_BLOCK',
23
+ SWING_STORE_EXPORT: 'SWING_STORE_EXPORT', // used to synchronize data export
24
+ });
25
+ harden(SwingsetMessageType);
26
+
27
+ // TODO: Update all imports to use SwingsetMessageType. But until then...
28
+ export const {
29
+ AG_COSMOS_INIT,
30
+ BEGIN_BLOCK,
31
+ END_BLOCK,
32
+ COMMIT_BLOCK,
33
+ AFTER_COMMIT_BLOCK,
34
+ SWING_STORE_EXPORT,
35
+ } = SwingsetMessageType;
36
+
37
+ /**
38
+ * Types of "action" messages consumed by the swingset VM from actionQueue or
39
+ * highPriorityQueue during END_BLOCK. See:
40
+ *
41
+ * - ../../../golang/cosmos/x/swingset/keeper/msg_server.go
42
+ * - ../../../golang/cosmos/x/swingset/keeper/proposal.go
43
+ * - ../../../golang/cosmos/x/vbank/vbank.go
44
+ * - ../../../golang/cosmos/x/vibc/handler.go
45
+ * - ../../../golang/cosmos/x/vibc/keeper/triggers.go
46
+ * - ../../../golang/cosmos/x/vibc/types/ibc_module.go
47
+ *
48
+ * @enum {(typeof QueuedActionType)[keyof typeof QueuedActionType]}
49
+ */
50
+ export const QueuedActionType = /** @type {const} */ ({
51
+ CORE_EVAL: 'CORE_EVAL',
52
+ DELIVER_INBOUND: 'DELIVER_INBOUND',
53
+ IBC_EVENT: 'IBC_EVENT',
54
+ INSTALL_BUNDLE: 'INSTALL_BUNDLE',
55
+ PLEASE_PROVISION: 'PLEASE_PROVISION',
56
+ VBANK_BALANCE_UPDATE: 'VBANK_BALANCE_UPDATE',
57
+ WALLET_ACTION: 'WALLET_ACTION',
58
+ WALLET_SPEND_ACTION: 'WALLET_SPEND_ACTION',
59
+ VTRANSFER_IBC_EVENT: 'VTRANSFER_IBC_EVENT',
60
+ KERNEL_UPGRADE_EVENTS: 'KERNEL_UPGRADE_EVENTS',
61
+ });
62
+ harden(QueuedActionType);
63
+
64
+ // TODO: Update all imports to use QueuedActionType. But until then...
65
+ export const {
66
+ CORE_EVAL,
67
+ DELIVER_INBOUND,
68
+ IBC_EVENT,
69
+ INSTALL_BUNDLE,
70
+ PLEASE_PROVISION,
71
+ VBANK_BALANCE_UPDATE,
72
+ WALLET_ACTION,
73
+ WALLET_SPEND_ACTION,
74
+ VTRANSFER_IBC_EVENT,
75
+ KERNEL_UPGRADE_EVENTS,
76
+ } = QueuedActionType;
@@ -1 +1 @@
1
- {"version":3,"file":"batched-deliver.d.ts","sourceRoot":"","sources":["batched-deliver.js"],"names":[],"mappings":"AAKA;;GAEG;AAEH;;;;;;;GAOG;AACH,4CAPW,eAAe,gCACf;IACN,YAAY,EAAE,8BAAkC,CAAC;IACjD,UAAU,EAAE,4BAAgC,CAAC;CAC9C,mBACO,MAAM,aATM,OAAO,EAAE,UAAU,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAiDjE;AApDD,4CAA6C;8BAGhC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC"}
1
+ {"version":3,"file":"batched-deliver.d.ts","sourceRoot":"","sources":["batched-deliver.js"],"names":[],"mappings":"AAKA;;GAEG;AAEH;;;;;;;GAOG;AACH,4CAPW,eAAe,gCACf;IACN,YAAY,EAAE,8BAAkC,CAAC;IACjD,UAAU,EAAE,4BAAgC,CAAC;CAC9C,mBACO,MAAM,aATM,OAAO,EAAE,UAAU,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAiDjE;AApDD,uCAAwC,IAAI,CAAC;8BAGhC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC"}
package/src/callback.d.ts CHANGED
@@ -15,7 +15,7 @@ export function prepareAttenuator<M extends PropertyKey>(zone: import("@agoric/b
15
15
  }) => import("@endo/exo").Guarded<{ [K_2 in M]: (this: any, ...args: any[]) => any; }>;
16
16
  export function prepareGuardedAttenuator<G extends import("@endo/patterns").InterfaceGuard>(zone: import("@agoric/base-zone").Zone, interfaceGuard: G, opts?: {
17
17
  tag?: string | undefined;
18
- } | undefined): MakeAttenuator<any>;
18
+ }): MakeAttenuator<any>;
19
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
20
  interfaceGuard?: import("@endo/patterns").InterfaceGuard<{ [K in M]: import("@endo/patterns").MethodGuard; }> | undefined;
21
21
  tag?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"callback.d.ts","sourceRoot":"","sources":["callback.js"],"names":[],"mappings":"AAgDO,yBALgC,CAAC,SAA3B,CAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAI,YAC3B,aAAa,CAAC,CAAC,WACf,UAAU,CAAC,CAAC,CAAC,GACX,UAAU,CAAC,CAAC,CAAC,CAQzB;AAWM,sBALgC,CAAC,SAA3B,CAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAI,YAC3B,SAAS,CAAC,CAAC,WACX,UAAU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-storage-paths.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,yCAA0C;AAC1C,sDAAuD;AACvD,0DAA2D;AAC3D,sCAAuC;AACvC,8BAA+B;AAC/B,gCAAiC;AACjC,gCAAiC;AACjC,iCAAkC;AAClC,uCAAwC"}
1
+ {"version":3,"file":"chain-storage-paths.d.ts","sourceRoot":"","sources":["chain-storage-paths.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,2BAA4B,aAAa,CAAC;AAC1C,kCAAmC,mBAAmB,CAAC;AACvD,oCAAqC,qBAAqB,CAAC;AAC3D,yBAA0B,YAAY,CAAC;AACvC,qBAAsB,QAAQ,CAAC;AAC/B,sBAAuB,SAAS,CAAC;AACjC,sBAAuB,SAAS,CAAC;AACjC,qBAAsB,WAAW,CAAC;AAClC,0BAA2B,YAAY,CAAC"}
@@ -0,0 +1,25 @@
1
+ export function makeInitMsg(initAction: any): InitMsg;
2
+ export type NatString = `${bigint}`;
3
+ export type BlockInfo = {
4
+ blockHeight: number;
5
+ /**
6
+ * POSIX Seconds Since the Epoch
7
+ */
8
+ blockTime: number;
9
+ params: import("@agoric/cosmic-proto/swingset/swingset.js").ParamsSDKType;
10
+ };
11
+ /**
12
+ * cosmosInitAction fields that are subject to consensus. See cosmosInitAction
13
+ * in {@link ../../../golang/cosmos/app/app.go}.
14
+ */
15
+ export type InitMsg = BlockInfo & {
16
+ type: typeof _ActionType.AG_COSMOS_INIT;
17
+ chainID: string;
18
+ isBootstrap?: boolean;
19
+ supplyCoins: {
20
+ denom: string;
21
+ amount: NatString;
22
+ }[];
23
+ };
24
+ import * as _ActionType from './action-types.js';
25
+ //# sourceMappingURL=chain-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-utils.d.ts","sourceRoot":"","sources":["chain-utils.js"],"names":[],"mappings":"AAsCO,wCAHI,GAAG,GACD,OAAO,CAoBnB;wBA1Ca,GAAG,MAAM,EAAE;;iBAIX,MAAM;;;;eACN,MAAM;YACN,OAAO,2CAA2C,EAAE,aAAa;;;;;;sBAIlE,SAAS,GAAG;IACpB,IAAI,EAAE,OAAO,WAAW,CAAC,cAAc,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,SAAS,CAAA;KAAE,EAAE,CAAC;CACrD;6BAjByB,mBAAmB"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @file Types and utilities for supporting blockchain functionality without
3
+ * risking import cycles.
4
+ *
5
+ * TODO: Integrate (or integrate with) any/all of:
6
+ *
7
+ * - ./action-types.js
8
+ * - ./chain-storage-paths.js
9
+ * - ./config.js
10
+ * - ../../cosmic-proto (if comfortable co-residing with generated code)
11
+ */
12
+
13
+ import * as _ActionType from './action-types.js';
14
+
15
+ /** @typedef {`${bigint}`} NatString */
16
+
17
+ /**
18
+ * @typedef {object} BlockInfo
19
+ * @property {number} blockHeight
20
+ * @property {number} blockTime POSIX Seconds Since the Epoch
21
+ * @property {import('@agoric/cosmic-proto/swingset/swingset.js').ParamsSDKType} params
22
+ */
23
+
24
+ /**
25
+ * @typedef {BlockInfo & {
26
+ * type: typeof _ActionType.AG_COSMOS_INIT;
27
+ * chainID: string;
28
+ * isBootstrap?: boolean;
29
+ * supplyCoins: { denom: string; amount: NatString }[];
30
+ * }} InitMsg
31
+ * cosmosInitAction fields that are subject to consensus. See cosmosInitAction
32
+ * in {@link ../../../golang/cosmos/app/app.go}.
33
+ */
34
+
35
+ /**
36
+ * @param {any} initAction
37
+ * @returns {InitMsg}
38
+ */
39
+ export const makeInitMsg = initAction => {
40
+ const {
41
+ type,
42
+ blockHeight,
43
+ blockTime,
44
+ chainID,
45
+ params,
46
+ // NB: resolvedConfig is independent of consensus and MUST NOT be included
47
+ supplyCoins,
48
+ } = initAction;
49
+ return {
50
+ type,
51
+ blockHeight,
52
+ blockTime,
53
+ chainID,
54
+ params,
55
+ supplyCoins,
56
+ };
57
+ };
package/src/errors.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export function NonNullish<T>(val: T | null | undefined, optDetails?: string | undefined): T;
1
+ export function NonNullish<T>(val: T | null | undefined, optDetails?: string): T;
2
2
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["errors.js"],"names":[],"mappings":"AAQO,2BALM,CAAC,OACH,CAAC,GAAG,IAAI,GAAG,SAAS,oCAElB,CAAC,CAQb"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["errors.js"],"names":[],"mappings":"AAQO,2BALM,CAAC,OACH,CAAC,GAAG,IAAI,GAAG,SAAS,eACpB,MAAM,GACJ,CAAC,CAQb"}
package/src/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  export * from "./config.js";
2
2
  export * from "./debug.js";
3
3
  export * from "./errors.js";
4
- export * from "./utils.js";
4
+ export * from "./js-utils.js";
5
5
  export * from "./method-tools.js";
6
+ export * from "./ses-utils.js";
6
7
  export * from "./typeCheck.js";
7
8
  export * from "./typeGuards.js";
8
9
  export * from "./types-index.js";
10
+ export { pureDataMarshaller } from "./marshal.js";
9
11
  export { objectMap } from "@endo/common/object-map.js";
10
12
  export { objectMetaMap } from "@endo/common/object-meta-map.js";
11
13
  export { fromUniqueEntries } from "@endo/common/from-unique-entries.js";
package/src/index.js CHANGED
@@ -5,8 +5,10 @@
5
5
  export * from './config.js';
6
6
  export * from './debug.js';
7
7
  export * from './errors.js';
8
- export * from './utils.js';
8
+ export * from './js-utils.js';
9
+ export { pureDataMarshaller } from './marshal.js';
9
10
  export * from './method-tools.js';
11
+ export * from './ses-utils.js';
10
12
  export * from './typeCheck.js';
11
13
  export * from './typeGuards.js';
12
14
 
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @file Pure JavaScript utility functions that are compatible with but not
3
+ * dependent upon a hardened environment.
4
+ */
5
+ export const logLevels: readonly ["debug", "log", "info", "warn", "error"];
6
+ export function deepCopyJsonable<T>(value: T): T;
7
+ export function deepMapObject(obj: object, mapper: (value: any, name: string, record: object) => any): object;
8
+ export function objectMapMutable<O extends Record<PropertyKey, any>, V>(obj: O, mapFn: <K extends keyof O>(value: O[K], key: K) => V): { [K in keyof O]: V; };
9
+ export function makeMeasureSeconds(currentTimeMillisec: () => number): <T>(fn: () => Promise<T>) => Promise<{
10
+ result: T;
11
+ duration: number;
12
+ }>;
13
+ export type LogLevel = (typeof logLevels)[keyof readonly ["debug", "log", "info", "warn", "error"] & number];
14
+ export type LimitedConsole = Pick<Console, LogLevel>;
15
+ //# sourceMappingURL=js-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"js-utils.d.ts","sourceRoot":"","sources":["js-utils.js"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,2EAMG;AAkBI,iCAJM,CAAC,SACH,CAAC,GACC,CAAC,CAE4D;AAiDnE,mCAJI,MAAM,UACN,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,GAAG,GAC/C,MAAM,CAGuC;AASnD,iCANiC,CAAC,SAA3B,MAAM,CAAC,WAAW,EAAE,GAAG,CAAE,EAC1B,CAAC,OACH,CAAC,SACD,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,GAC3C,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAE,CAKjC;AASM,wDAFI,MAAM,MAAM,IAIR,CAAC,MACH,MAAM,OAAO,CAAC,CAAC,CAAC,KACd,OAAO,CAAC;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAStD;uBAnGa,CAAC,OAAO,SAAS,EAAE,2DAAkB,MAAM,CAAC;6BAE5C,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC"}
@@ -0,0 +1,116 @@
1
+ // @ts-check
2
+ // @jessie-check
3
+ /**
4
+ * @file Pure JavaScript utility functions that are compatible with but not
5
+ * dependent upon a hardened environment.
6
+ */
7
+
8
+ export const logLevels = /** @type {const} */ ([
9
+ 'debug',
10
+ 'log',
11
+ 'info',
12
+ 'warn',
13
+ 'error',
14
+ ]);
15
+ Object.freeze(logLevels);
16
+
17
+ /** @typedef {(typeof logLevels)[keyof logLevels & number]} LogLevel */
18
+
19
+ /** @typedef {Pick<Console, LogLevel>} LimitedConsole */
20
+
21
+ const { entries, fromEntries } = Object;
22
+
23
+ /**
24
+ * Deep-copy a value by round-tripping it through JSON (which drops
25
+ * function/symbol/undefined values and properties that are non-enumerable
26
+ * and/or symbol-keyed, and rejects bigint values).
27
+ *
28
+ * @template T
29
+ * @param {T} value
30
+ * @returns {T}
31
+ */
32
+ export const deepCopyJsonable = value => JSON.parse(JSON.stringify(value));
33
+
34
+ /**
35
+ * @param {any} value
36
+ * @param {string | undefined} name
37
+ * @param {object | undefined} container
38
+ * @param {(value: any, name: string, record: object) => any} mapper
39
+ * @returns {any}
40
+ */
41
+ const deepMapObjectInternal = (value, name, container, mapper) => {
42
+ if (container && typeof name === 'string') {
43
+ const mapped = mapper(value, name, container);
44
+ if (mapped !== value) {
45
+ return mapped;
46
+ }
47
+ }
48
+
49
+ if (typeof value !== 'object' || !value) {
50
+ return value;
51
+ }
52
+
53
+ let wasMapped = false;
54
+ const mappedEntries = Object.entries(value).map(([innerName, innerValue]) => {
55
+ const mappedInnerValue = deepMapObjectInternal(
56
+ innerValue,
57
+ innerName,
58
+ value,
59
+ mapper,
60
+ );
61
+ wasMapped ||= mappedInnerValue !== innerValue;
62
+ return [innerName, mappedInnerValue];
63
+ });
64
+
65
+ return wasMapped ? Object.fromEntries(mappedEntries) : value;
66
+ };
67
+
68
+ /**
69
+ * Recursively traverses a record object structure, calling a mapper function
70
+ * for each enumerable string-keyed property and returning a record composed of
71
+ * the results. If none of the values are changed, the original object is
72
+ * returned, maintaining its identity.
73
+ *
74
+ * When the property value is an object, it is sent to the mapper like any other
75
+ * value, and then recursively traversed unless replaced with a distinct value.
76
+ *
77
+ * @param {object} obj
78
+ * @param {(value: any, name: string, record: object) => any} mapper
79
+ * @returns {object}
80
+ */
81
+ export const deepMapObject = (obj, mapper) =>
82
+ deepMapObjectInternal(obj, undefined, undefined, mapper);
83
+
84
+ /**
85
+ * @template {Record<PropertyKey, any>} O
86
+ * @template V
87
+ * @param {O} obj
88
+ * @param {<K extends keyof O>(value: O[K], key: K) => V} mapFn
89
+ * @returns {{ [K in keyof O]: V }}
90
+ */
91
+ export const objectMapMutable = (obj, mapFn) => {
92
+ const newEntries = entries(obj).map(([k, v]) => [k, mapFn(v, k)]);
93
+ return /** @type {{ [K in keyof O]: V }} */ (fromEntries(newEntries));
94
+ };
95
+
96
+ /**
97
+ * Returns a function that uses a millisecond-based current-time capability
98
+ * (such as `performance.now`) to measure execution duration of an async
99
+ * function and report the result in seconds to match our telemetry standard.
100
+ *
101
+ * @param {() => number} currentTimeMillisec
102
+ */
103
+ export const makeMeasureSeconds = currentTimeMillisec => {
104
+ /**
105
+ * @template T
106
+ * @param {() => Promise<T>} fn
107
+ * @returns {Promise<{ result: T; duration: number }>}
108
+ */
109
+ const measureSeconds = async fn => {
110
+ const t0 = currentTimeMillisec();
111
+ const result = await fn();
112
+ const durationMillisec = currentTimeMillisec() - t0;
113
+ return { result, duration: durationMillisec / 1000 };
114
+ };
115
+ return measureSeconds;
116
+ };
@@ -13,23 +13,12 @@
13
13
  */
14
14
  export function makeChainStorageRoot(handleStorageMessage: (message: StorageMessage) => any, rootPath: string, rootOptions?: {
15
15
  sequence?: boolean | undefined;
16
- } | undefined): import("@endo/exo").Guarded<{
16
+ }): import("@endo/exo").Guarded<{
17
17
  getPath(): string;
18
- /**
19
- * @deprecated use getPath
20
- * @type {() => Promise<VStorageKey>}
21
- */
22
18
  getStoreKey(): Promise<VStorageKey>;
23
- /**
24
- * @type {(
25
- * name: string,
26
- * childNodeOptions?: { sequence?: boolean },
27
- * ) => StorageNode}
28
- */
29
19
  makeChildNode(name: string, childNodeOptions?: {
30
20
  sequence?: boolean;
31
21
  }): StorageNode;
32
- /** @type {(value: string) => Promise<void>} */
33
22
  setValue(value: string): Promise<void>;
34
23
  }>;
35
24
  /**
@@ -50,21 +39,10 @@ export function prepareChainStorageNode(zone: import("@agoric/base-zone").Zone):
50
39
  sequence?: boolean | undefined;
51
40
  } | undefined) => import("@endo/exo").Guarded<{
52
41
  getPath(): string;
53
- /**
54
- * @deprecated use getPath
55
- * @type {() => Promise<VStorageKey>}
56
- */
57
42
  getStoreKey(): Promise<VStorageKey>;
58
- /**
59
- * @type {(
60
- * name: string,
61
- * childNodeOptions?: { sequence?: boolean },
62
- * ) => StorageNode}
63
- */
64
43
  makeChildNode(name: string, childNodeOptions?: {
65
44
  sequence?: boolean;
66
45
  }): StorageNode;
67
- /** @type {(value: string) => Promise<void>} */
68
46
  setValue(value: string): Promise<void>;
69
47
  }>;
70
48
  export function makeSerializeToStorage(storageNode: ERef<StorageNode>, marshaller: ERef<Marshaller>): (value: PassableCap) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"lib-chainStorage.d.ts","sourceRoot":"","sources":["lib-chainStorage.js"],"names":[],"mappings":"AAyPA;;;;;;;;;;;;GAYG;AACH,2DATW,CAAC,OAAO,EAAE,cAAc,KAAK,GAAG,YAGhC,MAAM;;;;IAhEX;;;OAGG;mBADa,OAAO,CAAC,WAAW,CAAC;IASpC;;;;;OAKG;wBAHQ,MAAM,qBACO;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GACtC,WAAW;IAYnB,+CAA+C;oBAA5B,MAAM,GAAK,OAAO,CAAC,IAAI,CAAC;GAqDhD;AAcD;;;;;;;;GAQG;AACH,qDAJW,KAAK,WAAW,OAAC,CAAC,aAClB,MAAM,GACJ,OAAO,CAAC,WAAW,CAAC,CAMhC;AApOM,mCAH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BA5Ie,WAAW;iCACJ,eAAe"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @import {ExecutionContext, Macro, TestFn} from 'ava';
3
+ */
4
+ export const AVA_EXPECT_UNHANDLED_REJECTIONS: "AGORIC_AVA_EXPECT_UNHANDLED_REJECTIONS";
5
+ export const SUBTEST_PREFIX: "(unhandled rejection subprocess): ";
6
+ export function makeExpectUnhandledRejection<C>({ test, importMetaUrl }: {
7
+ test: TestFn<C>;
8
+ importMetaUrl: string;
9
+ }): (expectedUnhandled: number) => Macro<[name: string, impl: (t: ExecutionContext<C>) => any], C>;
10
+ import type { TestFn } from 'ava';
11
+ import type { ExecutionContext } from 'ava';
12
+ import type { Macro } from 'ava';
13
+ //# sourceMappingURL=ava-unhandled-rejection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ava-unhandled-rejection.d.ts","sourceRoot":"","sources":["ava-unhandled-rejection.js"],"names":[],"mappings":"AAOA;;GAEG;AAEH,8CACE,wCAAwC,CAAC;AAE3C,6BAA8B,oCAAoC,CAAC;AAW5D,6CARM,CAAC,2BAEX;IAA0B,IAAI,EAAtB,OAAO,CAAC,CAAC;IACM,aAAa,EAA5B,MAAM;CACd,GAAU,CACR,iBAAiB,EAAE,MAAM,KACtB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CA0CtE;4BAzDiD,KAAK;sCAAL,KAAK;2BAAL,KAAK"}