mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
change derivation of ln channel keys: use hardened paths
This commit is contained in:
parent
0ea21c59d2
commit
08bc8617ad
1 changed files with 8 additions and 8 deletions
|
@ -23,7 +23,7 @@ from .bitcoin import push_script, redeem_script_to_address, address_to_script
|
||||||
from . import segwit_addr
|
from . import segwit_addr
|
||||||
from .i18n import _
|
from .i18n import _
|
||||||
from .lnaddr import lndecode
|
from .lnaddr import lndecode
|
||||||
from .bip32 import BIP32Node
|
from .bip32 import BIP32Node, BIP32_PRIME
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .lnchannel import Channel
|
from .lnchannel import Channel
|
||||||
|
@ -77,7 +77,7 @@ class Config(StoredObject):
|
||||||
|
|
||||||
@attr.s
|
@attr.s
|
||||||
class LocalConfig(Config):
|
class LocalConfig(Config):
|
||||||
seed = attr.ib(type=bytes, converter=hex_to_bytes)
|
seed = attr.ib(type=bytes, converter=hex_to_bytes) # type: Optional[bytes]
|
||||||
funding_locked_received = attr.ib(type=bool)
|
funding_locked_received = attr.ib(type=bool)
|
||||||
was_announced = attr.ib(type=bool)
|
was_announced = attr.ib(type=bool)
|
||||||
current_commitment_signature = attr.ib(type=bytes, converter=hex_to_bytes)
|
current_commitment_signature = attr.ib(type=bytes, converter=hex_to_bytes)
|
||||||
|
@ -1040,12 +1040,12 @@ def extract_nodeid(connect_contents: str) -> Tuple[bytes, str]:
|
||||||
# key derivation
|
# key derivation
|
||||||
# see lnd/keychain/derivation.go
|
# see lnd/keychain/derivation.go
|
||||||
class LnKeyFamily(IntEnum):
|
class LnKeyFamily(IntEnum):
|
||||||
MULTISIG = 0
|
MULTISIG = 0 | BIP32_PRIME
|
||||||
REVOCATION_BASE = 1
|
REVOCATION_BASE = 1 | BIP32_PRIME
|
||||||
HTLC_BASE = 2
|
HTLC_BASE = 2 | BIP32_PRIME
|
||||||
PAYMENT_BASE = 3
|
PAYMENT_BASE = 3 | BIP32_PRIME
|
||||||
DELAY_BASE = 4
|
DELAY_BASE = 4 | BIP32_PRIME
|
||||||
REVOCATION_ROOT = 5
|
REVOCATION_ROOT = 5 | BIP32_PRIME
|
||||||
NODE_KEY = 6
|
NODE_KEY = 6
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue