At network creation there exists a master account with all of the lumen that will ever exist. The secret key for this account is derived from the network's configured
network_passphrase - e.g.
"Standalone Network ; February 2017".
Here's how you get the secret seed:
- Check the config for the network passphrase. If Horizon is running, you can just get it from the root document. e.g. from https://horizon.stellar.org/ or for the standalone network http://localhost:8000/
- SHA256 hash the network_passphrase.
- Your SDK should have a method to construct the key from this hash. e.g. https://github.com/Synesso/scala-stellar-sdk/blob/master/src/main/scala/stellar/sdk/KeyPair.scala#L138-L148
(If you were using the Scala SDK you could just use
StandaloneNetwork.masterAccount to replace the steps above).
Once you have that key, you can create new accounts.
You might be asking, how is it secure that the secret seed of the master account can be derived by anybody? The answer is that you should immediately create a new account for which only you know the secret and move all the lumens into that new account. You can also set the master key's weight to zero for good measure. Then it doesn't matter who gets the secret from the master account.