Reddit • Bitcointalk • Ethereum StackExchange • Twitter • Medium • Docs
Nodechain is a service that allows you to create nodes on a blockchain and connect to them natively through the JSON-RPC protocol to its API. In short, it allows the user to build and manage their own nodes natively without having to rely on external services.
This repository contains all the code related to the RPC and WS APIs, including the connection to the APIs of the native nodes of each blockchain.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Clone the project in your computer or your server
~$ git clone https://github.com/swappermarket/NodeChain.git-
Create a new configuration with the following environmental variables:
COIN=<YOUR_COIN>,STAGE=DEV. You can also set upPORT,SSL_PORT,NGINX_CONFIG_PATH,CERT_PATH,BLOCKCHAIN_PATHbut this is not needed to build only the Connector. -
Navigate to
/Connectorand run:
~$ pip install -r "requirements.txt"- Run the server.
To set the connection with the APIs of the native nodes of each blockchain you can modify the file /<API>/connector.py
IMPORTANT: To work with full nodes in development mode, You need to have the blockchain synchronized for its use. If the blockchain is not synchronized locally, connection to public nodes may be necessary.
- Clone the project in your computer or your server
~$ git clone https://github.com/swappermarket/NodeChain.git- Navigate to
/scriptsand install the requirements:
~$ pip install -r "requirements.txt"- Run the script to build any API:
~$ python3 buildapi.py-
Follow the steps of the script:
- Choose an API to build
- Choose a port where you want to build the API
- Choose a path where you want to store the Blockchain
- Choose a port where you want to bind SSL port
- Choose if you want to add SSL to your node.
(To activate SSL note that you need to have the files swapper_cert.key and swapper_cert.crt in the certificates directory)
- Clone the project in your computer or your server
~$ git clone https://github.com/swappermarket/NodeChain.git- Navigate to
/scriptsand install the requirements:
~$ pip install -r "requirements.txt"- Run the script to build any API:
~$ python3 buildapi.py-
Follow the steps of the script:
- Choose an API to build
- Choose a port where you want to build the API
- Choose a path where you want to store the Blockchain
- Choose a port where you want to bind SSL port
- Choose if you want to add SSL to your node.
(To activate SSL note that you need to have the files swapper_cert.key and swapper_cert.crt in the certificates directory)
IMPORTANT: You must use a different port for each API
- Navigate to
/scriptsand run the script to stop any running API:
~$ python3 buildapi.py- Choose the API you want to stop.
NodeChain uses the JSON RPC protocol for API requests. The API provides the following endpoints:
https://<URL-SERVER>:<PORT>/rpcfor RPC requests.wss://<URL-SERVER>:<PORT>/wsfor real time requests.
Please read Contribution Guidelines for details on our code of conduct, and the process for submitting pull requests to us.
We use Swagger for docs. All the documentation concerning Nodechain is available at NodeChain Docs
All changes to the documentation must be made in the NodeChain-docs repository.
Please read Contribution Guidelines for details on our versioning system. For the version available, see the tags on this repository.
This software is licensed under the MIT License. See LICENSE for the full details.
The main goal of the project is to give the user an easy way to be able to build their own blockchain nodes without external services, either in built on their own local machines or on production servers. We believe in decentralizing the world and work to make it easily accessible to everyone.