evidence

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package evidence defines the Evidence interface and its implementations. Evidence represents cryptographic proof of a resolution step, similar to how key.Key represents different key types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evidence

type Evidence interface {
	// Bytes returns the raw bytes for storage/encoding.
	Bytes() []byte

	// String returns a human-readable representation.
	String() string

	// Equals checks if two evidences are equal.
	Equals(other Evidence) bool

	// Kind returns the type of the evidence.
	Kind() EvidenceKind
}

Evidence represents proof of a resolution step. Different resolvers produce different evidence types.

type EvidenceKind

type EvidenceKind int

EvidenceKind represents the type of evidence.

const (
	// EvidenceKindExplicit indicates evidence from explicit arc resolution (MALT).
	EvidenceKindExplicit EvidenceKind = iota
	// EvidenceKindImplicit indicates evidence from implicit Merkle-DAG traversal.
	EvidenceKindImplicit
	// EvidenceKindHAMT indicates evidence from HAMT resolution.
	EvidenceKindHAMT
)

type ExplicitEvidence

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

ExplicitEvidence represents cryptographic proof emitted by the semantic layer over a primitive commitment backend such as KZG.

func NewExplicitEvidence

func NewExplicitEvidence(proof []byte) *ExplicitEvidence

NewExplicitEvidence creates a new explicit evidence from proof bytes.

func (*ExplicitEvidence) Bytes

func (e *ExplicitEvidence) Bytes() []byte

Bytes returns the proof bytes.

func (*ExplicitEvidence) Equals

func (e *ExplicitEvidence) Equals(other Evidence) bool

Equals checks equality.

func (*ExplicitEvidence) Kind

func (e *ExplicitEvidence) Kind() EvidenceKind

Kind returns EvidenceKindExplicit.

func (*ExplicitEvidence) String

func (e *ExplicitEvidence) String() string

String returns a hex representation.

type HAMTEvidence

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

HAMTEvidence represents proof from HAMT resolution.

func NewHAMTEvidence

func NewHAMTEvidence(proof []byte) *HAMTEvidence

NewHAMTEvidence creates a new HAMT evidence from proof bytes.

func (*HAMTEvidence) Bytes

func (e *HAMTEvidence) Bytes() []byte

Bytes returns the proof bytes.

func (*HAMTEvidence) Equals

func (e *HAMTEvidence) Equals(other Evidence) bool

Equals checks equality.

func (*HAMTEvidence) Kind

func (e *HAMTEvidence) Kind() EvidenceKind

Kind returns EvidenceKindHAMT.

func (*HAMTEvidence) String

func (e *HAMTEvidence) String() string

String returns a hex representation.

type ImplicitEvidence

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

ImplicitEvidence represents block content for Merkle-DAG traversal.

func NewImplicitEvidence

func NewImplicitEvidence(blockContent []byte) *ImplicitEvidence

NewImplicitEvidence creates a new implicit evidence from block content.

func (*ImplicitEvidence) Bytes

func (e *ImplicitEvidence) Bytes() []byte

Bytes returns the block content bytes.

func (*ImplicitEvidence) Equals

func (e *ImplicitEvidence) Equals(other Evidence) bool

Equals checks equality.

func (*ImplicitEvidence) Kind

func (e *ImplicitEvidence) Kind() EvidenceKind

Kind returns EvidenceKindImplicit.

func (*ImplicitEvidence) String

func (e *ImplicitEvidence) String() string

String returns a summary.

Jump to

Keyboard shortcuts

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