Connect to a public node

NodeChain gives you the possibility to connect your own remote nodes to use the Wrapper APIs.

To do so, first follow the steps below:

  1. Start NodeChain and choose the currency and network that most closely resembles the one of your remote node:

$ ./nodechain.py start
---------------------------------------------------
  _  _          _        ___  _                   
 | \| | ___  __| | ___  / __|| |_   __ _ (_) _ _  
 | .` |/ _ \/ _` |/ -_)| (__ | ' \ / _` || || ' \ 
 |_|\_|\___/\__,_|\___| \___||_||_|\__,_||_||_||_|
---------------------------------------------------
===================================================
                CONNECTOR CONFIG
===================================================
Port to start: 60000
Port to start (SSL): 443
Starting network nodechain-network.
nodechain-network is already started
Starting connector and reverse proxy... This might take a while.
Connector has been started
===================================================
                BLOCKCHAIN SELECTION
===================================================
[OFF]          1.Bitcoin
[OFF]          2.Ethereum
[OFF]          3.Bitcoin-cash
[OFF]          4.Terra
               5.Exit
Please choose the blockchain that you want to use to build up/stop the node(1-5): 2
===================================================
                NETWORK SELECTION
===================================================
[OFF]          1.Regtest
[OFF]          2.Testnet
[OFF]          3.Mainnet
               4.Exit
Please choose the network that you want to use (1-4): 2
Please choose the directory to save blockchain data (/srv/nodechain-node/eth_testnet): 

2. Check the option to start a remote node and indicate that you want to configure the API with your own endpoints:

Do you want to connect to a remote node?: [y/N]: y
Do you want to use the default configuration for the API  [Y/n]: n
You need to configure the endpoints to start the node.
Please, introduce a value for rpcEndpoint: https://ropsten.infura.io/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxx1592
Please, introduce a value for wsEndpoint: wss://ropsten.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxx1592
Please, introduce a value for indexerEndpoint: http://postgrest-testnet:3000
eth testnet has registered succesfully in the connector

Congratulations! Now you can use the remote node to handle any request from the Wrapper API.

Last updated