I am making an attempt to revive per_commitment_secret from channel.backup file (LND). What’s the seed? Is the seed saved in channel.backup file?
BOLT #03 per_commitment_secret calculation
generate_from_seed(seed, I):
P = seed
for B in 47 right down to 0:
if B set in I:
flip(B) in P
P = SHA256(P)
return P
channel.backup file:
Model: (chanbackup.MultiBackupVersion) 0,
StaticBackups: ([]dump.BackupSingle) (len=1 cap=1) {
(dump.BackupSingle) {
Model: (chanbackup.SingleBackupVersion) 3,
IsInitiator: (bool) true,
ChainHash: (string) (len=64) "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943",
FundingOutpoint: (string) (len=66) "9e85aa58382ea2ec19cc40abf33e6fdd452e2e8ac641dee91aa2e3f81c1e1d59:0",
ShortChannelID: (lnwire.ShortChannelID) 2534684:31:0,
RemoteNodePub: (string) (len=66) "0359faf62fb32f91fa993d253392f5872731799d39c0fe5e4a3f630e2a1b99328e",
Addresses: ([]web.Addr) (len=1 cap=1) {
(*web.TCPAddr)(0xc0002fe780)(127.0.0.1:9734)
},
Capability: (btcutil.Quantity) 0.00100000 BTC,
LocalChanCfg: (dump.ChannelConfig) {
ChannelConstraints: (channeldb.ChannelConstraints) {
DustLimit: (btcutil.Quantity) 0 BTC,
ChanReserve: (btcutil.Quantity) 0 BTC,
MaxPendingAmount: (lnwire.MilliSatoshi) 0 mSAT,
MinHTLC: (lnwire.MilliSatoshi) 0 mSAT,
MaxAcceptedHtlcs: (uint16) 0,
CsvDelay: (uint16) 144
},
MultiSigKey: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/0'/0/0",
PubKey: (string) (len=5) "<nil>"
},
RevocationBasePoint: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/1'/0/0",
PubKey: (string) (len=5) "<nil>"
},
PaymentBasePoint: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/3'/0/0",
PubKey: (string) (len=5) "<nil>"
},
DelayBasePoint: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/4'/0/0",
PubKey: (string) (len=5) "<nil>"
},
HtlcBasePoint: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/2'/0/0",
PubKey: (string) (len=5) "<nil>"
}
},
RemoteChanCfg: (dump.ChannelConfig) {
ChannelConstraints: (channeldb.ChannelConstraints) {
DustLimit: (btcutil.Quantity) 0 BTC,
ChanReserve: (btcutil.Quantity) 0 BTC,
MaxPendingAmount: (lnwire.MilliSatoshi) 0 mSAT,
MinHTLC: (lnwire.MilliSatoshi) 0 mSAT,
MaxAcceptedHtlcs: (uint16) 0,
CsvDelay: (uint16) 144
},
MultiSigKey: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/0'/0/0",
PubKey: (string) (len=66) "03a80d38d0a2d709bae3accc70d50734e71da6cfc9fa005f359d65357d5cf61c8c"
},
RevocationBasePoint: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/0'/0/0",
PubKey: (string) (len=66) "020d4faed88bc397b81048dbbc16aeb69aba72b92fd3b2816907c5f37fe2aaa4f4"
},
PaymentBasePoint: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/0'/0/0",
PubKey: (string) (len=66) "02f8ef4bbc7c3f520dcb3c57869e73680b41f778b7339dacc185a9a21740254dcd"
},
DelayBasePoint: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/0'/0/0",
PubKey: (string) (len=66) "02c314c978afe85f27cf01b4af61059afbb445d03deded4833e2ba8b23ccfd5623"
},
HtlcBasePoint: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/0'/0/0",
PubKey: (string) (len=66) "02a085a39448babc5fd4c4a1a4c13362ab5f9e2d51e78afcba056057cc54be3158"
}
},
ShaChainRootDesc: (dump.KeyDescriptor) {
Path: (string) (len=17) "m/1017'/1'/5'/0/1",
PubKey: (string) (len=5) "<nil>"
}
}
}
}