Documentation ¶
Overview ¶
Code generated by fastssz. DO NOT EDIT.
Index ¶
- func VerifyBurn(proofBytes []byte, address []byte, merkleRoot chainhash.Hash) error
- func VerifyBurnProof(p *CoinsProof, address []byte, merkleRoot chainhash.Hash) error
- type CoinsProof
- type CoinsProofSerializable
- func (c *CoinsProofSerializable) Hash() chainhash.Hash
- func (c *CoinsProofSerializable) HashTreeRoot() ([32]byte, error)
- func (c *CoinsProofSerializable) HashTreeRootWith(hh *ssz.Hasher) (err error)
- func (c *CoinsProofSerializable) Marshal() ([]byte, error)
- func (c *CoinsProofSerializable) MarshalSSZ() ([]byte, error)
- func (c *CoinsProofSerializable) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (c *CoinsProofSerializable) RedeemAccountHash() ([20]byte, error)
- func (c *CoinsProofSerializable) SizeSSZ() (size int)
- func (c *CoinsProofSerializable) ToCoinProof() (*CoinsProof, error)
- func (c *CoinsProofSerializable) Unmarshal(b []byte) error
- func (c *CoinsProofSerializable) 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 []byte, merkleRoot chainhash.Hash) error
VerifyBurnProof verifies a single burn proof.
Types ¶
type CoinsProof ¶
type CoinsProof struct { MerkleIndex uint64 MerkleBranch []chainhash.Hash PkScript [25]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) ToSerializable ¶
func (c *CoinsProof) ToSerializable(acc [44]byte) (*CoinsProofSerializable, error)
type CoinsProofSerializable ¶
type CoinsProofSerializable struct { MerkleIndex uint64 MerkleBranch [][32]byte `ssz-max:"64"` PkScript [25]byte Transaction [192]byte RedeemAccount [44]byte }
func (*CoinsProofSerializable) Hash ¶
func (c *CoinsProofSerializable) Hash() chainhash.Hash
func (*CoinsProofSerializable) HashTreeRoot ¶
func (c *CoinsProofSerializable) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the CoinsProofSerializable object
func (*CoinsProofSerializable) HashTreeRootWith ¶
func (c *CoinsProofSerializable) HashTreeRootWith(hh *ssz.Hasher) (err error)
HashTreeRootWith ssz hashes the CoinsProofSerializable object with a hasher
func (*CoinsProofSerializable) Marshal ¶
func (c *CoinsProofSerializable) Marshal() ([]byte, error)
func (*CoinsProofSerializable) MarshalSSZ ¶
func (c *CoinsProofSerializable) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the CoinsProofSerializable object
func (*CoinsProofSerializable) MarshalSSZTo ¶
func (c *CoinsProofSerializable) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the CoinsProofSerializable object to a target array
func (*CoinsProofSerializable) RedeemAccountHash ¶
func (c *CoinsProofSerializable) RedeemAccountHash() ([20]byte, error)
func (*CoinsProofSerializable) SizeSSZ ¶
func (c *CoinsProofSerializable) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the CoinsProofSerializable object
func (*CoinsProofSerializable) ToCoinProof ¶
func (c *CoinsProofSerializable) ToCoinProof() (*CoinsProof, error)
func (*CoinsProofSerializable) Unmarshal ¶
func (c *CoinsProofSerializable) Unmarshal(b []byte) error
func (*CoinsProofSerializable) UnmarshalSSZ ¶
func (c *CoinsProofSerializable) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the CoinsProofSerializable object