Documentation ¶
Index ¶
- type HyperShaChain
- func (h *HyperShaChain) AddNextHash(hash [32]byte) error
- func (h *HyperShaChain) CurrentPreImage() *wire.ShaHash
- func (h *HyperShaChain) CurrentRevocationHash() []byte
- func (h *HyperShaChain) Decode(b io.Reader) error
- func (h *HyperShaChain) Encode(b io.Writer) error
- func (h *HyperShaChain) GetHash(index uint64) (*[32]byte, error)
- func (h *HyperShaChain) LocatePreImage(outputScript []byte) (uint64, *[32]byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HyperShaChain ¶
HyperShaChain... * https://github.com/rustyrussell/ccan/blob/master/ccan/crypto/shachain/design.txt
func NewFromSeed ¶
func NewFromSeed(seed *[32]byte, deriveTo uint64) (*HyperShaChain, error)
NewHyperShaChainFromSeed...
- used to derive your own pre-images
func (*HyperShaChain) AddNextHash ¶
func (h *HyperShaChain) AddNextHash(hash [32]byte) error
addHash
func (*HyperShaChain) CurrentPreImage ¶
func (h *HyperShaChain) CurrentPreImage() *wire.ShaHash
CurrentPreImage...
func (*HyperShaChain) CurrentRevocationHash ¶
func (h *HyperShaChain) CurrentRevocationHash() []byte
CurrentRevocationHash... TODO(roasbeef): *wire.ShaHash vs [wire.HashSize]byte ?
func (*HyperShaChain) Decode ¶
func (h *HyperShaChain) Decode(b io.Reader) error
UnmarshallBinary...
func (*HyperShaChain) GetHash ¶
func (h *HyperShaChain) GetHash(index uint64) (*[32]byte, error)
getHash... index should be commitment #
func (*HyperShaChain) LocatePreImage ¶
func (h *HyperShaChain) LocatePreImage(outputScript []byte) (uint64, *[32]byte)
LocatePreImage... Alice just broadcasted an old commitment tx, we need the revocation hash to claim the funds so we don't get cheated. However, we aren't storing all the pre-images in memory. So which shachain index # did she broadcast?
Click to show internal directories.
Click to hide internal directories.