@agoric/network 0.1.1-other-dev-3eb1a1d.0 → 0.1.1-other-dev-fbe72e7.0.fbe72e7

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,44 +1,44 @@
1
1
  {
2
2
  "name": "@agoric/network",
3
- "version": "0.1.1-other-dev-3eb1a1d.0+3eb1a1d",
3
+ "version": "0.1.1-other-dev-fbe72e7.0.fbe72e7",
4
4
  "description": "Agoric's network protocol API",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
7
7
  "repository": "https://github.com/Agoric/agoric-sdk",
8
8
  "scripts": {
9
9
  "build": "exit 0",
10
- "prepack": "tsc --build tsconfig.build.json",
11
- "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
10
+ "prepack": "yarn run -T tsc --build tsconfig.build.json",
11
+ "postpack": "git clean -f '*.d.*ts*' '*.tsbuildinfo'",
12
12
  "test": "ava",
13
- "test:c8": "c8 --all $C8_OPTIONS ava",
13
+ "test:c8": "c8 --all ${C8_OPTIONS:-} ava",
14
14
  "test:xs": "exit 0",
15
15
  "lint-fix": "yarn lint:eslint --fix",
16
- "lint": "run-s --continue-on-error lint:*",
17
- "lint:types": "tsc",
18
- "lint:eslint": "eslint ."
16
+ "lint": "yarn run -T run-s --continue-on-error 'lint:*'",
17
+ "lint:types": "yarn run -T tsc",
18
+ "lint:eslint": "yarn run -T eslint ."
19
19
  },
20
20
  "keywords": [],
21
21
  "author": "Agoric",
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
- "@agoric/internal": "0.3.3-other-dev-3eb1a1d.0+3eb1a1d",
25
- "@agoric/store": "0.9.3-other-dev-3eb1a1d.0+3eb1a1d",
26
- "@agoric/vat-data": "0.5.3-other-dev-3eb1a1d.0+3eb1a1d",
27
- "@endo/base64": "^1.0.9",
28
- "@endo/errors": "^1.2.8",
29
- "@endo/far": "^1.1.9",
30
- "@endo/pass-style": "^1.4.7",
31
- "@endo/patterns": "^1.4.7",
32
- "@endo/promise-kit": "^1.1.8"
24
+ "@agoric/internal": "0.3.3-other-dev-fbe72e7.0.fbe72e7",
25
+ "@agoric/store": "0.9.3-other-dev-fbe72e7.0.fbe72e7",
26
+ "@agoric/vat-data": "0.5.3-other-dev-fbe72e7.0.fbe72e7",
27
+ "@endo/base64": "^1.0.12",
28
+ "@endo/errors": "^1.2.13",
29
+ "@endo/far": "^1.1.14",
30
+ "@endo/pass-style": "^1.6.3",
31
+ "@endo/patterns": "^1.7.0",
32
+ "@endo/promise-kit": "^1.1.13"
33
33
  },
34
34
  "devDependencies": {
35
- "@agoric/swingset-liveslots": "0.10.3-other-dev-3eb1a1d.0+3eb1a1d",
36
- "@agoric/swingset-vat": "0.32.3-other-dev-3eb1a1d.0+3eb1a1d",
37
- "@agoric/vow": "0.1.1-other-dev-3eb1a1d.0+3eb1a1d",
38
- "@agoric/zone": "0.2.3-other-dev-3eb1a1d.0+3eb1a1d",
39
- "@endo/bundle-source": "^3.5.0",
35
+ "@agoric/swingset-liveslots": "0.10.3-other-dev-fbe72e7.0.fbe72e7",
36
+ "@agoric/swingset-vat": "0.32.3-other-dev-fbe72e7.0.fbe72e7",
37
+ "@agoric/vow": "0.1.1-other-dev-fbe72e7.0.fbe72e7",
38
+ "@agoric/zone": "0.2.3-other-dev-fbe72e7.0.fbe72e7",
39
+ "@endo/bundle-source": "^4.1.2",
40
40
  "ava": "^5.3.0",
41
- "c8": "^10.1.2"
41
+ "c8": "^10.1.3"
42
42
  },
43
43
  "exports": {
44
44
  ".": "./src/index.js"
@@ -53,7 +53,7 @@
53
53
  "access": "public"
54
54
  },
55
55
  "engines": {
56
- "node": "^18.12 || ^20.9"
56
+ "node": "^20.9 || ^22.11"
57
57
  },
58
58
  "ava": {
59
59
  "files": [
@@ -68,5 +68,5 @@
68
68
  "typeCoverage": {
69
69
  "atLeast": 91.16
70
70
  },
71
- "gitHead": "3eb1a1d2d75b2b4a94807cd3bf759bc9fc531f05"
71
+ "gitHead": "fbe72e72107f9997f788674e668c660d92ec4492"
72
72
  }
package/src/bytes.d.ts CHANGED
@@ -42,5 +42,4 @@ export function byteSourceToBase64(byteSource: ByteSource): string;
42
42
  export function base64ToBytes(string: string): Bytes;
43
43
  export type ByteSource = Bytes | Buffer | Uint8Array | Iterable<number>;
44
44
  import type { Bytes } from './types.js';
45
- import type { Bytes as Bytes_1 } from './types.js';
46
45
  //# sourceMappingURL=bytes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["bytes.js"],"names":[],"mappings":"AAKA;;GAEG;AAEH,2EAA2E;AAE3E;;;;;;;GAOG;AACH,6CAHW,OAAO,GACL,UAAU,CAgBtB;AAuBD;;;;;;GAMG;AACH,oCAHW,UAAU,GACR,KAAK,CAOjB;AAED;;;;;GAKG;AACH,qCAHW,KAAK,GACH,MAAM,CAIlB;AAED;;;;;GAKG;AACH,+CAHW,UAAU,GACR,MAAM,CAKlB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,GACJ,KAAK,CAIjB;yBA1Fa,KAAK,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;2BAHpC,YAAY;sCAAZ,YAAY"}
1
+ {"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["bytes.js"],"names":[],"mappings":"AAKA;;GAEG;AAEH,2EAA2E;AAE3E;;;;;;;GAOG;AACH,6CAHW,OAAO,GACL,UAAU,CAgBtB;AAuBD;;;;;;GAMG;AACH,oCAHW,UAAU,GACR,KAAK,CAOjB;AAED;;;;;GAKG;AACH,qCAHW,KAAK,GACH,MAAM,CAIlB;AAED;;;;;GAKG;AACH,+CAHW,UAAU,GACR,MAAM,CAKlB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,GACJ,KAAK,CAIjB;yBA1Fa,KAAK,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;2BAHpC,YAAY"}
package/src/bytes.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
  import { X, Fail } from '@endo/errors';
3
3
  import { encodeBase64, decodeBase64 } from '@endo/base64';
4
- import { isObject } from '@endo/pass-style';
4
+ import { isPrimitive } from '@endo/pass-style';
5
5
 
6
6
  /**
7
7
  * @import {Bytes} from './types.js';
@@ -22,7 +22,7 @@ export function coerceToByteSource(specimen) {
22
22
  return specimen;
23
23
  }
24
24
 
25
- isObject(specimen) ||
25
+ !isPrimitive(specimen) ||
26
26
  assert.fail(X`non-object ${specimen} is not a ByteSource`, TypeError);
27
27
 
28
28
  const obj = /** @type {{}} */ (specimen);
package/src/network.d.ts CHANGED
@@ -11,7 +11,7 @@ export function getPrefixes(addr: string): string[];
11
11
  * @param {import('@agoric/base-zone').Zone} zone
12
12
  * @param {VowTools} powers
13
13
  */
14
- export function prepareLoopbackProtocolHandler(zone: import("@agoric/base-zone").Zone, { watch, allVows }: VowTools): (instancePrefix?: string | undefined) => import("@endo/exo").Guarded<{
14
+ export function prepareLoopbackProtocolHandler(zone: import("@agoric/base-zone").Zone, { watch, allVows }: VowTools): (instancePrefix?: string) => import("@endo/exo").Guarded<{
15
15
  onCreate(_impl: any, _protocolHandler: any): Promise<void>;
16
16
  generatePortID(_localAddr: any, _protocolHandler: any): Promise<string>;
17
17
  onBind(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
@@ -40,7 +40,7 @@ export function prepareLoopbackProtocolHandler(zone: import("@agoric/base-zone")
40
40
  export const ENDPOINT_SEPARATOR: "/";
41
41
  export const CLOSE_REASON_FINALIZER: "closed-by-finalizer";
42
42
  export function rethrowUnlessMissing(err: unknown): undefined;
43
- export function crossoverConnection(zone: import("@agoric/zone").Zone, handler0: Remote<Required<ConnectionHandler>>, addr0: Endpoint, handler1: Remote<Required<ConnectionHandler>>, addr1: Endpoint, makeConnection: (opts: ConnectionOpts) => Connection, finalizer: Finalizer, current?: globalThis.WeakSetStore<Closable> | undefined): Connection[];
43
+ export function crossoverConnection(zone: import("@agoric/zone").Zone, handler0: Remote<Required<ConnectionHandler>>, addr0: Endpoint, handler1: Remote<Required<ConnectionHandler>>, addr1: Endpoint, makeConnection: (opts: ConnectionOpts) => Connection, finalizer: Finalizer, current?: WeakSetStore<Closable>): Connection[];
44
44
  export function prepareNetworkProtocol(zone: import("@agoric/base-zone").Zone, powers: Powers): (protocolHandler: Remote<ProtocolHandler>) => Protocol;
45
45
  export function prepareEchoConnectionKit(zone: import("@agoric/base-zone").Zone): () => import("@endo/exo").GuardedKit<{
46
46
  handler: {
@@ -55,7 +55,7 @@ export function prepareEchoConnectionKit(zone: import("@agoric/base-zone").Zone)
55
55
  * @param {CloseReason} [reason]
56
56
  * @param {ConnectionHandler} [_connectionHandler]
57
57
  */
58
- onClose(_connection: Connection, reason?: CloseReason, _connectionHandler?: ConnectionHandler | undefined): Promise<void>;
58
+ onClose(_connection: Connection, reason?: CloseReason, _connectionHandler?: ConnectionHandler): Promise<void>;
59
59
  };
60
60
  listener: {
61
61
  onAccept(_port: any, _localAddr: any, _remoteAddr: any, _listenHandler: any): Promise<import("@endo/exo").Guarded<{
@@ -70,7 +70,7 @@ export function prepareEchoConnectionKit(zone: import("@agoric/base-zone").Zone)
70
70
  * @param {CloseReason} [reason]
71
71
  * @param {ConnectionHandler} [_connectionHandler]
72
72
  */
73
- onClose(_connection: Connection, reason?: CloseReason, _connectionHandler?: ConnectionHandler | undefined): Promise<void>;
73
+ onClose(_connection: Connection, reason?: CloseReason, _connectionHandler?: ConnectionHandler): Promise<void>;
74
74
  }>>;
75
75
  onListen(port: any, _listenHandler: any): Promise<void>;
76
76
  };
@@ -1 +1 @@
1
- {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["network.js"],"names":[],"mappings":"AA2CA;;;;GAIG;AACH,kCAFW,MAAM,YAahB;AAwtCD,mFAAmF;AAEnF;;;;;GAKG;AACH,qDAHW,OAAO,mBAAmB,EAAE,IAAI,sBAChC,QAAQ;;;;IAmCX;;;;;OAKG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gCAAZ,YAAY;8BAAZ,YAAY;qCAAZ,YAAY;8BAAZ,YAAY;2BAAZ,YAAY;iCAAZ,YAAY;AAo/CnM,mFAAmF;AAEnF;;;;;;;;;;GAUG;AACH,wCAHW,OAAO,mBAAmB,EAAE,IAAI,aAChC,QAAQ;;IAcf;;;;;OAKG;yBAFQ,OAAO,UAAU,CAAC,WAClB,OAAO,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAK9C;;;;OAIG;uBADQ,OAAO;QAAE,KAAK,IAAI,WAAW,GAAG,CAAC,CAAA;KAAE,CAAC;;;GA0BlD;gCAljD8C,aAAa"}
package/src/network.js CHANGED
@@ -10,7 +10,7 @@ import { Shape } from './shapes.js';
10
10
 
11
11
  /// <reference path="./types.js" />
12
12
  /**
13
- * @import {AttemptDescription, Bytes, CloseReason, Closable, Connection, ConnectionHandler, Endpoint, ListenHandler, Port, Protocol, ProtocolHandler, ProtocolImpl} from './types.js';
13
+ * @import {AttemptDescription, Bytes, CloseReason, Closable, Connection, ConnectionHandler, Endpoint, ListenHandler, Port, Protocol, ProtocolHandler, ProtocolImpl, SendOptions} from './types.js';
14
14
  * @import {PromiseVow, Remote, VowTools} from '@agoric/vow';
15
15
  */
16
16
 
@@ -114,8 +114,11 @@ const prepareHalfConnection = (zone, { watch, allVows, finalizer }) => {
114
114
  const { addrs, r } = this.state;
115
115
  return addrs[r];
116
116
  },
117
- /** @param {Bytes} packetBytes */
118
- async send(packetBytes) {
117
+ /**
118
+ * @param {Bytes} packetBytes
119
+ * @param {SendOptions} [opts]
120
+ */
121
+ async send(packetBytes, opts) {
119
122
  const { closed, handlers, r, conns } = this.state;
120
123
  if (closed) {
121
124
  throw Error(closed);
@@ -126,6 +129,7 @@ const prepareHalfConnection = (zone, { watch, allVows, finalizer }) => {
126
129
  conns.get(r),
127
130
  toBytes(packetBytes),
128
131
  handlers[r],
132
+ opts,
129
133
  ),
130
134
  this.facets.openConnectionAckWatcher,
131
135
  );
package/src/router.d.ts CHANGED
@@ -31,16 +31,7 @@ export function prepareRouter<T>(zone: import("@agoric/base-zone").Zone): () =>
31
31
  */
32
32
  unregister(prefix: string, route: T): void;
33
33
  }>;
34
- export function prepareRouterProtocol(zone: import("@agoric/base-zone").Zone, powers: import("./network.js").Powers, E?: ((<T>(x: T) => import("../../../node_modules/@endo/eventual-send/src/E.js").ECallableOrMethods<import("@endo/eventual-send").RemoteFunctions<T>>) & {
35
- readonly get: <T>(x: T) => import("../../../node_modules/@endo/eventual-send/src/E.js").EGetters<import("@endo/eventual-send").LocalRecord<T>>;
36
- readonly resolve: {
37
- (): Promise<void>;
38
- <T>(value: T): Promise<Awaited<T>>;
39
- <T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
40
- };
41
- readonly sendOnly: <T>(x: T) => import("../../../node_modules/@endo/eventual-send/src/E.js").ESendOnlyCallableOrMethods<import("@endo/eventual-send").RemoteFunctions<T>>;
42
- readonly when: <T, U = T>(x: T | PromiseLike<T>, onfulfilled?: ((value: T) => import("@endo/eventual-send").ERef<U>) | undefined, onrejected?: ((reason: any) => import("@endo/eventual-send").ERef<U>) | undefined) => Promise<U>;
43
- }) | undefined): () => import("@endo/exo").Guarded<{
34
+ export function prepareRouterProtocol(zone: import("@agoric/base-zone").Zone, powers: import("./network.js").Powers, E?: typeof defaultE): () => import("@endo/exo").Guarded<{
44
35
  /**
45
36
  * @param {string[]} paths
46
37
  * @param {Remote<ProtocolHandler>} protocolHandler
@@ -80,6 +71,7 @@ export type RouterProtocol = {
80
71
  unregisterProtocolHandler: (prefix: string, protocolHandler: ProtocolHandler) => void;
81
72
  };
82
73
  import type { Endpoint } from './types.js';
74
+ import { E as defaultE } from '@endo/far';
83
75
  import type { ProtocolHandler } from './types.js';
84
76
  import type { Remote } from '@agoric/vow';
85
77
  import type { Port } from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["router.js"],"names":[],"mappings":"AAWA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH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;GAWjB;AAgBM,4CAJI,OAAO,mBAAmB,EAAE,IAAI,UAChC,OAAO,cAAc,EAAE,MAAM,MAC7B,OAAO,QAAQ;IAmCpB;;;OAGG;mCAFQ,MAAM,EAAE,mBACR,OAAO,eAAe,CAAC;IAYlC;;;OAGG;sCAFQ,MAAM,mBACN,OAAO,eAAe,CAAC;IAclC,kCAAkC;wBAAtB,QAAQ;GAUzB;;;;mBAzKY,CAAC;;;;;eAEA,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE;;;;;cAE/B,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI;;;;;gBAElC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI;;;cA8ElC,CAAC,MAAM,EAAE,MAAM,KAAK,WAAW,IAAI,CAAC;6BACpC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,eAAe,KAAK,IAAI;+BAC3D,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,KAAK,IAAI;;8BA3FZ,YAAY;8BAN1C,WAAW;qCAMmB,YAAY;4BACzB,aAAa;0BADA,YAAY;gCACzB,aAAa"}
package/src/shapes.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ export const SendOptionsShape: import("@endo/patterns").Matcher;
1
2
  export namespace Shape {
2
- namespace ConnectionI {
3
+ export namespace ConnectionI {
3
4
  let connection: import("@endo/patterns").InterfaceGuard<{
4
5
  send: import("@endo/patterns").MethodGuard;
5
6
  close: import("@endo/patterns").MethodGuard;
@@ -16,7 +17,7 @@ export namespace Shape {
16
17
  onFulfilled: import("@endo/patterns").MethodGuard;
17
18
  }>;
18
19
  }
19
- namespace InboundAttemptI {
20
+ export namespace InboundAttemptI {
20
21
  export let inboundAttempt: import("@endo/patterns").InterfaceGuard<{
21
22
  accept: import("@endo/patterns").MethodGuard;
22
23
  getLocalAddress: import("@endo/patterns").MethodGuard;
@@ -35,7 +36,7 @@ export namespace Shape {
35
36
  }>;
36
37
  export { sinkWatcher_1 as sinkWatcher };
37
38
  }
38
- namespace PortI {
39
+ export namespace PortI {
39
40
  export let port: import("@endo/patterns").InterfaceGuard<{
40
41
  getLocalAddress: import("@endo/patterns").MethodGuard;
41
42
  addListener: import("@endo/patterns").MethodGuard;
@@ -68,7 +69,7 @@ export namespace Shape {
68
69
  }>;
69
70
  export { sinkWatcher_2 as sinkWatcher };
70
71
  }
71
- namespace ProtocolHandlerI {
72
+ export namespace ProtocolHandlerI {
72
73
  export let protocolHandler: import("@endo/patterns").InterfaceGuard<{
73
74
  onCreate: import("@endo/patterns").MethodGuard;
74
75
  generatePortID: import("@endo/patterns").MethodGuard;
@@ -93,25 +94,25 @@ export namespace Shape {
93
94
  }>;
94
95
  export { rethrowUnlessMissingWatcher_3 as rethrowUnlessMissingWatcher };
95
96
  }
96
- let ProtocolImplI: import("@endo/patterns").InterfaceGuard<{
97
+ export let ProtocolImplI: import("@endo/patterns").InterfaceGuard<{
97
98
  bindPort: import("@endo/patterns").MethodGuard;
98
99
  inbound: import("@endo/patterns").MethodGuard;
99
100
  outbound: import("@endo/patterns").MethodGuard;
100
101
  }>;
101
- function Vow$(shape: any): import("@endo/patterns").Matcher;
102
- let AttemptDescription: import("@endo/patterns").Matcher;
103
- let Opts: import("@endo/patterns").Matcher;
104
- let Data: import("@endo/patterns").Matcher;
105
- let Bytes: import("@endo/patterns").Matcher;
106
- let Endpoint: import("@endo/patterns").Matcher;
107
- let Vow: import("@endo/patterns").Matcher;
108
- let ConnectionHandler: import("@endo/patterns").Matcher;
109
- let Connection: import("@endo/patterns").Matcher;
110
- let InboundAttempt: import("@endo/patterns").Matcher;
111
- let Listener: import("@endo/patterns").Matcher;
112
- let ListenHandler: import("@endo/patterns").Matcher;
113
- let Port: import("@endo/patterns").Matcher;
114
- let ProtocolHandler: import("@endo/patterns").Matcher;
115
- let ProtocolImpl: import("@endo/patterns").Matcher;
102
+ export function Vow$(shape: any): import("@endo/patterns").Matcher;
103
+ export let AttemptDescription: import("@endo/patterns").Matcher;
104
+ export { SendOptionsShape as Opts };
105
+ export let Data: import("@endo/patterns").Matcher;
106
+ export let Bytes: import("@endo/patterns").Matcher;
107
+ export let Endpoint: import("@endo/patterns").Matcher;
108
+ export let Vow: import("@endo/patterns").Matcher;
109
+ export let ConnectionHandler: import("@endo/patterns").Matcher;
110
+ export let Connection: import("@endo/patterns").Matcher;
111
+ export let InboundAttempt: import("@endo/patterns").Matcher;
112
+ export let Listener: import("@endo/patterns").Matcher;
113
+ export let ListenHandler: import("@endo/patterns").Matcher;
114
+ export let Port: import("@endo/patterns").Matcher;
115
+ export let ProtocolHandler: import("@endo/patterns").Matcher;
116
+ export let ProtocolImpl: import("@endo/patterns").Matcher;
116
117
  }
117
118
  //# sourceMappingURL=shapes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shapes.d.ts","sourceRoot":"","sources":["shapes.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6BQ,4DAAgC"}
1
+ {"version":3,"file":"shapes.d.ts","sourceRoot":"","sources":["shapes.js"],"names":[],"mappings":"AA2BA,gEAGE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM,mEAAgC"}
package/src/shapes.js CHANGED
@@ -25,6 +25,11 @@ const Shape1 = /** @type {const} */ ({
25
25
  ProtocolImpl: M.remotable('ProtocolImpl'),
26
26
  });
27
27
 
28
+ export const SendOptionsShape = M.splitRecord(
29
+ {},
30
+ { relativeTimeoutNs: M.bigint() },
31
+ );
32
+
28
33
  const Shape2 = /** @type {const} */ ({
29
34
  ...Shape1,
30
35
  Vow$: shape => M.or(shape, Shape1.Vow),
@@ -32,7 +37,7 @@ const Shape2 = /** @type {const} */ ({
32
37
  { handler: Shape1.ConnectionHandler },
33
38
  { remoteAddress: Shape1.Endpoint, localAddress: Shape1.Endpoint },
34
39
  ),
35
- Opts: M.recordOf(M.string(), M.any()),
40
+ Opts: SendOptionsShape,
36
41
  });
37
42
 
38
43
  export const Shape = /** @type {const} */ harden({
package/src/types.d.ts CHANGED
@@ -87,11 +87,18 @@ export type ListenHandler = {
87
87
  */
88
88
  onRemove?: ((port: Remote<Port>, l: Remote<ListenHandler>) => PromiseVow<void>) | undefined;
89
89
  };
90
+ export type WellKnownSendOptions = {
91
+ /**
92
+ * timeout the packet if an ack is not received by this time
93
+ */
94
+ relativeTimeoutNs?: bigint | undefined;
95
+ };
96
+ export type SendOptions = WellKnownSendOptions & Record<string, any>;
90
97
  export type ConnectionI = {
91
98
  /**
92
99
  * Send a packet on the connection
93
100
  */
94
- send: (packetBytes: Bytes, opts?: Record<string, any>) => PromiseVow<Bytes>;
101
+ send: (packetBytes: Bytes, opts?: SendOptions) => PromiseVow<Bytes>;
95
102
  /**
96
103
  * Close both ends of the connection
97
104
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;;4BAW2C,CAAC,SAA/B,OAAQ,WAAW,EAAE,OAAQ,EACH,CAAC,SAA3B,CAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAI,IACzB,CAAC,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;;;;;;;;WAML,MAAM,WAAW,IAAI,CAAC;;uBAGvB,eAAe,GAAG,SAAS;;;;;;;;;cAK1B,CAAC,MAAM,EAAE,QAAQ,KAAK,WAAW,IAAI,CAAC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,WAAW,IAAI,CAAC;;;;;;;;;YAIV,CAAC,IAAI,EAAE,kBAAkB,KAAK,WAAW,UAAU,CAAC;;;;;qBAEpD,MAAM,QAAQ;;;;;sBAEd,MAAM,QAAQ;;;;WAEd,MAAM,WAAW,IAAI,CAAC;;;;;;;;;;cAGtB,CAAC,MAAM,EAAE,QAAQ,KAAK,WAAW,OAAO,IAAI,CAAC,CAAC;;;;aAE9C,CACT,UAAU,EAAE,QAAQ,EACpB,UAAU,EAAE,QAAQ,KACjB,WAAW,cAAc,CAAC;;;;cAEpB,CACT,IAAI,EAAE,OAAO,IAAI,CAAC,EAClB,UAAU,EAAE,QAAQ,EACpB,iBAAiB,EAAE,OAAO,iBAAiB,CAAC,KACzC,WAAW,UAAU,CAAC;;gCAzMO,aAAa;qCADN,kBAAkB;4BACzB,aAAa"}
package/src/types.js CHANGED
@@ -78,11 +78,20 @@ export {};
78
78
  * listener has been removed
79
79
  */
80
80
 
81
+ /**
82
+ * @typedef {object} WellKnownSendOptions
83
+ * @property {bigint} [relativeTimeoutNs] timeout the packet if an ack is not received by this time
84
+ */
85
+
86
+ /**
87
+ * @typedef {WellKnownSendOptions & Record<string, any>} SendOptions
88
+ */
89
+
81
90
  /**
82
91
  * @typedef {object} ConnectionI
83
92
  * @property {(
84
93
  * packetBytes: Bytes,
85
- * opts?: Record<string, any>,
94
+ * opts?: SendOptions,
86
95
  * ) => PromiseVow<Bytes>} send
87
96
  * Send a packet on the connection
88
97
  * @property {() => PromiseVow<void>} close Close both ends of the connection