types

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDuplicatedHash = fmt.Errorf("MerkleTree: duplicated hash provided")
)

Functions

func NewMerkleTree

func NewMerkleTree(hashes []common.Hash) (*MerkleTreeNode, []*MerkleProof, error)

func VerifyProof

func VerifyProof(rootHash common.Hash, hash common.Hash, proof *MerkleProof) bool

Types

type MerkleProof

type MerkleProof struct {
	Hashes []common.Hash
}

func NewMerkleProof

func NewMerkleProof(node *MerkleTreeNode) *MerkleProof

func (*MerkleProof) Bytes

func (p *MerkleProof) Bytes() []byte

type MerkleTreeNode

type MerkleTreeNode struct {
	Hash     common.Hash
	Parent   *MerkleTreeNode
	LeftSib  *MerkleTreeNode
	RightSib *MerkleTreeNode
}

func (*MerkleTreeNode) String

func (n *MerkleTreeNode) String() string

type Segment

type Segment struct {
	StreamID              string
	SegmentSequenceNumber *big.Int
	DataHash              common.Hash
}

func (*Segment) Hash

func (s *Segment) Hash() common.Hash

type TranscodeReceipt

type TranscodeReceipt struct {
	StreamID                 string
	SegmentSequenceNumber    *big.Int
	DataHash                 []byte
	ConcatTranscodedDataHash []byte
	BroadcasterSig           []byte
}

func (*TranscodeReceipt) Hash

func (tc *TranscodeReceipt) Hash() common.Hash

Jump to

Keyboard shortcuts

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