Building the private test Stellar network

For building our project, we'll launch a simple Stellar network that contains a single blockchain node and a single client/server. The blockchain node in Stellar is called Stellar Core, while the client-server is called Horizon. Horizon is a client API server that extends a suite of handful endpoints, allowing application developers to view transaction data and statistics, and to submit transactions to the core blockchain node. Similar to web3-js, Stellar has a JavaScript SDK that allows us to build requests in order to interact with Horizon.

Stellar provides a handy Docker image that can be used to quickly launch an ephemeral (temporary) or persistent (permanent) container for implementing the Stellar network. This Docker container contains an instance of Stellar Core, an instance of Horizon, installed dependencies such as PostgreSQL, and a Go environment.

To launch this Docker image, simply run the following command on a terminal window:

docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --standalone

This command downloads the Stellar/QuickStart image from the Docker repository and runs a container with Stellar Core and Horizon. Notice the Docker proxy port at 8000. The Docker proxy port extends the Horizon port inside the container. Thus, any requests to Horizon can be submitted to the 8000 port of the local machine. 

Wait for the container to come online. It will initiate a PostgreSQL database, Stellar Core, and Horizon. After the container comes online successfully, you should be able to see the docker-proxy on port 8000 on your machine. Open a browser window and go to http://localhost:8000.

You should be able to see Horizon and the API endpoints and application details. Notice the list of endpoints for submitting requests to the client/server.

OK. Now, let's move on to account creation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.217.228