burnproof

package
v0.1.1-devnet Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyBurn

func VerifyBurn(proofBytes []byte, address string) error

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) Marshal

func (c *CoinsProof) Marshal(w io.Writer) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL