Skip to content

Commit afd7d7f

Browse files
committed
Use bn.js without types
1 parent f969973 commit afd7d7f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
},
3636
"homepage": "https://github.com/CodeChain-io/codechain-primitives-js#readme",
3737
"devDependencies": {
38-
"@types/bn.js": "^4.11.2",
3938
"@types/crypto-js": "^3.1.43",
4039
"@types/jest": "^23.3.2",
4140
"@types/lodash": "^4.14.116",

src/key/schnorr.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
import BN = require("bn.js");
21
import { md } from "node-forge";
32

3+
/**
4+
* @hidden
5+
*/
6+
const BN = require("bn.js");
47
/**
58
* @hidden
69
*/
@@ -22,10 +25,7 @@ export interface SchnorrSignature {
2225
s: string;
2326
}
2427

25-
/**
26-
* @hidden
27-
*/
28-
export function schnorrHash(r: BN, msg: BN): string {
28+
function schnorrHash(r: any, msg: any): string {
2929
// codechain-sdk is now importing a library from bitcore.
3030
// But the library monkey patches bn.js so that the method parametrization changes when imported.
3131
// toBuffer("be", 32) does not guarantee the buffer length to be 32 if overridden.

0 commit comments

Comments
 (0)