@agoric/network 0.1.1-dev-501c093.0 → 0.1.1-dev-db972d4.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 +9 -9
- package/src/bytes.d.ts +8 -6
- package/src/bytes.d.ts.map +1 -1
- package/src/bytes.js +35 -25
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/network.d.ts +16 -126
- package/src/network.d.ts.map +1 -1
- package/src/network.js +289 -443
- package/src/router.d.ts +5 -9
- package/src/router.d.ts.map +1 -1
- package/src/router.js +7 -10
- package/src/shapes.d.ts +117 -0
- package/src/shapes.d.ts.map +1 -0
- package/src/shapes.js +191 -0
- package/src/types.d.ts +36 -27
- package/src/types.d.ts.map +1 -1
- package/src/types.js +54 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/network",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-db972d4.0+db972d4",
|
|
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-
|
|
25
|
-
"@agoric/internal": "0.3.3-dev-
|
|
26
|
-
"@agoric/store": "0.9.3-dev-
|
|
27
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
24
|
+
"@agoric/assert": "0.6.1-dev-db972d4.0+db972d4",
|
|
25
|
+
"@agoric/internal": "0.3.3-dev-db972d4.0+db972d4",
|
|
26
|
+
"@agoric/store": "0.9.3-dev-db972d4.0+db972d4",
|
|
27
|
+
"@agoric/vat-data": "0.5.3-dev-db972d4.0+db972d4",
|
|
28
28
|
"@endo/base64": "^1.0.2",
|
|
29
29
|
"@endo/far": "^1.0.4",
|
|
30
30
|
"@endo/patterns": "^1.1.0",
|
|
31
31
|
"@endo/promise-kit": "^1.0.4"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
35
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
36
|
-
"@agoric/zone": "0.2.3-dev-
|
|
34
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-db972d4.0+db972d4",
|
|
35
|
+
"@agoric/swingset-vat": "0.32.3-dev-db972d4.0+db972d4",
|
|
36
|
+
"@agoric/zone": "0.2.3-dev-db972d4.0+db972d4",
|
|
37
37
|
"@endo/bundle-source": "^3.1.0",
|
|
38
38
|
"ava": "^5.3.0",
|
|
39
39
|
"c8": "^9.1.0"
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"typeCoverage": {
|
|
71
71
|
"atLeast": 91.68
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "db972d4615b3aaee60659a6c97f3d42487e50771"
|
|
74
74
|
}
|
package/src/bytes.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Convert
|
|
2
|
+
* Convert a Uint8Array or other sequence of octets to a string representation
|
|
3
|
+
* that `@endo/marshal` accepts as Passable.
|
|
3
4
|
*
|
|
4
|
-
* @param {
|
|
5
|
+
* @param {ByteSource} byteSource
|
|
5
6
|
* @returns {Bytes}
|
|
6
7
|
*/
|
|
7
|
-
export function toBytes(
|
|
8
|
+
export function toBytes(byteSource: ByteSource): Bytes;
|
|
8
9
|
/**
|
|
9
10
|
* Convert bytes to a String.
|
|
10
11
|
*
|
|
@@ -15,15 +16,16 @@ export function bytesToString(bytes: Bytes): string;
|
|
|
15
16
|
/**
|
|
16
17
|
* Base64, as specified in https://tools.ietf.org/html/rfc4648#section-4
|
|
17
18
|
*
|
|
18
|
-
* @param {
|
|
19
|
+
* @param {ByteSource} byteSource
|
|
19
20
|
* @returns {string} base64 encoding
|
|
20
21
|
*/
|
|
21
|
-
export function dataToBase64(
|
|
22
|
+
export function dataToBase64(byteSource: ByteSource): string;
|
|
22
23
|
/**
|
|
23
|
-
* Decodes a string into
|
|
24
|
+
* Decodes a base64 string into bytes.
|
|
24
25
|
*
|
|
25
26
|
* @param {string} string Base64-encoded string
|
|
26
27
|
* @returns {Bytes} decoded bytes
|
|
27
28
|
*/
|
|
28
29
|
export function base64ToBytes(string: string): Bytes;
|
|
30
|
+
export type ByteSource = Bytes | Buffer | Uint8Array | Iterable<number>;
|
|
29
31
|
//# sourceMappingURL=bytes.d.ts.map
|
package/src/bytes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["bytes.js"],"names":[],"mappings":"
|
|
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,SAAS,MAAM,CAAC"}
|
package/src/bytes.js
CHANGED
|
@@ -1,24 +1,43 @@
|
|
|
1
|
+
// @ts-check
|
|
1
2
|
/// <reference path="./types.js" />
|
|
3
|
+
import { Fail } from '@agoric/assert';
|
|
2
4
|
import { encodeBase64, decodeBase64 } from '@endo/base64';
|
|
3
5
|
|
|
6
|
+
/** @typedef {Bytes | Buffer | Uint8Array | Iterable<number>} ByteSource */
|
|
7
|
+
|
|
4
8
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @param {Data} data
|
|
8
|
-
* @returns {Bytes}
|
|
9
|
+
* @param {ByteSource} contents
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const coerceToByteArray = contents => {
|
|
12
|
+
if (typeof contents === 'string') {
|
|
13
|
+
return Uint8Array.from(contents, c => {
|
|
14
|
+
const b = c.charCodeAt(0);
|
|
15
|
+
b <= 0xff || Fail`character cannot be coerced to an octet: ${c}`;
|
|
16
|
+
return b;
|
|
17
|
+
});
|
|
18
|
+
} else if (contents instanceof Uint8Array) {
|
|
19
|
+
// Reconstruct to ensure we have a Uint8Array and not a Buffer.
|
|
20
|
+
return new Uint8Array(
|
|
21
|
+
contents.buffer,
|
|
22
|
+
contents.byteOffset,
|
|
23
|
+
contents.byteLength,
|
|
24
|
+
);
|
|
16
25
|
}
|
|
26
|
+
return new Uint8Array(contents);
|
|
27
|
+
};
|
|
17
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Convert a Uint8Array or other sequence of octets to a string representation
|
|
31
|
+
* that `@endo/marshal` accepts as Passable.
|
|
32
|
+
*
|
|
33
|
+
* @param {ByteSource} byteSource
|
|
34
|
+
* @returns {Bytes}
|
|
35
|
+
*/
|
|
36
|
+
export function toBytes(byteSource) {
|
|
18
37
|
// We return the raw characters in the lower half of
|
|
19
38
|
// the String's representation.
|
|
20
|
-
const buf =
|
|
21
|
-
return String.fromCharCode
|
|
39
|
+
const buf = coerceToByteArray(byteSource);
|
|
40
|
+
return String.fromCharCode(...buf);
|
|
22
41
|
}
|
|
23
42
|
|
|
24
43
|
/**
|
|
@@ -34,25 +53,16 @@ export function bytesToString(bytes) {
|
|
|
34
53
|
/**
|
|
35
54
|
* Base64, as specified in https://tools.ietf.org/html/rfc4648#section-4
|
|
36
55
|
*
|
|
37
|
-
* @param {
|
|
56
|
+
* @param {ByteSource} byteSource
|
|
38
57
|
* @returns {string} base64 encoding
|
|
39
58
|
*/
|
|
40
|
-
export function dataToBase64(
|
|
41
|
-
|
|
42
|
-
let bytes;
|
|
43
|
-
if (typeof data === 'string') {
|
|
44
|
-
bytes = new Uint8Array(data.length);
|
|
45
|
-
for (let i = 0; i < data.length; i += 1) {
|
|
46
|
-
bytes[i] = data.charCodeAt(i);
|
|
47
|
-
}
|
|
48
|
-
} else {
|
|
49
|
-
bytes = new Uint8Array(data);
|
|
50
|
-
}
|
|
59
|
+
export function dataToBase64(byteSource) {
|
|
60
|
+
const bytes = coerceToByteArray(byteSource);
|
|
51
61
|
return encodeBase64(bytes);
|
|
52
62
|
}
|
|
53
63
|
|
|
54
64
|
/**
|
|
55
|
-
* Decodes a string into
|
|
65
|
+
* Decodes a base64 string into bytes.
|
|
56
66
|
*
|
|
57
67
|
* @param {string} string Base64-encoded string
|
|
58
68
|
* @returns {Bytes} decoded bytes
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
package/src/network.d.ts
CHANGED
|
@@ -10,11 +10,11 @@ export function getPrefixes(addr: string): string[];
|
|
|
10
10
|
* @param {import('@agoric/base-zone').Zone} zone
|
|
11
11
|
* @param {ReturnType<import('@agoric/vow').prepareVowTools>} powers
|
|
12
12
|
*/
|
|
13
|
-
export function prepareLoopbackProtocolHandler(zone: import('@agoric/base-zone').Zone, { watch }: ReturnType<(zone: import("@agoric/base-zone").Zone, powers?: {
|
|
13
|
+
export function prepareLoopbackProtocolHandler(zone: import('@agoric/base-zone').Zone, { watch, allVows }: ReturnType<(zone: import("@agoric/base-zone").Zone, powers?: {
|
|
14
14
|
isRetryableReason?: ((reason: any) => boolean) | undefined;
|
|
15
15
|
watchPromise?: ((p: PromiseLike<any>, watcher: import("@agoric/vow/src/watch-promise.js").PromiseWatcher, ...args: unknown[]) => void) | undefined;
|
|
16
16
|
} | undefined) => {
|
|
17
|
-
when: <T
|
|
17
|
+
when: <T, TResult1 = import("@agoric/vow").Unwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow").Unwrap<T>) => TResult1 | PromiseLike<TResult1>) | undefined, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined) => Promise<TResult1 | TResult2>;
|
|
18
18
|
watch: <T_1 = any, TResult1_1 = T_1, TResult2_1 = T_1>(specimenP: import("@agoric/vow").ERef<T_1 | import("@agoric/vow").Vow<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1> | undefined, watcherContext?: unknown) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
|
|
19
19
|
makeVowKit: <T_2>() => import("@agoric/vow").VowKit<T_2>;
|
|
20
20
|
allVows: (vows: any) => import("@agoric/vow").Vow<any>;
|
|
@@ -22,16 +22,22 @@ export function prepareLoopbackProtocolHandler(zone: import('@agoric/base-zone')
|
|
|
22
22
|
onCreate(_impl: any, _protocolHandler: any): Promise<void>;
|
|
23
23
|
generatePortID(_localAddr: any, _protocolHandler: any): Promise<string>;
|
|
24
24
|
onBind(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @param {*} _port
|
|
27
|
+
* @param {Endpoint} localAddr
|
|
28
|
+
* @param {Endpoint} remoteAddr
|
|
29
|
+
* @returns {PromiseVow<AttemptDescription>}}
|
|
30
|
+
*/
|
|
31
|
+
onConnect(_port: any, localAddr: Endpoint, remoteAddr: Endpoint): PromiseVow<AttemptDescription>;
|
|
26
32
|
onInstantiate(_port: any, _localAddr: any, _remote: any, _protocol: any): Promise<string>;
|
|
27
33
|
onListen(port: any, localAddr: any, listenHandler: any, _protocolHandler: any): Promise<void>;
|
|
28
34
|
/**
|
|
29
|
-
* @param {Port} port
|
|
35
|
+
* @param {Remote<Port>} port
|
|
30
36
|
* @param {Endpoint} localAddr
|
|
31
|
-
* @param {ListenHandler} listenHandler
|
|
37
|
+
* @param {Remote<ListenHandler>} listenHandler
|
|
32
38
|
* @param {*} _protocolHandler
|
|
33
39
|
*/
|
|
34
|
-
onListenRemove(port: Port
|
|
40
|
+
onListenRemove(port: Remote<Port>, localAddr: Endpoint, listenHandler: Remote<ListenHandler>, _protocolHandler: any): Promise<void>;
|
|
35
41
|
onRevoke(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
|
|
36
42
|
}>;
|
|
37
43
|
/**
|
|
@@ -39,133 +45,17 @@ export function prepareLoopbackProtocolHandler(zone: import('@agoric/base-zone')
|
|
|
39
45
|
* casually.
|
|
40
46
|
*/
|
|
41
47
|
export const ENDPOINT_SEPARATOR: "/";
|
|
42
|
-
export namespace Shape {
|
|
43
|
-
namespace ConnectionI {
|
|
44
|
-
let connection: import("@endo/patterns").InterfaceGuard<{
|
|
45
|
-
send: import("@endo/patterns").MethodGuard;
|
|
46
|
-
close: import("@endo/patterns").MethodGuard;
|
|
47
|
-
getLocalAddress: import("@endo/patterns").MethodGuard;
|
|
48
|
-
getRemoteAddress: import("@endo/patterns").MethodGuard;
|
|
49
|
-
}>;
|
|
50
|
-
let openConnectionAckWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
51
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
52
|
-
}>;
|
|
53
|
-
let rethrowUnlessMissingWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
54
|
-
onRejected: import("@endo/patterns").MethodGuard;
|
|
55
|
-
}>;
|
|
56
|
-
let sinkWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
57
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
58
|
-
}>;
|
|
59
|
-
}
|
|
60
|
-
namespace InboundAttemptI {
|
|
61
|
-
export let inboundAttempt: import("@endo/patterns").InterfaceGuard<{
|
|
62
|
-
accept: import("@endo/patterns").MethodGuard;
|
|
63
|
-
getLocalAddress: import("@endo/patterns").MethodGuard;
|
|
64
|
-
getRemoteAddress: import("@endo/patterns").MethodGuard;
|
|
65
|
-
close: import("@endo/patterns").MethodGuard;
|
|
66
|
-
}>;
|
|
67
|
-
export let inboundAttemptAcceptWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
68
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
69
|
-
}>;
|
|
70
|
-
let rethrowUnlessMissingWatcher_1: import("@endo/patterns").InterfaceGuard<{
|
|
71
|
-
onRejected: import("@endo/patterns").MethodGuard;
|
|
72
|
-
}>;
|
|
73
|
-
export { rethrowUnlessMissingWatcher_1 as rethrowUnlessMissingWatcher };
|
|
74
|
-
let sinkWatcher_1: import("@endo/patterns").InterfaceGuard<{
|
|
75
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
76
|
-
}>;
|
|
77
|
-
export { sinkWatcher_1 as sinkWatcher };
|
|
78
|
-
}
|
|
79
|
-
namespace PortI {
|
|
80
|
-
export let port: import("@endo/patterns").InterfaceGuard<{
|
|
81
|
-
getLocalAddress: import("@endo/patterns").MethodGuard;
|
|
82
|
-
addListener: import("@endo/patterns").MethodGuard;
|
|
83
|
-
connect: import("@endo/patterns").MethodGuard;
|
|
84
|
-
removeListener: import("@endo/patterns").MethodGuard;
|
|
85
|
-
revoke: import("@endo/patterns").MethodGuard;
|
|
86
|
-
}>;
|
|
87
|
-
export let portAddListenerWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
88
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
89
|
-
}>;
|
|
90
|
-
export let portRemoveListenerWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
91
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
92
|
-
}>;
|
|
93
|
-
export let portConnectWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
94
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
95
|
-
}>;
|
|
96
|
-
export let portRevokeWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
97
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
98
|
-
}>;
|
|
99
|
-
export let portRevokeCleanupWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
100
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
101
|
-
}>;
|
|
102
|
-
let rethrowUnlessMissingWatcher_2: import("@endo/patterns").InterfaceGuard<{
|
|
103
|
-
onRejected: import("@endo/patterns").MethodGuard;
|
|
104
|
-
}>;
|
|
105
|
-
export { rethrowUnlessMissingWatcher_2 as rethrowUnlessMissingWatcher };
|
|
106
|
-
let sinkWatcher_2: import("@endo/patterns").InterfaceGuard<{
|
|
107
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
108
|
-
onRejected: import("@endo/patterns").MethodGuard;
|
|
109
|
-
}>;
|
|
110
|
-
export { sinkWatcher_2 as sinkWatcher };
|
|
111
|
-
}
|
|
112
|
-
namespace ProtocolHandlerI {
|
|
113
|
-
export let protocolHandler: import("@endo/patterns").InterfaceGuard<{
|
|
114
|
-
onCreate: import("@endo/patterns").MethodGuard;
|
|
115
|
-
generatePortID: import("@endo/patterns").MethodGuard;
|
|
116
|
-
onBind: import("@endo/patterns").MethodGuard;
|
|
117
|
-
onListen: import("@endo/patterns").MethodGuard;
|
|
118
|
-
onListenRemove: import("@endo/patterns").MethodGuard;
|
|
119
|
-
onInstantiate: import("@endo/patterns").MethodGuard;
|
|
120
|
-
onConnect: import("@endo/patterns").MethodGuard;
|
|
121
|
-
onRevoke: import("@endo/patterns").MethodGuard;
|
|
122
|
-
}>;
|
|
123
|
-
export let protocolHandlerAcceptWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
124
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
125
|
-
}>;
|
|
126
|
-
export let protocolHandlerInstantiateWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
127
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
128
|
-
}>;
|
|
129
|
-
export let protocolHandlerConnectWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
130
|
-
onFulfilled: import("@endo/patterns").MethodGuard;
|
|
131
|
-
}>;
|
|
132
|
-
let rethrowUnlessMissingWatcher_3: import("@endo/patterns").InterfaceGuard<{
|
|
133
|
-
onRejected: import("@endo/patterns").MethodGuard;
|
|
134
|
-
}>;
|
|
135
|
-
export { rethrowUnlessMissingWatcher_3 as rethrowUnlessMissingWatcher };
|
|
136
|
-
}
|
|
137
|
-
let ProtocolImplI: import("@endo/patterns").InterfaceGuard<{
|
|
138
|
-
bind: import("@endo/patterns").MethodGuard;
|
|
139
|
-
inbound: import("@endo/patterns").MethodGuard;
|
|
140
|
-
outbound: import("@endo/patterns").MethodGuard;
|
|
141
|
-
}>;
|
|
142
|
-
function Vow$(shape: any): import("@endo/patterns").Matcher;
|
|
143
|
-
let AttemptDescription: import("@endo/patterns").Matcher;
|
|
144
|
-
let Opts: import("@endo/patterns").Matcher;
|
|
145
|
-
let Data: import("@endo/patterns").Matcher;
|
|
146
|
-
let Bytes: import("@endo/patterns").Matcher;
|
|
147
|
-
let Endpoint: import("@endo/patterns").Matcher;
|
|
148
|
-
let Vow: import("@endo/patterns").Matcher;
|
|
149
|
-
let ConnectionHandler: import("@endo/patterns").Matcher;
|
|
150
|
-
let Connection: import("@endo/patterns").Matcher;
|
|
151
|
-
let InboundAttempt: import("@endo/patterns").Matcher;
|
|
152
|
-
let Listener: import("@endo/patterns").Matcher;
|
|
153
|
-
let ListenHandler: import("@endo/patterns").Matcher;
|
|
154
|
-
let Port: import("@endo/patterns").Matcher;
|
|
155
|
-
let ProtocolHandler: import("@endo/patterns").Matcher;
|
|
156
|
-
let ProtocolImpl: import("@endo/patterns").Matcher;
|
|
157
|
-
}
|
|
158
48
|
export function rethrowUnlessMissing(err: unknown): undefined;
|
|
159
|
-
export function crossoverConnection(zone: import('@agoric/zone').Zone, handler0: ConnectionHandler
|
|
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?: WeakSetStore<Closable> | undefined): Connection[];
|
|
160
50
|
export function prepareNetworkProtocol(zone: import('@agoric/base-zone').Zone, powers: ReturnType<(zone: import("@agoric/base-zone").Zone, powers?: {
|
|
161
51
|
isRetryableReason?: ((reason: any) => boolean) | undefined;
|
|
162
52
|
watchPromise?: ((p: PromiseLike<any>, watcher: import("@agoric/vow/src/watch-promise.js").PromiseWatcher, ...args: unknown[]) => void) | undefined;
|
|
163
53
|
} | undefined) => {
|
|
164
|
-
when: <T
|
|
54
|
+
when: <T, TResult1 = import("@agoric/vow").Unwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow").Unwrap<T>) => TResult1 | PromiseLike<TResult1>) | undefined, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined) => Promise<TResult1 | TResult2>;
|
|
165
55
|
watch: <T_1 = any, TResult1_1 = T_1, TResult2_1 = T_1>(specimenP: import("@agoric/vow").ERef<T_1 | import("@agoric/vow").Vow<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1> | undefined, watcherContext?: unknown) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
|
|
166
56
|
makeVowKit: <T_2>() => import("@agoric/vow").VowKit<T_2>;
|
|
167
57
|
allVows: (vows: any) => import("@agoric/vow").Vow<any>;
|
|
168
|
-
}>): (protocolHandler: ProtocolHandler) => Protocol;
|
|
58
|
+
}>): (protocolHandler: Remote<ProtocolHandler>) => Protocol;
|
|
169
59
|
export function prepareEchoConnectionKit(zone: import('@agoric/base-zone').Zone): () => import("@endo/exo/src/exo-makers.js").GuardedKit<{
|
|
170
60
|
handler: {
|
|
171
61
|
/**
|
|
@@ -201,7 +91,7 @@ export function prepareEchoConnectionKit(zone: import('@agoric/base-zone').Zone)
|
|
|
201
91
|
}>;
|
|
202
92
|
export type ConnectionOpts = {
|
|
203
93
|
addrs: Endpoint[];
|
|
204
|
-
handlers: ConnectionHandler[];
|
|
94
|
+
handlers: import('@agoric/vow').Remote<Required<ConnectionHandler>>[];
|
|
205
95
|
conns: MapStore<number, Connection>;
|
|
206
96
|
current: WeakSetStore<Closable>;
|
|
207
97
|
l: 0 | 1;
|
package/src/network.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["network.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["network.js"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,kCAFW,MAAM,YAahB;AA4rCD;;;;;GAKG;AACH,qDAHW,OAAO,mBAAmB,EAAE,IAAI,sBAChC;;;;;;;;EAAiD;;;;IAmCpD;;;;;OAKG;qCAHQ,QAAQ,cACR,QAAQ,GACN,WAAW,kBAAkB,CAAC;;;IA+D3C;;;;;OAKG;yBAJQ,OAAO,IAAI,CAAC,aACZ,QAAQ,iBACR,OAAO,aAAa,CAAC;;GA+CvC;AA33CD;;;GAGG;AACH,qCAAsC;AAG/B,0CADK,OAAO,aAWlB;AA2IM,0CARI,OAAO,cAAc,EAAE,IAAI,YAC3B,OAAO,aAAa,EAAE,MAAM,CAAC,SAAS,iBAAiB,CAAC,CAAC,SACzD,QAAQ,YACR,OAAO,aAAa,EAAE,MAAM,CAAC,SAAS,iBAAiB,CAAC,CAAC,SACzD,QAAQ,yBACD,cAAc,KAAK,UAAU,8DAgD9C;AAi6BM,6CAHI,OAAO,mBAAmB,EAAE,IAAI,UAChC;;;;;;;;EAAiD,qBAM/C,OAAO,eAAe,CAAC,KACrB,QAAQ,CA2BtB;AAOM,+CAFI,OAAO,mBAAmB,EAAE,IAAI;;QAsCnC;;;;WAIG;+BAHQ,UAAU,SACV,KAAK,sBACL,iBAAiB;QAU5B;;;;WAIG;6BAHQ,UAAU,YACV,WAAW;;;;YAftB;;;;eAIG;mCAHQ,UAAU,SACV,KAAK,sBACL,iBAAiB;YAU5B;;;;eAIG;iCAHQ,UAAU,YACV,WAAW;;;;GAyB7B;;WAtrCa,QAAQ,EAAE;cACV,OAAO,aAAa,EAAE,MAAM,CAAC,SAAS,iBAAiB,CAAC,CAAC,EAAE;WAC3D,SAAS,MAAM,EAAE,UAAU,CAAC;aAC5B,aAAa,QAAQ,CAAC;OACtB,CAAC,GAAC,CAAC;OACH,CAAC,GAAC,CAAC"}
|