aboutsummaryrefslogtreecommitdiff
path: root/libs/stellar-util/stellar-util.js
diff options
context:
space:
mode:
Diffstat (limited to 'libs/stellar-util/stellar-util.js')
-rw-r--r--libs/stellar-util/stellar-util.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/stellar-util/stellar-util.js b/libs/stellar-util/stellar-util.js
new file mode 100644
index 0000000..008dfe6
--- /dev/null
+++ b/libs/stellar-util/stellar-util.js
@@ -0,0 +1,16 @@
1const StellarBase = require('stellar-base');
2const edHd = require('ed25519-hd-key');
3
4window.stellarUtil = {
5 getKeypair: function (path, seed) {
6 const result = edHd.derivePath(path, seed);
7 return StellarBase.Keypair.fromRawEd25519Seed(result.key);
8 },
9 dummyNetwork: {
10 bip32: {public: 0, private: 0},
11 messagePrefix: '',
12 pubKeyHash: 0,
13 scriptHash: 0,
14 wif: 0,
15 },
16}