@libp2p/interface-internal 1.0.11 → 1.1.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId } from '@libp2p/interface';
|
|
1
|
+
import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId, IsDialableOptions } from '@libp2p/interface';
|
|
2
2
|
import type { PeerMap } from '@libp2p/peer-collections';
|
|
3
3
|
import type { Multiaddr } from '@multiformats/multiaddr';
|
|
4
4
|
export interface OpenConnectionOptions extends AbortOptions {
|
|
@@ -71,5 +71,15 @@ export interface ConnectionManager {
|
|
|
71
71
|
* ```
|
|
72
72
|
*/
|
|
73
73
|
getDialQueue(): PendingDial[];
|
|
74
|
+
/**
|
|
75
|
+
* Given the current node configuration, returns a promise of `true` or
|
|
76
|
+
* `false` if the node would attempt to dial the passed multiaddr.
|
|
77
|
+
*
|
|
78
|
+
* This means a relevant transport is configured, and the connection gater
|
|
79
|
+
* would not block the dial attempt.
|
|
80
|
+
*
|
|
81
|
+
* This may involve resolving DNS addresses so you should pass an AbortSignal.
|
|
82
|
+
*/
|
|
83
|
+
isDialable(multiaddr: Multiaddr | Multiaddr[], options?: IsDialableOptions): Promise<boolean>;
|
|
74
84
|
}
|
|
75
85
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connection-manager/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connection-manager/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAA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-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Interfaces implemented by internal libp2p components",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/interface-internal#readme",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"build": "aegir build"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@libp2p/interface": "^1.
|
|
52
|
-
"@libp2p/peer-collections": "^5.1.
|
|
51
|
+
"@libp2p/interface": "^1.2.0",
|
|
52
|
+
"@libp2p/peer-collections": "^5.1.10",
|
|
53
53
|
"@multiformats/multiaddr": "^12.2.1",
|
|
54
54
|
"uint8arraylist": "^2.4.8"
|
|
55
55
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId } from '@libp2p/interface'
|
|
1
|
+
import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId, IsDialableOptions } from '@libp2p/interface'
|
|
2
2
|
import type { PeerMap } from '@libp2p/peer-collections'
|
|
3
3
|
import type { Multiaddr } from '@multiformats/multiaddr'
|
|
4
4
|
|
|
@@ -80,4 +80,15 @@ export interface ConnectionManager {
|
|
|
80
80
|
* ```
|
|
81
81
|
*/
|
|
82
82
|
getDialQueue(): PendingDial[]
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Given the current node configuration, returns a promise of `true` or
|
|
86
|
+
* `false` if the node would attempt to dial the passed multiaddr.
|
|
87
|
+
*
|
|
88
|
+
* This means a relevant transport is configured, and the connection gater
|
|
89
|
+
* would not block the dial attempt.
|
|
90
|
+
*
|
|
91
|
+
* This may involve resolving DNS addresses so you should pass an AbortSignal.
|
|
92
|
+
*/
|
|
93
|
+
isDialable(multiaddr: Multiaddr | Multiaddr[], options?: IsDialableOptions): Promise<boolean>
|
|
83
94
|
}
|