mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-10-13 16:49:24 +00:00
Invert coin-type and purpose in default derivation path (#1728)
This commit is contained in:
parent
edc459ae1b
commit
6613faee2d
@ -2,6 +2,7 @@ package libkaspawallet
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/bip32"
|
"github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/bip32"
|
||||||
"github.com/kaspanet/kaspad/domain/dagconfig"
|
"github.com/kaspanet/kaspad/domain/dagconfig"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@ -31,7 +32,7 @@ func defaultPath(isMultisig bool) string {
|
|||||||
|
|
||||||
// TODO: Register the coin type in https://github.com/satoshilabs/slips/blob/master/slip-0044.md
|
// TODO: Register the coin type in https://github.com/satoshilabs/slips/blob/master/slip-0044.md
|
||||||
const coinType = 111111
|
const coinType = 111111
|
||||||
return fmt.Sprintf("m/%d'/%d'/0'", coinType, purpose)
|
return fmt.Sprintf("m/%d'/%d'/0'", purpose, coinType)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MasterPublicKeyFromMnemonic returns the master public key with the correct derivation for the given mnemonic.
|
// MasterPublicKeyFromMnemonic returns the master public key with the correct derivation for the given mnemonic.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user