Skip to content

Commit

Permalink
removed crypto that only cause problems
Browse files Browse the repository at this point in the history
  • Loading branch information
BlobMaster41 committed May 5, 2024
1 parent 591f103 commit b9585d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 75 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "@btc-vision/bsi-binary",
"version": "1.0.9",
"version": "1.0.10",
"description": "",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand All @@ -22,14 +22,15 @@
"install": "gulp && gulp cjs"
},
"browser": {
"crypto": "./src/crypto/crypto-browser.js",
"crypto": false,
"stream": false
},
"author": "BlobMaster41",
"license": "LICENSE.MD",
"devDependencies": {
"@babel/preset-env": "^7.24.3",
"@types/node": "^20.11.30",
"@types/sha.js": "^2.4.4",
"eslint": "^8.57.0",
"jest": "^29.7.0",
"prettier": "3.2.5",
Expand All @@ -47,6 +48,7 @@
"gulp-cached": "^1.1.1",
"gulp-logger": "^0.0.2",
"gulp-typescript": "^6.0.0-alpha.1",
"sha.js": "^2.4.11",
"tiny-secp256k1": "^2.2.3",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2"
Expand Down
5 changes: 3 additions & 2 deletions src/abi/ABICoder.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createHash } from 'crypto';
import shajs from 'sha.js';

import { BinaryReader } from '../buffer/BinaryReader.js';
import { BufferHelper } from '../utils/BufferHelper.js';

Expand Down Expand Up @@ -111,6 +112,6 @@ export class ABICoder {
}

private sha256(buffer: Buffer | string | Uint8Array): Buffer {
return createHash('sha256').update(buffer).digest();
return new shajs.sha256().update(buffer).digest();
}
}
71 changes: 0 additions & 71 deletions src/crypto/crypto-browser.js

This file was deleted.

0 comments on commit b9585d3

Please sign in to comment.