]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Add experimental incomplete combined js libs
authorIan Coleman <ian@iancoleman.io>
Tue, 24 Sep 2019 23:24:52 +0000 (09:24 +1000)
committerIan Coleman <ian@iancoleman.io>
Thu, 19 Dec 2019 03:21:25 +0000 (14:21 +1100)
libs/combined/index.js [new file with mode: 0644]
libs/combined/package.json [new file with mode: 0644]

diff --git a/libs/combined/index.js b/libs/combined/index.js
new file mode 100644 (file)
index 0000000..cd97612
--- /dev/null
@@ -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 (file)
index 0000000..93ffe40
--- /dev/null
@@ -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"
+  }
+}