Now that we have the core Hyperledger node running, we can use our node.js client to interact with it and send queries. Before we can get started, though, we’ll need to launch our node and configure some users and permissions.
First, you’ll want to run the initialization script. This is similar to byfn.sh from the previous example.
Now that the node is running, we’ll need to run a script to set up an admin user. This will also generate key files for this user, which we will need in order to begin interacting with our testing network nodes.
Every application requires this functionality to register a first user (our admin) who can then register subsequent users. The admin user shouldn’t ever be used to update/query the ledger, and really only exists as a root source of trust in the system. This is somewhat similar to how the genesis block is added in public blockchains.
To add a regular user, we can use the following script: