Ponimania Pute Backfit: A Leadger Live and Bip44
As a polular kitten for cryptocurrency Metamask, you, it is believed that he generates one and the same address for the Ledger Live and Bitcoin Integration (BIP44). But why is this? In this state, we dissatisfied with the Metamask code base that it comes to the shotgun.
PROPOSITION
In cryptocurrency mosts, the output of the output is used for the coding closed key of the poetry in the several adress. Naiblya spread the output of the output of the BIP44 (Bitcoin 44), which breaks partial keys to the Sheterch Children: M/44 '/0/, M/44'/ ///etc
Koshelek Ledger Live and Metamask have a different way, as pointed into fragments of the code:
`Javascript
const Ledger_live_path =M/44 ‘/60’/0 ‘/0;
Const BIP44_PATH =M/44 ‘/…
`
Obraty unimania that BIP44_PATH uses the second prefix (m/) and a few second structure for the home -coolers.
Metamask code
In the Metamask code base, we can visit, as a way out of the outcrops:
`Javascript
Const Generateaddress = (Path) => {
Const [address] = Path.split ('/');
Return$ {address}/$ {getchildren (address)};
};
const getchildren = (address) => {
/
// In the actuality of this will be an analize BIP44 output
const Childs = [];
for (Let I = 1; I
kids.push (Address.substring (I, I + 8));
}
The children are heard;
};
This function GetChildren 'enters the bip44 in the quality of the vicinity and the massive of the sub -resolutions. These predatory devices are subjected to the final address.
Why then the same way of the output in both the costs
Now, when we put on how to work out the output, let's post, where Metamask generates one and the same address for Ledger Live, so for the BIP44 output.
In the function ofGenerateaddress, we simply launch the bip44 way in the cure of the entrance and it is broken on the separation addresses, using the symbol/. We take up these predatory de -dogrev, to formulate the final address.
The key Ponimania here is concluded in the fact that it will be coded by the BIP44 on the address we can self -deteriorate to everyone's reddemination. Second words, if we havem/44 ‘/60’/0// 0Path Bip44, he equivalent to the one -hand address with quarters: M/44 ‘/60*/.
In the Metamask code base, we do not catch the devices of the Address address. In addition, we shrink all the way out in the shadow and weaken the adhesive address.
In the result, as the Ledger Live, and the BIP44 output of the bip44 in the score is generated by one and the same address in Metamask. The heathing of this can be said to be illogical, but on the very dela of this investigation, as the metamask is abandoned by the code of the BIP44 in Adres.
conclusion

Ponimania code base Metamask can help you shut up how the wallet generates the address for Ledger Live, and for the BIP44 output. Perspective calculation inbip44_pathand ledder_live_path`, we see that the reolization metamask is equivalently, even if it is used differently prefixes and structures.
In the future, the work with the metamask or the other wallets, you can quench the main mechanic, which grons these dwarfs work smoothly.
