Comparing version 1.0.1 to 1.1.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.c32ToB58 = exports.b58ToC32 = exports.c32addressDecode = exports.c32address = exports.versions = void 0; | ||
var checksum_1 = require("./checksum"); | ||
var base58check = require("base58check"); | ||
var base58check = require("./base58check"); | ||
exports.versions = { | ||
@@ -6,0 +7,0 @@ mainnet: { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.c32checkDecode = exports.c32checkEncode = void 0; | ||
var buffer_1 = require("buffer/"); | ||
var encoding_1 = require("./encoding"); | ||
var crypto = require("crypto"); | ||
var cross_sha256_1 = require("cross-sha256"); | ||
/** | ||
@@ -11,4 +13,3 @@ * Get the c32check checksum of a hex-encoded string | ||
function c32checksum(dataHex) { | ||
var tmpHash = crypto.createHash('sha256').update(Buffer.from(dataHex, 'hex')).digest(); | ||
var dataHash = crypto.createHash('sha256').update(tmpHash).digest(); | ||
var dataHash = cross_sha256_1.hashSha256(cross_sha256_1.hashSha256(buffer_1.Buffer.from(dataHex, 'hex'))); | ||
var checksum = dataHash.slice(0, 4).toString('hex'); | ||
@@ -15,0 +16,0 @@ return checksum; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.c32decode = exports.c32normalize = exports.c32encode = exports.c32 = void 0; | ||
var buffer_1 = require("buffer/"); | ||
exports.c32 = '0123456789ABCDEFGHJKMNPQRSTVWXYZ'; | ||
@@ -51,3 +53,3 @@ var hex = '0123456789abcdef'; | ||
res = res.slice(C32leadingZeros); | ||
var zeroPrefix = Buffer.from(inputHex, 'hex').toString().match(/^\u0000*/); | ||
var zeroPrefix = buffer_1.Buffer.from(inputHex, 'hex').toString().match(/^\u0000*/); | ||
var numLeadingZeroBytesInHex = zeroPrefix ? zeroPrefix[0].length : 0; | ||
@@ -54,0 +56,0 @@ for (var i = 0; i < numLeadingZeroBytesInHex; i++) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.b58ToC32 = exports.c32ToB58 = exports.versions = exports.c32normalize = exports.c32addressDecode = exports.c32address = exports.c32checkDecode = exports.c32checkEncode = exports.c32decode = exports.c32encode = void 0; | ||
var encoding_1 = require("./encoding"); | ||
exports.c32encode = encoding_1.c32encode; | ||
exports.c32decode = encoding_1.c32decode; | ||
exports.c32normalize = encoding_1.c32normalize; | ||
Object.defineProperty(exports, "c32encode", { enumerable: true, get: function () { return encoding_1.c32encode; } }); | ||
Object.defineProperty(exports, "c32decode", { enumerable: true, get: function () { return encoding_1.c32decode; } }); | ||
Object.defineProperty(exports, "c32normalize", { enumerable: true, get: function () { return encoding_1.c32normalize; } }); | ||
var checksum_1 = require("./checksum"); | ||
exports.c32checkEncode = checksum_1.c32checkEncode; | ||
exports.c32checkDecode = checksum_1.c32checkDecode; | ||
Object.defineProperty(exports, "c32checkEncode", { enumerable: true, get: function () { return checksum_1.c32checkEncode; } }); | ||
Object.defineProperty(exports, "c32checkDecode", { enumerable: true, get: function () { return checksum_1.c32checkDecode; } }); | ||
var address_1 = require("./address"); | ||
exports.c32address = address_1.c32address; | ||
exports.c32addressDecode = address_1.c32addressDecode; | ||
exports.c32ToB58 = address_1.c32ToB58; | ||
exports.b58ToC32 = address_1.b58ToC32; | ||
exports.versions = address_1.versions; | ||
Object.defineProperty(exports, "c32address", { enumerable: true, get: function () { return address_1.c32address; } }); | ||
Object.defineProperty(exports, "c32addressDecode", { enumerable: true, get: function () { return address_1.c32addressDecode; } }); | ||
Object.defineProperty(exports, "c32ToB58", { enumerable: true, get: function () { return address_1.c32ToB58; } }); | ||
Object.defineProperty(exports, "b58ToC32", { enumerable: true, get: function () { return address_1.b58ToC32; } }); | ||
Object.defineProperty(exports, "versions", { enumerable: true, get: function () { return address_1.versions; } }); |
{ | ||
"name": "c32check", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Crockford base-32 checksum encoding", | ||
@@ -9,6 +9,12 @@ "main": "lib/index", | ||
"prettier": "@blockstack/prettier-config", | ||
"browser": { | ||
"crypto": false | ||
}, | ||
"scripts": { | ||
"webpack": "rimraf lib dist && webpack --mode=production", | ||
"webpack:analyze": "rimraf dist && cross-env NODE_ENV=production ANALYZE=true webpack --mode=production", | ||
"compile": "rimraf lib && tsc", | ||
"prepublishOnly": "npm run build", | ||
"prepare": "npm run build", | ||
"postinstall": "npm run build", | ||
"build": "npm run lint && npm run test && npm run webpack && npm run compile", | ||
@@ -76,28 +82,36 @@ "lint": "eslint --ext=.ts -f=codeframe ./src ./tests", | ||
], | ||
"files": [ | ||
"src", | ||
"lib", | ||
"dist" | ||
], | ||
"devDependencies": { | ||
"@babel/core": "^7.7.4", | ||
"@babel/preset-env": "^7.7.4", | ||
"@blockstack/prettier-config": "0.0.4", | ||
"@types/node": "^12.12.14", | ||
"@typescript-eslint/eslint-plugin": "^2.10.0", | ||
"@typescript-eslint/parser": "^2.10.0", | ||
"babel-loader": "^8.0.6", | ||
"codecov": "^3.6.1", | ||
"cross-env": "^6.0.3", | ||
"eslint": "^6.7.2", | ||
"nyc": "^14.1.1", | ||
"prettier": "^1.19.1", | ||
"rimraf": "^3.0.0", | ||
"source-map-support": "^0.5.16", | ||
"tape": "^4.11.0", | ||
"@babel/core": "^7.11.1", | ||
"@babel/preset-env": "^7.11.0", | ||
"@blockstack/prettier-config": "0.0.6", | ||
"@types/bs58": "^4.0.1", | ||
"@types/node": "^8.0.0", | ||
"@typescript-eslint/eslint-plugin": "^3.9.1", | ||
"@typescript-eslint/parser": "^3.9.1", | ||
"babel-loader": "^8.1.0", | ||
"codecov": "^3.7.2", | ||
"cross-env": "^7.0.2", | ||
"eslint": "^7.7.0", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.0.5", | ||
"rimraf": "^3.0.2", | ||
"source-map-support": "^0.5.19", | ||
"tape": "^5.0.1", | ||
"tape-promise": "^4.0.0", | ||
"ts-loader": "^6.2.1", | ||
"ts-node": "^8.5.4", | ||
"typescript": "^3.7.3", | ||
"webpack": "^4.41.2", | ||
"webpack-cli": "^3.3.10" | ||
"ts-loader": "^8.0.2", | ||
"ts-node": "^8.10.2", | ||
"typescript": "^3.9.7", | ||
"webpack": "^4.44.1", | ||
"webpack-bundle-analyzer": "^3.8.0", | ||
"webpack-cli": "^3.3.12" | ||
}, | ||
"dependencies": { | ||
"base58check": "^2.0.0", | ||
"ripemd160": "^2.0.1" | ||
"base-x": "^3.0.8", | ||
"buffer": "^5.6.0", | ||
"cross-sha256": "^1.1.2" | ||
}, | ||
@@ -104,0 +118,0 @@ "engines": { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
219157
3
23
20
964
1
+ Addedbase-x@^3.0.8
+ Addedbuffer@^5.6.0
+ Addedcross-sha256@^1.1.2
+ Addedbase-x@3.0.10(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedcross-sha256@1.2.0(transitive)
+ Addedieee754@1.2.1(transitive)
- Removedbase58check@^2.0.0
- Removedripemd160@^2.0.1
- Removedbase-x@1.1.0(transitive)
- Removedbase58check@2.0.0(transitive)
- Removedbs58@3.1.0(transitive)
- Removedhash-base@3.1.0(transitive)
- Removedinherits@2.0.4(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedripemd160@2.0.2(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)