diff --git a/package.json b/package.json index 66ff8ae..599e46d 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "@types/mocha": "^5.2.7", "@typescript-eslint/eslint-plugin": "^2.6.0", "@typescript-eslint/parser": "^2.6.0", - "bn.js-typings": "^1.0.1", "chai": "^4.2.0", "eslint": "^6.6.0", "karma": "^4.4.1", @@ -64,6 +63,7 @@ "webpack": "^4.41.5" }, "dependencies": { + "@types/bn.js": "^4.11.6", "bcrypto": "5.0.3", "bn.js": "^5.0.0", "buffer": "^5.4.3", diff --git a/src/@types/basic.ts b/src/@types/basic.ts index 8e3ad53..0e9ba27 100644 --- a/src/@types/basic.ts +++ b/src/@types/basic.ts @@ -1,4 +1,4 @@ -import { BN } from 'bn.js'; +import BN from 'bn.js'; import { Buffer } from 'buffer'; export type bytes = Buffer; diff --git a/src/handshakes/ik.ts b/src/handshakes/ik.ts index a88c38e..b94f7a2 100644 --- a/src/handshakes/ik.ts +++ b/src/handshakes/ik.ts @@ -1,5 +1,5 @@ import {Buffer} from "buffer"; -import {BN} from "bn.js"; +import BN from "bn.js"; import {CipherState, HandshakeState, MessageBuffer, NoiseSession} from "../@types/handshake"; import {bytes, bytes32} from "../@types/basic"; diff --git a/src/handshakes/xx.ts b/src/handshakes/xx.ts index 94f9f83..0caf6bc 100644 --- a/src/handshakes/xx.ts +++ b/src/handshakes/xx.ts @@ -1,5 +1,5 @@ import { Buffer } from 'buffer'; -import { BN } from 'bn.js'; +import BN from 'bn.js'; import { bytes32, bytes } from '../@types/basic' import { KeyPair } from '../@types/libp2p' diff --git a/tsconfig.json b/tsconfig.json index 075738e..001f7ed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,6 @@ "noImplicitAny": false, "typeRoots": [ "./node_modules/@types", - "./node_modules/bn.js-typings/index.d.ts", "./src/@types" ] }, @@ -16,7 +15,6 @@ "**/src/**/*.ts" ], "exclude": [ - "node_modules", - "./src/@types" + "node_modules" ] } diff --git a/yarn.lock b/yarn.lock index 7f4c6dc..b1af7f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1056,6 +1056,13 @@ dependencies: "@types/node" "*" +"@types/bn.js@^4.11.6": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + "@types/chai@^4.2.4": version "4.2.4" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.4.tgz#8936cffad3c96ec470a2dc26a38c3ba8b9b6f619" @@ -1091,11 +1098,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.3.tgz#65a8d9a6a0f6af55595a2d0020617959130d6495" integrity sha512-QZ9CjUB3QoA3f2afw3utKlfRPhpmufB7jC2+oDhLWnXqoyx333fhKSQDLQu2EK7OE0a15X67eYiRAaJsHXrpMA== -"@types/node@^10.12.12": - version "10.17.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.2.tgz#41b5afbcde1a5a805302a4da3cf399499f1bbf64" - integrity sha512-sAh60KDol+MpwOr1RTK0+HgBEYejKsxdpmrOS1Wts5bI03dLzq8F7T0sRXDKeaEK8iWDlGfdzxrzg6vx/c5pNA== - "@typescript-eslint/eslint-plugin@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.6.0.tgz#e82ed43fc4527b21bfe35c20a2d6e4ed49fc7957" @@ -1650,13 +1652,6 @@ bluebird@^3.3.0, bluebird@^3.5.5: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js-typings@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bn.js-typings/-/bn.js-typings-1.0.1.tgz#00faef56401850b763cee041c0728a9aaf091e7e" - integrity sha512-PdV3AEpI5A8mHCt3KgBobIJ+3rhoxxkRl8b0dCGDgGtJNYmN4KTPLHYq7xOSmKF1Kv06aZ5k8QhXbyG73IyhdQ== - dependencies: - "@types/node" "^10.12.12" - bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.8, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"