Before we can create our assets and exchange, we need to create our user accounts. Stellar accounts are similar to Ethereum accounts, and they allow users to interact with the Stellar network through transactions. They contain a public key (which is referred to as an account ID) and a secret key or private key, which is used to sign transactions submitted to the ledger.
The stellar-sdk provides a utility called Keypair.random, which generates a random ed25519 public-private key pair that can be used as a Stellar account. For a public-private key pair to be a valid account on the Stellar network, it needs a minimum balance of 20 lumens.
To create an account on our private network, we'll generate a new public-private key pair and fund it with a balance of more than 20 lumens.
To do so, we'll write a small node-js application that will generate...