From 8017442c509ef1fa545367e727608bdc91bc1504 Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Wed, 25 Sep 2019 09:24:52 +1000 Subject: Add experimental incomplete combined js libs --- libs/combined/index.js | 43 +++++++++++++++++++++++++++++++++++++++++++ libs/combined/package.json | 19 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 libs/combined/index.js create mode 100644 libs/combined/package.json (limited to 'libs') diff --git a/libs/combined/index.js b/libs/combined/index.js new file mode 100644 index 0000000..cd97612 --- /dev/null +++ b/libs/combined/index.js @@ -0,0 +1,43 @@ +/* base-x */ + +let basex = require('base-x') + +/* bitcoinjs-bip38 */ + +let bip38 = require('bip38') + +/* bitcoinjs-lib */ + +let bitcoin = require('bitcoinjs-lib') + +/* ethereum-util */ + +let ethUtil = require('ethereumjs-util') + +/* stellar-util */ + +let StellarBase = require('stellar-base'); +let edHd = require('ed25519-hd-key'); +let stellarUtil = { + getKeypair: function (path, seed) { + const result = edHd.derivePath(path, seed); + return StellarBase.Keypair.fromRawEd25519Seed(result.key); + }, + dummyNetwork: { + bip32: {public: 0, private: 0}, + messagePrefix: '', + pubKeyHash: 0, + scriptHash: 0, + wif: 0, + }, +} + +/* exports */ + +module.exports = { + basex, + bip38, + bitcoin, + ethUtil, + stellarUtil +} diff --git a/libs/combined/package.json b/libs/combined/package.json new file mode 100644 index 0000000..93ffe40 --- /dev/null +++ b/libs/combined/package.json @@ -0,0 +1,19 @@ +{ + "name": "bip39-tool-external-libs", + "version": "0.4.0", + "scripts": { + "build": "browserify index.js --standalone libs > /tmp/bip39-libs.js" + }, + "dependencies": { + "bip38": "2.0.2", + "bitcoinjs-lib": "3.3.2", + "base-x": "3.0.7", + "ed25519-hd-key": "^1.0.0", + "ethereumjs-util": "6.0.0", + "stellar-base": "^0.10.0" + }, + "devDependencies": { + "browserify": "^16.2.3", + "uglify-es": "^3.3.9" + } +} -- cgit v1.2.3