ErrSTHTooOld is returned if the STH passed to Update needs to be updated.
var ErrSTHTooOld = errors.New("STH too old")
Witness consists of the witness' URL and signature verifier.
type Witness struct { URL *url.URL }
func (w Witness) GetLatestSTH(ctx context.Context, logID string) ([]byte, error)
GetLatestSTH returns a recent STH from the witness for the specified log ID.
func (w Witness) Update(ctx context.Context, logID string, sth []byte, proof [][]byte) ([]byte, error)
Update attempts to clock the witness forward for the given logID. The latest signed STH will be returned if this succeeds, or if the error is http.ErrSTHTooOld. In all other cases no STH should be expected.