Creating and Funding an Account on CasperLabs’ Testnet using CLarity Explorer
Just like internet browsers, blockchain explorers help us to navigate the blockchain, it is a very important tool that helps us view transactions on the blockchain, monitor the state of the network; deploys, unconfirmed transactions, etc.
CasperLabs is building a compelling explorer christened CLarity with some interesting features to help navigate through our blockchain. In this short tutorial, we walk through the simple process of creating and funding an account on CasperLabs blockchain using CLarity explorer.
To interact with CLarity, we’ll have to create an account that comes with a public and a private key pair. At the moment, there are two ways to create an account, using GitHub OAuth or Google OAuth. To create an account, we’ll head to https://clarity.casperlabs.io then click on the “Create an Account” to create a new account.
For this example, we’re going to be using GitHub OAuth to create an account. When we click on the “ Create an Account” button, a small window should pop-up with options to sign in using Google or GitHub, we’ll click on “Continue with GitHub”
On clicking on “Continue with GitHub”, the app redirects to us to GitHub’s authorization where we would authorize CasperLabs explorer. We click on “Authorize CasperLabs”, this should redirect us back to CLarity explorer with a new account created using our GitHub credentials. If this doesn’t happen, refresh the page and click on “Sign In” at the top-right corner of the screen.
On successful authorization of Casperlabs Explorer app, we should have an interface with the option of creating an account key or importing a key from an already existing account, since we are just signing up we’ll be creating a new account key, this comes with a corresponding private key which would be saved locally on our device, to create a new account, we click on “Create Account Key”.
It’s is worth noting that the CasperLabs blockchain doesn’t create new accounts on the network until the account has a transaction that is registered on the network, this is because there isn’t a need to create zero-balance accounts on the blockchain. This feature also helps reduce data storage and bloat on the network. When we create a new account, the account details are created and stored locally, the public key won’t be available on a block explorer until that particular public key has a transaction that’s registered on the blockchain.
On clicking the “Create Account Key”, CLarity creates an account with a public key and a corresponding private key in Base64 and Base16. For ease of remembrance, we can assign a human-readable alias to the key pair, for this instance let’s use “My_First_Account”, this account alias should not include spaces. After that, we click on “Save”, this would create an “alias.private.key” file, in this case, “My_First_Account.private.key” which would subsequently be downloaded to our machine. This file contains our private key and is very sensitive as anyone with access to this file can access our token and compromise our account so it should be stored in a safe offline location.
Congratulations, we have succeeded in creating our first CasperLabs account using CLarity. To interact with the CasperLabs blockchain, we would need to have some CLX tokens to pay for computation on the network, gas fees, and other payments and as we can see on the image above, our public key does not have any CLX token on its balance.
We would now proceed to fund our account from the faucet available on CLarity. To do this, we click on the ‘Faucet’ link at the right side of the app, then click on the “- -Select account- -” to reveal a dropdown of the public keys available on our account, we then select “My_First_Account” and click on “Request tokens”. We should see a new funding request appear under the “Recent Faucet Requests” section of the current page and Viola! we’re 1,000,000,000 CLX rich! Okay, not yet as these are dummy tokens only for use on the testnet but we’ve got them nonetheless, a billion of them, still better than nothing :)
Currently, a given account can only request tokens once and it may take some time for your request to be processed; the status of your request will be updated from a small clock icon to a green tick when tokens are available on your account.