@libp2p/peer-store 12.0.20 → 12.0.21-7ae12f9b0
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/utils/bytes-to-peer.d.ts +1 -1
- package/dist/src/utils/bytes-to-peer.js +1 -1
- package/dist/src/utils/dedupe-addresses.d.ts +2 -2
- package/dist/src/utils/peer-equals.d.ts +1 -1
- package/dist/src/utils/to-peer-pb.d.ts +3 -3
- package/package.json +11 -11
- package/src/utils/bytes-to-peer.ts +1 -1
- package/src/utils/dedupe-addresses.ts +2 -2
- package/src/utils/peer-equals.ts +1 -1
- package/src/utils/to-peer-pb.ts +3 -3
- package/dist/typedoc-urls.json +0 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Peer as PeerPB } from '../pb/peer.
|
|
1
|
+
import { Peer as PeerPB } from '../pb/peer.ts';
|
|
2
2
|
import type { PeerId, Peer } from '@libp2p/interface';
|
|
3
3
|
export declare function bytesToPeer(peerId: PeerId, buf: Uint8Array, maxAddressAge: number): Peer;
|
|
4
4
|
export declare function pbToPeer(peerId: PeerId, peer: PeerPB, maxAddressAge: number): Peer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { publicKeyFromProtobuf } from '@libp2p/crypto/keys';
|
|
2
2
|
import { peerIdFromPublicKey } from '@libp2p/peer-id';
|
|
3
3
|
import { multiaddr } from '@multiformats/multiaddr';
|
|
4
|
-
import { Peer as PeerPB } from
|
|
4
|
+
import { Peer as PeerPB } from "../pb/peer.js";
|
|
5
5
|
function populatePublicKey(peerId, protobuf) {
|
|
6
6
|
if (peerId.publicKey != null || protobuf.publicKey == null) {
|
|
7
7
|
return peerId;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AddressFilter } from '../index.
|
|
2
|
-
import type { Address as AddressPB } from '../pb/peer.
|
|
1
|
+
import type { AddressFilter } from '../index.ts';
|
|
2
|
+
import type { Address as AddressPB } from '../pb/peer.ts';
|
|
3
3
|
import type { PeerId, Address, AbortOptions } from '@libp2p/interface';
|
|
4
4
|
export declare function dedupeFilterAndSortAddresses(peerId: PeerId, filter: AddressFilter, addresses: Array<Address | AddressPB | undefined>, existingAddresses?: AddressPB[], options?: AbortOptions): Promise<AddressPB[]>;
|
|
5
5
|
//# sourceMappingURL=dedupe-addresses.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AddressFilter } from '../index.
|
|
2
|
-
import type { Peer as PeerPB } from '../pb/peer.
|
|
3
|
-
import type { ExistingPeer } from '../store.
|
|
1
|
+
import type { AddressFilter } from '../index.ts';
|
|
2
|
+
import type { Peer as PeerPB } from '../pb/peer.ts';
|
|
3
|
+
import type { ExistingPeer } from '../store.ts';
|
|
4
4
|
import type { PeerId, PeerData, AbortOptions } from '@libp2p/interface';
|
|
5
5
|
export interface ToPBPeerOptions extends AbortOptions {
|
|
6
6
|
addressFilter?: AddressFilter;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/peer-store",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.21-7ae12f9b0",
|
|
4
4
|
"description": "Stores information about peers libp2p knows on the network",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/peer-store#readme",
|
|
@@ -49,25 +49,25 @@
|
|
|
49
49
|
"test:electron-main": "aegir test -t electron-main"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@libp2p/crypto": "
|
|
53
|
-
"@libp2p/interface": "
|
|
54
|
-
"@libp2p/peer-collections": "
|
|
55
|
-
"@libp2p/peer-id": "
|
|
56
|
-
"@libp2p/peer-record": "
|
|
57
|
-
"@multiformats/multiaddr": "^13.0.
|
|
52
|
+
"@libp2p/crypto": "5.1.19-7ae12f9b0",
|
|
53
|
+
"@libp2p/interface": "3.2.3-7ae12f9b0",
|
|
54
|
+
"@libp2p/peer-collections": "7.0.21-7ae12f9b0",
|
|
55
|
+
"@libp2p/peer-id": "6.0.10-7ae12f9b0",
|
|
56
|
+
"@libp2p/peer-record": "9.0.11-7ae12f9b0",
|
|
57
|
+
"@multiformats/multiaddr": "^13.0.3",
|
|
58
58
|
"interface-datastore": "^9.0.1",
|
|
59
59
|
"it-all": "^3.0.9",
|
|
60
60
|
"main-event": "^1.0.1",
|
|
61
61
|
"mortice": "^3.3.1",
|
|
62
|
-
"multiformats": "^
|
|
62
|
+
"multiformats": "^14.0.0",
|
|
63
63
|
"protons-runtime": "^6.0.1",
|
|
64
64
|
"uint8arraylist": "^2.4.8",
|
|
65
|
-
"uint8arrays": "^
|
|
65
|
+
"uint8arrays": "^6.1.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@libp2p/logger": "
|
|
68
|
+
"@libp2p/logger": "6.2.8-7ae12f9b0",
|
|
69
69
|
"@types/sinon": "^21.0.1",
|
|
70
|
-
"aegir": "^
|
|
70
|
+
"aegir": "^48.0.11",
|
|
71
71
|
"benchmark": "^2.1.4",
|
|
72
72
|
"datastore-core": "^11.0.1",
|
|
73
73
|
"delay": "^7.0.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { publicKeyFromProtobuf } from '@libp2p/crypto/keys'
|
|
2
2
|
import { peerIdFromPublicKey } from '@libp2p/peer-id'
|
|
3
3
|
import { multiaddr } from '@multiformats/multiaddr'
|
|
4
|
-
import { Peer as PeerPB } from '../pb/peer.
|
|
4
|
+
import { Peer as PeerPB } from '../pb/peer.ts'
|
|
5
5
|
import type { PeerId, Peer, Tag } from '@libp2p/interface'
|
|
6
6
|
import type { Digest } from 'multiformats/hashes/digest'
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InvalidParametersError } from '@libp2p/interface'
|
|
2
2
|
import { CODE_P2P, isMultiaddr, multiaddr } from '@multiformats/multiaddr'
|
|
3
|
-
import type { AddressFilter } from '../index.
|
|
4
|
-
import type { Address as AddressPB } from '../pb/peer.
|
|
3
|
+
import type { AddressFilter } from '../index.ts'
|
|
4
|
+
import type { Address as AddressPB } from '../pb/peer.ts'
|
|
5
5
|
import type { PeerId, Address, AbortOptions } from '@libp2p/interface'
|
|
6
6
|
|
|
7
7
|
export async function dedupeFilterAndSortAddresses (peerId: PeerId, filter: AddressFilter, addresses: Array<Address | AddressPB | undefined>, existingAddresses?: AddressPB[], options?: AbortOptions): Promise<AddressPB[]> {
|
package/src/utils/peer-equals.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
|
|
2
|
-
import type { Peer, Address, Tag } from '../pb/peer.
|
|
2
|
+
import type { Peer, Address, Tag } from '../pb/peer.ts'
|
|
3
3
|
|
|
4
4
|
export function peerEquals (peerA: Peer, peerB: Peer): boolean {
|
|
5
5
|
return addressesEqual(peerA.addresses, peerB.addresses) &&
|
package/src/utils/to-peer-pb.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { publicKeyToProtobuf } from '@libp2p/crypto/keys'
|
|
|
3
3
|
import { InvalidParametersError } from '@libp2p/interface'
|
|
4
4
|
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
|
|
5
5
|
import { dedupeFilterAndSortAddresses } from './dedupe-addresses.ts'
|
|
6
|
-
import type { AddressFilter } from '../index.
|
|
7
|
-
import type { Tag, Peer as PeerPB } from '../pb/peer.
|
|
8
|
-
import type { ExistingPeer } from '../store.
|
|
6
|
+
import type { AddressFilter } from '../index.ts'
|
|
7
|
+
import type { Tag, Peer as PeerPB } from '../pb/peer.ts'
|
|
8
|
+
import type { ExistingPeer } from '../store.ts'
|
|
9
9
|
import type { PeerId, Address, PeerData, TagOptions, AbortOptions } from '@libp2p/interface'
|
|
10
10
|
|
|
11
11
|
export interface ToPBPeerOptions extends AbortOptions {
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"AddressFilter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_peer-store.AddressFilter.html",
|
|
3
|
-
".:AddressFilter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_peer-store.AddressFilter.html",
|
|
4
|
-
"PersistentPeerStoreComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_peer-store.PersistentPeerStoreComponents.html",
|
|
5
|
-
".:PersistentPeerStoreComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_peer-store.PersistentPeerStoreComponents.html",
|
|
6
|
-
"PersistentPeerStoreInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_peer-store.PersistentPeerStoreInit.html",
|
|
7
|
-
".:PersistentPeerStoreInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_peer-store.PersistentPeerStoreInit.html",
|
|
8
|
-
"persistentPeerStore": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer-store.persistentPeerStore.html",
|
|
9
|
-
".:persistentPeerStore": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer-store.persistentPeerStore.html"
|
|
10
|
-
}
|