Metamask: What is the metamask algorithm for creating accounts based on one seed phrase?

Metamask algorithm: Create and restore account phrases of account *

Metamask Humsks Popular Ethereum portfolio software to generate several accounts with one seed phrase. Infected, we deepen the Metamask algorithm and investigate how it works.

What free phrase?

A marine phrase is 12-24 phrases that contains multiple mnemonic phrases. It is used to create multiple Ethereum portfolios, each with IMTH Y and Balances. The scene is used to recover and Ethereum’s portfolio is selected to access your exile or where to resurrect the lost funds.

algorithm for MEMASK

The Metamask algorithm uses a combined cryptographic technicians to generate multiple accounts of single phrase. It is a step by step explanation:

1.Separation of the seed phrase *: The first step in the algorithm is to divide the seal phrase into 12-24 individual words, depending on the tingling of the addressing you want.

  • frost phrases

    Metamask: What is the metamask algorithm for creating accounts based on one seed phrase?

    : Each Wrase phrase is used by AM Mnemonic phrase for the phrase for generated accounts. These resorts are stant yys and balances.

  • Private keys generation

    : For each Metamask phrase, the Metamask generates with a private key, uses the read-key assumption test, and the elliptical crystal Siginal Curvet Curvet Curvet Curvet Curvets (Cecdsa).

  • * Create Account: Each will be a private key used to create etherreum with Etherreum, addressing a blockchain.

Emple script

It is a script script 10 accounts single seat phrase:

`ovasscript

const metamask = requirement (stomach);

CONST Account = new metamask.web3 ();

// Defining a phrase

Constphrase = 'yur_seed_phrase';

// cut the phrase of the seed phrase phrase 12 words (or Feer, depending on the desire of accounts)

CONST WORDS = SEEDPRASE.SPLI.SPITE (/\ s+)/);

// Create a card for storing generated addresses and private keys

Const addresses = new card ();

for (let = 0;

// generating a mnemonic phrase for this account

const mnemonicphrase = dyemonic_phrase _ $ {

Cont Pervisykey = Where Account.

// Create Ethereum's address and use an ECDSA private key

Contest = '0x…' + privatekey.substring (0, 6); /// generate any prefix for the address

Letter from privatkeyhish = wherehedress account.

Addresses.Set (Amnemonicprase} _ Attack, addressed);

// Store the key and the address in the array

Console.log ('Ginerated address: $ {get (s ofmoricphrasephrase} -private Key: $ {privatekey.substring (0, 6)});

}

` s

Ne : SICPT is just a simplified study to illustrate the Metamask algorithm. When evaluated in the real world, you Dold need to deal with errors and edges more strongly.

Including a Metamask algorithm called multiple Etherreeum accounts with a single phrase. By dividing the phrase for sealing into 12 words (or Feer), generating phrases for each account and using ECDSA to create an endeavor, Metamask has applied each gene stove every gene stove stoves.

ETHEREUM SOMEONE SENDS BITCOIN

上部へスクロール