Documentation
¶
Index ¶
- func VerifyBurn(proofBytes []byte, address string) error
- func VerifyBurnProof(p *CoinsProof, address string) error
- type CoinsProof
- func (c *CoinsProof) CalcMerkleRoot(leafHash chainhash.Hash) chainhash.Hash
- func (c *CoinsProof) HashTreeRoot() ([32]byte, error)
- func (c *CoinsProof) HashTreeRootWith(hh *ssz.Hasher) error
- func (c *CoinsProof) Marshal(w io.Writer) error
- func (c *CoinsProof) MarshalSSZ() ([]byte, error)
- func (c *CoinsProof) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (c *CoinsProof) SizeSSZ() (size int)
- func (c *CoinsProof) Unmarshal(r io.Reader) error
- func (c *CoinsProof) UnmarshalSSZ(buf []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyBurn ¶
VerifyBurn verifies a burn proof.
func VerifyBurnProof ¶
func VerifyBurnProof(p *CoinsProof, address string) error
VerifyBurnProof verifies a single burn proof.
Types ¶
type CoinsProof ¶
type CoinsProof struct {
MerkleIndex uint32
MerkleBranch []chainhash.Hash
PkScript []byte
Transaction wire.MsgTx
}
CoinsProof is a proof of coins on the old blockchain.
func (*CoinsProof) CalcMerkleRoot ¶
func (c *CoinsProof) CalcMerkleRoot(leafHash chainhash.Hash) chainhash.Hash
CalcMerkleRoot calculates the merkle root under some assumptions.
func (*CoinsProof) HashTreeRoot ¶
func (c *CoinsProof) HashTreeRoot() ([32]byte, error)
func (*CoinsProof) HashTreeRootWith ¶
func (c *CoinsProof) HashTreeRootWith(hh *ssz.Hasher) error
func (*CoinsProof) MarshalSSZ ¶
func (c *CoinsProof) MarshalSSZ() ([]byte, error)
func (*CoinsProof) MarshalSSZTo ¶
func (c *CoinsProof) MarshalSSZTo(buf []byte) (dst []byte, err error)
func (*CoinsProof) SizeSSZ ¶
func (c *CoinsProof) SizeSSZ() (size int)
func (*CoinsProof) Unmarshal ¶
func (c *CoinsProof) Unmarshal(r io.Reader) error
Unmarshal decodes the proof from a byte slice.
func (*CoinsProof) UnmarshalSSZ ¶
func (c *CoinsProof) UnmarshalSSZ(buf []byte) error
Click to show internal directories.
Click to hide internal directories.