DEV Community

Cover image for Stellar Quests Level 1: Create Account
Marlon
Marlon

Posted on

Stellar Quests Level 1: Create Account

What are Stellar accounts?

Accounts on the Stellar blockchain are the "central data structure which hold balances, sign transactions, and issue assets". Each account needs a keypair and the required minimum balance of Lumens ($XLM) in order to exist.

How are Accounts created?

Before an account can be created, a keypair needs to be generated. A keypair itself does NOT instantiate an account. The Stellar blockchain implements this rule so that there isn't an abundance of unused accounts. In order for an account to be instantiated, one must first send at least 1 Lumen ($XLM) to the public key address.

This gets done by building a transaction of operation type "Create Account". This operation asks for three inputs: destination, starting balance, and source account. The Destination would be the public key from the keypair that was generated. The Starting Balance is the amount one wishes to fund the new account with; which must be greater than 1 Lumen ($XLM). The Source Account is the public key of the account that will be sending the funds; plus, this input is optional because if the funds will not be sent by the account which has built the transaction, then the public key entered here will refer to the account that is. NOTE: All transactions MUST be signed off by all source accounts mentioned; in this case, the account which built the transaction and the account which is funding the new account.

Accounts and their balances

Accounts may hold different balances of different types of assets. There are two types of assets. There's the native asset "Lumen ($XLM)", and then there are "custom assets". In future blog posts, I'll be covering custom assets and how they're established.

I plan on writing corresponding blog posts with relevant code examples. For now, I am simply learning the basics of the Stellar blockchain and utilizing the Stellar Laboratory in order to interact with the test net. If you wish to learn about the Stellar blockchain, and earn while doing it, then please visit: https://quest.stellar.org/

Top comments (0)