@agoric/network 0.1.1-dev-14afd8f.0.14afd8f → 0.1.1-dev-cbcea8c.0.cbcea8c
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 +16 -16
- package/src/network.d.ts +79 -15
- package/src/network.d.ts.map +1 -1
- package/src/network.js +92 -4
- package/src/router.d.ts +25 -22
- package/src/router.d.ts.map +1 -1
- package/src/router.js +4 -2
- package/src/shapes.d.ts +113 -57
- package/src/shapes.d.ts.map +1 -1
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-cbcea8c.0.cbcea8c",
|
|
4
4
|
"description": "Agoric's network protocol API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -21,23 +21,23 @@
|
|
|
21
21
|
"author": "Agoric",
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@agoric/internal": "0.3.3-dev-
|
|
25
|
-
"@agoric/store": "0.9.3-dev-
|
|
26
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
27
|
-
"@endo/base64": "^1.
|
|
28
|
-
"@endo/errors": "^1.
|
|
24
|
+
"@agoric/internal": "0.3.3-dev-cbcea8c.0.cbcea8c",
|
|
25
|
+
"@agoric/store": "0.9.3-dev-cbcea8c.0.cbcea8c",
|
|
26
|
+
"@agoric/vat-data": "0.5.3-dev-cbcea8c.0.cbcea8c",
|
|
27
|
+
"@endo/base64": "^1.1.1",
|
|
28
|
+
"@endo/errors": "^1.3.1",
|
|
29
29
|
"@endo/far": "^1.1.14",
|
|
30
|
-
"@endo/pass-style": "^1.
|
|
31
|
-
"@endo/patterns": "^1.
|
|
32
|
-
"@endo/promise-kit": "^1.1
|
|
30
|
+
"@endo/pass-style": "^1.8.1",
|
|
31
|
+
"@endo/patterns": "^1.9.1",
|
|
32
|
+
"@endo/promise-kit": "^1.2.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
36
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
37
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
38
|
-
"@agoric/vow": "0.1.1-dev-
|
|
39
|
-
"@agoric/zone": "0.2.3-dev-
|
|
40
|
-
"@endo/bundle-source": "^4.
|
|
35
|
+
"@agoric/cosmic-proto": "0.4.1-dev-cbcea8c.0.cbcea8c",
|
|
36
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-cbcea8c.0.cbcea8c",
|
|
37
|
+
"@agoric/swingset-vat": "0.32.3-dev-cbcea8c.0.cbcea8c",
|
|
38
|
+
"@agoric/vow": "0.1.1-dev-cbcea8c.0.cbcea8c",
|
|
39
|
+
"@agoric/zone": "0.2.3-dev-cbcea8c.0.cbcea8c",
|
|
40
|
+
"@endo/bundle-source": "^4.3.2",
|
|
41
41
|
"ava": "^7.0.0",
|
|
42
42
|
"c8": "^10.1.3"
|
|
43
43
|
},
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"typeCoverage": {
|
|
71
71
|
"atLeast": 91.16
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "cbcea8c2415f2c9c4bc1ea9ff90730f2773bafaa"
|
|
74
74
|
}
|
package/src/network.d.ts
CHANGED
|
@@ -16,23 +16,54 @@ export function prepareLoopbackProtocolHandler(zone: Zone, { watch, allVows }: V
|
|
|
16
16
|
generatePortID(_localAddr: any, _protocolHandler: any): Promise<string>;
|
|
17
17
|
onBind(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
|
|
18
18
|
/**
|
|
19
|
-
* @param {
|
|
19
|
+
* @param {Remote<Port>} _port
|
|
20
20
|
* @param {Endpoint} localAddr
|
|
21
21
|
* @param {Endpoint} remoteAddr
|
|
22
22
|
* @returns {PromiseVow<AttemptDescription>}}
|
|
23
23
|
*/
|
|
24
|
-
onConnect(_port:
|
|
24
|
+
onConnect(_port: Remote<Port>, localAddr: Endpoint, remoteAddr: Endpoint): PromiseVow<AttemptDescription>;
|
|
25
25
|
onInstantiate(_port: any, _localAddr: any, _remote: any, _protocol: any): Promise<string>;
|
|
26
|
-
onListen(port: any, localAddr: any, listenHandler: any, _protocolHandler: any): Promise<void>;
|
|
27
26
|
/**
|
|
28
27
|
* @param {Remote<Port>} port
|
|
29
28
|
* @param {Endpoint} localAddr
|
|
30
|
-
* @param {Remote<ListenHandler
|
|
31
|
-
* @param {
|
|
29
|
+
* @param {Remote<Required<ListenHandler>>} listenHandler
|
|
30
|
+
* @param {unknown} _protocolHandler
|
|
32
31
|
*/
|
|
33
|
-
|
|
32
|
+
onListen(port: Remote<Port>, localAddr: Endpoint, listenHandler: Remote<Required<ListenHandler>>, _protocolHandler: unknown): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* @param {Remote<Port>} port
|
|
35
|
+
* @param {Endpoint} localAddr
|
|
36
|
+
* @param {Remote<Required<ListenHandler>>} listenHandler
|
|
37
|
+
* @param {unknown} _protocolHandler
|
|
38
|
+
*/
|
|
39
|
+
onListenRemove(port: Remote<Port>, localAddr: Endpoint, listenHandler: Remote<Required<ListenHandler>>, _protocolHandler: unknown): Promise<void>;
|
|
34
40
|
onRevoke(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
|
|
35
|
-
}
|
|
41
|
+
}, import("@endo/patterns").InterfaceGuard<{
|
|
42
|
+
onCreate: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
43
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
44
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
45
|
+
generatePortID: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
46
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
47
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
48
|
+
onBind: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
49
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
50
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
51
|
+
onListen: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
52
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
53
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
54
|
+
onListenRemove: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
55
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
56
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
57
|
+
onInstantiate: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
58
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
59
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
60
|
+
onConnect: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
61
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
62
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
63
|
+
onRevoke: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
64
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
65
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
66
|
+
}>>;
|
|
36
67
|
/**
|
|
37
68
|
* Compatibility note: this must match what our peers use, so don't change it
|
|
38
69
|
* casually.
|
|
@@ -71,18 +102,51 @@ export function prepareEchoConnectionKit(zone: Zone): () => import("@endo/exo").
|
|
|
71
102
|
* @param {ConnectionHandler} [_connectionHandler]
|
|
72
103
|
*/
|
|
73
104
|
onClose(_connection: Connection, reason?: CloseReason, _connectionHandler?: ConnectionHandler): Promise<void>;
|
|
74
|
-
}
|
|
105
|
+
}, import("@endo/patterns").InterfaceGuard<{
|
|
106
|
+
onReceive: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], [import("@endo/patterns").MatcherOf<"splitRecord", [{}, {
|
|
107
|
+
relativeTimeoutNs: import("@endo/patterns").MatcherOf<"bigint", bigint>;
|
|
108
|
+
}, never]>], import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").SyncValueGuard>;
|
|
109
|
+
onClose: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>], [import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").MatcherOf<"kind", "undefined">, import("@endo/patterns").SyncValueGuard>;
|
|
110
|
+
}>>>;
|
|
75
111
|
onListen(port: any, _listenHandler: any): Promise<void>;
|
|
76
112
|
};
|
|
113
|
+
}, {
|
|
114
|
+
handler: import("@endo/patterns").InterfaceGuard<{
|
|
115
|
+
onReceive: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], [import("@endo/patterns").MatcherOf<"splitRecord", [{}, {
|
|
116
|
+
relativeTimeoutNs: import("@endo/patterns").MatcherOf<"bigint", bigint>;
|
|
117
|
+
}, never]>], import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").SyncValueGuard>;
|
|
118
|
+
onClose: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>], [import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").MatcherOf<"kind", "undefined">, import("@endo/patterns").SyncValueGuard>;
|
|
119
|
+
}>;
|
|
120
|
+
listener: import("@endo/patterns").InterfaceGuard<{
|
|
121
|
+
onListen: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
122
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
123
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
124
|
+
onAccept: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
125
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
126
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
127
|
+
}>;
|
|
77
128
|
}>;
|
|
78
129
|
export function preparePortAllocator(zone: Zone, { watch }: Powers): (args_0: {
|
|
79
130
|
protocol: Protocol;
|
|
80
131
|
}) => import("@endo/exo").Guarded<{
|
|
81
|
-
allocateCustomIBCPort(
|
|
82
|
-
allocateICAControllerPort()
|
|
83
|
-
allocateICQControllerPort()
|
|
84
|
-
allocateCustomLocalPort(
|
|
85
|
-
}
|
|
132
|
+
allocateCustomIBCPort: (args_0?: string | undefined) => Promise<any>;
|
|
133
|
+
allocateICAControllerPort: () => Promise<any>;
|
|
134
|
+
allocateICQControllerPort: () => Promise<any>;
|
|
135
|
+
allocateCustomLocalPort: (args_0?: string | undefined) => Promise<any>;
|
|
136
|
+
}, import("@endo/patterns").InterfaceGuard<{
|
|
137
|
+
allocateCustomIBCPort: import("@endo/patterns").MethodGuard<"async", [], [import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
138
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
139
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
140
|
+
allocateICAControllerPort: import("@endo/patterns").MethodGuard<"async", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
141
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
142
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
143
|
+
allocateICQControllerPort: import("@endo/patterns").MethodGuard<"async", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
144
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
145
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
146
|
+
allocateCustomLocalPort: import("@endo/patterns").MethodGuard<"async", [], [import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
147
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
148
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
149
|
+
}>>;
|
|
86
150
|
export function prepareNetworkPowers(zone: Zone, vowTools: VowTools): Powers;
|
|
87
151
|
export type MakeEchoConnectionKit = ReturnType<typeof prepareEchoConnectionKit>;
|
|
88
152
|
export type Powers = VowTools & {
|
|
@@ -101,11 +165,11 @@ export type PortAllocator = ReturnType<ReturnType<typeof preparePortAllocator>>;
|
|
|
101
165
|
export type Finalizer = ReturnType<typeof prepareFinalizer>;
|
|
102
166
|
import type { Zone } from '@agoric/base-zone';
|
|
103
167
|
import type { VowTools } from '@agoric/vow';
|
|
168
|
+
import type { Port } from './types.js';
|
|
169
|
+
import type { Remote } from '@agoric/vow';
|
|
104
170
|
import type { Endpoint } from './types.js';
|
|
105
171
|
import type { AttemptDescription } from './types.js';
|
|
106
172
|
import type { PromiseVow } from '@agoric/vow';
|
|
107
|
-
import type { Port } from './types.js';
|
|
108
|
-
import type { Remote } from '@agoric/vow';
|
|
109
173
|
import type { ListenHandler } from './types.js';
|
|
110
174
|
import type { ConnectionHandler } from './types.js';
|
|
111
175
|
import type { Connection } from './types.js';
|
package/src/network.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["network.js"],"names":[],"mappings":"AA6CA;;;;GAIG;AACH,kCAFW,MAAM,YAahB;
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["network.js"],"names":[],"mappings":"AA6CA;;;;GAIG;AACH,kCAFW,MAAM,YAahB;AA6yCD,mFAAmF;AAEnF;;;;;GAKG;AACH,qDAHW,IAAI,sBACJ,QAAQ,qBAyJL,MAAM;;;;IAtHZ;;;;;OAKG;qBAJQ,OAAO,IAAI,CAAC,aACZ,QAAQ,cACR,QAAQ,GACN,WAAW,kBAAkB,CAAC;;IAmC3C;;;;;OAKG;mBAJQ,OAAO,IAAI,CAAC,aACZ,QAAQ,iBACR,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC,oBAC/B,OAAO;IA8BlB;;;;;OAKG;yBAJQ,OAAO,IAAI,CAAC,aACZ,QAAQ,iBACR,OAAO,QAAQ,CAAC,aAAa,CAAC,CAAC,oBAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgDzB;AAz/CD;;;GAGG;AACH,iCAAkC,GAAG,CAAC;AAGtC,qCAAsC,qBAAqB,CAAC;AAGrD,0CADK,OAAO,aAWlB;AAmKM,0CATI,IAAI,YACJ,OAAO,QAAQ,CAAC,iBAAiB,CAAC,CAAC,SACnC,QAAQ,YACR,OAAO,QAAQ,CAAC,iBAAiB,CAAC,CAAC,SACnC,QAAQ,kBACR,CAAC,IAAI,EAAE,cAAc,KAAK,UAAU,aACpC,SAAS,YACT,aAAa,QAAQ,CAAC,gBAoDhC;AAs/BM,6CAHI,IAAI,UACJ,MAAM,qBAMJ,OAAO,eAAe,CAAC,KACrB,QAAQ,CA2BtB;AAOM,+CAFI,IAAI;;QAsCP;;;;WAIG;+BAHQ,UAAU,SACV,KAAK,sBACL,iBAAiB;QAU5B;;;;WAIG;6BAHQ,UAAU,WACV,WAAW,uBACX,iBAAiB;;;;YAhB5B;;;;eAIG;mCAHQ,UAAU,SACV,KAAK,sBACL,iBAAiB;YAU5B;;;;eAIG;iCAHQ,UAAU,WACV,WAAW,uBACX,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;GAwBnC;AA8KM,2CAHI,IAAI,aACJ,MAAM;cAkBF,QAAQ;;;;;;;;;;;;;;;;;;;IAkDpB;AAyEI,2CAJI,IAAI,YACJ,QAAQ,GACN,MAAM,CAKlB;oCA3Ta,UAAU,CAAC,OAAO,wBAAwB,CAAC;qBAx1C3C,QAAQ,GAAG;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE;;WA6DnC,QAAQ,EAAE;cACV,OAAO,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EAAE;WACrC,SAAS,MAAM,EAAE,UAAU,CAAC;aAC5B,aAAa,QAAQ,CAAC;OACtB,CAAC,GAAC,CAAC;OACH,CAAC,GAAC,CAAC;;0BAoVH,CAAA,OAAO,WAAW,EAAC,MAAM,OAAO,WAAW,CAAC;4BAkrC5C,UAAU,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;wBA6EnD,UAAU,CAAC,OAAO,gBAAgB,CAAC;0BA3pD1B,mBAAmB;8BADK,aAAa;0BAD2I,YAAY;4BACpK,aAAa;8BAD2I,YAAY;wCAAZ,YAAY;gCACpK,aAAa;mCAD2I,YAAY;uCAAZ,YAAY;gCAAZ,YAAY;8BAAZ,YAAY;kCAIpL,eAAe;qCAJyJ,YAAY;8BAAZ,YAAY;2BAAZ,YAAY;iCAAZ,YAAY;8BAGxL,eAAe;;;;;;AA6kD1C,mFAAmF;AAEnF;;;;;;;;;;GAUG;AACH,wCAHW,IAAI,aACJ,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;;;GA2BlD"}
|
package/src/network.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Shape } from './shapes.js';
|
|
|
8
8
|
|
|
9
9
|
/// <reference path="./types.js" />
|
|
10
10
|
/**
|
|
11
|
-
* @import {AttemptDescription, Bytes, CloseReason, Closable, Connection, ConnectionHandler, Endpoint, ListenHandler, Port, Protocol, ProtocolHandler, ProtocolImpl, SendOptions} from './types.js';
|
|
11
|
+
* @import {AttemptDescription, Bytes, CloseReason, Closable, Connection, ConnectionHandler, Endpoint, ListenHandler, Port, Protocol, ProtocolHandler, ProtocolImpl, SendOptions, InboundAttempt} from './types.js';
|
|
12
12
|
* @import {PromiseVow, Remote, VowTools} from '@agoric/vow';
|
|
13
13
|
* @import {Zone} from '@agoric/base-zone';
|
|
14
14
|
* @import {MapStore} from '@agoric/store';
|
|
@@ -159,6 +159,9 @@ const prepareHalfConnection = (zone, { watch, allVows, finalizer }) => {
|
|
|
159
159
|
},
|
|
160
160
|
},
|
|
161
161
|
openConnectionAckWatcher: {
|
|
162
|
+
/**
|
|
163
|
+
* @param {Bytes | undefined} ack
|
|
164
|
+
*/
|
|
162
165
|
onFulfilled(ack) {
|
|
163
166
|
return toBytes(ack || '');
|
|
164
167
|
},
|
|
@@ -360,6 +363,15 @@ const prepareInboundAttempt = (zone, makeConnection, { watch, finalizer }) => {
|
|
|
360
363
|
},
|
|
361
364
|
},
|
|
362
365
|
inboundAttemptAcceptWatcher: {
|
|
366
|
+
/**
|
|
367
|
+
* @param {unknown} lchandler
|
|
368
|
+
* @param {{
|
|
369
|
+
* localAddress: string;
|
|
370
|
+
* rchandler: Remote<ConnectionHandler>;
|
|
371
|
+
* remoteAddress: string;
|
|
372
|
+
* current: SetStore<Closable>;
|
|
373
|
+
* }} watchContext
|
|
374
|
+
*/
|
|
363
375
|
onFulfilled(lchandler, watchContext) {
|
|
364
376
|
const { localAddress, rchandler, remoteAddress, current } =
|
|
365
377
|
watchContext;
|
|
@@ -569,18 +581,30 @@ const preparePort = (zone, powers) => {
|
|
|
569
581
|
},
|
|
570
582
|
},
|
|
571
583
|
portAddListenerWatcher: {
|
|
584
|
+
/**
|
|
585
|
+
* @param {unknown} _value
|
|
586
|
+
* @param {{ listenHandler: Remote<Required<ListenHandler>> }} watcherContext
|
|
587
|
+
*/
|
|
572
588
|
onFulfilled(_value, watcherContext) {
|
|
573
589
|
const { listenHandler } = watcherContext;
|
|
574
590
|
return E(listenHandler).onListen(this.facets.port, listenHandler);
|
|
575
591
|
},
|
|
576
592
|
},
|
|
577
593
|
portRemoveListenerWatcher: {
|
|
594
|
+
/**
|
|
595
|
+
* @param {unknown} _value
|
|
596
|
+
* @param {{ listenHandler: Remote<Required<ListenHandler>> }} watcherContext
|
|
597
|
+
*/
|
|
578
598
|
onFulfilled(_value, watcherContext) {
|
|
579
599
|
const { listenHandler } = watcherContext;
|
|
580
600
|
return E(listenHandler).onRemove(this.facets.port, listenHandler);
|
|
581
601
|
},
|
|
582
602
|
},
|
|
583
603
|
portConnectWatcher: {
|
|
604
|
+
/**
|
|
605
|
+
* @param {Remote<Connection>} conn
|
|
606
|
+
* @param {{ chandler: Remote<Required<ConnectionHandler>> }} ctx
|
|
607
|
+
*/
|
|
584
608
|
onFulfilled(conn, { chandler }) {
|
|
585
609
|
const { openConnections, revoked } = this.state;
|
|
586
610
|
|
|
@@ -903,6 +927,15 @@ const prepareBinder = (zone, powers) => {
|
|
|
903
927
|
},
|
|
904
928
|
},
|
|
905
929
|
binderInboundInstantiateWatcher: {
|
|
930
|
+
/**
|
|
931
|
+
* @param {string | undefined} localInstance
|
|
932
|
+
* @param {{
|
|
933
|
+
* listenAddr: string;
|
|
934
|
+
* remoteAddr: string;
|
|
935
|
+
* port: Port;
|
|
936
|
+
* listenPrefixIndex: number;
|
|
937
|
+
* }} watchContext
|
|
938
|
+
*/
|
|
906
939
|
onFulfilled(localInstance, watchContext) {
|
|
907
940
|
const { listenAddr, remoteAddr, port, listenPrefixIndex } =
|
|
908
941
|
watchContext;
|
|
@@ -927,6 +960,15 @@ const prepareBinder = (zone, powers) => {
|
|
|
927
960
|
},
|
|
928
961
|
},
|
|
929
962
|
binderInboundInstantiateCatchWatcher: {
|
|
963
|
+
/**
|
|
964
|
+
* @param {Error} e
|
|
965
|
+
* @param {{
|
|
966
|
+
* lastFailure: Error;
|
|
967
|
+
* listenPrefixIndex: number;
|
|
968
|
+
* listenAddr: string;
|
|
969
|
+
* remoteAddr: string;
|
|
970
|
+
* }} watchContext
|
|
971
|
+
*/
|
|
930
972
|
onRejected(e, watchContext) {
|
|
931
973
|
let { lastFailure, listenPrefixIndex } = watchContext;
|
|
932
974
|
|
|
@@ -994,6 +1036,10 @@ const prepareBinder = (zone, powers) => {
|
|
|
994
1036
|
},
|
|
995
1037
|
},
|
|
996
1038
|
binderOutboundInstantiateWatcher: {
|
|
1039
|
+
/**
|
|
1040
|
+
* @param {string | undefined} localInstance
|
|
1041
|
+
* @param {{ localAddr: string }} watchContext
|
|
1042
|
+
*/
|
|
997
1043
|
onFulfilled(localInstance, watchContext) {
|
|
998
1044
|
const { localAddr } = watchContext;
|
|
999
1045
|
|
|
@@ -1001,6 +1047,16 @@ const prepareBinder = (zone, powers) => {
|
|
|
1001
1047
|
},
|
|
1002
1048
|
},
|
|
1003
1049
|
binderOutboundConnectWatcher: {
|
|
1050
|
+
/**
|
|
1051
|
+
* @param {{ handler: Remote<ConnectionHandler>; remoteAddress: string; localAddress: string }} arg0
|
|
1052
|
+
* @param {{
|
|
1053
|
+
* lastFailure: Error;
|
|
1054
|
+
* lchandler: Remote<ConnectionHandler>;
|
|
1055
|
+
* localAddr: string;
|
|
1056
|
+
* remoteAddr: string;
|
|
1057
|
+
* port: Port;
|
|
1058
|
+
* }} watchContext
|
|
1059
|
+
*/
|
|
1004
1060
|
onFulfilled(
|
|
1005
1061
|
{
|
|
1006
1062
|
handler: rchandler,
|
|
@@ -1038,6 +1094,15 @@ const prepareBinder = (zone, powers) => {
|
|
|
1038
1094
|
},
|
|
1039
1095
|
},
|
|
1040
1096
|
binderOutboundCatchWatcher: {
|
|
1097
|
+
/**
|
|
1098
|
+
* @param {Error} e
|
|
1099
|
+
* @param {{
|
|
1100
|
+
* port: Port;
|
|
1101
|
+
* remoteAddr: string;
|
|
1102
|
+
* lchandler: Remote<ConnectionHandler>;
|
|
1103
|
+
* localAddr: string;
|
|
1104
|
+
* }} watchContext
|
|
1105
|
+
*/
|
|
1041
1106
|
onRejected(e, watchContext) {
|
|
1042
1107
|
let lastFailure;
|
|
1043
1108
|
|
|
@@ -1071,6 +1136,10 @@ const prepareBinder = (zone, powers) => {
|
|
|
1071
1136
|
},
|
|
1072
1137
|
},
|
|
1073
1138
|
binderOutboundInboundWatcher: {
|
|
1139
|
+
/**
|
|
1140
|
+
* @param {string | undefined} initialLocalAddress
|
|
1141
|
+
* @param {{ remoteAddr: string; localAddr: string }} watchContext
|
|
1142
|
+
*/
|
|
1074
1143
|
onFulfilled(initialLocalAddress, watchContext) {
|
|
1075
1144
|
const { remoteAddr, localAddr } = watchContext;
|
|
1076
1145
|
|
|
@@ -1086,12 +1155,20 @@ const prepareBinder = (zone, powers) => {
|
|
|
1086
1155
|
},
|
|
1087
1156
|
},
|
|
1088
1157
|
binderOutboundAcceptWatcher: {
|
|
1158
|
+
/**
|
|
1159
|
+
* @param {InboundAttempt} attempt
|
|
1160
|
+
* @param {{ handler: Remote<Required<ConnectionHandler>> }} watchContext
|
|
1161
|
+
*/
|
|
1089
1162
|
onFulfilled(attempt, watchContext) {
|
|
1090
1163
|
const { handler } = watchContext;
|
|
1091
1164
|
return E(attempt).accept({ handler });
|
|
1092
1165
|
},
|
|
1093
1166
|
},
|
|
1094
1167
|
binderBindGeneratePortWatcher: {
|
|
1168
|
+
/**
|
|
1169
|
+
* @param {string} portID
|
|
1170
|
+
* @param {{ localAddr: string; underspecified: boolean }} watchContext
|
|
1171
|
+
*/
|
|
1095
1172
|
onFulfilled(portID, watchContext) {
|
|
1096
1173
|
const { localAddr, underspecified } = watchContext;
|
|
1097
1174
|
const { protocolHandler, boundPorts } = this.state;
|
|
@@ -1112,6 +1189,10 @@ const prepareBinder = (zone, powers) => {
|
|
|
1112
1189
|
},
|
|
1113
1190
|
},
|
|
1114
1191
|
binderPortWatcher: {
|
|
1192
|
+
/**
|
|
1193
|
+
* @param {unknown} _value
|
|
1194
|
+
* @param {{ port: Port; localAddr: string }} watchContext
|
|
1195
|
+
*/
|
|
1115
1196
|
onFulfilled(_value, watchContext) {
|
|
1116
1197
|
const { port, localAddr } = watchContext;
|
|
1117
1198
|
const { boundPorts, currentConnections } = this.state;
|
|
@@ -1345,7 +1426,7 @@ export function prepareLoopbackProtocolHandler(zone, { watch, allVows }) {
|
|
|
1345
1426
|
// noop, for now; Maybe handle a bind?
|
|
1346
1427
|
},
|
|
1347
1428
|
/**
|
|
1348
|
-
* @param {
|
|
1429
|
+
* @param {Remote<Port>} _port
|
|
1349
1430
|
* @param {Endpoint} localAddr
|
|
1350
1431
|
* @param {Endpoint} remoteAddr
|
|
1351
1432
|
* @returns {PromiseVow<AttemptDescription>}}
|
|
@@ -1383,6 +1464,12 @@ export function prepareLoopbackProtocolHandler(zone, { watch, allVows }) {
|
|
|
1383
1464
|
this.state.instanceNonce += 1n;
|
|
1384
1465
|
return `${instancePrefix}${this.state.instanceNonce}`;
|
|
1385
1466
|
},
|
|
1467
|
+
/**
|
|
1468
|
+
* @param {Remote<Port>} port
|
|
1469
|
+
* @param {Endpoint} localAddr
|
|
1470
|
+
* @param {Remote<Required<ListenHandler>>} listenHandler
|
|
1471
|
+
* @param {unknown} _protocolHandler
|
|
1472
|
+
*/
|
|
1386
1473
|
async onListen(port, localAddr, listenHandler, _protocolHandler) {
|
|
1387
1474
|
const { listeners } = this.state;
|
|
1388
1475
|
|
|
@@ -1414,8 +1501,8 @@ export function prepareLoopbackProtocolHandler(zone, { watch, allVows }) {
|
|
|
1414
1501
|
/**
|
|
1415
1502
|
* @param {Remote<Port>} port
|
|
1416
1503
|
* @param {Endpoint} localAddr
|
|
1417
|
-
* @param {Remote<ListenHandler
|
|
1418
|
-
* @param {
|
|
1504
|
+
* @param {Remote<Required<ListenHandler>>} listenHandler
|
|
1505
|
+
* @param {unknown} _protocolHandler
|
|
1419
1506
|
*/
|
|
1420
1507
|
async onListenRemove(port, localAddr, listenHandler, _protocolHandler) {
|
|
1421
1508
|
const { listeners } = this.state;
|
|
@@ -1435,6 +1522,7 @@ export function prepareLoopbackProtocolHandler(zone, { watch, allVows }) {
|
|
|
1435
1522
|
},
|
|
1436
1523
|
},
|
|
1437
1524
|
protocolHandlerConnectWatcher: {
|
|
1525
|
+
/** @param {[InboundAttempt, Remote<Required<ConnectionHandler>>]} results */
|
|
1438
1526
|
onFulfilled(results) {
|
|
1439
1527
|
return {
|
|
1440
1528
|
remoteInstance: results[0],
|
package/src/router.d.ts
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* @import {Zone} from '@agoric/base-zone';
|
|
5
5
|
* @import {Powers} from './network.js';
|
|
6
6
|
* @import {MapStore} from '@agoric/store';
|
|
7
|
+
* @import {CopyTagged, Passable} from '@endo/pass-style';
|
|
7
8
|
*/
|
|
8
9
|
/**
|
|
9
|
-
* @template T
|
|
10
|
+
* @template {Protocol} T
|
|
10
11
|
* @typedef {object} Router A delimited string router implementation
|
|
11
12
|
* @property {(addr: string) => [string, T][]} getRoutes Return the match and
|
|
12
13
|
* route in order of preference
|
|
@@ -16,11 +17,11 @@
|
|
|
16
17
|
* prefix->route from the database
|
|
17
18
|
*/
|
|
18
19
|
export const RouterI: import("@endo/patterns").InterfaceGuard<{
|
|
19
|
-
getRoutes: import("@endo/patterns").MethodGuard
|
|
20
|
-
register: import("@endo/patterns").MethodGuard
|
|
21
|
-
unregister: import("@endo/patterns").MethodGuard
|
|
20
|
+
getRoutes: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"arrayOf", (import("@endo/patterns").MatcherOf<"string", string> | import("@endo/patterns").MatcherOf<"any", any>)[]>, import("@endo/patterns").SyncValueGuard>;
|
|
21
|
+
register: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"kind", "undefined">, import("@endo/patterns").SyncValueGuard>;
|
|
22
|
+
unregister: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"kind", "undefined">, import("@endo/patterns").SyncValueGuard>;
|
|
22
23
|
}>;
|
|
23
|
-
export function prepareRouter<T>(zone: Zone): () => import("@endo/exo").Guarded<{
|
|
24
|
+
export function prepareRouter<T extends Passable>(zone: Zone): () => import("@endo/exo").Guarded<{
|
|
24
25
|
/** @param {Endpoint} addr */
|
|
25
26
|
getRoutes(addr: Endpoint): [string, T][];
|
|
26
27
|
/**
|
|
@@ -33,25 +34,26 @@ export function prepareRouter<T>(zone: Zone): () => import("@endo/exo").Guarded<
|
|
|
33
34
|
* @param {T} route
|
|
34
35
|
*/
|
|
35
36
|
unregister(prefix: string, route: T): void;
|
|
36
|
-
}
|
|
37
|
+
}, import("@endo/patterns").InterfaceGuard<{
|
|
38
|
+
getRoutes: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"arrayOf", (import("@endo/patterns").MatcherOf<"string", string> | import("@endo/patterns").MatcherOf<"any", any>)[]>, import("@endo/patterns").SyncValueGuard>;
|
|
39
|
+
register: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"kind", "undefined">, import("@endo/patterns").SyncValueGuard>;
|
|
40
|
+
unregister: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"kind", "undefined">, import("@endo/patterns").SyncValueGuard>;
|
|
41
|
+
}>>;
|
|
37
42
|
export function prepareRouterProtocol(zone: Zone, powers: Powers, E?: typeof defaultE): () => import("@endo/exo").Guarded<{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
registerProtocolHandler
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/** @param {Endpoint} localAddr */
|
|
49
|
-
bindPort(localAddr: Endpoint): Promise<Port | import("@agoric/vow").Vow<Port>>;
|
|
50
|
-
}>;
|
|
43
|
+
registerProtocolHandler: (args_0: string[], args_1: any) => any;
|
|
44
|
+
unregisterProtocolHandler: (args_0: string, args_1: any) => any;
|
|
45
|
+
bindPort: (args_0: string) => Promise<any>;
|
|
46
|
+
}, import("@endo/patterns").InterfaceGuard<{
|
|
47
|
+
registerProtocolHandler: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"arrayOf", import("@endo/patterns").MatcherOf<"string", string>>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").SyncValueGuard>;
|
|
48
|
+
unregisterProtocolHandler: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").SyncValueGuard>;
|
|
49
|
+
bindPort: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
50
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
51
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
52
|
+
}>>;
|
|
51
53
|
/**
|
|
52
54
|
* A delimited string router implementation
|
|
53
55
|
*/
|
|
54
|
-
export type Router<T> = {
|
|
56
|
+
export type Router<T extends Protocol> = {
|
|
55
57
|
/**
|
|
56
58
|
* Return the match and
|
|
57
59
|
* route in order of preference
|
|
@@ -73,12 +75,13 @@ export type RouterProtocol = {
|
|
|
73
75
|
registerProtocolHandler: (paths: string[], protocolHandler: ProtocolHandler) => void;
|
|
74
76
|
unregisterProtocolHandler: (prefix: string, protocolHandler: ProtocolHandler) => void;
|
|
75
77
|
};
|
|
78
|
+
import type { Passable } from '@endo/pass-style';
|
|
76
79
|
import type { Zone } from '@agoric/base-zone';
|
|
77
80
|
import type { Endpoint } from './types.js';
|
|
78
81
|
import type { Powers } from './network.js';
|
|
79
82
|
import { E as defaultE } from '@endo/far';
|
|
80
|
-
import type {
|
|
81
|
-
import type { Remote } from '@agoric/vow';
|
|
83
|
+
import type { Protocol } from './types.js';
|
|
82
84
|
import type { Port } from './types.js';
|
|
83
85
|
import type { PromiseVow } from '@agoric/vow';
|
|
86
|
+
import type { ProtocolHandler } from './types.js';
|
|
84
87
|
//# sourceMappingURL=router.d.ts.map
|
package/src/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["router.js"],"names":[],"mappings":"AAUA
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["router.js"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AAEH;;;;;;;;;GASG;AAEH;;;;GAIG;AAMI,8BAHiB,CAAC,SAAZ,QAAU,QACZ,IAAI;IAiBT,6BAA6B;oBAAjB,QAAQ;IAyBpB;;;OAGG;qBAFQ,MAAM,SACN,CAAC;IAKZ;;;OAGG;uBAFQ,MAAM,SACN,CAAC;;;;;IAWjB;AAgBM,4CAJI,IAAI,UACJ,MAAM,MACN,OAAO,QAAQ;;;;;;;;;;IA4EzB;;;;mBA1KuB,CAAC,SAAZ,QAAU;;;;;eAET,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;;8BA1FjC,kBAAkB;0BAHlC,mBAAmB;8BAFkB,YAAY;4BAG/C,cAAc;8BATT,WAAW;8BAMmB,YAAY;0BAAZ,YAAY;gCACzB,aAAa;qCADA,YAAY"}
|
package/src/router.js
CHANGED
|
@@ -14,10 +14,11 @@ import { Shape } from './shapes.js';
|
|
|
14
14
|
* @import {Zone} from '@agoric/base-zone';
|
|
15
15
|
* @import {Powers} from './network.js';
|
|
16
16
|
* @import {MapStore} from '@agoric/store';
|
|
17
|
+
* @import {CopyTagged, Passable} from '@endo/pass-style';
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* @template T
|
|
21
|
+
* @template {Protocol} T
|
|
21
22
|
* @typedef {object} Router A delimited string router implementation
|
|
22
23
|
* @property {(addr: string) => [string, T][]} getRoutes Return the match and
|
|
23
24
|
* route in order of preference
|
|
@@ -34,7 +35,7 @@ export const RouterI = M.interface('Router', {
|
|
|
34
35
|
});
|
|
35
36
|
|
|
36
37
|
/**
|
|
37
|
-
* @template T
|
|
38
|
+
* @template {Passable} T
|
|
38
39
|
* @param {Zone} zone
|
|
39
40
|
*/
|
|
40
41
|
export const prepareRouter = zone => {
|
|
@@ -131,6 +132,7 @@ export const prepareRouterProtocol = (zone, powers, E = defaultE) => {
|
|
|
131
132
|
}),
|
|
132
133
|
() => {
|
|
133
134
|
/** @type {Router<Protocol>} */
|
|
135
|
+
// @ts-expect-error cast
|
|
134
136
|
const router = makeRouter();
|
|
135
137
|
|
|
136
138
|
/** @type {MapStore<string, Protocol>} */
|
package/src/shapes.d.ts
CHANGED
|
@@ -1,118 +1,174 @@
|
|
|
1
|
-
export const SendOptionsShape: import("@endo/patterns").
|
|
1
|
+
export const SendOptionsShape: import("@endo/patterns").MatcherOf<"splitRecord", [{}, {
|
|
2
|
+
relativeTimeoutNs: import("@endo/patterns").MatcherOf<"bigint", bigint>;
|
|
3
|
+
}, never]>;
|
|
2
4
|
export namespace Shape {
|
|
3
5
|
export namespace ConnectionI {
|
|
4
6
|
let connection: import("@endo/patterns").InterfaceGuard<{
|
|
5
|
-
send: import("@endo/patterns").MethodGuard
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
send: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>], [import("@endo/patterns").MatcherOf<"splitRecord", [{}, {
|
|
8
|
+
relativeTimeoutNs: import("@endo/patterns").MatcherOf<"bigint", bigint>;
|
|
9
|
+
}, never]>], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
10
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
11
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
12
|
+
close: import("@endo/patterns").MethodGuard<"async", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
13
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
14
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
15
|
+
getLocalAddress: import("@endo/patterns").MethodGuard<"sync", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").SyncValueGuard>;
|
|
16
|
+
getRemoteAddress: import("@endo/patterns").MethodGuard<"sync", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").SyncValueGuard>;
|
|
9
17
|
}>;
|
|
10
18
|
let openConnectionAckWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
11
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
19
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
12
20
|
}>;
|
|
13
21
|
let rethrowUnlessMissingWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
14
|
-
onRejected: import("@endo/patterns").MethodGuard
|
|
22
|
+
onRejected: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
15
23
|
}>;
|
|
16
24
|
let sinkWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
17
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
25
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
18
26
|
}>;
|
|
19
27
|
}
|
|
20
28
|
export namespace InboundAttemptI {
|
|
21
29
|
export let inboundAttempt: import("@endo/patterns").InterfaceGuard<{
|
|
22
|
-
accept: import("@endo/patterns").MethodGuard
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
accept: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"splitRecord", [{
|
|
31
|
+
handler: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
32
|
+
}, {
|
|
33
|
+
remoteAddress: import("@endo/patterns").MatcherOf<"string", string>;
|
|
34
|
+
localAddress: import("@endo/patterns").MatcherOf<"string", string>;
|
|
35
|
+
}, never]>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
36
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
37
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
38
|
+
getLocalAddress: import("@endo/patterns").MethodGuard<"sync", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").SyncValueGuard>;
|
|
39
|
+
getRemoteAddress: import("@endo/patterns").MethodGuard<"sync", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").SyncValueGuard>;
|
|
40
|
+
close: import("@endo/patterns").MethodGuard<"async", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
41
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
42
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
26
43
|
}>;
|
|
27
44
|
export let inboundAttemptAcceptWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
28
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
45
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
29
46
|
}>;
|
|
30
47
|
let rethrowUnlessMissingWatcher_1: import("@endo/patterns").InterfaceGuard<{
|
|
31
|
-
onRejected: import("@endo/patterns").MethodGuard
|
|
48
|
+
onRejected: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
32
49
|
}>;
|
|
33
50
|
export { rethrowUnlessMissingWatcher_1 as rethrowUnlessMissingWatcher };
|
|
34
51
|
let sinkWatcher_1: import("@endo/patterns").InterfaceGuard<{
|
|
35
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
52
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
36
53
|
}>;
|
|
37
54
|
export { sinkWatcher_1 as sinkWatcher };
|
|
38
55
|
}
|
|
39
56
|
export namespace PortI {
|
|
40
57
|
export let port: import("@endo/patterns").InterfaceGuard<{
|
|
41
|
-
getLocalAddress: import("@endo/patterns").MethodGuard
|
|
42
|
-
addListener: import("@endo/patterns").MethodGuard
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
58
|
+
getLocalAddress: import("@endo/patterns").MethodGuard<"sync", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").SyncValueGuard>;
|
|
59
|
+
addListener: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
60
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
61
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
62
|
+
connect: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>], [import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
63
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
64
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
65
|
+
removeListener: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
66
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
67
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
68
|
+
revoke: import("@endo/patterns").MethodGuard<"async", [], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
69
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
70
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
46
71
|
}>;
|
|
47
72
|
export let portAddListenerWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
48
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
73
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
49
74
|
}>;
|
|
50
75
|
export let portRemoveListenerWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
51
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
76
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
52
77
|
}>;
|
|
53
78
|
export let portConnectWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
54
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
79
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
55
80
|
}>;
|
|
56
81
|
export let portRevokeWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
57
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
82
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
58
83
|
}>;
|
|
59
84
|
export let portRevokeCleanupWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
60
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
85
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
61
86
|
}>;
|
|
62
87
|
let rethrowUnlessMissingWatcher_2: import("@endo/patterns").InterfaceGuard<{
|
|
63
|
-
onRejected: import("@endo/patterns").MethodGuard
|
|
88
|
+
onRejected: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
64
89
|
}>;
|
|
65
90
|
export { rethrowUnlessMissingWatcher_2 as rethrowUnlessMissingWatcher };
|
|
66
91
|
let sinkWatcher_2: import("@endo/patterns").InterfaceGuard<{
|
|
67
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
68
|
-
onRejected: import("@endo/patterns").MethodGuard
|
|
92
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], any, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
93
|
+
onRejected: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
69
94
|
}>;
|
|
70
95
|
export { sinkWatcher_2 as sinkWatcher };
|
|
71
96
|
}
|
|
72
97
|
export namespace ProtocolHandlerI {
|
|
73
98
|
export let protocolHandler: import("@endo/patterns").InterfaceGuard<{
|
|
74
|
-
onCreate: import("@endo/patterns").MethodGuard
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
99
|
+
onCreate: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
100
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
101
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
102
|
+
generatePortID: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
103
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
104
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
105
|
+
onBind: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
106
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
107
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
108
|
+
onListen: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
109
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
110
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
111
|
+
onListenRemove: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
112
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
113
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
114
|
+
onInstantiate: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
115
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
116
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
117
|
+
onConnect: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
118
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
119
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
120
|
+
onRevoke: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
121
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
122
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
82
123
|
}>;
|
|
83
124
|
export let protocolHandlerAcceptWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
84
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
125
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
85
126
|
}>;
|
|
86
127
|
export let protocolHandlerInstantiateWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
87
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
128
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
88
129
|
}>;
|
|
89
130
|
export let protocolHandlerConnectWatcher: import("@endo/patterns").InterfaceGuard<{
|
|
90
|
-
onFulfilled: import("@endo/patterns").MethodGuard
|
|
131
|
+
onFulfilled: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
91
132
|
}>;
|
|
92
133
|
let rethrowUnlessMissingWatcher_3: import("@endo/patterns").InterfaceGuard<{
|
|
93
|
-
onRejected: import("@endo/patterns").MethodGuard
|
|
134
|
+
onRejected: import("@endo/patterns").MethodGuard<"sync", [import("@endo/patterns").MatcherOf<"any", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"any", any>, import("@endo/patterns").MatcherOf<"any", any>>;
|
|
94
135
|
}>;
|
|
95
136
|
export { rethrowUnlessMissingWatcher_3 as rethrowUnlessMissingWatcher };
|
|
96
137
|
}
|
|
97
138
|
export let ProtocolImplI: import("@endo/patterns").InterfaceGuard<{
|
|
98
|
-
bindPort: import("@endo/patterns").MethodGuard
|
|
99
|
-
|
|
100
|
-
|
|
139
|
+
bindPort: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
140
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
141
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
142
|
+
inbound: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"string", string>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
143
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
144
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
145
|
+
outbound: import("@endo/patterns").MethodGuard<"async", [import("@endo/patterns").MatcherOf<"remotable", any>, import("@endo/patterns").MatcherOf<"string", string>, import("@endo/patterns").MatcherOf<"remotable", any>], import("@endo/patterns").ArgGuard[], import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
146
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
147
|
+
}]>]>, import("@endo/patterns").SyncValueGuard>;
|
|
101
148
|
}>;
|
|
102
|
-
export function Vow$(shape: any): import("@endo/patterns").
|
|
103
|
-
|
|
149
|
+
export function Vow$(shape: any): import("@endo/patterns").MatcherOf<"or", [any, import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
150
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
151
|
+
}]>]>;
|
|
152
|
+
export let AttemptDescription: import("@endo/patterns").MatcherOf<"splitRecord", [{
|
|
153
|
+
handler: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
154
|
+
}, {
|
|
155
|
+
remoteAddress: import("@endo/patterns").MatcherOf<"string", string>;
|
|
156
|
+
localAddress: import("@endo/patterns").MatcherOf<"string", string>;
|
|
157
|
+
}, never]>;
|
|
104
158
|
export { SendOptionsShape as Opts };
|
|
105
|
-
export let Data: import("@endo/patterns").
|
|
106
|
-
export let Bytes: import("@endo/patterns").
|
|
107
|
-
export let Endpoint: import("@endo/patterns").
|
|
108
|
-
export let Vow: import("@endo/patterns").
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
export let
|
|
112
|
-
export let
|
|
113
|
-
export let
|
|
114
|
-
export let
|
|
115
|
-
export let
|
|
116
|
-
export let
|
|
159
|
+
export let Data: import("@endo/patterns").MatcherOf<"string", string>;
|
|
160
|
+
export let Bytes: import("@endo/patterns").MatcherOf<"string", string>;
|
|
161
|
+
export let Endpoint: import("@endo/patterns").MatcherOf<"string", string>;
|
|
162
|
+
export let Vow: import("@endo/patterns").MatcherOf<"tagged", ["Vow", {
|
|
163
|
+
vowV0: import("@endo/patterns").MatcherOf<"remotable", import("@endo/pass-style").Passable<import("@endo/pass-style").PassableCap, Error>>;
|
|
164
|
+
}]>;
|
|
165
|
+
export let ConnectionHandler: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
166
|
+
export let Connection: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
167
|
+
export let InboundAttempt: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
168
|
+
export let Listener: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
169
|
+
export let ListenHandler: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
170
|
+
export let Port: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
171
|
+
export let ProtocolHandler: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
172
|
+
export let ProtocolImpl: import("@endo/patterns").MatcherOf<"remotable", any>;
|
|
117
173
|
}
|
|
118
174
|
//# sourceMappingURL=shapes.d.ts.map
|
package/src/shapes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shapes.d.ts","sourceRoot":"","sources":["shapes.js"],"names":[],"mappings":"AA2BA
|
|
1
|
+
{"version":3,"file":"shapes.d.ts","sourceRoot":"","sources":["shapes.js"],"names":[],"mappings":"AA2BA;;WAGE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM;;UAAgC"}
|