Comparing version 2.4.0 to 2.4.1-3c63482e5
@@ -149,12 +149,12 @@ /* eslint-disable complexity */ | ||
let startingConfidence = true; | ||
if (this.observed.has(addr)) { | ||
if (options?.type === 'observed' || this.observed.has(addr)) { | ||
startingConfidence = this.observed.confirm(addr, options?.ttl ?? this.addressVerificationTTL); | ||
} | ||
if (this.transportAddresses.has(addr)) { | ||
if (options?.type === 'transport' || this.transportAddresses.has(addr)) { | ||
startingConfidence = this.transportAddresses.confirm(addr, options?.ttl ?? this.addressVerificationTTL); | ||
} | ||
if (this.dnsMappings.has(addr)) { | ||
if (options?.type === 'dns-mapping' || this.dnsMappings.has(addr)) { | ||
startingConfidence = this.dnsMappings.confirm(addr, options?.ttl ?? this.addressVerificationTTL); | ||
} | ||
if (this.ipMappings.has(addr)) { | ||
if (options?.type === 'ip-mapping' || this.ipMappings.has(addr)) { | ||
startingConfidence = this.ipMappings.confirm(addr, options?.ttl ?? this.addressVerificationTTL); | ||
@@ -161,0 +161,0 @@ } |
@@ -267,3 +267,3 @@ /* eslint-disable max-depth */ | ||
try { | ||
const peerInfo = await this.components.peerRouting.findPeer(peerId); | ||
const peerInfo = await this.components.peerRouting.findPeer(peerId, options); | ||
this.log('found multiaddrs for %p in the peer routing', peerId, addrs.map(({ multiaddr }) => multiaddr.toString())); | ||
@@ -270,0 +270,0 @@ addrs.push(...peerInfo.multiaddrs.map(multiaddr => ({ |
@@ -1,3 +0,3 @@ | ||
export declare const version = "2.4.0"; | ||
export declare const version = "2.4.1-3c63482e5"; | ||
export declare const name = "js-libp2p"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,3 +0,3 @@ | ||
export const version = '2.4.0'; | ||
export const version = '2.4.1-3c63482e5'; | ||
export const name = 'js-libp2p'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "libp2p", | ||
"version": "2.4.0", | ||
"version": "2.4.1-3c63482e5", | ||
"description": "JavaScript implementation of libp2p, a modular peer to peer network stack", | ||
@@ -90,11 +90,11 @@ "license": "Apache-2.0 OR MIT", | ||
"@chainsafe/netmask": "^2.0.0", | ||
"@libp2p/crypto": "^5.0.8", | ||
"@libp2p/interface": "^2.3.0", | ||
"@libp2p/interface-internal": "^2.2.0", | ||
"@libp2p/logger": "^5.1.5", | ||
"@libp2p/multistream-select": "^6.0.10", | ||
"@libp2p/peer-collections": "^6.0.13", | ||
"@libp2p/peer-id": "^5.0.9", | ||
"@libp2p/peer-store": "^11.0.13", | ||
"@libp2p/utils": "^6.3.0", | ||
"@libp2p/crypto": "5.0.8-3c63482e5", | ||
"@libp2p/interface": "2.3.0-3c63482e5", | ||
"@libp2p/interface-internal": "2.2.1-3c63482e5", | ||
"@libp2p/logger": "5.1.5-3c63482e5", | ||
"@libp2p/multistream-select": "6.0.10-3c63482e5", | ||
"@libp2p/peer-collections": "6.0.13-3c63482e5", | ||
"@libp2p/peer-id": "5.0.9-3c63482e5", | ||
"@libp2p/peer-store": "11.0.13-3c63482e5", | ||
"@libp2p/utils": "6.3.0-3c63482e5", | ||
"@multiformats/dns": "^1.0.6", | ||
@@ -101,0 +101,0 @@ "@multiformats/multiaddr": "^12.3.3", |
@@ -11,6 +11,35 @@ <h1 align="center"> | ||
[![Matrix](https://img.shields.io/badge/matrix-%23libp2p--implementers%3Aipfs.io-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p) | ||
[![Discord](https://img.shields.io/discord/806902334369824788?color=blueviolet\&label=discord\&style=flat-square)](https://discord.com/invite/Ae4TbahHaT) | ||
[![Discord](https://img.shields.io/discord/806902334369824788?color=blueviolet&label=discord&style=flat-square)](https://discord.com/invite/Ae4TbahHaT) | ||
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p) | ||
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p/main.yml?branch=main\&style=flat-square)](https://github.com/libp2p/js-libp2p/actions/workflows/main.yml?query=branch%3Amain) | ||
# About | ||
<!-- | ||
!IMPORTANT! | ||
Everything in this README between "# About" and "# Install" is automatically | ||
generated and will be overwritten the next time the doc generator is run. | ||
To make changes to this section, please update the @packageDocumentation section | ||
of src/index.js or src/index.ts | ||
To experiment with formatting, please run "npm run docs" from the root of this | ||
repo and examine the changes made. | ||
--> | ||
Use the `createLibp2p` function to create a libp2p node. | ||
## Example | ||
```typescript | ||
import { createLibp2p } from 'libp2p' | ||
const node = await createLibp2p({ | ||
// ...other options | ||
}) | ||
``` | ||
# Background | ||
@@ -17,0 +46,0 @@ |
@@ -252,15 +252,15 @@ /* eslint-disable complexity */ | ||
if (this.observed.has(addr)) { | ||
if (options?.type === 'observed' || this.observed.has(addr)) { | ||
startingConfidence = this.observed.confirm(addr, options?.ttl ?? this.addressVerificationTTL) | ||
} | ||
if (this.transportAddresses.has(addr)) { | ||
if (options?.type === 'transport' || this.transportAddresses.has(addr)) { | ||
startingConfidence = this.transportAddresses.confirm(addr, options?.ttl ?? this.addressVerificationTTL) | ||
} | ||
if (this.dnsMappings.has(addr)) { | ||
if (options?.type === 'dns-mapping' || this.dnsMappings.has(addr)) { | ||
startingConfidence = this.dnsMappings.confirm(addr, options?.ttl ?? this.addressVerificationTTL) | ||
} | ||
if (this.ipMappings.has(addr)) { | ||
if (options?.type === 'ip-mapping' || this.ipMappings.has(addr)) { | ||
startingConfidence = this.ipMappings.confirm(addr, options?.ttl ?? this.addressVerificationTTL) | ||
@@ -267,0 +267,0 @@ } |
@@ -352,3 +352,3 @@ /* eslint-disable max-depth */ | ||
try { | ||
const peerInfo = await this.components.peerRouting.findPeer(peerId) | ||
const peerInfo = await this.components.peerRouting.findPeer(peerId, options) | ||
@@ -355,0 +355,0 @@ this.log('found multiaddrs for %p in the peer routing', peerId, addrs.map(({ multiaddr }) => multiaddr.toString())) |
@@ -1,2 +0,2 @@ | ||
export const version = '2.4.0' | ||
export const version = '2.4.1-3c63482e5' | ||
export const name = 'js-libp2p' |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
191
971436
158
11957
1
+ Added@libp2p/crypto@5.0.8-3c63482e5(transitive)
+ Added@libp2p/interface@2.3.0-3c63482e5(transitive)
+ Added@libp2p/interface-internal@2.2.1-3c63482e5(transitive)
+ Added@libp2p/logger@5.1.5-3c63482e5(transitive)
+ Added@libp2p/multistream-select@6.0.10-3c63482e5(transitive)
+ Added@libp2p/peer-collections@6.0.13-3c63482e5(transitive)
+ Added@libp2p/peer-id@5.0.9-3c63482e5(transitive)
+ Added@libp2p/peer-record@8.0.13-3c63482e5(transitive)
+ Added@libp2p/peer-store@11.0.13-3c63482e5(transitive)
+ Added@libp2p/utils@6.3.0-3c63482e5(transitive)
- Removed@libp2p/crypto@5.0.9(transitive)
- Removed@libp2p/interface-internal@2.2.2(transitive)
- Removed@libp2p/multistream-select@6.0.11(transitive)
- Removed@libp2p/peer-collections@6.0.14(transitive)
- Removed@libp2p/peer-id@5.0.10(transitive)
- Removed@libp2p/peer-record@8.0.14(transitive)
- Removed@libp2p/peer-store@11.0.14(transitive)
- Removed@libp2p/utils@6.3.1(transitive)