aboutsummaryrefslogtreecommitdiff
path: root/pkg/client/api/api.go
blob: 38406dfff5756b6bd937bdec107b13b8ff3b5ce9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// package api implements the Sigsum v0 API.  See
//
//     https://git.sigsum.org/sigsum/tree/doc/api.md
//
// for further details.  No verification, retries, etc., is done here.
package api

import (
	"git.sigsum.org/sigsum-go/pkg/requests"
	"git.sigsum.org/sigsum-go/pkg/types"
)

type API interface {
	GetToCosignTreeHead() (*types.SignedTreeHead, error)
	GetCosignedTreeHead() (*types.CosignedTreeHead, error)
	GetInclusionProof(treeSize uint64, leafHash *types.Hash) (*types.InclusionProof, error)
	GetConsistencyProof(oldSize, newSize uint64) (*types.ConsistencyProof, error)
	GetLeaves(startSize, endSize uint64) (*types.Leaves, error)

	AddLeaf(*requests.Leaf) error
	AddCosignature(*requests.Cosignature) error
}