Like m / purpose' / coin_type' / account' / change / address_index which gives say a value of m/44'/60'/0'/0
What is the meaning of "m", purpose, coin type, etc.
Such a great question.
Derivation paths are related to HD Wallets or HD Keys, a type of wallet where you have a single, human readable, seed phrase that unlocks a number of accounts / addresses / private keys across any supported network. These phrases typically look like
brain surround have swap horror body response double fire dumb bring hazard.
The technical specification for the most commonly used HD wallets are...
Typically you have a single private key (e.g.
afdfd9c3d2095ef696594f6cedcae59e72dcd697e2a7521b1578140422a4f890) which allows you to access your funds in it's matching address (e.g.
0x06A85356DCb5b307096726FB86A78c59D38e08ee). This is a keypair.
With HD wallets you have a single seed phrase (e.g.
brain surround have swap horror body response double fire dumb bring hazard) which, via math and algorithms and code and stuff, derives multiple keypairs. An infinite number of keypairs.
Additionally, there is an insecure format of wallet known as a "brain wallet" where a person can use a single, human-readable phrase and, via math and algorithms and code and stuff, turns into a single keypair.
Brain wallets allow you to turn
brain surround have swap horror body response double fire dumb bring hazard into a single private key which is then used to access your funds and sign your transactions.
For simplicity's sake, lets represent this as
If I were to use
catsarecool10 instead of
dogsarecool12 as my phrase, I would get a different keypair, different address, different account.
HD wallets are similar, but each phrase has an infinite number of keypairs or accounts that it can access. Because, unlike brain wallets, it does more complex math. For simplicity's sake, let's represent this as
If you change any one of those pieces, the private key that you get (or derive) is is going to be different, just as it was above with
dogsarecool12. However, since all the coders follow the same rules, the pieces that get added to the seed phrase are consistent and allow users to access the same accounts across multiple products or blockchains.
part of it.
What each number represents:
m / purpose' / coin_type' / account' / change / address_index
Probably just a random way to start a string so that coders can easily tell if something is a derivation path, not you starting to type "mommy".
This is always
44'. However, if it were decided that there were a better evolution of the HD key system, you could change it to be
45' so that, again, coders could tell the difference between an old system and a new system.
60' (coin type)
Which blockchain are you accessing? Each blockchain has a number that represents it. Bitcoin is
0. Ethereum is
60. Aion is
425. When you create a new blockchain, you apply for an unused number. You can see all the chains and their numbers here: https://github.com/satoshilabs/slips/blob/master/slip-0044.md
A number that starts at 0 and increases. A layer of separation or hierarchy. (more on that below)
Sometimes used in Ethereum, sometimes not. Was created for Bitcoin originally which doesn't really have "accounts", it has "unspent transaction outputs". Basically you never send a part of your bitcoin holdings around—you send all your bitcoin to multiple addresses. If you have 0.75 BTC but only want to send me 0.5 BTC, you would send me 0.5 BTC and then send yourself 0.25 BTC. "Yourself" could be back to the original address or to another address you have access to (for example, the next address on the "list"). This number says "send whatever I don't want to send to my friend to the 10th address on my list. Or the 0th address on the list (aka the address I am sending from).
Another variable to get different accounts, etc.
Some of the variables above are based on external forces, like what chain I am on. Some are chosen by the user or the wallet software, like the
change variable. The
index variables give me (or my wallet) more things to change.
For example, let's say I want to separate my personal ETH holdings from my company's ETH holdings. I could use
m/44'/60'/0'/0'/0 for the company and
m/44'/60'/1'/0'/0 for my personal.
But let's say I want to have different addresses for...
I could use
m/44'/60'/1'/0'/0 for savings,
m/44'/60'/1'/0'/1 for paychecks,
m/44'/60'/1'/0'/2 for getting paid back by my friend, and so forth. I could also do the same with the company accounts. Yay!