mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 07:35:07 +02:00
walletunlocker+keychain+config_builder: use new aezeed version
This commit is contained in:
@@ -8,11 +8,20 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// KeyDerivationVersion is the version of the key derivation schema
|
||||
// defined below. We use a version as this means that we'll be able to
|
||||
// accept new seed in the future and be able to discern if the software
|
||||
// is compatible with the version of the seed.
|
||||
KeyDerivationVersion = 0
|
||||
// KeyDerivationVersionLegacy is the previous version of the key
|
||||
// derivation schema defined below. We use a version as this means that
|
||||
// we'll be able to accept new seed in the future and be able to discern
|
||||
// if the software is compatible with the version of the seed.
|
||||
KeyDerivationVersionLegacy = 0
|
||||
|
||||
// KeyDerivationVersionTaproot is the most recent version of the key
|
||||
// derivation scheme that marks the introduction of the Taproot
|
||||
// derivation with BIP0086 support.
|
||||
KeyDerivationVersionTaproot = 1
|
||||
|
||||
// CurrentKeyDerivationVersion is the current default key derivation
|
||||
// version that is used for new seeds.
|
||||
CurrentKeyDerivationVersion = KeyDerivationVersionTaproot
|
||||
|
||||
// BIP0043Purpose is the "purpose" value that we'll use for the first
|
||||
// version or our key derivation scheme. All keys are expected to be
|
||||
@@ -25,6 +34,13 @@ const (
|
||||
BIP0043Purpose = 1017
|
||||
)
|
||||
|
||||
// IsKnownVersion returns true if the given version is one of the known
|
||||
// derivation scheme versions as defined by this package.
|
||||
func IsKnownVersion(internalVersion uint8) bool {
|
||||
return internalVersion == KeyDerivationVersionLegacy ||
|
||||
internalVersion == KeyDerivationVersionTaproot
|
||||
}
|
||||
|
||||
var (
|
||||
// MaxKeyRangeScan is the maximum number of keys that we'll attempt to
|
||||
// scan with if a caller knows the public key, but not the KeyLocator
|
||||
|
Reference in New Issue
Block a user