unicitytree

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSystemIdentifierLength = errors.New("invalid system identifier length")

Functions

This section is empty.

Types

type Data

type Data struct {
	SystemIdentifier            []byte
	InputRecord                 *types.InputRecord
	SystemDescriptionRecordHash []byte
}

func (*Data) AddToHasher

func (d *Data) AddToHasher(hasher hash.Hash)

func (*Data) Key

func (d *Data) Key() []byte

type UnicityTree

type UnicityTree struct {
	// contains filtered or unexported fields
}

func New

func New(hasher hash.Hash, d []*Data) (*UnicityTree, error)

New creates a new unicity tree with given input records.

func (*UnicityTree) GetCertificate

func (u *UnicityTree) GetCertificate(systemIdentifier []byte) (*types.UnicityTreeCertificate, error)

GetCertificate returns an unicity tree certificate for given system identifier.

func (*UnicityTree) GetIR added in v0.2.0

func (u *UnicityTree) GetIR(systemIdentifier []byte) (*types.InputRecord, error)

GetIR returns Input Record for system identifier.

func (*UnicityTree) GetRootHash

func (u *UnicityTree) GetRootHash() []byte

Jump to

Keyboard shortcuts

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