8

I have been practicing with the test-net for a while and creating test accounts with the friendbot. Now I want to create a real account throught the API with the lumens that I already have. Is there any way to do that?

Thanks for your help.

2 Answers 2

4

To create a new account you issue a transaction with the CreateAccount operation. It's very similar to a Payment operation, but has the side-effect of creating a new account. This is essentially what friendbot is doing.

You can test this approach on testnet via the laboratory.

  1. Generate an account (but don't use friendbot to fund it).
  2. Create a new transaction.
    1. The Source account is the account id of the account you are paying from.
    2. Having entered that, the fetch next sequence number button will appear. Click it.
  3. Scroll down to the operations drop-down list and choose "Create Account"
    1. Destination is the account id of the account you wish to create (step #1 above)
    2. Nominate a starting balance
    3. Click sign in transaction signer
  4. Sign the transaction
    1. Scroll down to the signatures section and add the secret key of the account you are paying from. (Take a moment to make sure you're really on stellar.org)
    2. Click Submit to Post Transaction endpoint
    3. Click submit
1
  • I know this is old but can't find any docs online to help. The caveat I'm noticing is the source account must be an account that's funded that you have the private/secret key for. For example, I want to create a new account that I generate via the SDK, but I don't have a funded source account where I have the seed for (my funded account is on Coinbase for example). How do I create and fund a new Stellar account from a funded account on Coinbase? Commented Mar 27, 2020 at 22:23
1

After "Create Account", you need to initiate a regular transfer of fund/XLM from already funded account to the "new account". (There is no friendbot for real network !)

1
  • Hello!.. thanks for answering. What I try to do is to do the process that you described, but by code. That's to say, I have an app where I create accounst with the code provided by stellar developers.. What I want to do is to create a real account using that code. Sorry for my bad english Commented May 31, 2018 at 1:20

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.