personality

package
v0.0.0-...-7d7216e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package personality runs a simple Trillian personality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignedCheckpoint

type SignedCheckpoint []byte

SignedCheckpoint is a serialised form of a checkpoint+signatures.

type TrillianP

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

TrillianP is a personality backed by a trillian log.

func NewPersonality

func NewPersonality(logAddr string, treeID int64, s note.Signer) (*TrillianP, error)

NewPersonality creates a new Trillian personality from the flags.

func (*TrillianP) Append

func (p *TrillianP) Append(ctx context.Context, entry []byte) (SignedCheckpoint, error)

Append adds an entry to the Trillian log and waits to return the new checkpoint.

func (*TrillianP) GetChkpt

func (p *TrillianP) GetChkpt(ctx context.Context) (SignedCheckpoint, error)

GetChkpt gets the latest checkpoint.

func (*TrillianP) ProveIncl

func (p *TrillianP) ProveIncl(ctx context.Context, chkptSize uint64, entry []byte) (*trillian.Proof, error)

ProveIncl returns an inclusion proof for a given checkpoint and entry.

func (*TrillianP) UpdateChkpt

func (p *TrillianP) UpdateChkpt(ctx context.Context, chkptSize uint64) (SignedCheckpoint, *trillian.Proof, error)

UpdateChkpt gets the latest checkpoint for the Trillian log and proves its consistency with a provided one.

Jump to

Keyboard shortcuts

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