I'm trying to figure it all my self but I cannot find any useful information on how actually use the Documentation provided.

For example I see there are classes and inside Account, AccountCallBuilder, AccountResponse, etc... but how can I use them?

For example, when I create a keypair I type this:

var pair = StellarSdk.Keypair.random();

Using the Keypair class and the .random() method? but how can I create an account? same as this?

var account = StellarSdk.Account.accountId();

I'm trying this and it returns me an error, is it correct?

Any resource useful even if I need to return to the very basics of javascript would be really appreciated.

2 Answers 2


You may create an account using Account

- accountId string
- sequence string

also read Account fields


js-stellar-sdk is used by the stellar laboratory, if you go to the stellar laboratory you will see there is a tab for account creator which generates keypair. In Stellar, these keypairs are converted into accounts by performing the create account operation. So the the stellar laboratory sends the transaction XDR to the stellar-core either through Horizon or using the URL endpoint. If the XDR is valid, account gets created.

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.