mirror of https://github.com/status-im/js-waku.git
Upgrade libp2p packages
This commit is contained in:
parent
1a232999ae
commit
2c66f86e91
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
|
@ -52,19 +52,19 @@
|
|||
"dependencies": {
|
||||
"@bitauth/libauth": "^1.17.1",
|
||||
"debug": "^4.3.1",
|
||||
"it-concat": "^1.0.3",
|
||||
"it-length-prefixed": "^3.1.0",
|
||||
"libp2p": "^0.31.0-rc.3",
|
||||
"libp2p-gossipsub": "^0.7.0",
|
||||
"libp2p-mplex": "^0.10.2",
|
||||
"libp2p-noise": "^2.0.5",
|
||||
"it-concat": "^2.0.0",
|
||||
"it-length-prefixed": "^5.0.2",
|
||||
"libp2p": "^0.31.0",
|
||||
"libp2p-gossipsub": "^0.9.0",
|
||||
"libp2p-mplex": "^0.10.3",
|
||||
"libp2p-noise": "^3.0.0",
|
||||
"libp2p-secio": "^0.13.1",
|
||||
"libp2p-tcp": "^0.15.3",
|
||||
"libp2p-websockets": "^0.15.5",
|
||||
"libp2p-tcp": "^0.15.4",
|
||||
"libp2p-websockets": "^0.15.6",
|
||||
"multiaddr": "^9.0.1",
|
||||
"prompt-sync": "^4.2.0",
|
||||
"ts-proto": "^1.79.3",
|
||||
"uuid": "^3.4.0",
|
||||
"ts-proto": "^1.79.7",
|
||||
"uuid": "^8.3.2",
|
||||
"yarg": "^1.0.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
import Libp2p from 'libp2p';
|
||||
import Gossipsub from 'libp2p-gossipsub';
|
||||
import {
|
||||
AddrInfo,
|
||||
Libp2p,
|
||||
MessageIdFunction,
|
||||
} from 'libp2p-gossipsub/src/interfaces';
|
||||
import { ControlPrune, PeerInfo } from 'libp2p-gossipsub/src/message';
|
||||
import { AddrInfo, MessageIdFunction } from 'libp2p-gossipsub/src/interfaces';
|
||||
import { MessageCache } from 'libp2p-gossipsub/src/message-cache';
|
||||
import { RPC } from 'libp2p-gossipsub/src/message/rpc';
|
||||
import {
|
||||
PeerScoreParams,
|
||||
PeerScoreThresholds,
|
||||
|
@ -307,13 +304,13 @@ export class WakuRelay extends Gossipsub {
|
|||
* @param {string} id
|
||||
* @param {string} topic
|
||||
* @param {boolean} doPX
|
||||
* @returns {ControlPrune}
|
||||
* @returns {RPC.IControlPrune}
|
||||
*/
|
||||
_makePrune(id: string, topic: string, doPX: boolean): ControlPrune {
|
||||
_makePrune(id: string, topic: string, doPX: boolean): RPC.IControlPrune {
|
||||
// backoff is measured in seconds
|
||||
// RelayPruneBackoff is measured in milliseconds
|
||||
const backoff = constants.RelayPruneBackoff / 1000;
|
||||
const px: PeerInfo[] = [];
|
||||
const px: RPC.IPeerInfo[] = [];
|
||||
if (doPX) {
|
||||
// select peers for Peer eXchange
|
||||
const peers = getRelayPeers(
|
||||
|
|
|
@ -138,7 +138,14 @@ function base64FromBytes(arr: Uint8Array): string {
|
|||
return btoa(bin.join(''));
|
||||
}
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined;
|
||||
type Builtin =
|
||||
| Date
|
||||
| Function
|
||||
| Uint8Array
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined;
|
||||
export type DeepPartial<T> = T extends Builtin
|
||||
? T
|
||||
: T extends Array<infer U>
|
||||
|
|
|
@ -156,7 +156,14 @@ function base64FromBytes(arr: Uint8Array): string {
|
|||
return btoa(bin.join(''));
|
||||
}
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined;
|
||||
type Builtin =
|
||||
| Date
|
||||
| Function
|
||||
| Uint8Array
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined;
|
||||
export type DeepPartial<T> = T extends Builtin
|
||||
? T
|
||||
: T extends Array<infer U>
|
||||
|
|
|
@ -649,7 +649,14 @@ function base64FromBytes(arr: Uint8Array): string {
|
|||
return btoa(bin.join(''));
|
||||
}
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined;
|
||||
type Builtin =
|
||||
| Date
|
||||
| Function
|
||||
| Uint8Array
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined;
|
||||
export type DeepPartial<T> = T extends Builtin
|
||||
? T
|
||||
: T extends Array<infer U>
|
||||
|
|
Loading…
Reference in New Issue