@agoric/network 0.1.1-dev-de2008a.0 → 0.1.1-dev-9d7a377.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 +9 -9
- package/src/network.d.ts.map +1 -1
- package/src/router.d.ts +11 -5
- package/src/router.d.ts.map +1 -1
- package/src/types.d.ts +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-9d7a377.0+9d7a377",
|
|
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-9d7a377.0+9d7a377",
|
|
25
|
+
"@agoric/internal": "0.3.3-dev-9d7a377.0+9d7a377",
|
|
26
|
+
"@agoric/store": "0.9.3-dev-9d7a377.0+9d7a377",
|
|
27
|
+
"@agoric/vat-data": "0.5.3-dev-9d7a377.0+9d7a377",
|
|
28
28
|
"@endo/base64": "^1.0.4",
|
|
29
29
|
"@endo/far": "^1.1.1",
|
|
30
30
|
"@endo/patterns": "^1.3.1",
|
|
31
31
|
"@endo/promise-kit": "^1.1.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
35
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
36
|
-
"@agoric/zone": "0.2.3-dev-
|
|
34
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-9d7a377.0+9d7a377",
|
|
35
|
+
"@agoric/swingset-vat": "0.32.3-dev-9d7a377.0+9d7a377",
|
|
36
|
+
"@agoric/zone": "0.2.3-dev-9d7a377.0+9d7a377",
|
|
37
37
|
"@endo/bundle-source": "^3.2.2",
|
|
38
38
|
"ava": "^5.3.0",
|
|
39
39
|
"c8": "^9.1.0"
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"typeCoverage": {
|
|
71
71
|
"atLeast": 89.73
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "9d7a377c6315b72bafcede22ec58c52fb2a5adae"
|
|
74
74
|
}
|
package/src/network.d.ts
CHANGED
|
@@ -10,12 +10,12 @@ 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(
|
|
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, 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
|
-
watch: <T_1 = unknown, TResult1_1 = T_1, TResult2_1 = T_1, C = unknown>(specimenP: import("@agoric/vow").ERef<T_1 | import("@agoric/vow").Vow<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1, any> | undefined, watcherContext?: C | undefined) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
|
|
17
|
+
when: <T, TResult1 = import("@agoric/vow").Unwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow/src/types.js").Unwrap<T>) => TResult1 | PromiseLike<TResult1>) | undefined, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined) => Promise<TResult1 | TResult2>;
|
|
18
|
+
watch: <T_1 = unknown, TResult1_1 = T_1, TResult2_1 = T_1, C = unknown>(specimenP: import("@agoric/vow/src/types.js").ERef<T_1 | import("@agoric/vow/src/types.js").Vow<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1, any> | undefined, watcherContext?: C | undefined) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
|
|
19
19
|
makeVowKit: <T_2>() => import("@agoric/vow").VowKit<T_2>;
|
|
20
20
|
allVows: (vows: any) => import("@agoric/vow").Vow<any>;
|
|
21
21
|
}>): (instancePrefix?: string | undefined) => import("@endo/exo").Guarded<{
|
|
@@ -46,17 +46,17 @@ export function prepareLoopbackProtocolHandler(zone: import('@agoric/base-zone')
|
|
|
46
46
|
*/
|
|
47
47
|
export const ENDPOINT_SEPARATOR: "/";
|
|
48
48
|
export function rethrowUnlessMissing(err: unknown): undefined;
|
|
49
|
-
export function crossoverConnection(zone: import(
|
|
50
|
-
export function prepareNetworkProtocol(zone: import(
|
|
49
|
+
export function crossoverConnection(zone: import("@agoric/zone").Zone, handler0: import("@agoric/vow").Remote<Required<ConnectionHandler>>, addr0: Endpoint, handler1: import("@agoric/vow").Remote<Required<ConnectionHandler>>, addr1: Endpoint, makeConnection: (opts: ConnectionOpts) => Connection, current?: globalThis.WeakSetStore<Closable> | undefined): Connection[];
|
|
50
|
+
export function prepareNetworkProtocol(zone: import("@agoric/base-zone").Zone, powers: ReturnType<(zone: import("@agoric/base-zone").Zone, powers?: {
|
|
51
51
|
isRetryableReason?: ((reason: any) => boolean) | undefined;
|
|
52
52
|
watchPromise?: ((p: PromiseLike<any>, watcher: import("@agoric/vow/src/watch-promise.js").PromiseWatcher, ...args: unknown[]) => void) | undefined;
|
|
53
53
|
} | undefined) => {
|
|
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>;
|
|
55
|
-
watch: <T_1 = unknown, TResult1_1 = T_1, TResult2_1 = T_1, C = unknown>(specimenP: import("@agoric/vow").ERef<T_1 | import("@agoric/vow").Vow<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1, any> | undefined, watcherContext?: C | undefined) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
|
|
54
|
+
when: <T, TResult1 = import("@agoric/vow").Unwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow/src/types.js").Unwrap<T>) => TResult1 | PromiseLike<TResult1>) | undefined, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined) => Promise<TResult1 | TResult2>;
|
|
55
|
+
watch: <T_1 = unknown, TResult1_1 = T_1, TResult2_1 = T_1, C = unknown>(specimenP: import("@agoric/vow/src/types.js").ERef<T_1 | import("@agoric/vow/src/types.js").Vow<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1, any> | undefined, watcherContext?: C | undefined) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
|
|
56
56
|
makeVowKit: <T_2>() => import("@agoric/vow").VowKit<T_2>;
|
|
57
57
|
allVows: (vows: any) => import("@agoric/vow").Vow<any>;
|
|
58
58
|
}>): (protocolHandler: Remote<ProtocolHandler>) => Protocol;
|
|
59
|
-
export function prepareEchoConnectionKit(zone: import(
|
|
59
|
+
export function prepareEchoConnectionKit(zone: import("@agoric/base-zone").Zone): () => import("@endo/exo").GuardedKit<{
|
|
60
60
|
handler: {
|
|
61
61
|
/**
|
|
62
62
|
* @param {Connection} _connection
|
|
@@ -91,7 +91,7 @@ export function prepareEchoConnectionKit(zone: import('@agoric/base-zone').Zone)
|
|
|
91
91
|
}>;
|
|
92
92
|
export type ConnectionOpts = {
|
|
93
93
|
addrs: Endpoint[];
|
|
94
|
-
handlers: import(
|
|
94
|
+
handlers: import("@agoric/vow").Remote<Required<ConnectionHandler>>[];
|
|
95
95
|
conns: MapStore<number, Connection>;
|
|
96
96
|
current: WeakSetStore<Closable>;
|
|
97
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":"AA8BA;;;;GAIG;AACH,kCAFW,MAAM,YAahB;AAwsCD;;;;;GAKG;AACH,qDAHW,OAAO,mBAAmB,EAAE,IAAI,sBAChC,UAAU
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["network.js"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,kCAFW,MAAM,YAahB;AAwsCD;;;;;GAKG;AACH,qDAHW,OAAO,mBAAmB,EAAE,IAAI,sBAChC,UAAU,QAlvCX,OAAO,mBACjB,EAAE,IAAI;;wBAIL,gBAED,WAAU,OAAQ,kCAAoB,EAGtC,cADc,WAAW,SACnB;;uFAHY,CAAC,yBAGnB,OAAO,0BAAY,EAAE,MAAM,CAAC,CAAC,CAAC;uFAkJc,OAAO,0BAAY,EAC9D,IAAI,CAAC,GAAC,GAAG,OAAO,0BAAY,EAAE,GAAG,CAAC,GAAC,CAAC,CAAC;;;EAqlCsB;;;;IAmCpD;;;;;OAKG;qCAHQ,QAAQ,cACR,QAAQ;;;IAgEnB;;;;;OAKG;kDAHQ,QAAQ;;GAiD1B;AAx4CD;;;GAGG;AACH,qCAAsC;AAG/B,0CADK,OAAO,aAWlB;AA2IM,0CARI,OAAO,cAAc,EAAE,IAAI,YAC3B,OAAO,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,SACzD,QAAQ,YACR,OAAO,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,SACzD,QAAQ,kBACR,CAAC,IAAI,EAAE,cAAc,KAAK,UAAU,yEAgD9C;AA66BM,6CAHI,OAAO,mBAAmB,EAAE,IAAI,UAChC,UAAU,oCAtnCnB,IAAI;;8FASN,cADc;;oJACO,MAAM;0HAmJ1B,IAAI,0CAA0B,GAAG;;;EA09B0B,iDAO7C,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;;WAlsCa,QAAQ,EAAE;cACV,OAAO,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EAAE;WAC3D,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;aAC5B,YAAY,CAAC,QAAQ,CAAC;OACtB,CAAC,GAAC,CAAC;OACH,CAAC,GAAC,CAAC"}
|
package/src/router.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export const RouterI: import("@endo/patterns").InterfaceGuard<{
|
|
|
13
13
|
register: import("@endo/patterns").MethodGuard;
|
|
14
14
|
unregister: import("@endo/patterns").MethodGuard;
|
|
15
15
|
}>;
|
|
16
|
-
export function prepareRouter<T>(zone: import(
|
|
16
|
+
export function prepareRouter<T>(zone: import("@agoric/base-zone").Zone): () => import("@endo/exo").Guarded<{
|
|
17
17
|
/** @param {Endpoint} addr */
|
|
18
18
|
getRoutes(addr: Endpoint): [string, T][];
|
|
19
19
|
/**
|
|
@@ -27,12 +27,18 @@ export function prepareRouter<T>(zone: import('@agoric/base-zone').Zone): () =>
|
|
|
27
27
|
*/
|
|
28
28
|
unregister(prefix: string, route: T): void;
|
|
29
29
|
}>;
|
|
30
|
-
export function prepareRouterProtocol(zone: import(
|
|
30
|
+
export function prepareRouterProtocol(zone: import("@agoric/base-zone").Zone, powers: ReturnType<(zone: import("@agoric/base-zone").Zone, powers?: {
|
|
31
31
|
isRetryableReason?: ((reason: any) => boolean) | undefined;
|
|
32
32
|
watchPromise?: ((p: PromiseLike<any>, watcher: import("@agoric/vow/src/watch-promise.js").PromiseWatcher, ...args: unknown[]) => void) | undefined;
|
|
33
33
|
} | undefined) => {
|
|
34
|
-
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>;
|
|
35
|
-
watch: <T_1 = unknown, TResult1_1 = T_1, TResult2_1 = T_1, C = unknown>(specimenP: import("@agoric/vow").ERef<T_1 | import("@agoric/vow
|
|
34
|
+
when: <T, TResult1 = import("@agoric/vow").Unwrap<T>, TResult2 = never>(specimenP: T, onFulfilled?: ((value: import("@agoric/vow/src/types.js").Unwrap<T>) => TResult1 | PromiseLike<TResult1>) | undefined, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined) => Promise<TResult1 | TResult2>;
|
|
35
|
+
watch: <T_1 = unknown, TResult1_1 = T_1, TResult2_1 = T_1, C = unknown>(specimenP: import("@agoric/vow/src/types.js").ERef<T_1 | import("@agoric/vow/src/types.js" /**
|
|
36
|
+
* @param {string[]} paths
|
|
37
|
+
* @param {Remote<ProtocolHandler>} protocolHandler
|
|
38
|
+
*/).Vow /**
|
|
39
|
+
* @param {string[]} paths
|
|
40
|
+
* @param {Remote<ProtocolHandler>} protocolHandler
|
|
41
|
+
*/<T_1>>, watcher?: import("@agoric/vow").Watcher<T_1, TResult1_1, TResult2_1, any> | undefined, watcherContext?: C | undefined) => import("@agoric/vow").Vow<TResult1_1 | TResult2_1>;
|
|
36
42
|
makeVowKit: <T_2>() => import("@agoric/vow").VowKit<T_2>;
|
|
37
43
|
allVows: (vows: any) => import("@agoric/vow").Vow<any>;
|
|
38
44
|
}>, E?: ((<T_3>(x: T_3) => import("../../../node_modules/@endo/eventual-send/src/E.js").ECallableOrMethods<import("@endo/eventual-send").RemoteFunctions<T_3>>) & {
|
|
@@ -43,7 +49,7 @@ export function prepareRouterProtocol(zone: import('@agoric/base-zone').Zone, po
|
|
|
43
49
|
<T_3_1>(value: T_3_1 | PromiseLike<T_3_1>): Promise<Awaited<T_3_1>>;
|
|
44
50
|
};
|
|
45
51
|
readonly sendOnly: <T_4>(x: T_4) => import("../../../node_modules/@endo/eventual-send/src/E.js").ESendOnlyCallableOrMethods<import("@endo/eventual-send").RemoteFunctions<T_4>>;
|
|
46
|
-
readonly when: <T_5, U = T_5>(x: T_5 | PromiseLike<T_5>, onfulfilled?: ((value: T_5) => import("
|
|
52
|
+
readonly when: <T_5, U = T_5>(x: T_5 | PromiseLike<T_5>, onfulfilled?: ((value: T_5) => import("../../../node_modules/@endo/eventual-send/src/E.js").ERef<U>) | undefined, onrejected?: ((reason: any) => import("../../../node_modules/@endo/eventual-send/src/E.js").ERef<U>) | undefined) => Promise<U>;
|
|
47
53
|
}) | undefined): () => import("@endo/exo").Guarded<{
|
|
48
54
|
/**
|
|
49
55
|
* @param {string[]} paths
|
package/src/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["router.js"],"names":[],"mappings":"AAUA;;;;;;;;;GASG;AAEH;;;;GAIG;AA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KAAK,CAAC,MAAM,EAID,CAAC,AAJG,CAAC,EAAE;;;;;cAE/B,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAEE,CAAC,AAFA,KAAK,IAAI;;;;;gBAElC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI;;;uBA8EzB,MAAM;6BACf,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,eAAe,KAAK,IAAI;+BAC3D,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,KAAK,IAAI"}
|
package/src/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Rearrange the exo types to make a cast of the methods (M) and init function (I) to a specific type.
|
|
3
3
|
*/
|
|
4
4
|
type ExoClassMethods<M extends import("@endo/exo").Methods, I extends (...args: any[]) => any> = M & ThisType<{
|
|
5
|
-
self: import(
|
|
5
|
+
self: import("@endo/exo").Guarded<M>;
|
|
6
6
|
state: ReturnType<I>;
|
|
7
7
|
}>;
|
|
8
8
|
/**
|