package
0.18.4-beta.rc2
Repository: https://github.com/lightningnetwork/lnd.git
Documentation: pkg.go.dev
# Functions
IsKnownVersion returns true if the given version is one of the known derivation scheme versions as defined by this package.
NewBtcWalletKeyRing creates a new implementation of the keychain.SecretKeyRing interface backed by btcwallet.
No description provided by the author
NewPubKeyECDH wraps the given key of the key ring so it adheres to the SingleKeyECDH interface.
No description provided by the author
# Constants
BIP0043Purpose is the "purpose" value that we'll use for the first version or our key derivation scheme.
CoinTypeBitcoin specifies the BIP44 coin type for Bitcoin key derivation.
CoinTypeTestnet specifies the BIP44 coin type for all testnet key derivation.
CurrentKeyDerivationVersion is the current default key derivation version that is used for new seeds.
KeyDerivationVersionLegacy is the previous version of the key derivation schema defined below.
KeyDerivationVersionTaproot is the most recent version of the key derivation scheme that marks the introduction of the Taproot derivation with BIP0086 support.
KeyFamilyBaseEncryption is the family of keys that will be used to derive keys that we use to encrypt and decrypt any general blob data like static channel backups and the TLS private key.
KeyFamilyDelayBase are keys used within channels that will be combined with per-state randomness to produce public keys that will be used in scripts that pay to us, but require a CSV delay before we can sweep the funds.
KeyFamilyHtlcBase are keys used within channels that will be combined with per-state randomness to produce public keys that will be used in HTLC scripts.
KeyFamilyMultiSig are keys to be used within multi-sig scripts.
KeyFamilyNodeKey is a family of keys that will be used to derive keys that will be advertised on the network to represent our current "identity" within the network.
KeyFamilyPaymentBase are keys used within channels that will be combined with per-state randomness to produce public keys that will be used in scripts that pay directly to us without any delay.
KeyFamilyRevocationBase are keys that are used within channels to create revocation basepoints that the remote party will use to create revocation keys for us.
KeyFamilyRevocationRoot is a family of keys which will be used to derive the root of a revocation tree for a particular channel.
KeyFamilyTowerID is the family of keys used to derive the public key of a watchtower.
KeyFamilyTowerSession is the family of keys that will be used to derive session keys when negotiating sessions with watchtowers.
# Variables
ErrCannotDerivePrivKey is returned when DerivePrivKey is unable to derive a private key given only the public key and target key family.
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 and wishes to derive a private key.
VersionZeroKeyFamilies is a slice of all the known key families for first version of the key derivation schema defined in this package.
# Structs
BtcWalletKeyRing is an implementation of both the KeyRing and SecretKeyRing interfaces backed by btcwallet's internal root waddrmgr.
KeyDescriptor wraps a KeyLocator and also optionally includes a public key.
KeyLocator is a two-tuple that can be used to derive *any* key that has ever been used under the key derivation mechanisms described in this file.
PrivKeyECDH is an implementation of the SingleKeyECDH in which we do have the full private key.
No description provided by the author
PubKeyECDH is an implementation of the SingleKeyECDH interface.
No description provided by the author
# Interfaces
ECDHRing is an interface that abstracts away basic low-level ECDH shared key generation on keys within a key ring.
KeyRing is the primary interface that will be used to perform public derivation of various keys used within the peer-to-peer network, and also within any created contracts.
MessageSignerRing is an interface that abstracts away basic low-level ECDSA signing on keys within a key ring.
SecretKeyRing is a ring similar to the regular KeyRing interface, but it is also able to derive *private keys*.
SingleKeyECDH is an abstraction interface that hides the implementation of an ECDH operation by wrapping a single, specific private key.
SingleKeyMessageSigner is an abstraction interface that hides the implementation of the low-level ECDSA signing operations by wrapping a single, specific private key.
# Type aliases
KeyFamily represents a "family" of keys that will be used within various contracts created by lnd.