How can I send lumens over local docker quickstart image using accounts made on local image and not the testnet
How can I send lumens over local docker quickstart image using accounts made on local image and not the testnet
Loading saved threads...
Bobby Garza · External communityPost link
External question — Stellar Stack Exchange
Author: Bobby Garza
Original post: https://stellar.stackexchange.com/questions/3021
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
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!
Quote
Report
Synesso · External communityPost link
External answer — Stellar Stack Exchange
Author: Synesso
Original post: https://stellar.stackexchange.com/a/3027
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
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.
Quote
Report
Post Reply
Checking account access…