I wasn't aware of a private key format, however numerous stackoverflow posts hint towards a formatting of some kind
And looking at iancoleman/bip39's website, indeed the private key changes as you change the coin, implying that there is at least a format that takes into account version bytes.
However, using hdkey in js I am unable to reproduce this format, or even the "32-byte big-endian secret parameter" Pieter Wuille describes in the last example.
var bip39 = require('bip39'); var hdkey = require('hdkey'); const mnemonic = 'thunder purchase pave tower lecture upgrade supreme half kid fitness tray shove' const seed = bip39.mnemonicToSeed(mnemonic); //creates seed buffer console.log('mnemonic: ' + mnemonic); const root = hdkey.fromMasterSeed(seed); const masterPrivateKey = root.privateKey.toString('hex'); const addrnode = root.derive("m/0'/0"); console.log('addrnodePublicKey: '+ addrnode._publicKey.toString('hex')) console.log('addernodePrivateKey: ' + addrnode._privateKey.toString('hex'))
What is the detailed private key format? What does it consist of, how do you derive it from a standard private key? What is it used for compared to the unformatted private key?