Added NANO currency

This commit is contained in:
Joohansson
2020-08-26 11:57:58 +02:00
parent 863eee8ed7
commit e086305895
10 changed files with 4258 additions and 11 deletions

View File

@@ -80,6 +80,23 @@ module.exports.stellarUtil = {
},
}
/* nano-util */
let NanoBase = require('nanocurrency-web');
module.exports.nanoUtil = {
getKeypair: function (index, seed) {
const accounts = NanoBase.wallet.accounts(seed, index, index)
return {privKey: accounts[0].privateKey, pubKey: accounts[0].publicKey, address: accounts[0].address};
},
dummyNetwork: {
bip32: {public: 0, private: 0},
messagePrefix: '',
pubKeyHash: 0,
scriptHash: 0,
wif: 0,
},
}
/* unorm */
module.exports.unorm = require('unorm')

File diff suppressed because it is too large Load Diff

View File

@@ -12,17 +12,18 @@
"bip38grs": "git://github.com/Groestlcoin/bip38grs.git#091975b01679b74dc0a4136bb743fe17791b0151",
"bitcoinjs-lib": "git://github.com/iancoleman/bitcoinjs-lib.git#v3.3.2_16bit",
"bs58": "^4.0.1",
"buffer": "5.4.3",
"buffer": "^5.4.3",
"create-hash": "^1.2.0",
"ed25519-hd-key": "^1.0.0",
"elastos-wallet-js": "git://github.com/johnnynanjiang/Elastos.SDK.Keypair.Javascript.git#491dc51b64efaf0a8aae62028b68e2c8e38fde06",
"ethereumjs-util": "6.0.0",
"handshake-util": "1.2.0",
"fast-levenshtein": "2.0.6",
"groestlcoinjs-lib": "git://github.com/Groestlcoin/groestlcoinjs-lib.git#3.3.2",
"handshake-util": "1.2.0",
"javascript-biginteger": "0.9.2",
"jsrsasign": "^8.0.15",
"kjua": "0.6.0",
"nanocurrency-web": "^1.2.2",
"nebulas": "0.5.6",
"stellar-base": "^0.10.0",
"unorm": "1.6.0",

View File

@@ -0,0 +1,15 @@
const NanoBase = require('nanocurrency-web');
window.nanoUtil = {
getKeypair: function (index, seed) {
const accounts = NanoBase.wallet.accounts(seed, index, index)
return {privKey: accounts[0].privateKey, pubKey: accounts[0].publicKey, address: accounts[0].address};
},
dummyNetwork: {
bip32: {public: 0, private: 0},
messagePrefix: '',
pubKeyHash: 0,
scriptHash: 0,
wif: 0,
},
}

1614
libs/nanocurrency-web/package-lock.json generated Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
{
"name": "nano-util",
"version": "0.0.1",
"scripts": {
"build": "browserify nano-util.js > /tmp/nano-util.js"
},
"dependencies": {
"nanocurrency-web": "^1.2.2"
},
"devDependencies": {
"browserify": "^16.2.3",
"uglify-es": "^3.3.9"
}
}

View File

@@ -0,0 +1,4 @@
Build (will create a bundle and copy it to /tmp/nano-util.js):
npm install
npm run build