Skip to content

Backend API for working with the most famous cryptocurrencies: Bitcoin, Ethereum, Zcash, TRON, Monero and Dash

License

Notifications You must be signed in to change notification settings

SamLatsin/crypto-nodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crypto-nodes

Backend HTTP-JSON API for working with the most famous cryptocurrencies: Bitcoin, Ethereum, Zcash, TRON, Monero and Dash.

Overview

Aggregator of the most famous cryptocurrencies written in PHP Phalcon, Python and JavaScript, persistant storage is MySQL. See API documentation.

Use cases

  • Crypto P2P exchange
  • Online marketplace
  • Banking
  • Personal purposes like cold wallet

Features

For all curriencies:

  • Create wallets
  • Check balance
  • Generate new address
  • Check node status
  • Network fee calculation
  • Send cryptocurrency
  • Get history of transactions
  • Wallet recover with progress status
  • Get transaction info
  • Node auto restart on fail or boot

Bitcoin special features:

  • Multiple wallets import by private key or mnemonic
  • Cron task for checking imported wallets and sending all bitcoins to one wallet from them

Zcash special features:

  • Support for transparent addresses (t-address)
  • Support for shielded addresses (z-address)

Ethereum special feature:

  • Support for ERC20 USDT tokens

Tron special feature:

  • Support for TRC20 USDT tokens

What needs to be done

  • Remove external API dependency for Tron and Ethereum networks
  • Add new currencies

Requirements

npm requirments:

  • tron-wallet-hd
  • bip39
  • ethereum-hdwallet
  • readline
  • ethereumjs-tx
  • web3
  • tronweb
  • trongrid

python requirments:

  • base58
  • requests
  • json
  • sys
  • statistics
  • collections

Installation

The installation process may seem quite complicated, but you only need to do it once 😁

Install all requirments.

From command line run:

git clone https://github.com/SamLatsin/crypto-nodes.git
cd /var/www/
mv crypto-nodes/src/ /var/www/crypto-rest-api/

Clone hd-wallet-derive and place it to /var/www/crypto-rest-api/app/:

git clone https://github.com/dan-da/hd-wallet-derive.git
mv hd-wallet-derive /var/www/crypto-rest-api/app/hd-wallet-generator

Import crypto-nodes/db snapshot/main.sql to your Database.

Add all lines from crypto-nodes/configs/crontab.txt to your crontab.

After installing all nodes put corresponding configs to them from crypto-nodes/configs/nodes configs/. Your file structure should be like this:

File structure with blockchain sizes at 10 October 2022

/root/
├── disk1
│   └── xmr (147GB)
├── disk2
│   ├── dash (146GB)
│   ├── tron (using API)
│   └── zec (80GB)
├── disk3
│   └── eth (consensus - 114GB, blockhain - 1.3TB)
└── disk4
    └── btc (463GB)

Edit file /var/www/crypto-rest-api/app/app.php and put your Database credentials.

Edit file /var/www/crypto-rest-api/app/route/load.php and put your API_TRON_TOKEN, API_ETHER_SCAN and generate tokens for all currencies.

After all steps done you can check if API works, check API documentation.

License

Crypto-nodes is open-sourced software licensed under the MIT license

About

Backend API for working with the most famous cryptocurrencies: Bitcoin, Ethereum, Zcash, TRON, Monero and Dash

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published