mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-20 02:27:21 +01:00
b023120460
* Still considering if it’s better just to use a modified HD chain or not: * give them child branch/sub-tree etc.
33 lines
573 B
Go
33 lines
573 B
Go
package wallet
|
|
|
|
import "github.com/btcsuite/btcd/wire"
|
|
|
|
// TODO(roasbeef): port Rusty's hash-chain stuff
|
|
// * or just use HD chains based off of CodeShark's proposal?
|
|
|
|
// chainFragment...
|
|
type chainFragment struct {
|
|
index uint64
|
|
hash wire.ShaHash
|
|
}
|
|
|
|
// ShaChain...
|
|
type ShaChain struct {
|
|
lastChainIndex uint64
|
|
|
|
chainFragments []chainFragment
|
|
}
|
|
|
|
// NewShaChain...
|
|
func NewShaChain(seed wire.ShaHash) *ShaChain {
|
|
// TODO(roasbeef): from/to or static size?
|
|
}
|
|
|
|
// NextHash...
|
|
func (s *ShaChain) NextHash() {
|
|
}
|
|
|
|
// GetHash...
|
|
func (s *ShaChain) GetHash(index uint64) {
|
|
}
|