6

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.

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

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 !)

  • 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 – Daniel Valencia May 31 '18 at 1:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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