From 65c41183088f111aa289d1ea4c51bef7fa971226 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Tue, 23 Feb 2021 12:34:21 +0100 Subject: added proof request types --- types/serialize.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'types/serialize.go') diff --git a/types/serialize.go b/types/serialize.go index da4bd9f..af0a1ed 100644 --- a/types/serialize.go +++ b/types/serialize.go @@ -6,6 +6,22 @@ import ( "github.com/google/certificate-transparency-go/tls" ) +const ( + HashSizeV1 = 32 +) + +// GetProofByHashV1 is a serializable get-proof-by-hash request +type GetProofByHashV1 struct { + Hash [HashSizeV1]byte + TreeSize uint64 +} + +// GetConsistencyProofV1 is a serializable get-consistency-proof request +type GetConsistencyProofV1 struct { + First uint64 + Second uint64 +} + // Marshal marshals a TLS-encodable structure func Marshal(item interface{}) ([]byte, error) { serialized, err := tls.Marshal(item) -- cgit v1.2.3