chain

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(c *Chain, r *record.Record) error

Types

type Chain

type Chain struct {
	ChainID     string              `json:"chain_id"`
	CreatedAt   time.Time           `json:"created_at"`
	RecordCount int                 `json:"record_count"`
	HeadHash    string              `json:"head_hash,omitempty"`
	Records     []record.Record     `json:"records"`
	Signatures  []signing.Signature `json:"signatures,omitempty"`
}

func New

func New(chainID string, createdAt time.Time) *Chain

type Verification

type Verification struct {
	Intact     bool   `json:"intact"`
	Count      int    `json:"count"`
	BreakPoint string `json:"break_point,omitempty"`
	BreakIndex int    `json:"break_index,omitempty"`
	HeadHash   string `json:"head_hash,omitempty"`
}

func Verify

func Verify(c *Chain) (*Verification, error)

func VerifyRange

func VerifyRange(c *Chain, from, to time.Time) (*Verification, error)

Jump to

Keyboard shortcuts

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