CEX Integration Guide
  • Introduction
  • Circular's Public Blockchains
  • SDK Library
  • Networks
  • Local Calls
    • Retrieve Wallet
    • Retrieve Wallet Balance for a Specific Asset
    • Resolve Domain Name
    • Retrieve Asset Supply
    • Retrieve Blockchain Block Height
    • Retrieve a Single Block
    • Retrieve a Set of Blocks
    • Retrieve List of Blockchains
    • Retrieve Transaction by ID
    • Retrieve Transaction by Address
    • Retrieve Transaction by Date
  • Transactions
    • Transaction Composition
    • Calculating a Transaction Hash
    • Submitting a Transaction
    • Transaction Finality
  • Wallet Creation
    • Creating a Wallet
    • Wallet Generation (Read Warning)
  • Appendix
  • Node.js
    • Page 1
Powered by GitBook
On this page
  • Seed Phrase
  • Generate Key
  • Generate Wallet Address
  1. Wallet Creation

Creating a Wallet

Seed Phrase

A vocabulary of 5,000 or more words is generally considered secure. In practice, we typically use a 12-word phrase.

Generate Key

const seedPhraseTextarea = 'word1 word2 ...';
const EC = elliptic.ec;
const ec = new EC('secp256k1');

// Create a SHA-256 hash of the seed phrase
const hash = sha256.sha256.array(seedPhrase);

// Generate the private key from the hash
const keyPair = ec.keyFromPrivate(hash);

// Generate the public key from the private key
const publicKey = keyPair.getPublic(false, 'hex');

// Generate private key in PKCS1 format
const privateKeyPKCS1 = keyPair.getPrivate('hex');

Generate Wallet Address

const Address = sha256.sha256(publicKey);
PreviousTransaction FinalityNextWallet Generation (Read Warning)

Last updated 7 months ago