How To Create an Account & Obtain your Private Key on DEXON

Table of Contents
I. Introduction
II. Creating an account and obtaining your private key via DekuSan
III. Creating an account and obtaining your private key via web3

I. Introduction

This documentation describes the procedures to obtain your private key. We will cover two methods; DekuSan and Web3.

II. Creating an account and obtaining your private key via DekuSan

The DEXON wallet, or DekuSan, is a web wallet that allows users to view transactions and send tokens on the DEXON blocklattice. Think of it as the MetaMask for DEXON. DekuSan is the gateway that will easily let you visit the DEXON blocklattice in your browser. It also allows you to run DEXON DApps, view transactions, and send tokens in your browser.

A. Installing Dekusan

You can install DekuSan for both Google Chrome and Firefox browsers.

  1. Once downloaded, input your password. Note the network that your are joining. By default you will be joining the DEXON test network. However, you can customize the RPC endpoint accordingly.

2. Select your preferred account by clicking on the upper right avatar, by default it’s Account 1 (unless you have created other accounts as well).

3. Click Details to access the address of your account as well as to export your private key. Note that you should protect your private key with caution, as giving others access to this key is tantamount to provisioning your assets to others.

4. That’s it. Now you have your DekuSan up and running and your private key can be exported as well.

III. Creating account and obtaining private key via Web3

We highly recommend using the DekuSan wallet as a gateway to all your DEXON interfacing needs. Nevertheless, you can utilize Web3 as well. Please refer to the web3 documentation for an introduction to their interface https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html before proceeding to obtain your private key using web3.

  1. Create account and obtain the private key

2. Install DekuSan. Import the private key into DekuSan by clicking on the Pixelated icon at top right corner > Import Account. Select type as ‘Private Key’ and paste the key accordingly. Click on ‘Import’. Once done, you will be able to interface with your account using the DekuSan wallet.

3. The major difference between DekuSan and MetaMask wallet is that there is no web3 object on DekuSan (MetaMask will remove the web3 object in the future as well). Should you require the web3 object, you can obtain it via two methods:

  • Install via npm:
npm install web3

Refer to https://github.com/ethereum/web3.js/blob/develop/README.md#installation if you need more information regarding installation details.

4A. In the DekuSan interface, you will be able to see the provider object window.dexon displayed. Input this as the parameter into the web3 constructor to create the web3 object to interface with DEXON.

import​ Web3 ​from​ ​'web3'​;
const​ ​dexonWeb3​ ​=​ ​new​ ​Web3​(​window.​ dexon);

4B. Should you choose to use JSON RPC, the JSON RPC address for DEXON testnet is https://api-testnet.dexscan.org/v1/network/rpc . Use this as the web3 HTTP provider

import​ Web3 ​from​ ​'web3'​;
 const​ ​dexonWeb3​ ​=​ ​new​ ​Web3​(​'https://api-testnet.dexscan.org/v1/network/rpc'​); // or
 const​ ​dexonWeb3​ ​=​ ​new​ ​Web3​(​new Web3.providers.HttpProvider​(​'https://api-testnet.dexscan.org/v1/network/rpc'​));

5. That’s it. You should be able to access DEXON by calling methods in the dexonWeb3 object. Please refer to https://gist.github.com/boczeratul/fb300ecc12eacde88b998d1cad073621 for further documentation.


Let’s talk about DEXON

You can register for the newsletter for the latest updates, or join us in our various community discussions in different platforms.

✅ Telegram discussionshttps://t.me/dexon_foundation
 Announcementshttps://t.me/dexon_news
✅ Scam alertshttps://t.me/dexon_scam_alerts

👩‍💻 Gitter (DEXON’s official dev chat)https://gitter.im/dexon-foundation/Lobby
👩‍💻 Githubhttps://github.com/dexon-foundation
👩‍💻 Reddithttps://www.reddit.com/r/DEXONFoundation/

👉 Twitterhttps://twitter.com/dexonfoundation
👉 Faceboookhttps://www.facebook.com/DEXON.Foundation/
👉 YouTubehttps://www.youtube.com/channel/UCbg6l4M8QmSrJphxQvKof5g
👉 Mediumhttps://medium.com/dexon

Leave a Reply

Your email address will not be published. Required fields are marked *