@agoric/network 0.1.1-dev-aa68d8f.0 → 0.1.1-dev-651b051.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/network",
3
- "version": "0.1.1-dev-aa68d8f.0+aa68d8f",
3
+ "version": "0.1.1-dev-651b051.0+651b051",
4
4
  "description": "Agoric's network protocol API",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -21,20 +21,21 @@
21
21
  "author": "Agoric",
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
- "@agoric/assert": "0.6.1-dev-aa68d8f.0+aa68d8f",
25
- "@agoric/internal": "0.3.3-dev-aa68d8f.0+aa68d8f",
26
- "@agoric/store": "0.9.3-dev-aa68d8f.0+aa68d8f",
27
- "@endo/base64": "^1.0.4",
28
- "@endo/far": "^1.1.1",
29
- "@endo/patterns": "^1.3.1",
30
- "@endo/promise-kit": "^1.1.1"
24
+ "@agoric/assert": "0.6.1-dev-651b051.0+651b051",
25
+ "@agoric/internal": "0.3.3-dev-651b051.0+651b051",
26
+ "@agoric/store": "0.9.3-dev-651b051.0+651b051",
27
+ "@agoric/vat-data": "0.5.3-dev-651b051.0+651b051",
28
+ "@endo/base64": "^1.0.5",
29
+ "@endo/far": "^1.1.2",
30
+ "@endo/patterns": "^1.4.0",
31
+ "@endo/promise-kit": "^1.1.2"
31
32
  },
32
33
  "devDependencies": {
33
- "@agoric/swingset-liveslots": "0.10.3-dev-aa68d8f.0+aa68d8f",
34
- "@agoric/swingset-vat": "0.32.3-dev-aa68d8f.0+aa68d8f",
35
- "@agoric/vow": "0.1.1-dev-aa68d8f.0+aa68d8f",
36
- "@agoric/zone": "0.2.3-dev-aa68d8f.0+aa68d8f",
37
- "@endo/bundle-source": "^3.2.2",
34
+ "@agoric/swingset-liveslots": "0.10.3-dev-651b051.0+651b051",
35
+ "@agoric/swingset-vat": "0.32.3-dev-651b051.0+651b051",
36
+ "@agoric/vow": "0.1.1-dev-651b051.0+651b051",
37
+ "@agoric/zone": "0.2.3-dev-651b051.0+651b051",
38
+ "@endo/bundle-source": "^3.2.3",
38
39
  "ava": "^5.3.0",
39
40
  "c8": "^9.1.0"
40
41
  },
@@ -68,7 +69,7 @@
68
69
  "workerThreads": false
69
70
  },
70
71
  "typeCoverage": {
71
- "atLeast": 89.73
72
+ "atLeast": 89.5
72
73
  },
73
- "gitHead": "aa68d8fba19087b3a2c72bd59f6f9e47e34ffe1b"
74
+ "gitHead": "651b05136f236230c67c8b40224540c585beaa54"
74
75
  }
package/src/bytes.d.ts CHANGED
@@ -27,5 +27,5 @@ export function dataToBase64(byteSource: ByteSource): string;
27
27
  * @returns {Bytes} decoded bytes
28
28
  */
29
29
  export function base64ToBytes(string: string): string;
30
- export type ByteSource = string | Buffer | Uint8Array | Iterable<number>;
30
+ export type ByteSource = string | Iterable<number> | Buffer | Uint8Array;
31
31
  //# sourceMappingURL=bytes.d.ts.map
package/src/types.d.ts CHANGED
@@ -17,12 +17,13 @@ export type Endpoint = string;
17
17
  /**
18
18
  * A closable object
19
19
  */
20
- export type Closable = {
20
+ export type ClosableI = {
21
21
  /**
22
22
  * Terminate the object
23
23
  */
24
24
  close: () => PromiseVow<void>;
25
25
  };
26
+ export type Closable = RemotableObject & ClosableI;
26
27
  /**
27
28
  * The network Protocol
28
29
  */
@@ -86,7 +87,7 @@ export type ListenHandler = {
86
87
  */
87
88
  onRemove?: ((port: Remote<Port>, l: Remote<ListenHandler>) => PromiseVow<void>) | undefined;
88
89
  };
89
- export type Connection = {
90
+ export type ConnectionI = {
90
91
  /**
91
92
  * Send a packet on the connection
92
93
  */
@@ -105,6 +106,7 @@ export type Connection = {
105
106
  */
106
107
  getRemoteAddress: () => Endpoint;
107
108
  };
109
+ export type Connection = RemotableObject & ConnectionI;
108
110
  /**
109
111
  * A handler for a given Connection
110
112
  */
@@ -212,5 +214,6 @@ export type ProtocolImpl = {
212
214
  };
213
215
  export type PortAllocator = ReturnType<ReturnType<typeof import("@agoric/network").preparePortAllocator>>;
214
216
  import type { PromiseVow } from '@agoric/vow';
217
+ import type { RemotableObject } from '@endo/pass-style';
215
218
  import type { Remote } from '@agoric/vow';
216
219
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;4BAU8D,CAAC,sCAAqB,CAAC,mBAD7D,GAAG,EAAE,KAAK,GAAG,IACyB,CAAC,AAAjD,GAAG,QAAQ,CAAC;IAAE,IAAI,EAAE,OAAO,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC;;;;oBAK5E,MAAM;;;;;uBAIN,MAAM;;;;;;;;;;;;;;;;;;uBAWI,QAAQ;;;;;;;;;;qBAMjB,MAAM,QAAQ;;;;;;;;sBAKf,QAAQ;;;;;;;;;;;;;;;;;;;;;;8CAeL,QAAQ,cACP,QAAQ;;;;gDAMT,QAAQ,cACP,QAAQ;;;;yCAIe,GAAG;;;;;;;;;;;wBASzB,KAAK,SACX,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;;;;qBAIjB,MAAM,QAAQ;;;;sBAEd,MAAM,QAAQ;;;;;;;;;0DAOZ,QAAQ,cACP,QAAQ;;;;uDAMf,KAAK,uCAEH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;yDAKjB,WAAW;;;;;0BAKZ,GAAG,GAAG,IAAI;;;;;;;;;;;;;;;;;;gCAeG,QAAQ;;;;4CAIlB,QAAQ;;;;8CAMR,QAAQ;;;;oDAOR,QAAQ;;;;qDAOR,QAAQ,UACX,QAAQ;;;;+CAML,QAAQ,UACX,QAAQ;;;;8CAOL,QAAQ;;;;;;;;;mBAMH,kBAAkB;;;;;qBAEzB,MAAM,QAAQ;;;;;sBAEd,MAAM,Q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;uBAKL,QAAQ;;;;0BAGd,QAAQ,cACR,QAAQ;;;;+CAKR,QAAQ;;4BAMX,UAAU,CAAC,UAAU,CAAC,cAAc,iBAAiB,EAAE,oBAAoB,CAAC,CAAC;gCApMtD,aAAa;qCADN,kBAAkB;4BACzB,aAAa"}
package/src/types.js CHANGED
@@ -3,7 +3,10 @@
3
3
  // Ensure this is a module.
4
4
  export {};
5
5
 
6
- /** @import {PromiseVow, Remote} from '@agoric/vow' */
6
+ /**
7
+ * @import {Passable, RemotableObject} from '@endo/pass-style';
8
+ * @import {PromiseVow, Remote} from '@agoric/vow';
9
+ */
7
10
 
8
11
  /**
9
12
  * @template {import('@endo/exo').Methods} M
@@ -22,9 +25,12 @@ export {};
22
25
  */
23
26
 
24
27
  /**
25
- * @typedef {object} Closable A closable object
28
+ * @typedef {object} ClosableI A closable object
26
29
  * @property {() => PromiseVow<void>} close Terminate the object
27
30
  */
31
+ /**
32
+ * @typedef {RemotableObject & ClosableI} Closable
33
+ */
28
34
 
29
35
  /**
30
36
  * @typedef {object} Protocol The network Protocol
@@ -73,7 +79,7 @@ export {};
73
79
  */
74
80
 
75
81
  /**
76
- * @typedef {object} Connection
82
+ * @typedef {object} ConnectionI
77
83
  * @property {(
78
84
  * packetBytes: Bytes,
79
85
  * opts?: Record<string, any>,
@@ -84,6 +90,9 @@ export {};
84
90
  * connection
85
91
  * @property {() => Endpoint} getRemoteAddress Get the name of the counterparty
86
92
  */
93
+ /**
94
+ * @typedef {RemotableObject & ConnectionI} Connection
95
+ */
87
96
 
88
97
  /**
89
98
  * @typedef {object} ConnectionHandler A handler for a given Connection