Creating user accounts

Before we can create the US dollar asset, 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 that are submitted to the ledger.

The stellar-sdk provides a utility called Keypair.random which generates a random ed25519 public-private key pair. This 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. Lumens is the native currency of the Stellar network. Thus, to create an account on our private network, we'll need to 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 new key pairs and fund them.

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

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