Deterministic NodeID:
- use_recoverable_channel is a user setting, available
only in standard wallets with a 'segwit' seed_type
- if enabled, 'lightning_xprv' is derived from seed
- otherwise, wallets use the existing 'lightning_privkey2'
Recoverable channels:
- channel recovery data is added funding tx using an OP_RETURN
- recovery data = 4 magic bytes + node id[0:16]
- recovery data is chacha20 encrypted using funding_address as nonce.
(this will allow to fund multiple channels in the same tx)
GUI:
- whether channels are recoverable is shown in wallet info dialog.
- if the wallet can have recoverable channels but has an old node_id,
users are told to close their channels and restore from seed
to have that feature.
This commit is contained in:
@@ -613,6 +613,11 @@ class BIP32_KeyStore(Xpub, Deterministic_KeyStore):
|
||||
cK = ecc.ECPrivkey(k).get_public_key_bytes()
|
||||
return cK, k
|
||||
|
||||
def get_lightning_xprv(self, password):
|
||||
xprv = self.get_master_private_key(password)
|
||||
rootnode = BIP32Node.from_xkey(xprv)
|
||||
node = rootnode.subkey_at_private_derivation("m/67'/")
|
||||
return node.to_xprv()
|
||||
|
||||
class Old_KeyStore(MasterPublicKeyMixin, Deterministic_KeyStore):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user