Skip to content

Commit

Permalink
Fix dependency security issue. Bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
tboydston committed Jan 2, 2023
1 parent 8e78cc0 commit 004972a
Show file tree
Hide file tree
Showing 67 changed files with 2,999 additions and 8,037 deletions.
12 changes: 10 additions & 2 deletions hdAddressGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ const bip38 = require("bip38");
const edHd = require("ed25519-hd-key");
const basex = require("base-x");
const bs58 = require("bs58");
const bs58check = require("bs58check");

const createHash = require("create-hash");
const pubConvert = require("pubkeyconverter");

// Coin specific libs
const bitcoin = require("bitcoinjs-lib");
Expand Down Expand Up @@ -102,7 +103,7 @@ class AddressGenerator {

// If a BIP 49 'y' or BIP 141 'z' xpub is submitted it is converted to an 'x' pub it can be processed.
this.extPub = extPub;
this.xpub = extPub === false ? false : pubConvert.pubToXpub(extPub);
this.xpub = extPub === false ? false : this.pubToXpub(extPub);

if (seed !== false) {
this.seed = Buffer.from(seed, "hex");
Expand Down Expand Up @@ -892,6 +893,13 @@ class AddressGenerator {
}/${index}${this.hardened ? "'" : ""}`;
}

pubToXpub(pub) {
let data = bs58check.decode(pub);
data = data.slice(4);
data = Buffer.concat([Buffer.from("0488b21e", "hex"), data]);
return bs58check.encode(data);
}

/**
* Checks if a coin has a test in the 'coins' folder.
* @param {string} coinName Short name of the coin.
Expand Down
2 changes: 1 addition & 1 deletion node_modules/base-x/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/base-x/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions node_modules/base-x/src/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions node_modules/bignumber.js/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 0 additions & 23 deletions node_modules/bignumber.js/LICENCE

This file was deleted.

113 changes: 67 additions & 46 deletions node_modules/bignumber.js/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/bignumber.js/bignumber.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions node_modules/bignumber.js/bignumber.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/bignumber.js/bignumber.min.js

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/bignumber.js/bignumber.min.js.map

This file was deleted.

Loading

0 comments on commit 004972a

Please sign in to comment.