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:
Olaoluwa Osuntokun 2015-11-18 14:59:51 -08:00
parent 5e8a2ed26f
commit b023120460
2 changed files with 33 additions and 0 deletions

@ -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) {
}

@ -0,0 +1 @@
package wallet