Skip to content

Nodechain is a service that allows you to create nodes on a blockchain and connect to them natively through APIs. The goal is to allow the user to build their own nodes natively without having to rely on external services.

License

Notifications You must be signed in to change notification settings

hippocampusSwapper/NodeChain

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeChain

RedditBitcointalkEthereum StackExchangeTwitterMediumDocs


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.


Getting Started

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.

Prerequisites

Installing

Only APIs (Connector service)

  1. Clone the project in your computer or your server
~$ git clone https://github.com/swappermarket/NodeChain.git
  1. Create a new configuration with the following environmental variables: COIN=<YOUR_COIN>,STAGE=DEV. You can also set up PORT, SSL_PORT, NGINX_CONFIG_PATH, CERT_PATH, BLOCKCHAIN_PATH but this is not needed to build only the Connector.

  2. Navigate to /Connector and run:

~$ pip install -r "requirements.txt"
  1. 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

Full nodes (Connector service + Blockchain nodes)

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.

  1. Clone the project in your computer or your server
~$ git clone https://github.com/swappermarket/NodeChain.git
  1. Navigate to /scripts and install the requirements:
~$ pip install -r "requirements.txt"
  1. Run the script to build any API:
~$ python3 buildapi.py
  1. 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)

Deployment

Start any API

  1. Clone the project in your computer or your server
~$ git clone https://github.com/swappermarket/NodeChain.git
  1. Navigate to /scripts and install the requirements:
~$ pip install -r "requirements.txt"
  1. Run the script to build any API:
~$ python3 buildapi.py
  1. 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

Stop any API

  1. Navigate to /scripts and run the script to stop any running API:
~$ python3 buildapi.py
  1. Choose the API you want to stop.

Usage

NodeChain uses the JSON RPC protocol for API requests. The API provides the following endpoints:

  • https://<URL-SERVER>:<PORT>/rpc for RPC requests.
  • wss://<URL-SERVER>:<PORT>/ws for real time requests.

Contributing

Please read Contribution Guidelines for details on our code of conduct, and the process for submitting pull requests to us.

Docs

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.

Version

Please read Contribution Guidelines for details on our versioning system. For the version available, see the tags on this repository.

License

This software is licensed under the MIT License. See LICENSE for the full details.

Motivation and Vision

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.

Related projects

About

Nodechain is a service that allows you to create nodes on a blockchain and connect to them natively through APIs. The goal is to allow the user to build their own nodes natively without having to rely on external services.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 94.0%
  • Dockerfile 3.9%
  • Shell 2.1%