forked from TheTrunk/bitcore-node-zelcash
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from TheTrunk/master
v3.2.0
- Loading branch information
Showing
8 changed files
with
694 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
|
||
#!/bin/bash | ||
|
||
# install needed dependencies | ||
cd | ||
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | ||
sudo apt-get install -y nodejs | ||
sudo apt-get install -y build-essential | ||
sudo apt-get install -y libzmq3-dev | ||
|
||
# MongoDB | ||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 | ||
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.1 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.1.list | ||
sudo apt-get update | ||
sudo apt-get install -y mongodb-org | ||
sudo systemctl enable mongod | ||
sudo service mongod start | ||
|
||
#bitcore-node-zelcash | ||
cd | ||
git clone https://github.com/TheTrunk/bitcore-node-zelcash | ||
cd bitcore-node-zelcash | ||
npm install | ||
cd bin | ||
chmod +x bitcore-node | ||
cp ~/zelcashBitcore/src/zelcashd ~/bitcore-node-zelcash/bin | ||
./bitcore-node create mynode | ||
cd mynode | ||
|
||
rm bitcore-node.json | ||
|
||
cat << EOF > bitcore-node.json | ||
{ | ||
"network": "livenet", | ||
"port": 3001, | ||
"services": [ | ||
"bitcoind", | ||
"insight-api", | ||
"insight-ui", | ||
"web" | ||
], | ||
"messageLog": "", | ||
"servicesConfig": { | ||
"web": { | ||
"disablePolling": false, | ||
"enableSocketRPC": false | ||
}, | ||
"bitcoind": { | ||
"sendTxLog": "./data/pushtx.log", | ||
"spawn": { | ||
"datadir": "./data", | ||
"exec": "../zelcashd", | ||
"rpcqueue": 1000, | ||
"rpcport": 16124, | ||
"zmqpubrawtx": "tcp://127.0.0.1:28332", | ||
"zmqpubhashblock": "tcp://127.0.0.1:28332" | ||
} | ||
}, | ||
"insight-api": { | ||
"routePrefix": "api", | ||
"db": { | ||
"host": "127.0.0.1", | ||
"port": "27017", | ||
"database": "zelcash-api-livenet", | ||
"user": "", | ||
"password": "" | ||
}, | ||
"disableRateLimiter": true | ||
}, | ||
"insight-ui": { | ||
"apiPrefix": "api", | ||
"routePrefix": "" | ||
} | ||
} | ||
} | ||
EOF | ||
|
||
cd data | ||
cat << EOF > zelcash.conf | ||
server=1 | ||
whitelist=127.0.0.1 | ||
txindex=1 | ||
addressindex=1 | ||
timestampindex=1 | ||
spentindex=1 | ||
zmqpubrawtx=tcp://127.0.0.1:28332 | ||
zmqpubhashblock=tcp://127.0.0.1:28332 | ||
rpcport=16124 | ||
rpcallowip=127.0.0.1 | ||
rpcuser=zelcash | ||
rpcpassword=myzelcashpassword | ||
uacomment=bitcore | ||
mempoolexpiry=24 | ||
rpcworkqueue=1100 | ||
maxmempool=2000 | ||
dbcache=1000 | ||
maxtxfee=1.0 | ||
dbmaxfilesize=64 | ||
showmetrics=0 | ||
addnode=explorer.zel.cash | ||
addnode=explorer2.zel.cash | ||
addnode=explorer.zelcash.online | ||
addnode=explorer.zel.zeltrez.io | ||
EOF | ||
|
||
cd .. | ||
cd node_modules | ||
git clone https://github.com/TheTrunk/insight-api | ||
git clone https://github.com/TheTrunk/insight-ui | ||
cd insight-api | ||
npm install | ||
cd .. | ||
cd insight-ui | ||
npm install | ||
cd .. | ||
cd .. | ||
|
||
echo "Explorer is installed" | ||
echo "Then to start explorer navigate to mynode folder and type ../bitcore-node start. Explorer will be accessible on localhost:3001" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# install needed dependencies | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
build-essential pkg-config libc6-dev m4 g++-multilib \ | ||
autoconf libtool ncurses-dev unzip git python \ | ||
zlib1g-dev wget bsdmainutils automake curl | ||
|
||
# zelcashBitcore | ||
cd | ||
git clone -b Bitcore https://github.com/zelcash/zelcash.git zelcashBitcore | ||
cd zelcashBitcore | ||
./zcutil/fetch-params.sh | ||
./zcutil/build.sh -j$(nproc) | ||
cd | ||
echo "Zelcashd with extended RPC functionalities is prepared. Please run following command to install insight explorer for zelcash" | ||
echo "wget -qO- https://raw.githubusercontent.com/TheTrunk/bitcore-node-zelcash/master/installExplorer.sh | bash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.