Old CodeBlockLabs
VPS Recomendation
  • Home
  • 🌹Social Media
  • 🚰Testnet Faucet List
  • 🚰Mainnet Faucet List
  • 🔥Mainnet
    • Akash
    • Arcadia (Paw)
      • Installation
      • RPC Command
      • CLI
      • Fast Sync
    • Arkhadian
      • Installation
      • Update
      • Useful Commands
    • Banano
      • Installation
      • Node Configuration
      • RPC Command
      • CLI
      • Useful Command
    • DO Network
      • Install & Update
      • RPC Documentation
    • Kadena
      • Installation
      • Mining
    • Massa
      • Installation
    • Newrl
      • Installation
      • Useful Command
      • Update
    • Q Blockchain
      • Installation
      • Block stuck?
    • RaiblocksOne
      • Installation
      • Update
      • RPC Command
    • Raicoin
      • Installation
    • SGE
      • Installation
      • Update
      • Useful Commands
  • 💎Testnet
    • 0G Labs
      • Installation
      • Useful Commands
    • 5ire Chain
      • Installation
      • WASM Contract Deployment
    • Avail
      • Installation
    • BEVM
      • Installation
        • Docker
        • Binary
    • Blockx
      • Installation
      • Useful Commands
      • Incentivized Task
    • Elys
      • Installation
      • Useful Commands
    • Empeiria
      • Installation
      • Snapshot
      • Useful Commands
        • Wallet Management
        • Validator Management
        • Node Management
        • Governance
    • Impact Protocol
      • Installation
    • Erbie (wormholes)
      • Installation
      • RPC Documentation
      • Debug
    • Inery
      • Installation
      • Create Token
      • Value Contract
      • IneryCRUD
      • IneryPHP
      • Snapshots
    • Mantra
      • Installation
      • Useful commands
    • Naruno
      • Baklava Testnet
    • Nolus Protocol
      • Installation
      • Update
      • Snapshots
      • Relayer
      • Useful Commands
    • Noria
      • Installation
      • Update
      • State Sync
      • Useful Commands
    • Nibiru
      • Installation
      • Update
      • Useful Commands
    • Nulink
      • Installation
    • Ojo Network
      • Installation
      • Update
      • Useful Commands
    • PowerLoom
      • Pretest Task
    • The Power
      • Installation
    • Transformers Chain
      • Install & Update
      • RPC Documentation
  • âš¡VPS Provider
    • Contabo
      • Links To Provider
      • Promotion / Coupon
    • Vultr
      • Link To Provider
      • Promotion / Coupon
  • 😇solution
    • Docker
    • EVM Wallet by PrivateKey
    • Multiple Go
Powered by GitBook
On this page
  1. solution

EVM Wallet by PrivateKey

you can use this tutorial to get UTC file for your wallet from a private key.

// install dependencies
apt install npm
npm install ethereumjs-wallet

// create an exporter file
nano export-key-as-json.js

then paste all code on the box below

const fs = require("fs")
const wallet = require("ethereumjs-wallet").default

const pk = new Buffer.from(process.argv[2], 'hex') // replace by correct private key
const account = wallet.fromPrivateKey(pk)
const password = process.argv[3] // will be required to unlock/sign after importing to a wallet like MyEtherWallet

account.toV3(password)
    .then(value => {
        const address = account.getAddress().toString('hex')
        const file = `UTC--${new Date().toISOString().replace(/[:]/g, '-')}--${address}.json`
        fs.writeFileSync(file, JSON.stringify(value))
    });

then use CTRL+X , and save the file.

you can use the following command to generate UTC file by using privatekey and any password you want.

// Generate UTC File
node export-key-as-json.js <your-private-key> <some-random-password>
PreviousDockerNextMultiple Go

Last updated 2 years ago

change the <your-private-key> and <some-random-password> as you need

😇
😄