@agoric/network 0.1.1-dev-9d3d871.0 → 0.1.1-dev-b04fbb7.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/network.d.ts +99 -35
- package/src/network.d.ts.map +1 -1
- package/src/network.js +1008 -462
- package/src/router.d.ts +5 -0
- package/src/router.d.ts.map +1 -1
- package/src/types.d.ts +1 -1
- package/src/types.d.ts.map +1 -1
- package/src/types.js +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-b04fbb7.0+b04fbb7",
|
|
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-b04fbb7.0+b04fbb7",
|
|
25
|
+
"@agoric/internal": "0.3.3-dev-b04fbb7.0+b04fbb7",
|
|
26
|
+
"@agoric/store": "0.9.3-dev-b04fbb7.0+b04fbb7",
|
|
27
|
+
"@agoric/vat-data": "0.5.3-dev-b04fbb7.0+b04fbb7",
|
|
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-b04fbb7.0+b04fbb7",
|
|
35
|
+
"@agoric/swingset-vat": "0.32.3-dev-b04fbb7.0+b04fbb7",
|
|
36
|
+
"@agoric/zone": "0.2.3-dev-b04fbb7.0+b04fbb7",
|
|
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": "b04fbb75349885625d82e234603bb433df359c20"
|
|
74
74
|
}
|
package/src/network.d.ts
CHANGED
|
@@ -10,21 +10,19 @@ 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, {
|
|
13
|
+
export function prepareLoopbackProtocolHandler(zone: import('@agoric/base-zone').Zone, { watch }: 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
17
|
when: <T = any, TResult1 = import("@agoric/vow/src/E.js").Unwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow/src/E.js").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>;
|
|
21
|
+
}>): (instancePrefix: any) => import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
21
22
|
onCreate(_impl: any, _protocolHandler: any): Promise<void>;
|
|
22
23
|
generatePortID(_localAddr: any, _protocolHandler: any): Promise<string>;
|
|
23
24
|
onBind(_port: any, _localAddr: any, _protocolHandler: any): Promise<void>;
|
|
24
|
-
onConnect(_port: any, localAddr: any, remoteAddr: any, _chandler: any, protocolHandler: any): Promise<
|
|
25
|
-
remoteInstance: any;
|
|
26
|
-
handler: ConnectionHandler;
|
|
27
|
-
}>;
|
|
25
|
+
onConnect(_port: any, localAddr: any, remoteAddr: any, _chandler: any, protocolHandler: any): Promise<import("@agoric/vow").Vow<any>>;
|
|
28
26
|
onInstantiate(_port: any, _localAddr: any, _remote: any, _protocol: any): Promise<string>;
|
|
29
27
|
onListen(port: any, localAddr: any, listenHandler: any, _protocolHandler: any): Promise<void>;
|
|
30
28
|
/**
|
|
@@ -42,35 +40,100 @@ export function prepareLoopbackProtocolHandler(zone: import('@agoric/base-zone')
|
|
|
42
40
|
*/
|
|
43
41
|
export const ENDPOINT_SEPARATOR: "/";
|
|
44
42
|
export namespace Shape {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
+
}
|
|
74
137
|
let ProtocolImplI: import("@endo/patterns").InterfaceGuard<{
|
|
75
138
|
bind: import("@endo/patterns").MethodGuard;
|
|
76
139
|
inbound: import("@endo/patterns").MethodGuard;
|
|
@@ -101,6 +164,7 @@ export function prepareNetworkProtocol(zone: import('@agoric/base-zone').Zone, p
|
|
|
101
164
|
when: <T = any, TResult1 = import("@agoric/vow/src/E.js").Unwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow/src/E.js").Unwrap<T>) => TResult1 | PromiseLike<TResult1>) | undefined, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined) => Promise<TResult1 | TResult2>;
|
|
102
165
|
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>;
|
|
103
166
|
makeVowKit: <T_2>() => import("@agoric/vow").VowKit<T_2>;
|
|
167
|
+
allVows: (vows: any) => import("@agoric/vow").Vow<any>;
|
|
104
168
|
}>): (protocolHandler: ProtocolHandler) => Protocol;
|
|
105
169
|
export function prepareEchoConnectionKit(zone: import('@agoric/base-zone').Zone): () => import("@endo/exo/src/exo-makers.js").GuardedKit<{
|
|
106
170
|
handler: {
|
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":"AA0NA;;;;GAIG;AACH,kCAFW,MAAM,YAahB;AA2qCD;;;;;GAKG;AACH,qDAHW,OAAO,mBAAmB,EAAE,IAAI,aAChC;;;;;;;;EAAiD;;;;;;;IAqFpD;;;;;OAKG;yBAJQ,IAAI,aACJ,QAAQ,iBACR,aAAa;;GA+C/B;AAthDD;;;GAGG;AACH,qCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4B9B,4DAAgC;;;;;;;;;;;;;;;;AAoKjC,0CADK,OAAO,aAWlB;AA6IM,0CARI,OAAO,cAAc,EAAE,IAAI,YAC3B,iBAAiB,SACjB,QAAQ,YACR,iBAAiB,SACjB,QAAQ,yBACD,cAAc,KAAK,UAAU,YACpC,aAAa,QAAQ,CAAC,gBA+ChC;AA64BM,6CAHI,OAAO,mBAAmB,EAAE,IAAI,UAChC;;;;;;;;EAAiD,qBAM/C,eAAe,KACb,QAAQ,CA2BtB;AAOM,+CAFI,OAAO,mBAAmB,EAAE,IAAI;;QAuCnC;;;;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;;WArqCa,QAAQ,EAAE;cACV,iBAAiB,EAAE;WACnB,SAAS,MAAM,EAAE,UAAU,CAAC;aAC5B,aAAa,QAAQ,CAAC;OACtB,CAAC,GAAC,CAAC;OACH,CAAC,GAAC,CAAC"}
|