evidences

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Name is the name set in the fossilizer's information.
	Name = "dummyfossilizer"

	// Version1_0_0 uses canonical-JSON to serialize a timestamp.
	Version1_0_0 = "1.0.0"

	// Version used for new batch proofs.
	Version = Version1_0_0
)

Variables

View Source
var (
	ErrInvalidBackend = errors.New("backend is not dummyfossilizer")
	ErrUnknownVersion = errors.New("unknown evidence version")
)

Errors used by the batch evidence.

Functions

This section is empty.

Types

type DummyProof

type DummyProof struct {
	Timestamp uint64 `json:"timestamp"`
}

DummyProof implements the chainscript.Proof interface.

func UnmarshalProof

func UnmarshalProof(e *chainscript.Evidence) (*DummyProof, error)

UnmarshalProof unmarshals the dummy proof contained in an evidence.

func (*DummyProof) Evidence

func (p *DummyProof) Evidence(provider string) (*chainscript.Evidence, error)

Evidence wraps the proof in a versioned evidence.

func (*DummyProof) Time

func (p *DummyProof) Time() uint64

Time returns the timestamp.

func (*DummyProof) Verify

func (p *DummyProof) Verify(interface{}) bool

Verify returns true if the proof of a given linkHash is correct.

Jump to

Keyboard shortcuts

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