diff options
Diffstat (limited to 'libs/nanocurrency-web/nano-util.js')
-rwxr-xr-x | libs/nanocurrency-web/nano-util.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/nanocurrency-web/nano-util.js b/libs/nanocurrency-web/nano-util.js new file mode 100755 index 0000000..ec354f6 --- /dev/null +++ b/libs/nanocurrency-web/nano-util.js | |||
@@ -0,0 +1,15 @@ | |||
1 | const NanoBase = require('nanocurrency-web'); | ||
2 | |||
3 | window.nanoUtil = { | ||
4 | getKeypair: function (index, seed) { | ||
5 | const accounts = NanoBase.wallet.accounts(seed, index, index) | ||
6 | return {privKey: accounts[0].privateKey, pubKey: accounts[0].publicKey, address: accounts[0].address}; | ||
7 | }, | ||
8 | dummyNetwork: { | ||
9 | bip32: {public: 0, private: 0}, | ||
10 | messagePrefix: '', | ||
11 | pubKeyHash: 0, | ||
12 | scriptHash: 0, | ||
13 | wif: 0, | ||
14 | }, | ||
15 | } | ||