Skip to content

Commit 1a975b3

Browse files
Merge pull request #162 from Bitcoin-com/stage
TS Updates
2 parents 7f4ee4b + f86ffab commit 1a975b3

5 files changed

Lines changed: 247 additions & 66 deletions

File tree

lib/Crypto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as randomBytes from "randombytes"
1+
import randomBytes from "randombytes"
22
const Bitcoin = require("bitcoincashjs-lib")
33

44
export class Crypto {

lib/Mnemonic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as BIP39 from "bip39"
22
import * as bcl from "bitcoincashjs-lib"
33
// import * as Bitcoin from "bitcoincashjs-lib"
44
import { Buffer } from "buffer"
5-
import * as randomBytes from "randombytes"
5+
import randomBytes from "randombytes"
66
import * as wif from "wif"
77
import { Address } from "./Address"
88
// TODO: convert "bitcoincashjs-lib" require to import

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
"url": "git+https://github.com/Bitcoin-com/bitbox-sdk.git"
3232
},
3333
"dependencies": {
34+
"@types/bigi": "^1.4.2",
35+
"@types/bip39": "^2.4.2",
36+
"@types/randombytes": "^2.0.0",
37+
"@types/socket.io": "^2.1.2",
38+
"@types/socket.io-client": "^1.4.32",
39+
"@types/wif": "^2.0.1",
3440
"assert": "^1.4.1",
3541
"axios": "0.19.0",
3642
"bc-bip68": "^1.0.5",
@@ -57,16 +63,10 @@
5763
},
5864
"devDependencies": {
5965
"@istanbuljs/nyc-config-typescript": "^0.1.3",
60-
"@types/bigi": "^1.4.2",
61-
"@types/bip39": "^2.4.2",
6266
"@types/chai": "^4.1.7",
6367
"@types/mocha": "^5.2.6",
6468
"@types/node": "^10.11.7",
65-
"@types/randombytes": "^2.0.0",
6669
"@types/sinon": "^7.0.11",
67-
"@types/socket.io": "^2.1.2",
68-
"@types/socket.io-client": "^1.4.32",
69-
"@types/wif": "^2.0.1",
7070
"chai": "^4.1.2",
7171
"coveralls": "^3.0.2",
7272
"eslint": "^5.16.0",

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"downlevelIteration": true,
77
"moduleResolution": "node",
88
"lib": ["es2017"],
9-
"sourceMap": true
9+
"sourceMap": true,
10+
"esModuleInterop": true
1011
},
1112
"include": ["./lib", "./test", "./test/unit/**/*.ts"],
1213
"files": ["index.ts"]

0 commit comments

Comments
 (0)