Documentation
¶
Overview ¶
Package helloworld runs a simple client, designed to interact with a personality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a verifier that maintains a checkpoint as state.
func NewClient ¶
func NewClient(prsn Personality, nv note.Verifier) Client
NewClient creates a new client with an empty checkpoint and a given personality to talk to. In real usage, a client should persist this checkpoint across different runs to ensure consistency.
func (*Client) UpdateChkpt ¶
func (c *Client) UpdateChkpt(chkptNewRaw personality.SignedCheckpoint, pf *trillian.Proof) error
UpdateChkpt allows a client to update its stored checkpoint. In a real use case it would be important for the client to check the signature contained in the checkpoint before verifying consistency.
type Personality ¶
type Personality interface {
// Append stores an entry in the log and, once it is there, returns a
// new checkpoint that commits to the new entry (in addition to all
// previous ones).
Append(ctx context.Context, entry []byte) (personality.SignedCheckpoint, error)
// ProveIncl proves the inclusion of a given entry in a given checkpoint size.
// It is the job of the client to verify this inclusion proof in order to convince
// itself that the entry really has been included in the log.
ProveIncl(ctx context.Context, cpSize uint64, entry []byte) (*trillian.Proof, error)
// UpdateChkpt provides a new checkpoint along with a consistency proof to it
// from the specified older checkpoint size.
// Again, it is the job of the client to verify this consistency proof.
UpdateChkpt(ctx context.Context, oldCPSize uint64) (personality.SignedCheckpoint, *trillian.Proof, error)
}
Personality is the front-end for the Trillian log.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package personality runs a simple Trillian personality.
|
Package personality runs a simple Trillian personality. |
Click to show internal directories.
Click to hide internal directories.