Writing the CreateAccount utility

Let's start writing our Node.js create account utility, as follows:

  1. Create a new nodejs project directory. Install the stellar-sdk JavaScript module by executing the following command in the directory:
npm install --save stellar-sdk
  1. Create a new project file called CreateAccount.js.
  2. Start by importing the stellar-sdk, as follows:
const StellarSdk = require('stellar-sdk');
  1. Next, we'll define a new instance of the stellar-sdk, pointed to our local Horizon instance:
const server = new StellarSdk.Server('http://127.0.0.1:8000', {allowHttp: true});const passphrase = 'Standalone Network ; February 2017'
  1. The passphrase allows only selected users to connect to our network. You can find the network passphrase ...

Get Blockchain Development for Finance Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.