forked from sovanpanhavathseng/eth-words
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHD_wallet
13 lines (9 loc) · 1.35 KB
/
HD_wallet
1
2
3
4
5
6
7
8
9
10
11
12
13
An HD (Hierarchical Deterministic) wallet is a type of cryptocurrency wallet that uses a specific algorithm to generate a hierarchical tree of keys from a single seed phrase. This hierarchical tree allows for the generation of an unlimited number of unique addresses and private keys, without the need to back up each individual key.
The seed phrase is a sequence of words that can be used to generate the entire tree of keys. By backing up the seed phrase, a user can restore access to all of the addresses and funds associated with the wallet in the event of a lost or stolen device.
Here's an example of how an HD wallet might generate a new key pair:
A master key is generated from the seed phrase.
A chain code is generated from the master key.
A child key is generated by combining the chain code with a specific index number.
A new address and private key are derived from the child key.
This process can be repeated for an unlimited number of child keys, allowing for the generation of an unlimited number of unique addresses and private keys. By using this hierarchical structure, an HD wallet can significantly simplify the process of backing up and restoring a wallet, while still maintaining a high level of security.
Many popular cryptocurrency wallets, including Ledger, Trezor, and MyEtherWallet, use the HD wallet algorithm to generate and manage key pairs.