Now, let's run this utility. Navigate back to the Node.js project on the terminal window.
Run the following command to run the utility:
node CreateAccount.js
The utility will first log the master key to the console, and then the three newly created accounts. The string starting with S is the account's secret key. The string starting with G is the public key or account ID, as shown in the following code block:
Master Account SC5O7VZUXDJ6JBDSZ74DSERXL7W3Y5LTOAMRF7RQRL3TAGAPS7LUVG3L GBZXN7PIRZGNMHGA7MUUUF4GWPY5AYPV6LY4UV2GL6VJGIQRXFDNMADI
Account1 SDHH7CAELIMPNZPRFEBJHSFP24B7UEAAJVW2PMR5AZP5OESHH435DZFC GBUM3XRJKUVEQA4UF63CUCS3P72C5AZTRYI2VKELS7T7DVCCLV3DODNE
Account2 SCUN3DL3OCSU6SQ6K4BU3SIG7OHPKKUGFAR25CJG2JUSNIGGU3OCSVAS GDM3ACVBVHZXPYHQYTMQFS42DSIU7AVIZS4ARWNQGUNGL55BPCBUJV6C
Account3 SDOE7ICIYRSH74VWUTO52T24BDZBYHRYSYAPS5V73Z37WLYQNA6B4PP4 GCCHNGQFPZOSCT2FKVZGMCK5OTVMJEKMUTDLHKV22J5XKF3ROUSECBXC
Copy these accounts and store them safely for reference. We'll need these later.
Wait for the utility to fire the createAccount transaction and print a response to the console. A successful response indicates the three accounts have been created—and funded, as well.
You can verify this by yourself. Open a new browser window. Paste the following link to view the newly created accounts: http://localhost:8000/accounts/<Account ID>; For example, http://localhost:8000/accounts/GBUM3XRJKUVEQA4UF63CUCS3P72C5AZTRYI2VKELS7T7DVCCLV3DODNE.
You should be able to view the account. Scroll down and check out the balance for the native asset, as follows:
"balances": [ { "balance": "100000.0000000", "buying_liabilities": "0.0000000", "selling_liabilities": "0.0000000", "asset_type": "native" }
Keep the secret key and public key for these three accounts safe. Now, let's write a nodejs utility in order to create the assets and extend the trustlines.