treedb

package
v0.20260901.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIssuanceLogNotInitialized = errors.New("issuance log DB not initialized")

Functions

This section is empty.

Types

type CheckpointModel

type CheckpointModel struct {
	ID              int64   `db:"id"`
	MTCLogID        string  `db:"mtcLogID"`
	MTCASignature   []byte  `db:"mtcaSignature"`
	MirrorID        *string `db:"mirrorID"`
	MirrorSignature []byte  `db:"mirrorSignature"`
	TreeSize        int64   `db:"treeSize"`
	RootHash        []byte  `db:"rootHash"`
}

CheckpointModel represents the database storage of a checkpoint and associated signatures.

For signing, the TreeSize and RootHash fields are incorporated into a `cosigned.Message`.

func (*CheckpointModel) Mirrored

func (c *CheckpointModel) Mirrored() bool

func (*CheckpointModel) Valid

func (c *CheckpointModel) Valid() error

type Impl

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

func New

func New(db *db.WrappedMap) *Impl

func (*Impl) AddMirrorSignature

func (i *Impl) AddMirrorSignature(ctx context.Context, id int64, mirrorID string, mirrorCosig []byte, mtcLogID string) error

func (*Impl) LatestCheckpoint

func (i *Impl) LatestCheckpoint(ctx context.Context, mtcLogID string) (*CheckpointModel, error)

Jump to

Keyboard shortcuts

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