I am following the stellar walkthrough for creating two accounts, a source and a destination using the testnet. However, I would like to use my local docker quickstart image to facilitate the transaction. On the walkthrough it says "each account must have a minimum balance of 1 lumen," and this is why the testnet is used. How can I create accounts with my local docker image instead of using testnet so I can send transactions on my local instance to test my app?

Resources for development: https://www.stellar.org/developers/guides/get-started/create-account.html https://www.stellar.org/developers/guides/get-started/transactions.html

Thanks for the help!

1 Answer 1


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:

  1. 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/
  2. SHA256 hash the network_passphrase.
  3. 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.

  • So I have the passphrase and am passing it like so KeyPair pair = KeyPair.fromSecretSeed(ServerInfo.PASSPHRASE); but this is throwing an error response of shadow.com.google.common.io.BaseEncoding$DecodingException: Invalid input length 33 - does this mean I am on the right track and just need to handle this exception? Thanks for the help! Commented Mar 13, 2020 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.