add skeleton for shachain packaged
* Still considering if it’s better just to use a modified HD chain or not: * give them child branch/sub-tree etc.
This commit is contained in:
parent
5e8a2ed26f
commit
b023120460
32
wallet/shachain/hash_chain.go
Normal file
32
wallet/shachain/hash_chain.go
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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) {
|
||||||
|
}
|
1
wallet/shachain/hash_chain_test.go
Normal file
1
wallet/shachain/hash_chain_test.go
Normal file
@ -0,0 +1 @@
|
|||||||
|
package wallet
|
Loading…
Reference in New Issue
Block a user