@agoric/internal 0.3.3-dev-078e9f8.0 → 0.3.3-dev-4a9a6ad.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/internal",
3
- "version": "0.3.3-dev-078e9f8.0+078e9f8",
3
+ "version": "0.3.3-dev-4a9a6ad.0+4a9a6ad",
4
4
  "description": "Externally unsupported utilities internal to agoric-sdk",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -20,7 +20,7 @@
20
20
  "lint:types": "tsc"
21
21
  },
22
22
  "dependencies": {
23
- "@agoric/base-zone": "0.1.1-dev-078e9f8.0+078e9f8",
23
+ "@agoric/base-zone": "0.1.1-dev-4a9a6ad.0+4a9a6ad",
24
24
  "@endo/common": "^1.2.9",
25
25
  "@endo/errors": "^1.2.9",
26
26
  "@endo/far": "^1.1.10",
@@ -34,7 +34,7 @@
34
34
  "jessie.js": "^0.3.4"
35
35
  },
36
36
  "devDependencies": {
37
- "@agoric/cosmic-proto": "0.4.1-dev-078e9f8.0+078e9f8",
37
+ "@agoric/cosmic-proto": "0.4.1-dev-4a9a6ad.0+4a9a6ad",
38
38
  "@endo/exo": "^1.5.8",
39
39
  "@endo/init": "^1.1.8",
40
40
  "ava": "^5.3.0",
@@ -60,5 +60,5 @@
60
60
  "typeCoverage": {
61
61
  "atLeast": 93.04
62
62
  },
63
- "gitHead": "078e9f88578f5f0ea0c1d837e1ba006bceb7ff89"
63
+ "gitHead": "4a9a6adce6a239c39194fa90abd740294dbf0586"
64
64
  }
@@ -1,4 +1,19 @@
1
1
  export const StorageNodeShape: import("@endo/patterns").Matcher;
2
2
  /** To be used only for 'helper' facets where the calls are from trusted code. */
3
3
  export const UnguardedHelperI: import("@endo/patterns").InterfaceGuard<any>;
4
+ /**
5
+ * @typedef {number | `${bigint}`} BridgeBigInt Ensure that callees passed a
6
+ * bridge message that was serialised from a Golang int64 or uint64 accept
7
+ * either a JS number or a stringified JS bigint.
8
+ */
9
+ /**
10
+ * @type {import('./types.js').TypedPattern<BridgeBigInt>}
11
+ */
12
+ export const BridgeBigIntShape: import("./types.js").TypedPattern<BridgeBigInt>;
13
+ /**
14
+ * Ensure that callees passed a
15
+ * bridge message that was serialised from a Golang int64 or uint64 accept
16
+ * either a JS number or a stringified JS bigint.
17
+ */
18
+ export type BridgeBigInt = number | `${bigint}`;
4
19
  //# sourceMappingURL=typeGuards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAIA,gEAA2D;AAE3D,iFAAiF;AACjF,4EAKE"}
1
+ {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAKA,gEAA2D;AAE3D,iFAAiF;AACjF,4EAKE;AAEF;;;;GAIG;AAEH;;GAEG;AACH,gCAFU,OAAO,YAAY,EAAE,YAAY,CAAC,YAAY,CAAC,CAEK;;;;;;2BARjD,MAAM,GAAG,GAAG,MAAM,EAAE"}
package/src/typeGuards.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // @jessie-check
2
+ // @ts-check
2
3
 
3
4
  import { M } from '@endo/patterns';
4
5
 
@@ -11,3 +12,14 @@ export const UnguardedHelperI = M.interface(
11
12
  // not exposed so sloppy okay
12
13
  { sloppy: true },
13
14
  );
15
+
16
+ /**
17
+ * @typedef {number | `${bigint}`} BridgeBigInt Ensure that callees passed a
18
+ * bridge message that was serialised from a Golang int64 or uint64 accept
19
+ * either a JS number or a stringified JS bigint.
20
+ */
21
+
22
+ /**
23
+ * @type {import('./types.js').TypedPattern<BridgeBigInt>}
24
+ */
25
+ export const BridgeBigIntShape = M.or(M.number(), M.string());