DynoChain
  • Dyno
    • Dyno
    • Wallet Support
      • DYNO Wallet
    • Tutorial's
    • FAQ
      • Token
      • Contributing
  • DYNODAO
    • DYNO Wallet
  • DYNO Concept's
    • Consensus
    • The File
  • DYNO Ecosystem
    • Validator
    • Staking
    • Future Development
  • Development on DYNO
    • Key Management
      • Smart Contracts
        • Smart Contract Verification
        • Solidity
      • Remix
        • Website
      • Web3JS
        • Website
      • Truffle
        • Docs
    • Block-Chain Details
      • RPC
    • DND20 Token
      • Issue Token's
    • Wallet Support
    • Deployment
      • Remix
      • Truffle
      • HardHat
  • Links
    • Website (dynochain.io)
    • DynoDAO (dynodao.io)
    • $DynoScan ( Explorer )
    • $DND TestnetScan
    • $DND Faucet
    • Smart Contract Verification
    • Swap
    • GitHub
    • DYNO Wallet
  • Social Network's
    • Telegram
    • Twitter
    • Chain News
    • Discord
    • Reddit
    • Medium
    • Facebook (META)
    • Instagram
Powered by GitBook
On this page
  • Setup Web3
  • Connect to DND network
  • Set up account
  • Recover account
  • Full Example
  1. Development on DYNO

Key Management

This article is a guide about key management strategy on client side of your Decentralized Application on DND

PreviousFuture DevelopmentNextSmart Contracts

Last updated 2 years ago

Setup Web3

web3.js is a javascript library that allows our client-side application to talk to the blockchain. We configure web3 to communicate via Metamask.

web3.js doc is

Connect to DND network

   // mainnet 
     const web3 = new Web3('https://mainnet-rpc.dynoscan.io');
    // testnet
    const web3 = new Web3('https://testnet-rpc.dynoscan.io');

Set up account

If the installation and instantiation of web3 was successful, the following should successfully return a random account:

  const account = web3.eth.accounts.create();

Recover account

If you have backup the private key of your account, you can use it to restore your account.

 const account = web3.eth.accounts.privateKeyToAccount("$private-key")

Full Example

const Web3 = require('web3');
async function main() {

    const web3 = new Web3('https://mainnet-rpc.dynoscan.io');
    const loader = setupLoader({ provider: web3 }).web3;

    const account = web3.eth.accounts.create();
    console.log(account);
here
Page cover image