burnproof

package
v0.2.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Code generated by fastssz. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyBurn

func VerifyBurn(proofBytes []byte, address []byte, merkleRoot chainhash.Hash) error

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)

func (*CoinsProof) Unmarshal

func (c *CoinsProof) Unmarshal(r io.Reader) error

Unmarshal decodes the proof from a byte slice.

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 (*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

Jump to

Keyboard shortcuts

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