@libp2p/kad-dht 16.3.0 → 16.3.1-a34745c01
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/dist/index.min.js +1 -1
- package/dist/index.min.js.map +4 -4
- package/dist/src/content-fetching/index.d.ts +4 -4
- package/dist/src/content-fetching/index.js +7 -7
- package/dist/src/content-routing/index.d.ts +6 -6
- package/dist/src/content-routing/index.js +4 -4
- package/dist/src/peer-routing/index.d.ts +4 -4
- package/dist/src/peer-routing/index.js +6 -6
- package/dist/src/query/events.d.ts +1 -1
- package/dist/src/query/manager.d.ts +2 -2
- package/dist/src/query/manager.js +2 -2
- package/dist/src/query/query-path.d.ts +2 -2
- package/dist/src/query/query-path.d.ts.map +1 -1
- package/dist/src/query/query-path.js +9 -7
- package/dist/src/query/query-path.js.map +1 -1
- package/dist/src/query/types.d.ts +1 -1
- package/dist/src/record/selectors.d.ts +1 -1
- package/dist/src/record/selectors.js +1 -1
- package/dist/src/record/validators.d.ts +1 -1
- package/dist/src/routing-table/closest-peers.js +3 -3
- package/dist/src/routing-table/index.d.ts +1 -1
- package/dist/src/routing-table/index.js +1 -1
- package/dist/src/routing-table/k-bucket.js +2 -2
- package/dist/src/routing-table/refresh.d.ts +1 -1
- package/dist/src/routing-table/refresh.js +1 -1
- package/dist/src/rpc/handlers/add-provider.d.ts +3 -3
- package/dist/src/rpc/handlers/find-node.d.ts +4 -4
- package/dist/src/rpc/handlers/find-node.js +1 -1
- package/dist/src/rpc/handlers/get-providers.d.ts +5 -5
- package/dist/src/rpc/handlers/get-providers.js +1 -1
- package/dist/src/rpc/handlers/get-value.d.ts +3 -3
- package/dist/src/rpc/handlers/get-value.js +3 -3
- package/dist/src/rpc/handlers/ping.d.ts +2 -2
- package/dist/src/rpc/handlers/put-value.d.ts +3 -3
- package/dist/src/rpc/handlers/put-value.js +2 -2
- package/dist/src/rpc/index.d.ts +5 -5
- package/dist/src/rpc/index.js +1 -1
- package/package.json +16 -16
- package/src/content-fetching/index.ts +13 -13
- package/src/content-routing/index.ts +12 -12
- package/src/peer-routing/index.ts +12 -12
- package/src/query/events.ts +1 -1
- package/src/query/manager.ts +4 -4
- package/src/query/query-path.ts +12 -10
- package/src/query/types.ts +1 -1
- package/src/record/selectors.ts +2 -2
- package/src/record/validators.ts +1 -1
- package/src/routing-table/closest-peers.ts +3 -3
- package/src/routing-table/index.ts +2 -2
- package/src/routing-table/k-bucket.ts +2 -2
- package/src/routing-table/refresh.ts +2 -2
- package/src/rpc/handlers/add-provider.ts +3 -3
- package/src/rpc/handlers/find-node.ts +5 -5
- package/src/rpc/handlers/get-providers.ts +6 -6
- package/src/rpc/handlers/get-value.ts +6 -6
- package/src/rpc/handlers/ping.ts +2 -2
- package/src/rpc/handlers/put-value.ts +5 -5
- package/src/rpc/index.ts +5 -5
- package/dist/typedoc-urls.json +0 -65
|
@@ -3,22 +3,22 @@ import { InvalidPublicKeyError, NotFoundError } from '@libp2p/interface'
|
|
|
3
3
|
import { peerIdFromPublicKey, peerIdFromMultihash } from '@libp2p/peer-id'
|
|
4
4
|
import { Libp2pRecord } from '@libp2p/record'
|
|
5
5
|
import * as Digest from 'multiformats/hashes/digest'
|
|
6
|
-
import { QueryError, InvalidRecordError } from '../errors.
|
|
7
|
-
import { MessageType } from '../message/dht.
|
|
8
|
-
import { PeerDistanceList } from '../peer-distance-list.
|
|
6
|
+
import { QueryError, InvalidRecordError } from '../errors.ts'
|
|
7
|
+
import { MessageType } from '../message/dht.ts'
|
|
8
|
+
import { PeerDistanceList } from '../peer-distance-list.ts'
|
|
9
9
|
import {
|
|
10
10
|
queryErrorEvent,
|
|
11
11
|
finalPeerEvent,
|
|
12
12
|
valueEvent
|
|
13
|
-
} from '../query/events.
|
|
14
|
-
import { verifyRecord } from '../record/validators.
|
|
15
|
-
import { convertBuffer, keyForPublicKey } from '../utils.
|
|
16
|
-
import type { DHTRecord, FinalPeerEvent, QueryEvent, Validators } from '../index.
|
|
17
|
-
import type { Message } from '../message/dht.
|
|
18
|
-
import type { Network, SendMessageOptions } from '../network.
|
|
19
|
-
import type { QueryManager, QueryOptions } from '../query/manager.
|
|
20
|
-
import type { QueryFunc } from '../query/types.
|
|
21
|
-
import type { RoutingTable } from '../routing-table/index.
|
|
13
|
+
} from '../query/events.ts'
|
|
14
|
+
import { verifyRecord } from '../record/validators.ts'
|
|
15
|
+
import { convertBuffer, keyForPublicKey } from '../utils.ts'
|
|
16
|
+
import type { DHTRecord, FinalPeerEvent, QueryEvent, Validators } from '../index.ts'
|
|
17
|
+
import type { Message } from '../message/dht.ts'
|
|
18
|
+
import type { Network, SendMessageOptions } from '../network.ts'
|
|
19
|
+
import type { QueryManager, QueryOptions } from '../query/manager.ts'
|
|
20
|
+
import type { QueryFunc } from '../query/types.ts'
|
|
21
|
+
import type { RoutingTable } from '../routing-table/index.ts'
|
|
22
22
|
import type { GetClosestPeersOptions } from '../routing-table/k-bucket.ts'
|
|
23
23
|
import type { ComponentLogger, Logger, Metrics, PeerId, PeerInfo, PeerStore, RoutingOptions } from '@libp2p/interface'
|
|
24
24
|
import type { AbortOptions } from 'it-pushable'
|
package/src/query/events.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageType, SendQueryEvent, PeerResponseEvent, AddPeerEvent, ValueEvent, ProviderEvent, QueryErrorEvent, FinalPeerEvent, DisjointPath, PathEndedEvent, DialPeerEvent } from '../index.
|
|
1
|
+
import type { MessageType, SendQueryEvent, PeerResponseEvent, AddPeerEvent, ValueEvent, ProviderEvent, QueryErrorEvent, FinalPeerEvent, DisjointPath, PathEndedEvent, DialPeerEvent } from '../index.ts'
|
|
2
2
|
import type { PeerId, PeerInfo } from '@libp2p/interface'
|
|
3
3
|
import type { Libp2pRecord } from '@libp2p/record'
|
|
4
4
|
import type { ProgressOptions } from 'progress-events'
|
package/src/query/manager.ts
CHANGED
|
@@ -7,12 +7,12 @@ import { raceSignal } from 'race-signal'
|
|
|
7
7
|
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
|
|
8
8
|
import {
|
|
9
9
|
ALPHA, K, DEFAULT_QUERY_TIMEOUT
|
|
10
|
-
} from '../constants.
|
|
11
|
-
import { convertBuffer } from '../utils.
|
|
10
|
+
} from '../constants.ts'
|
|
11
|
+
import { convertBuffer } from '../utils.ts'
|
|
12
12
|
import { queryPath } from './query-path.ts'
|
|
13
13
|
import type { QueryFunc } from './types.ts'
|
|
14
|
-
import type { QueryEvent } from '../index.
|
|
15
|
-
import type { RoutingTable } from '../routing-table/index.
|
|
14
|
+
import type { QueryEvent } from '../index.ts'
|
|
15
|
+
import type { RoutingTable } from '../routing-table/index.ts'
|
|
16
16
|
import type { ComponentLogger, Metrics, PeerId, RoutingOptions, Startable } from '@libp2p/interface'
|
|
17
17
|
import type { ConnectionManager } from '@libp2p/interface-internal'
|
|
18
18
|
import type { DeferredPromise } from 'p-defer'
|
package/src/query/query-path.ts
CHANGED
|
@@ -3,10 +3,10 @@ import { Queue } from '@libp2p/utils'
|
|
|
3
3
|
import { pushable } from 'it-pushable'
|
|
4
4
|
import { xor as uint8ArrayXor } from 'uint8arrays/xor'
|
|
5
5
|
import { xorCompare as uint8ArrayXorCompare } from 'uint8arrays/xor-compare'
|
|
6
|
-
import { convertPeerId, convertBuffer } from '../utils.
|
|
6
|
+
import { convertPeerId, convertBuffer } from '../utils.ts'
|
|
7
7
|
import { pathEndedEvent, queryErrorEvent } from './events.ts'
|
|
8
|
-
import type { QueryEvent } from '../index.
|
|
9
|
-
import type { QueryFunc } from '../query/types.
|
|
8
|
+
import type { QueryEvent } from '../index.ts'
|
|
9
|
+
import type { QueryFunc } from '../query/types.ts'
|
|
10
10
|
import type { Logger, PeerId, RoutingOptions, AbortOptions, PeerInfo } from '@libp2p/interface'
|
|
11
11
|
import type { ConnectionManager } from '@libp2p/interface-internal'
|
|
12
12
|
import type { Filter } from '@libp2p/utils'
|
|
@@ -159,13 +159,6 @@ export async function * queryPath (options: QueryPathOptions): AsyncGenerator<Qu
|
|
|
159
159
|
continue
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
if (!(await connectionManager.isDialable(closerPeer.multiaddrs, { // eslint-disable-line max-depth
|
|
163
|
-
signal
|
|
164
|
-
}))) {
|
|
165
|
-
log('not querying undialable peer')
|
|
166
|
-
continue
|
|
167
|
-
}
|
|
168
|
-
|
|
169
162
|
const closerPeerKadId = await convertPeerId(closerPeer.id, {
|
|
170
163
|
signal
|
|
171
164
|
})
|
|
@@ -177,6 +170,15 @@ export async function * queryPath (options: QueryPathOptions): AsyncGenerator<Qu
|
|
|
177
170
|
continue
|
|
178
171
|
}
|
|
179
172
|
|
|
173
|
+
// dialability is the most expensive check so only run it for
|
|
174
|
+
// peers we would actually query
|
|
175
|
+
if (!(await connectionManager.isDialable(closerPeer.multiaddrs, { // eslint-disable-line max-depth
|
|
176
|
+
signal
|
|
177
|
+
}))) {
|
|
178
|
+
log('not querying undialable peer')
|
|
179
|
+
continue
|
|
180
|
+
}
|
|
181
|
+
|
|
180
182
|
log('querying closer peer %p', closerPeer.id)
|
|
181
183
|
queryPeer(closerPeer, closerPeerKadId)
|
|
182
184
|
}
|
package/src/query/types.ts
CHANGED
package/src/record/selectors.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InvalidParametersError } from '@libp2p/interface'
|
|
2
2
|
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
|
|
3
|
-
import { MissingSelectorError } from '../errors.
|
|
4
|
-
import type { Selectors } from '../index.
|
|
3
|
+
import { MissingSelectorError } from '../errors.ts'
|
|
4
|
+
import type { Selectors } from '../index.ts'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Select the best record out of the given records
|
package/src/record/validators.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { publicKeyFromProtobuf } from '@libp2p/crypto/keys'
|
|
|
2
2
|
import { InvalidParametersError } from '@libp2p/interface'
|
|
3
3
|
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
|
|
4
4
|
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
|
|
5
|
-
import type { Validators } from '../index.
|
|
5
|
+
import type { Validators } from '../index.ts'
|
|
6
6
|
import type { Libp2pRecord } from '@libp2p/record'
|
|
7
7
|
import type { AbortOptions } from 'it-pushable'
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PeerSet } from '@libp2p/peer-collections'
|
|
2
|
-
import { KEEP_ALIVE_TAG } from '../constants.
|
|
3
|
-
import { PeerDistanceList } from '../peer-distance-list.
|
|
4
|
-
import { convertPeerId } from '../utils.
|
|
2
|
+
import { KEEP_ALIVE_TAG } from '../constants.ts'
|
|
3
|
+
import { PeerDistanceList } from '../peer-distance-list.ts'
|
|
4
|
+
import { convertPeerId } from '../utils.ts'
|
|
5
5
|
import type { RoutingTable } from './index.ts'
|
|
6
6
|
import type { ComponentLogger, Logger, Metrics, PeerId, PeerStore, Startable } from '@libp2p/interface'
|
|
7
7
|
|
|
@@ -3,11 +3,11 @@ import { AdaptiveTimeout, PeerQueue } from '@libp2p/utils'
|
|
|
3
3
|
import { anySignal } from 'any-signal'
|
|
4
4
|
import parallel from 'it-parallel'
|
|
5
5
|
import { TypedEventEmitter, setMaxListeners } from 'main-event'
|
|
6
|
-
import * as utils from '../utils.
|
|
6
|
+
import * as utils from '../utils.ts'
|
|
7
7
|
import { ClosestPeers } from './closest-peers.ts'
|
|
8
8
|
import { KBucket, isLeafBucket } from './k-bucket.ts'
|
|
9
9
|
import type { Bucket, GetClosestPeersOptions, LeafBucket, Peer } from './k-bucket.ts'
|
|
10
|
-
import type { Network } from '../network.
|
|
10
|
+
import type { Network } from '../network.ts'
|
|
11
11
|
import type { AbortOptions, ComponentLogger, CounterGroup, Logger, Metric, Metrics, PeerId, PeerStore, Startable, Stream } from '@libp2p/interface'
|
|
12
12
|
import type { Ping } from '@libp2p/ping'
|
|
13
13
|
import type { AdaptiveTimeoutInit } from '@libp2p/utils'
|
|
@@ -3,8 +3,8 @@ import map from 'it-map'
|
|
|
3
3
|
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
|
|
4
4
|
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
|
|
5
5
|
import { xor as uint8ArrayXor } from 'uint8arrays/xor'
|
|
6
|
-
import { PeerDistanceList } from '../peer-distance-list.
|
|
7
|
-
import { convertPeerId } from '../utils.
|
|
6
|
+
import { PeerDistanceList } from '../peer-distance-list.ts'
|
|
7
|
+
import { convertPeerId } from '../utils.ts'
|
|
8
8
|
import { KBUCKET_SIZE, LAST_PING_THRESHOLD, PING_OLD_CONTACT_COUNT, PREFIX_LENGTH } from './index.ts'
|
|
9
9
|
import type { PeerId, AbortOptions, Metrics } from '@libp2p/interface'
|
|
10
10
|
|
|
@@ -6,10 +6,10 @@ import { setMaxListeners } from 'main-event'
|
|
|
6
6
|
import * as Digest from 'multiformats/hashes/digest'
|
|
7
7
|
import { sha256 } from 'multiformats/hashes/sha2'
|
|
8
8
|
import { xor as uint8ArrayXor } from 'uint8arrays/xor'
|
|
9
|
-
import { TABLE_REFRESH_INTERVAL, TABLE_REFRESH_QUERY_TIMEOUT } from '../constants.
|
|
9
|
+
import { TABLE_REFRESH_INTERVAL, TABLE_REFRESH_QUERY_TIMEOUT } from '../constants.ts'
|
|
10
10
|
import GENERATED_PREFIXES from './generated-prefix-list.ts'
|
|
11
11
|
import type { RoutingTable } from './index.ts'
|
|
12
|
-
import type { PeerRouting } from '../peer-routing/index.
|
|
12
|
+
import type { PeerRouting } from '../peer-routing/index.ts'
|
|
13
13
|
import type { AbortOptions, ComponentLogger, Logger, PeerId } from '@libp2p/interface'
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -3,9 +3,9 @@ import { peerIdFromMultihash } from '@libp2p/peer-id'
|
|
|
3
3
|
import { multiaddr } from '@multiformats/multiaddr'
|
|
4
4
|
import { CID } from 'multiformats/cid'
|
|
5
5
|
import * as Digest from 'multiformats/hashes/digest'
|
|
6
|
-
import type { Message } from '../../message/dht.
|
|
7
|
-
import type { Providers } from '../../providers.
|
|
8
|
-
import type { DHTMessageHandler } from '../index.
|
|
6
|
+
import type { Message } from '../../message/dht.ts'
|
|
7
|
+
import type { Providers } from '../../providers.ts'
|
|
8
|
+
import type { DHTMessageHandler } from '../index.ts'
|
|
9
9
|
import type { ComponentLogger, Logger, PeerId, PeerStore } from '@libp2p/interface'
|
|
10
10
|
|
|
11
11
|
export interface AddProviderComponents {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { InvalidMessageError } from '@libp2p/interface'
|
|
2
2
|
import { CODE_P2P } from '@multiformats/multiaddr'
|
|
3
3
|
import { equals as uint8ArrayEquals } from 'uint8arrays'
|
|
4
|
-
import { MessageType } from '../../message/dht.
|
|
5
|
-
import type { PeerInfoMapper } from '../../index.
|
|
6
|
-
import type { Message } from '../../message/dht.
|
|
7
|
-
import type { PeerRouting } from '../../peer-routing/index.
|
|
8
|
-
import type { DHTMessageHandler } from '../index.
|
|
4
|
+
import { MessageType } from '../../message/dht.ts'
|
|
5
|
+
import type { PeerInfoMapper } from '../../index.ts'
|
|
6
|
+
import type { Message } from '../../message/dht.ts'
|
|
7
|
+
import type { PeerRouting } from '../../peer-routing/index.ts'
|
|
8
|
+
import type { DHTMessageHandler } from '../index.ts'
|
|
9
9
|
import type { ComponentLogger, Logger, PeerId, PeerInfo } from '@libp2p/interface'
|
|
10
10
|
import type { AddressManager } from '@libp2p/interface-internal'
|
|
11
11
|
|
|
@@ -2,12 +2,12 @@ import { InvalidMessageError } from '@libp2p/interface'
|
|
|
2
2
|
import all from 'it-all'
|
|
3
3
|
import map from 'it-map'
|
|
4
4
|
import { CID } from 'multiformats/cid'
|
|
5
|
-
import { MessageType } from '../../message/dht.
|
|
6
|
-
import type { PeerInfoMapper } from '../../index.
|
|
7
|
-
import type { Message } from '../../message/dht.
|
|
8
|
-
import type { PeerRouting } from '../../peer-routing/index.
|
|
9
|
-
import type { Providers } from '../../providers.
|
|
10
|
-
import type { DHTMessageHandler } from '../index.
|
|
5
|
+
import { MessageType } from '../../message/dht.ts'
|
|
6
|
+
import type { PeerInfoMapper } from '../../index.ts'
|
|
7
|
+
import type { Message } from '../../message/dht.ts'
|
|
8
|
+
import type { PeerRouting } from '../../peer-routing/index.ts'
|
|
9
|
+
import type { Providers } from '../../providers.ts'
|
|
10
|
+
import type { DHTMessageHandler } from '../index.ts'
|
|
11
11
|
import type { ComponentLogger, Logger, PeerId, PeerInfo, PeerStore } from '@libp2p/interface'
|
|
12
12
|
import type { Multiaddr } from '@multiformats/multiaddr'
|
|
13
13
|
|
|
@@ -3,12 +3,12 @@ import { InvalidMessageError, NotFoundError } from '@libp2p/interface'
|
|
|
3
3
|
import { Libp2pRecord } from '@libp2p/record'
|
|
4
4
|
import {
|
|
5
5
|
PROVIDERS_VALIDITY
|
|
6
|
-
} from '../../constants.
|
|
7
|
-
import { MessageType } from '../../message/dht.
|
|
8
|
-
import { bufferToRecordKey, isPublicKeyKey, fromPublicKeyKey } from '../../utils.
|
|
9
|
-
import type { Message } from '../../message/dht.
|
|
10
|
-
import type { PeerRouting } from '../../peer-routing/index.
|
|
11
|
-
import type { DHTMessageHandler } from '../index.
|
|
6
|
+
} from '../../constants.ts'
|
|
7
|
+
import { MessageType } from '../../message/dht.ts'
|
|
8
|
+
import { bufferToRecordKey, isPublicKeyKey, fromPublicKeyKey } from '../../utils.ts'
|
|
9
|
+
import type { Message } from '../../message/dht.ts'
|
|
10
|
+
import type { PeerRouting } from '../../peer-routing/index.ts'
|
|
11
|
+
import type { DHTMessageHandler } from '../index.ts'
|
|
12
12
|
import type { ComponentLogger, Logger, PeerId, PeerStore } from '@libp2p/interface'
|
|
13
13
|
import type { Datastore } from 'interface-datastore'
|
|
14
14
|
|
package/src/rpc/handlers/ping.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Message } from '../../message/dht.
|
|
2
|
-
import type { DHTMessageHandler } from '../index.
|
|
1
|
+
import type { Message } from '../../message/dht.ts'
|
|
2
|
+
import type { DHTMessageHandler } from '../index.ts'
|
|
3
3
|
import type { ComponentLogger, Logger, PeerId } from '@libp2p/interface'
|
|
4
4
|
|
|
5
5
|
export interface PingComponents {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { InvalidMessageError } from '@libp2p/interface'
|
|
2
2
|
import { Libp2pRecord } from '@libp2p/record'
|
|
3
|
-
import { verifyRecord } from '../../record/validators.
|
|
4
|
-
import { bufferToRecordKey } from '../../utils.
|
|
5
|
-
import type { Validators } from '../../index.
|
|
6
|
-
import type { Message } from '../../message/dht.
|
|
7
|
-
import type { DHTMessageHandler } from '../index.
|
|
3
|
+
import { verifyRecord } from '../../record/validators.ts'
|
|
4
|
+
import { bufferToRecordKey } from '../../utils.ts'
|
|
5
|
+
import type { Validators } from '../../index.ts'
|
|
6
|
+
import type { Message } from '../../message/dht.ts'
|
|
7
|
+
import type { DHTMessageHandler } from '../index.ts'
|
|
8
8
|
import type { ComponentLogger, Logger, PeerId } from '@libp2p/interface'
|
|
9
9
|
import type { Datastore } from 'interface-datastore'
|
|
10
10
|
|
package/src/rpc/index.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { InvalidMessageError, TimeoutError } from '@libp2p/interface'
|
|
2
2
|
import { pbStream } from '@libp2p/utils'
|
|
3
|
-
import { Message, MessageType } from '../message/dht.
|
|
3
|
+
import { Message, MessageType } from '../message/dht.ts'
|
|
4
4
|
import { AddProviderHandler } from './handlers/add-provider.ts'
|
|
5
5
|
import { FindNodeHandler } from './handlers/find-node.ts'
|
|
6
6
|
import { GetProvidersHandler } from './handlers/get-providers.ts'
|
|
7
7
|
import { GetValueHandler } from './handlers/get-value.ts'
|
|
8
8
|
import { PingHandler } from './handlers/ping.ts'
|
|
9
9
|
import { PutValueHandler } from './handlers/put-value.ts'
|
|
10
|
-
import type { PeerInfoMapper, Validators } from '../index.
|
|
11
|
-
import type { PeerRouting } from '../peer-routing/index.
|
|
12
|
-
import type { Providers } from '../providers.
|
|
10
|
+
import type { PeerInfoMapper, Validators } from '../index.ts'
|
|
11
|
+
import type { PeerRouting } from '../peer-routing/index.ts'
|
|
12
|
+
import type { Providers } from '../providers.ts'
|
|
13
13
|
import type { FindNodeHandlerComponents } from './handlers/find-node.ts'
|
|
14
14
|
import type { GetProvidersHandlerComponents } from './handlers/get-providers.ts'
|
|
15
15
|
import type { GetValueHandlerComponents } from './handlers/get-value.ts'
|
|
16
16
|
import type { PutValueHandlerComponents } from './handlers/put-value.ts'
|
|
17
|
-
import type { RoutingTable } from '../routing-table/index.
|
|
17
|
+
import type { RoutingTable } from '../routing-table/index.ts'
|
|
18
18
|
import type { CounterGroup, Logger, Metrics, PeerId, MetricGroup, Connection, Stream } from '@libp2p/interface'
|
|
19
19
|
|
|
20
20
|
export interface DHTMessageHandler {
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"codec": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad-dht.MessageType.codec.html",
|
|
3
|
-
"EventTypes": "https://libp2p.github.io/js-libp2p/enums/_libp2p_kad-dht.EventTypes.html",
|
|
4
|
-
".:EventTypes": "https://libp2p.github.io/js-libp2p/enums/_libp2p_kad-dht.EventTypes.html",
|
|
5
|
-
"MessageType": "https://libp2p.github.io/js-libp2p/enums/_libp2p_kad-dht.MessageType.html",
|
|
6
|
-
"AddPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.AddPeerEvent.html",
|
|
7
|
-
".:AddPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.AddPeerEvent.html",
|
|
8
|
-
"DHTRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.DHTRecord.html",
|
|
9
|
-
".:DHTRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.DHTRecord.html",
|
|
10
|
-
"DialPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.DialPeerEvent.html",
|
|
11
|
-
".:DialPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.DialPeerEvent.html",
|
|
12
|
-
"DisjointPath": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.DisjointPath.html",
|
|
13
|
-
".:DisjointPath": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.DisjointPath.html",
|
|
14
|
-
"FinalPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.FinalPeerEvent.html",
|
|
15
|
-
".:FinalPeerEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.FinalPeerEvent.html",
|
|
16
|
-
"KadDHT": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.KadDHT.html",
|
|
17
|
-
".:KadDHT": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.KadDHT.html",
|
|
18
|
-
"KadDHTComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.KadDHTComponents.html",
|
|
19
|
-
".:KadDHTComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.KadDHTComponents.html",
|
|
20
|
-
"KadDHTInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.KadDHTInit.html",
|
|
21
|
-
".:KadDHTInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.KadDHTInit.html",
|
|
22
|
-
"PathEndedEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.PathEndedEvent.html",
|
|
23
|
-
".:PathEndedEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.PathEndedEvent.html",
|
|
24
|
-
"PeerInfoMapper": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.PeerInfoMapper.html",
|
|
25
|
-
".:PeerInfoMapper": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.PeerInfoMapper.html",
|
|
26
|
-
"PeerResponseEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.PeerResponseEvent.html",
|
|
27
|
-
".:PeerResponseEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.PeerResponseEvent.html",
|
|
28
|
-
"ProviderEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.ProviderEvent.html",
|
|
29
|
-
".:ProviderEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.ProviderEvent.html",
|
|
30
|
-
"ProvidersInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.ProvidersInit.html",
|
|
31
|
-
".:ProvidersInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.ProvidersInit.html",
|
|
32
|
-
"QueryErrorEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.QueryErrorEvent.html",
|
|
33
|
-
".:QueryErrorEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.QueryErrorEvent.html",
|
|
34
|
-
"ReProvideInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.ReProvideInit.html",
|
|
35
|
-
".:ReProvideInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.ReProvideInit.html",
|
|
36
|
-
"RoutingTable": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.RoutingTable.html",
|
|
37
|
-
".:RoutingTable": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.RoutingTable.html",
|
|
38
|
-
"SelectFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.SelectFn.html",
|
|
39
|
-
".:SelectFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.SelectFn.html",
|
|
40
|
-
"SendQueryEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.SendQueryEvent.html",
|
|
41
|
-
".:SendQueryEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.SendQueryEvent.html",
|
|
42
|
-
"SetModeOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.SetModeOptions.html",
|
|
43
|
-
".:SetModeOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.SetModeOptions.html",
|
|
44
|
-
"SingleKadDHT": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.SingleKadDHT.html",
|
|
45
|
-
".:SingleKadDHT": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.SingleKadDHT.html",
|
|
46
|
-
"ValidateFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.ValidateFn.html",
|
|
47
|
-
".:ValidateFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.ValidateFn.html",
|
|
48
|
-
"ValueEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.ValueEvent.html",
|
|
49
|
-
".:ValueEvent": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_kad-dht.ValueEvent.html",
|
|
50
|
-
"DHTProgressEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad-dht.DHTProgressEvents.html",
|
|
51
|
-
".:DHTProgressEvents": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad-dht.DHTProgressEvents.html",
|
|
52
|
-
"MessageName": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad-dht.MessageName.html",
|
|
53
|
-
".:MessageName": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad-dht.MessageName.html",
|
|
54
|
-
"QueryEvent": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad-dht.QueryEvent.html",
|
|
55
|
-
".:QueryEvent": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad-dht.QueryEvent.html",
|
|
56
|
-
"Selectors": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad-dht.Selectors.html",
|
|
57
|
-
".:Selectors": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad-dht.Selectors.html",
|
|
58
|
-
"Validators": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad-dht.Validators.html",
|
|
59
|
-
".:Validators": "https://libp2p.github.io/js-libp2p/types/_libp2p_kad-dht.Validators.html",
|
|
60
|
-
"kadDHT": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad-dht.kadDHT.html",
|
|
61
|
-
".:kadDHT": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad-dht.kadDHT.html",
|
|
62
|
-
"passthroughMapper": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad-dht.passthroughMapper.html",
|
|
63
|
-
"removePrivateAddressesMapper": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad-dht.removePrivateAddressesMapper.html",
|
|
64
|
-
"removePublicAddressesMapper": "https://libp2p.github.io/js-libp2p/functions/_libp2p_kad-dht.removePublicAddressesMapper.html"
|
|
65
|
-
}
|