Skip to content

Commit

Permalink
chore: update libp2p dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Jan 11, 2024
1 parent acb4792 commit 74b539d
Show file tree
Hide file tree
Showing 11 changed files with 1,208 additions and 1,381 deletions.
6 changes: 3 additions & 3 deletions packages/discv5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@
},
"homepage": "https://github.com/ChainSafe/discv5#readme",
"devDependencies": {
"@libp2p/peer-id-factory": "^3.0.9"
"@libp2p/peer-id-factory": "^4.0.3"
},
"dependencies": {
"@chainsafe/enr": "^2.0.1",
"@libp2p/crypto": "^3.0.0",
"@libp2p/interface": "^1.0.0",
"@libp2p/crypto": "^3.0.4",
"@libp2p/interface": "^1.1.1",
"@multiformats/multiaddr": "^12.1.10",
"bcrypto": "^5.4.0",
"bigint-buffer": "^1.1.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/discv5/src/keypair/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { KeyType } from "@libp2p/interface/keys";
import { KeyType } from "@libp2p/interface";

import { IKeypair } from "./types.js";
import { ERR_TYPE_NOT_IMPLEMENTED } from "./constants.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/discv5/src/keypair/secp256k1.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import secp256k1 from "bcrypto/lib/secp256k1.js";
import { KeyType } from "@libp2p/interface/keys";
import { KeyType } from "@libp2p/interface";
import { AbstractKeypair, IKeypair, IKeypairClass } from "./types.js";
import { ERR_INVALID_KEYPAIR_TYPE } from "./constants.js";

Expand Down
2 changes: 1 addition & 1 deletion packages/discv5/src/keypair/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { KeyType } from "@libp2p/interface/keys";
import { KeyType } from "@libp2p/interface";

export interface IKeypair {
type: KeyType;
Expand Down
13 changes: 9 additions & 4 deletions packages/discv5/src/libp2p/discv5.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { PeerId } from "@libp2p/interface/peer-id";
import { PeerDiscovery, PeerDiscoveryEvents, peerDiscoverySymbol } from "@libp2p/interface/peer-discovery";
import { PeerInfo } from "@libp2p/interface/peer-info";
import { CustomEvent, TypedEventEmitter } from "@libp2p/interface/events";
import {
CustomEvent,
PeerDiscovery,
PeerDiscoveryEvents,
peerDiscoverySymbol,
PeerId,
PeerInfo,
TypedEventEmitter,
} from "@libp2p/interface";
import { Multiaddr, multiaddr } from "@multiformats/multiaddr";
import { ENR } from "@chainsafe/enr";

Expand Down
2 changes: 1 addition & 1 deletion packages/discv5/src/service/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { EventEmitter } from "events";
import debug from "debug";
import { randomBytes } from "@libp2p/crypto";
import { Multiaddr } from "@multiformats/multiaddr";
import { PeerId } from "@libp2p/interface/peer-id";
import { PeerId } from "@libp2p/interface";
import {
createPeerIdFromPublicKey,
createPrivateKeyFromPeerId,
Expand Down
2 changes: 1 addition & 1 deletion packages/discv5/test/e2e/connect.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env mocha */
import { expect } from "chai";
import { multiaddr } from "@multiformats/multiaddr";
import { PeerId } from "@libp2p/interface/peer-id";
import { PeerId } from "@libp2p/interface";
import { createFromPrivKey } from "@libp2p/peer-id-factory";
import { unmarshalPrivateKey } from "@libp2p/crypto/keys";
import { SignableENR } from "@chainsafe/enr";
Expand Down
8 changes: 4 additions & 4 deletions packages/enr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
},
"homepage": "https://github.com/ChainSafe/discv5#readme",
"devDependencies": {
"@libp2p/peer-id-factory": "^3.0.1",
"@libp2p/peer-id-factory": "^4.0.3",
"@types/bn.js": "^4.11.5"
},
"dependencies": {
"@libp2p/crypto": "^3.0.0",
"@libp2p/interface": "^1.0.0",
"@libp2p/peer-id": "^4.0.0",
"@libp2p/crypto": "^3.0.4",
"@libp2p/interface": "^1.1.1",
"@libp2p/peer-id": "^4.0.4",
"@multiformats/multiaddr": "^12.1.10",
"base64url": "^3.0.1",
"bcrypto": "^5.4.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/enr/src/enr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { Multiaddr, multiaddr, protocols } from "@multiformats/multiaddr";
import base64url from "base64url";
import { toBigIntBE } from "bigint-buffer";
import * as RLP from "rlp";
import { KeyType } from "@libp2p/interface/keys";
import { PeerId } from "@libp2p/interface/peer-id";
import { KeyType, PeerId } from "@libp2p/interface";
import { convertToString, convertToBytes } from "@multiformats/multiaddr/convert";
import { encode as varintEncode } from "uint8-varint";

Expand Down
3 changes: 1 addition & 2 deletions packages/enr/src/peerId.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { PeerId } from "@libp2p/interface/peer-id";
import { KeyType, PeerId } from "@libp2p/interface";
import { peerIdFromKeys } from "@libp2p/peer-id";
import { keysPBM, supportedKeys } from "@libp2p/crypto/keys";
import { KeyType } from "@libp2p/interface/keys";

export const ERR_TYPE_NOT_IMPLEMENTED = "Keypair type not implemented";

Expand Down
Loading

0 comments on commit 74b539d

Please sign in to comment.