@agoric/network 0.1.1-dev-fbd8633.0 → 0.1.1-dev-e456308.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-fbd8633.0+fbd8633",
3
+ "version": "0.1.1-dev-e456308.0+e456308",
4
4
  "description": "Agoric's network protocol API",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -21,19 +21,19 @@
21
21
  "author": "Agoric",
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
- "@agoric/assert": "0.6.1-dev-fbd8633.0+fbd8633",
25
- "@agoric/internal": "0.3.3-dev-fbd8633.0+fbd8633",
26
- "@agoric/store": "0.9.3-dev-fbd8633.0+fbd8633",
27
- "@agoric/vat-data": "0.5.3-dev-fbd8633.0+fbd8633",
24
+ "@agoric/assert": "0.6.1-dev-e456308.0+e456308",
25
+ "@agoric/internal": "0.3.3-dev-e456308.0+e456308",
26
+ "@agoric/store": "0.9.3-dev-e456308.0+e456308",
27
+ "@agoric/vat-data": "0.5.3-dev-e456308.0+e456308",
28
28
  "@endo/base64": "^1.0.4",
29
29
  "@endo/far": "^1.1.1",
30
30
  "@endo/patterns": "^1.3.1",
31
31
  "@endo/promise-kit": "^1.1.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@agoric/swingset-liveslots": "0.10.3-dev-fbd8633.0+fbd8633",
35
- "@agoric/swingset-vat": "0.32.3-dev-fbd8633.0+fbd8633",
36
- "@agoric/zone": "0.2.3-dev-fbd8633.0+fbd8633",
34
+ "@agoric/swingset-liveslots": "0.10.3-dev-e456308.0+e456308",
35
+ "@agoric/swingset-vat": "0.32.3-dev-e456308.0+e456308",
36
+ "@agoric/zone": "0.2.3-dev-e456308.0+e456308",
37
37
  "@endo/bundle-source": "^3.2.2",
38
38
  "ava": "^5.3.0",
39
39
  "c8": "^9.1.0"
@@ -70,5 +70,5 @@
70
70
  "typeCoverage": {
71
71
  "atLeast": 89.73
72
72
  },
73
- "gitHead": "fbd8633ae9f8420a589dd9bc32925418f2dde060"
73
+ "gitHead": "e4563081e57304520ee75f85aff490fcdb640c20"
74
74
  }
package/src/bytes.d.ts CHANGED
@@ -5,14 +5,14 @@
5
5
  * @param {ByteSource} byteSource
6
6
  * @returns {Bytes}
7
7
  */
8
- export function toBytes(byteSource: ByteSource): Bytes;
8
+ export function toBytes(byteSource: ByteSource): string;
9
9
  /**
10
10
  * Convert bytes to a String.
11
11
  *
12
12
  * @param {Bytes} bytes
13
13
  * @returns {string}
14
14
  */
15
- export function bytesToString(bytes: Bytes): string;
15
+ export function bytesToString(bytes: string): string;
16
16
  /**
17
17
  * Base64, as specified in https://tools.ietf.org/html/rfc4648#section-4
18
18
  *
@@ -26,6 +26,6 @@ export function dataToBase64(byteSource: ByteSource): string;
26
26
  * @param {string} string Base64-encoded string
27
27
  * @returns {Bytes} decoded bytes
28
28
  */
29
- export function base64ToBytes(string: string): Bytes;
30
- export type ByteSource = Bytes | Buffer | Uint8Array | Iterable<number>;
29
+ export function base64ToBytes(string: string): string;
30
+ export type ByteSource = string | Buffer | Uint8Array | Iterable<number>;
31
31
  //# sourceMappingURL=bytes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["bytes.js"],"names":[],"mappings":"AA4BA;;;;;;GAMG;AACH,oCAHW,UAAU,GACR,KAAK,CAOjB;AAED;;;;;GAKG;AACH,qCAHW,KAAK,GACH,MAAM,CAIlB;AAED;;;;;GAKG;AACH,yCAHW,UAAU,GACR,MAAM,CAKlB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,GACJ,KAAK,CAIjB;yBAlEa,KAAK,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC"}
1
+ {"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["bytes.js"],"names":[],"mappings":"AAgCA;;;;;;GAMG;AACH,oCAHW,UAAU,UAQpB;AAED;;;;;GAKG;AACH,8CAFa,MAAM,CAIlB;AAED;;;;;GAKG;AACH,yCAHW,UAAU,GACR,MAAM,CAKlB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,UAKhB"}
package/src/bytes.js CHANGED
@@ -3,6 +3,10 @@
3
3
  import { Fail } from '@agoric/assert';
4
4
  import { encodeBase64, decodeBase64 } from '@endo/base64';
5
5
 
6
+ /**
7
+ * @import {Bytes} from './types.js';
8
+ */
9
+
6
10
  /** @typedef {Bytes | Buffer | Uint8Array | Iterable<number>} ByteSource */
7
11
 
8
12
  /**
package/src/index.d.ts CHANGED
@@ -2,5 +2,6 @@ export * from "./network.js";
2
2
  export * from "./shapes.js";
3
3
  export * from "./multiaddr.js";
4
4
  export * from "./bytes.js";
5
+ export * from "./types.js";
5
6
  export { prepareRouter, prepareRouterProtocol } from "./router.js";
6
7
  //# sourceMappingURL=index.d.ts.map
package/src/index.js CHANGED
@@ -3,3 +3,5 @@ export * from './shapes.js';
3
3
  export { prepareRouter, prepareRouterProtocol } from './router.js';
4
4
  export * from './multiaddr.js';
5
5
  export * from './bytes.js';
6
+ // eslint-disable-next-line import/export -- doesn't know types
7
+ export * from './types.js';
package/src/network.d.ts CHANGED
@@ -26,27 +26,48 @@ export function prepareLoopbackProtocolHandler(zone: import("@agoric/base-zone")
26
26
  * @param {*} _port
27
27
  * @param {Endpoint} localAddr
28
28
  * @param {Endpoint} remoteAddr
29
- * @returns {PromiseVow<AttemptDescription>}}
29
+ * @returns {import('@agoric/vow').PromiseVow<AttemptDescription>}}
30
30
  */
31
- onConnect(_port: any, localAddr: Endpoint, remoteAddr: Endpoint): PromiseVow<AttemptDescription>;
31
+ onConnect(_port: any, localAddr: string, remoteAddr: string): import("@agoric/vow").PromiseVow<AttemptDescription>;
32
32
  onInstantiate(_port: any, _localAddr: any, _remote: any, _protocol: any): Promise<string>;
33
33
  onListen(port: any, localAddr: any, listenHandler: any, _protocolHandler: any): Promise<void>;
34
34
  /**
35
- * @param {Remote<Port>} port
35
+ * @param {import('@agoric/vow').Remote<Port>} port
36
36
  * @param {Endpoint} localAddr
37
- * @param {Remote<ListenHandler>} listenHandler
37
+ * @param {import('@agoric/vow').Remote<ListenHandler>} listenHandler
38
38
  * @param {*} _protocolHandler
39
39
  */
40
- onListenRemove(port: Remote<Port>, localAddr: Endpoint, listenHandler: Remote<ListenHandler>, _protocolHandler: any): Promise<void>;
40
+ onListenRemove(port: import("@agoric/vow").Remote<Port, {}>, localAddr: string, listenHandler: import("@agoric/vow").Remote<ListenHandler, {
41
+ /**
42
+ * The listener has been registered
43
+ */
44
+ onListen?: undefined;
45
+ /**
46
+ * The connection was rejected
47
+ */
48
+ onReject?: undefined;
49
+ /**
50
+ * There was an error while listening
51
+ */
52
+ onError?: undefined;
53
+ /**
54
+ * The
55
+ * listener has been removed
56
+ */
57
+ onRemove?: undefined;
58
+ }>, _protocolHandler: any): Promise<void>;
41
59
  onRevoke(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
42
60
  }>;
61
+ /**
62
+ * @import {AttemptDescription, Bytes, Closable, CloseReason, Connection, ConnectionHandler, Endpoint, ListenHandler, Port, Protocol, ProtocolHandler, ProtocolImpl} from './types.js';
63
+ */
43
64
  /**
44
65
  * Compatibility note: this must match what our peers use, so don't change it
45
66
  * casually.
46
67
  */
47
68
  export const ENDPOINT_SEPARATOR: "/";
48
69
  export function rethrowUnlessMissing(err: unknown): undefined;
49
- export function crossoverConnection(zone: import("@agoric/zone").Zone, handler0: import("@agoric/vow").Remote<Required<ConnectionHandler>>, addr0: Endpoint, handler1: import("@agoric/vow").Remote<Required<ConnectionHandler>>, addr1: Endpoint, makeConnection: (opts: ConnectionOpts) => Connection, current?: globalThis.WeakSetStore<Closable> | undefined): Connection[];
70
+ export function crossoverConnection(zone: import("@agoric/zone").Zone, handler0: import("@agoric/vow").Remote<Required<ConnectionHandler>, {}>, addr0: string, handler1: import("@agoric/vow").Remote<Required<ConnectionHandler>, {}>, addr1: string, makeConnection: (opts: ConnectionOpts) => Connection, current?: globalThis.WeakSetStore<Closable> | undefined): Connection[];
50
71
  export function prepareNetworkProtocol(zone: import("@agoric/base-zone").Zone, powers: ReturnType<(zone: import("@agoric/base-zone").Zone, powers?: {
51
72
  isRetryableReason?: ((reason: any) => boolean) | undefined;
52
73
  watchPromise?: ((p: PromiseLike<any>, watcher: import("@agoric/vow/src/watch-promise.js").PromiseWatcher, ...args: unknown[]) => void) | undefined;
@@ -55,7 +76,12 @@ export function prepareNetworkProtocol(zone: import("@agoric/base-zone").Zone, p
55
76
  watch: <T_1 = unknown, TResult1_1 = T_1, TResult2_1 = T_1, C = unknown>(specimenP: import("@agoric/vow/src/types.js").ERef<T_1 | import("@agoric/vow/src/types.js").Vow<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1, any> | undefined, watcherContext?: C | undefined) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
56
77
  makeVowKit: <T_2>() => import("@agoric/vow").VowKit<T_2>;
57
78
  allVows: (vows: any) => import("@agoric/vow").Vow<any>;
58
- }>): (protocolHandler: Remote<ProtocolHandler>) => Protocol;
79
+ }>): (protocolHandler: import("@agoric/vow").Remote<ProtocolHandler, {
80
+ /**
81
+ * Return unique suffix for local address
82
+ */
83
+ onInstantiate?: undefined;
84
+ }>) => Protocol;
59
85
  export function prepareEchoConnectionKit(zone: import("@agoric/base-zone").Zone): () => import("@endo/exo").GuardedKit<{
60
86
  handler: {
61
87
  /**
@@ -63,13 +89,13 @@ export function prepareEchoConnectionKit(zone: import("@agoric/base-zone").Zone)
63
89
  * @param {Bytes} bytes
64
90
  * @param {ConnectionHandler} _connectionHandler
65
91
  */
66
- onReceive(_connection: Connection, bytes: Bytes, _connectionHandler: ConnectionHandler): Promise<string>;
92
+ onReceive(_connection: Connection, bytes: string, _connectionHandler: ConnectionHandler): Promise<string>;
67
93
  /**
68
94
  * @param {Connection} _connection
69
95
  * @param {CloseReason} [_reason]
70
96
  * @param {ConnectionHandler} [_connectionHandler]
71
97
  */
72
- onClose(_connection: Connection, _reason?: CloseReason, _connectionHandler?: ConnectionHandler | undefined): Promise<void>;
98
+ onClose(_connection: Connection, _reason?: any, _connectionHandler?: ConnectionHandler | undefined): Promise<void>;
73
99
  };
74
100
  listener: {
75
101
  onAccept(_port: any, _localAddr: any, _remoteAddr: any, _listenHandler: any): Promise<import("@endo/exo").Guarded<{
@@ -78,13 +104,13 @@ export function prepareEchoConnectionKit(zone: import("@agoric/base-zone").Zone)
78
104
  * @param {Bytes} bytes
79
105
  * @param {ConnectionHandler} _connectionHandler
80
106
  */
81
- onReceive(_connection: Connection, bytes: Bytes, _connectionHandler: ConnectionHandler): Promise<string>;
107
+ onReceive(_connection: Connection, bytes: string, _connectionHandler: ConnectionHandler): Promise<string>;
82
108
  /**
83
109
  * @param {Connection} _connection
84
110
  * @param {CloseReason} [_reason]
85
111
  * @param {ConnectionHandler} [_connectionHandler]
86
112
  */
87
- onClose(_connection: Connection, _reason?: CloseReason, _connectionHandler?: ConnectionHandler | undefined): Promise<void>;
113
+ onClose(_connection: Connection, _reason?: any, _connectionHandler?: ConnectionHandler | undefined): Promise<void>;
88
114
  }>>;
89
115
  onListen(port: any, _listenHandler: any): Promise<void>;
90
116
  };
@@ -103,11 +129,19 @@ export function preparePortAllocator(zone: import("@agoric/base-zone").Zone, { w
103
129
  allocateCustomLocalPort(specifiedName?: string): import("@agoric/vow").Vow<any>;
104
130
  }>;
105
131
  export type ConnectionOpts = {
106
- addrs: Endpoint[];
107
- handlers: import("@agoric/vow").Remote<Required<ConnectionHandler>>[];
108
- conns: MapStore<number, Connection>;
109
- current: WeakSetStore<Closable>;
132
+ addrs: string[];
133
+ handlers: import("@agoric/vow").Remote<Required<ConnectionHandler>, {}>[];
134
+ conns: globalThis.MapStore<number, Connection>;
135
+ current: globalThis.WeakSetStore<Closable>;
110
136
  l: 0 | 1;
111
137
  r: 0 | 1;
112
138
  };
139
+ import type { AttemptDescription } from './types.js';
140
+ import type { Port } from './types.js';
141
+ import type { ListenHandler } from './types.js';
142
+ import type { ConnectionHandler } from './types.js';
143
+ import type { Connection } from './types.js';
144
+ import type { Closable } from './types.js';
145
+ import type { ProtocolHandler } from './types.js';
146
+ import type { Protocol } from './types.js';
113
147
  //# sourceMappingURL=network.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["network.js"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,kCAFW,MAAM,YAahB;AAstCD;;;;;GAKG;AACH,qDAHW,OAAO,mBAAmB,EAAE,IAAI,sBAChC,UAAU,QAhwCX,OAAO,mBACjB,EAAE,IAAI;;wBAIL,gBAED,WAAU,OAAQ,kCAAoB,EAGtC,cADc,WAAW,SACnB;;uFAHY,CAAC,yBAGnB,OAAO,0BAAY,EAAE,MAAM,CAAC,CAAC,CAAC;uFA8IxB,OAAM,0BACJ,EAAE,IACT,CAAK,GAAH,GAAG,OAAO,0BAEZ,EAAK,GAAA,CAAC,GAAC,CACR,CAAC;;;EAmmC2D;;;;IAmCpD;;;;;OAKG;qCAHQ,QAAQ,cACR,QAAQ;;;IAgEnB;;;;;OAKG;kDAHQ,QAAQ;;GAiD1B;AAt5CD;;;GAGG;AACH,qCAAsC;AAG/B,0CADK,OAAO,aAWlB;AAyJM,0CARI,OAAO,cAAc,EAAE,IAAI,YAC3B,OAAO,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,SACzD,QAAQ,YACR,OAAO,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,SACzD,QAAQ,kBACR,CAAC,IAAI,EAAE,cAAc,KAAK,UAAU,yEAgD9C;AA66BM,6CAHI,OAAO,mBAAmB,EAAE,IAAI,UAChC,UAAU,oCApoCnB,IAAI;;8FASN,cADc;;oJACO,MAAM;0HA+IjB,IACT,0CAEK,GAAA;;;EAy+BsD,iDAO7C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;AAyJM,0CARI,OAAO,cAAc,EAAE,IAAI,yMAKpB,cAAc,wFAgD/B;AAi7BM,6CAHI,OAAO,mBAAmB,EAAE,IAAI,UAChC,UAAU,oCA3oCnB,IAAI;;8FAEkI,cAAc;;oJACrJ,MAEC;0HA6IO,IACP,0CAII,GAAG;;;EAo/BmD;;;;;gBAkC3D;AAOM,+CAFI,OAAO,mBAAmB,EAAE,IAAI;;QAsCnC;;;;WAIG;;QASH;;;;WAIG;;;;;YAjBH;;;;eAIG;;YASH;;;;eAIG;;;;;GAuBV;AAwKM,2CAHI,OAAO,mBAAmB,EAAE,IAAI,aAChC,UAAU,oCAt6CnB,IAAI;;8FAEkI,cAAc;;oJACrJ,MAEC;0HA6IO,IACP,0CAII,GAAG;;;EA+wCmD;;;;GAqDzD;;;;;;OA75CW,CAAC,GAAC,CAAC;OACH,CAAC,GAAC,CAAC;;wCA7DyJ,YAAY;0BAAZ,YAAY;mCAAZ,YAAY;uCAAZ,YAAY;gCAAZ,YAAY;8BAAZ,YAAY;qCAAZ,YAAY;8BAAZ,YAAY"}
package/src/network.js CHANGED
@@ -8,6 +8,9 @@ import { Shape } from './shapes.js';
8
8
 
9
9
  import '@agoric/store/exported.js';
10
10
  /// <reference path="./types.js" />
11
+ /**
12
+ * @import {AttemptDescription, Bytes, Closable, CloseReason, Connection, ConnectionHandler, Endpoint, ListenHandler, Port, Protocol, ProtocolHandler, ProtocolImpl} from './types.js';
13
+ */
11
14
 
12
15
  /**
13
16
  * Compatibility note: this must match what our peers use, so don't change it
@@ -409,7 +412,7 @@ const preparePort = (zone, powers) => {
409
412
  * @param {MapStore<Port, SetStore<Closable>>} opts.currentConnections
410
413
  * @param {MapStore<string, Port>} opts.boundPorts
411
414
  * @param {import('@agoric/vow').Remote<ProtocolHandler>} opts.protocolHandler
412
- * @param {Remote<ProtocolImpl>} opts.protocolImpl
415
+ * @param {import('@agoric/vow').Remote<ProtocolImpl>} opts.protocolImpl
413
416
  */
414
417
  const initPort = ({
415
418
  localAddr,
@@ -454,7 +457,9 @@ const preparePort = (zone, powers) => {
454
457
  }
455
458
  listening.set(localAddr, [
456
459
  this.facets.port,
457
- /** @type {Remote<Required<ListenHandler>>} */ (listenHandler),
460
+ /** @type {import('@agoric/vow').Remote<Required<ListenHandler>>} */ (
461
+ listenHandler
462
+ ),
458
463
  ]);
459
464
  E(lhandler).onRemove(lport, lhandler).catch(rethrowUnlessMissing);
460
465
  } else {
@@ -462,7 +467,9 @@ const preparePort = (zone, powers) => {
462
467
  localAddr,
463
468
  harden([
464
469
  this.facets.port,
465
- /** @type {Remote<Required<ListenHandler>>} */ (listenHandler),
470
+ /** @type {import('@agoric/vow').Remote<Required<ListenHandler>>} */ (
471
+ listenHandler
472
+ ),
466
473
  ]),
467
474
  );
468
475
  }
@@ -481,7 +488,7 @@ const preparePort = (zone, powers) => {
481
488
  );
482
489
  return watch(innerVow, this.facets.rethrowUnlessMissingWatcher);
483
490
  },
484
- /** @param {Remote<ListenHandler>} listenHandler */
491
+ /** @param {import('@agoric/vow').Remote<ListenHandler>} listenHandler */
485
492
  async removeListener(listenHandler) {
486
493
  const { listening, localAddr, protocolHandler } = this.state;
487
494
  listening.has(localAddr) || Fail`Port ${localAddr} is not listening`;
@@ -503,11 +510,11 @@ const preparePort = (zone, powers) => {
503
510
  },
504
511
  /**
505
512
  * @param {Endpoint} remotePort
506
- * @param {Remote<ConnectionHandler>} [connectionHandler]
513
+ * @param {import('@agoric/vow').Remote<ConnectionHandler>} [connectionHandler]
507
514
  */
508
515
  async connect(
509
516
  remotePort,
510
- connectionHandler = /** @type {Remote<ConnectionHandler>} */ (
517
+ connectionHandler = /** @type {import('@agoric/vow').Remote<ConnectionHandler>} */ (
511
518
  makeIncapable()
512
519
  ),
513
520
  ) {
@@ -724,8 +731,8 @@ const prepareBinder = (zone, powers) => {
724
731
  * @param {object} opts
725
732
  * @param {MapStore<Port, SetStore<Closable>>} opts.currentConnections
726
733
  * @param {MapStore<string, Port>} opts.boundPorts
727
- * @param {MapStore<Endpoint, [Port, Remote<Required<ListenHandler>>]>} opts.listening
728
- * @param {Remote<ProtocolHandler>} opts.protocolHandler
734
+ * @param {MapStore<Endpoint, [Port, import('@agoric/vow').Remote<Required<ListenHandler>>]>} opts.listening
735
+ * @param {import('@agoric/vow').Remote<ProtocolHandler>} opts.protocolHandler
729
736
  */
730
737
  ({ currentConnections, boundPorts, listening, protocolHandler }) => {
731
738
  /** @type {SetStore<Connection>} */
@@ -771,7 +778,7 @@ const prepareBinder = (zone, powers) => {
771
778
 
772
779
  const innerVow = watch(
773
780
  E(
774
- /** @type {Remote<Required<ProtocolHandler>>} */ (
781
+ /** @type {import('@agoric/vow').Remote<Required<ProtocolHandler>>} */ (
775
782
  protocolHandler
776
783
  ),
777
784
  ).onInstantiate(
@@ -813,7 +820,7 @@ const prepareBinder = (zone, powers) => {
813
820
  // Allocate a local address.
814
821
  const instantiateInnerVow = watch(
815
822
  E(
816
- /** @type {Remote<Required<ProtocolHandler>>} */ (
823
+ /** @type {import('@agoric/vow').Remote<Required<ProtocolHandler>>} */ (
817
824
  protocolHandler
818
825
  ),
819
826
  ).onInstantiate(port, localAddr, remoteAddr, protocolHandler),
@@ -939,7 +946,7 @@ const prepareBinder = (zone, powers) => {
939
946
 
940
947
  const innerVow = watch(
941
948
  E(
942
- /** @type {Remote<Required<ProtocolHandler>>} */ (
949
+ /** @type {import('@agoric/vow').Remote<Required<ProtocolHandler>>} */ (
943
950
  protocolHandler
944
951
  ),
945
952
  ).onInstantiate(
@@ -1169,7 +1176,7 @@ export const prepareNetworkProtocol = (zone, powers) => {
1169
1176
  const makeBinderKit = prepareBinder(zone, powers);
1170
1177
 
1171
1178
  /**
1172
- * @param {Remote<ProtocolHandler>} protocolHandler
1179
+ * @param {import('@agoric/vow').Remote<ProtocolHandler>} protocolHandler
1173
1180
  * @returns {Protocol}
1174
1181
  */
1175
1182
  const makeNetworkProtocol = protocolHandler => {
@@ -1181,7 +1188,7 @@ export const prepareNetworkProtocol = (zone, powers) => {
1181
1188
  /** @type {MapStore<string, Port>} */
1182
1189
  const boundPorts = detached.mapStore('addrToPort');
1183
1190
 
1184
- /** @type {MapStore<Endpoint, [Port, Remote<Required<ListenHandler>>]>} */
1191
+ /** @type {MapStore<Endpoint, [Port, import('@agoric/vow').Remote<Required<ListenHandler>>]>} */
1185
1192
  const listening = detached.mapStore('listening');
1186
1193
 
1187
1194
  const { binder, protocolImpl } = makeBinderKit({
@@ -1293,7 +1300,7 @@ export function prepareLoopbackProtocolHandler(zone, { watch, allVows }) {
1293
1300
 
1294
1301
  /** @param {string} [instancePrefix] */
1295
1302
  const initHandler = (instancePrefix = 'nonce/') => {
1296
- /** @type {MapStore<string, [Remote<Port>, Remote<Required<ListenHandler>>]>} */
1303
+ /** @type {MapStore<string, [import('@agoric/vow').Remote<Port>, import('@agoric/vow').Remote<Required<ListenHandler>>]>} */
1297
1304
  const listeners = detached.mapStore('localAddr');
1298
1305
 
1299
1306
  return {
@@ -1325,7 +1332,7 @@ export function prepareLoopbackProtocolHandler(zone, { watch, allVows }) {
1325
1332
  * @param {*} _port
1326
1333
  * @param {Endpoint} localAddr
1327
1334
  * @param {Endpoint} remoteAddr
1328
- * @returns {PromiseVow<AttemptDescription>}}
1335
+ * @returns {import('@agoric/vow').PromiseVow<AttemptDescription>}}
1329
1336
  */
1330
1337
  async onConnect(_port, localAddr, remoteAddr) {
1331
1338
  const { listeners } = this.state;
@@ -1372,7 +1379,7 @@ export function prepareLoopbackProtocolHandler(zone, { watch, allVows }) {
1372
1379
  localAddr,
1373
1380
  harden([
1374
1381
  port,
1375
- /** @type {Remote<Required<ListenHandler>>} */ (
1382
+ /** @type {import('@agoric/vow').Remote<Required<ListenHandler>>} */ (
1376
1383
  listenHandler
1377
1384
  ),
1378
1385
  ]),
@@ -1383,15 +1390,17 @@ export function prepareLoopbackProtocolHandler(zone, { watch, allVows }) {
1383
1390
  localAddr,
1384
1391
  harden([
1385
1392
  port,
1386
- /** @type {Remote<Required<ListenHandler>>} */ (listenHandler),
1393
+ /** @type {import('@agoric/vow').Remote<Required<ListenHandler>>} */ (
1394
+ listenHandler
1395
+ ),
1387
1396
  ]),
1388
1397
  );
1389
1398
  }
1390
1399
  },
1391
1400
  /**
1392
- * @param {Remote<Port>} port
1401
+ * @param {import('@agoric/vow').Remote<Port>} port
1393
1402
  * @param {Endpoint} localAddr
1394
- * @param {Remote<ListenHandler>} listenHandler
1403
+ * @param {import('@agoric/vow').Remote<ListenHandler>} listenHandler
1395
1404
  * @param {*} _protocolHandler
1396
1405
  */
1397
1406
  async onListenRemove(port, localAddr, listenHandler, _protocolHandler) {
package/src/router.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @import {AttemptDescription, Bytes, Closable, CloseReason, Connection, ConnectionHandler, Endpoint, ListenHandler, Port, Protocol, ProtocolHandler, ProtocolImpl} from './types.js';
3
+ * @import {PromiseVow, Remote, VowKit, VowResolver, VowTools} from '@agoric/vow';
4
+ */
1
5
  /**
2
6
  * @template T
3
7
  * @typedef {object} Router A delimited string router implementation
@@ -15,7 +19,7 @@ export const RouterI: import("@endo/patterns").InterfaceGuard<{
15
19
  }>;
16
20
  export function prepareRouter<T>(zone: import("@agoric/base-zone").Zone): () => import("@endo/exo").Guarded<{
17
21
  /** @param {Endpoint} addr */
18
- getRoutes(addr: Endpoint): [string, T][];
22
+ getRoutes(addr: string): [string, T][];
19
23
  /**
20
24
  * @param {string} prefix
21
25
  * @param {T} route
@@ -29,17 +33,22 @@ export function prepareRouter<T>(zone: import("@agoric/base-zone").Zone): () =>
29
33
  }>;
30
34
  export function prepareRouterProtocol(zone: import("@agoric/base-zone").Zone, powers: ReturnType<(zone: import("@agoric/base-zone").Zone, powers?: {
31
35
  isRetryableReason?: ((reason: any) => boolean) | undefined;
32
- watchPromise?: ((p: PromiseLike<any>, watcher: import("@agoric/vow/src/watch-promise.js").PromiseWatcher, ...args: unknown[]) => void) | undefined;
36
+ watchPromise?: ((p: PromiseLike<any>, watcher: import("@agoric/vow/src/watch-promise.js").
37
+ /**
38
+ * @template T
39
+ * @typedef {object} Router A delimited string router implementation
40
+ * @property {(addr: string) => [string, T][]} getRoutes Return the match and
41
+ * route in order of preference
42
+ * @property {(prefix: string, route: T) => void} register Add a prefix->route
43
+ * to the database
44
+ * @property {(prefix: string, route: T) => void} unregister Remove a
45
+ * prefix->route from the database
46
+ */
47
+ PromiseWatcher, ...args: unknown[]) => void) | undefined;
33
48
  } | undefined) => {
34
49
  when: <T, TResult1 = import("@agoric/vow").Unwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow/src/types.js").Unwrap<T>) => TResult1 | PromiseLike<TResult1>) | undefined, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined) => Promise<TResult1 | TResult2>;
35
- watch: <T_1 = unknown, TResult1_1 = T_1, TResult2_1 = T_1, C = unknown>(specimenP: import("@agoric/vow/src/types.js").ERef<T_1 | import("@agoric/vow/src/types.js" /**
36
- * @param {string[]} paths
37
- * @param {Remote<ProtocolHandler>} protocolHandler
38
- */).Vow /**
39
- * @param {string[]} paths
40
- * @param {Remote<ProtocolHandler>} protocolHandler
41
- */<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1, any> | undefined, watcherContext?: C | undefined) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
42
- makeVowKit: <T_2>() => import("@agoric/vow").VowKit<T_2>;
50
+ watch: <T_1 = unknown, TResult1_1 = T_1, TResult2_1 = T_1, C = unknown>(specimenP: import("@agoric/vow/src/types.js" /** @type {Router<Protocol>} */).ERef<T_1 | import("@agoric/vow/src/types.js").Vow<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1, any> | undefined, watcherContext?: C | undefined) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
51
+ makeVowKit: <T_2>() => VowKit<T_2>;
43
52
  allVows: (vows: any) => import("@agoric/vow").Vow<any>;
44
53
  }>, E?: ((<T_3>(x: T_3) => import("../../../node_modules/@endo/eventual-send/src/E.js").ECallableOrMethods<import("@endo/eventual-send").RemoteFunctions<T_3>>) & {
45
54
  readonly get: <T_1_1>(x: T_1_1) => import("../../../node_modules/@endo/eventual-send/src/E.js").EGetters<import("@endo/eventual-send").LocalRecord<T_1_1>>;
@@ -62,7 +71,7 @@ export function prepareRouterProtocol(zone: import("@agoric/base-zone").Zone, po
62
71
  */
63
72
  unregisterProtocolHandler(prefix: string, protocolHandler: Remote<ProtocolHandler>): void;
64
73
  /** @param {Endpoint} localAddr */
65
- bindPort(localAddr: Endpoint): Promise<Port | import("@agoric/vow").Vow<Port>>;
74
+ bindPort(localAddr: string): Promise<Port | import("@agoric/vow").Vow<Port>>;
66
75
  }>;
67
76
  /**
68
77
  * A delimited string router implementation
@@ -89,4 +98,9 @@ export type RouterProtocol = {
89
98
  registerProtocolHandler: (paths: string[], protocolHandler: ProtocolHandler) => void;
90
99
  unregisterProtocolHandler: (prefix: string, protocolHandler: ProtocolHandler) => void;
91
100
  };
101
+ import type { VowKit } from '@agoric/vow';
102
+ import type { ProtocolHandler } from './types.js';
103
+ import type { Remote } from '@agoric/vow';
104
+ import type { Port } from './types.js';
105
+ import type { PromiseVow } from '@agoric/vow';
92
106
  //# sourceMappingURL=router.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["router.js"],"names":[],"mappings":"AAUA;;;;;;;;;GASG;AAEH;;;;GAIG;AAMI,8BAiDU,CAAC,QAnDP,OAAO,mBAAmB,EAAE,IAAI;IAiBrC,6BAA6B;oBAAjB,QAAQ;IAyBpB;;;OAGG;qBAFQ,MAAM,SAQN,CAAC,AAPA;IAKZ;;;OAGG;uBAFQ,MAAM,SACN,CAAC;GAWjB;AAgBM,4CAJI,OAAO,mBAAmB,EAAE,IAAI,UAChC,UAAU,QAnGrB,OAAO,mBAAmB,EAAE,IAAI;;wBAOjB,gBAAiB,WAAU,OAAQ,kCACjD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yF,YAAY;4BAClH,aAAa;0BADyF,YAAY;gCAClH,aAAa"}
package/src/router.js CHANGED
@@ -5,8 +5,13 @@ import { Fail } from '@agoric/assert';
5
5
  import { ENDPOINT_SEPARATOR, prepareNetworkProtocol } from './network.js';
6
6
  import { Shape } from './shapes.js';
7
7
 
8
+ // XXX ambient types runtime imports until https://github.com/Agoric/agoric-sdk/issues/6512
8
9
  import '@agoric/store/exported.js';
9
10
  /// <reference path="./types.js" />
11
+ /**
12
+ * @import {AttemptDescription, Bytes, Closable, CloseReason, Connection, ConnectionHandler, Endpoint, ListenHandler, Port, Protocol, ProtocolHandler, ProtocolImpl} from './types.js';
13
+ * @import {PromiseVow, Remote, VowKit, VowResolver, VowTools} from '@agoric/vow';
14
+ */
10
15
 
11
16
  /**
12
17
  * @template T
package/src/types.d.ts CHANGED
@@ -1,23 +1,23 @@
1
1
  /**
2
2
  * Rearrange the exo types to make a cast of the methods (M) and init function (I) to a specific type.
3
3
  */
4
- type ExoClassMethods<M extends import("@endo/exo").Methods, I extends (...args: any[]) => any> = M & ThisType<{
4
+ export type ExoClassMethods<M extends import("@endo/exo").Methods, I extends (...args: any[]) => any> = M & ThisType<{
5
5
  self: import("@endo/exo").Guarded<M>;
6
6
  state: ReturnType<I>;
7
7
  }>;
8
8
  /**
9
9
  * Each character code carries 8-bit octets. Eventually we want to use passable Uint8Arrays.
10
10
  */
11
- type Bytes = string;
11
+ export type Bytes = string;
12
12
  /**
13
13
  * A local or remote address See multiaddr.js for an
14
14
  * opinionated router implementation
15
15
  */
16
- type Endpoint = string;
16
+ export type Endpoint = string;
17
17
  /**
18
18
  * A closable object
19
19
  */
20
- type Closable = {
20
+ export type Closable = {
21
21
  /**
22
22
  * Terminate the object
23
23
  */
@@ -26,7 +26,7 @@ type Closable = {
26
26
  /**
27
27
  * The network Protocol
28
28
  */
29
- type Protocol = {
29
+ export type Protocol = {
30
30
  /**
31
31
  * Claim a port, or if
32
32
  * ending in ENDPOINT_SEPARATOR, a fresh name
@@ -36,7 +36,7 @@ type Protocol = {
36
36
  /**
37
37
  * A port that has been bound to a protocol
38
38
  */
39
- type Port = {
39
+ export type Port = {
40
40
  /**
41
41
  * Get the locally bound name of this
42
42
  * port
@@ -63,7 +63,7 @@ type Port = {
63
63
  /**
64
64
  * A handler for incoming connections
65
65
  */
66
- type ListenHandler = {
66
+ export type ListenHandler = {
67
67
  /**
68
68
  * The listener has been registered
69
69
  */
@@ -86,7 +86,7 @@ type ListenHandler = {
86
86
  */
87
87
  onRemove?: ((port: Remote<Port>, l: Remote<ListenHandler>) => PromiseVow<void>) | undefined;
88
88
  };
89
- type Connection = {
89
+ export type Connection = {
90
90
  /**
91
91
  * Send a packet on the connection
92
92
  */
@@ -108,7 +108,7 @@ type Connection = {
108
108
  /**
109
109
  * A handler for a given Connection
110
110
  */
111
- type ConnectionHandler = {
111
+ export type ConnectionHandler = {
112
112
  /**
113
113
  * The connection has been opened
114
114
  */
@@ -125,8 +125,8 @@ type ConnectionHandler = {
125
125
  /**
126
126
  * The reason a connection was closed
127
127
  */
128
- type CloseReason = any | null;
129
- type AttemptDescription = {
128
+ export type CloseReason = any | null;
129
+ export type AttemptDescription = {
130
130
  handler: Remote<ConnectionHandler>;
131
131
  remoteAddress?: string | undefined;
132
132
  localAddress?: string | undefined;
@@ -135,7 +135,7 @@ type AttemptDescription = {
135
135
  * A handler for things the protocol
136
136
  * implementation will invoke
137
137
  */
138
- type ProtocolHandler = {
138
+ export type ProtocolHandler = {
139
139
  /**
140
140
  * This protocol is created
141
141
  */
@@ -172,7 +172,7 @@ type ProtocolHandler = {
172
172
  /**
173
173
  * An inbound connection attempt
174
174
  */
175
- type InboundAttempt = {
175
+ export type InboundAttempt = {
176
176
  /**
177
177
  * Establish the connection
178
178
  */
@@ -195,7 +195,7 @@ type InboundAttempt = {
195
195
  /**
196
196
  * Things the protocol can do for us
197
197
  */
198
- type ProtocolImpl = {
198
+ export type ProtocolImpl = {
199
199
  /**
200
200
  * Claim a port, or if
201
201
  * ending in ENDPOINT_SEPARATOR, a fresh name
@@ -210,7 +210,7 @@ type ProtocolImpl = {
210
210
  */
211
211
  outbound: (port: Remote<Port>, remoteAddr: Endpoint, connectionHandler: Remote<ConnectionHandler>) => PromiseVow<Connection>;
212
212
  };
213
- type PortAllocator = ReturnType<ReturnType<typeof import("@agoric/network").preparePortAllocator>>;
213
+ export type PortAllocator = ReturnType<ReturnType<typeof import("@agoric/network").preparePortAllocator>>;
214
214
  import type { PromiseVow } from '@agoric/vow';
215
215
  import type { Remote } from '@agoric/vow';
216
216
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;qBAO8D,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;;;;aAK5E,MAAM;;;;;gBAIN,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;;;;;mBAKZ,GAAG,GAAG,IAAI;;;;;;;;;;;;;;;;;;gCAeG,QAAQ;;;;4CAIlB,QAAQ;;;;8CAMR,QA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