client

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: BSD-2-Clause Imports: 11 Imported by: 2

Documentation

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
}

func New

func New(cfg Config) *Client

func (*Client) AddLeaf

func (cli *Client) AddLeaf(ctx context.Context, req requests.Leaf, header *token.SubmitHeader) (bool, error)

func (*Client) AddTreeHead added in v0.2.0

func (cli *Client) AddTreeHead(ctx context.Context, req requests.AddTreeHead) (types.Cosignature, error)

func (*Client) GetConsistencyProof

func (cli *Client) GetConsistencyProof(ctx context.Context, req requests.ConsistencyProof) (proof types.ConsistencyProof, err error)

func (*Client) GetInclusionProof

func (cli *Client) GetInclusionProof(ctx context.Context, req requests.InclusionProof) (proof types.InclusionProof, err error)

func (*Client) GetLeaves

func (cli *Client) GetLeaves(ctx context.Context, req requests.Leaves) (leaves []types.Leaf, err error)

func (*Client) GetSecondaryTreeHead added in v0.1.24

func (cli *Client) GetSecondaryTreeHead(ctx context.Context) (sth types.SignedTreeHead, err error)

func (*Client) GetTreeHead added in v0.1.20

func (cli *Client) GetTreeHead(ctx context.Context) (cth types.CosignedTreeHead, err error)

func (*Client) GetTreeSize added in v0.2.0

func (cli *Client) GetTreeSize(ctx context.Context, req requests.GetTreeSize) (uint64, error)

type Config

type Config struct {
	UserAgent string
	URL       string
}

type Log added in v0.1.24

Interface for log api.

type Secondary added in v0.1.24

type Secondary interface {
	GetSecondaryTreeHead(context.Context) (types.SignedTreeHead, error)
}

Interface for the secondary node's api.

type Witness added in v0.2.0

type Witness interface {
	GetTreeSize(context.Context, requests.GetTreeSize) (uint64, error)
	AddTreeHead(context.Context, requests.AddTreeHead) (types.Cosignature, error)
}

Jump to

Keyboard shortcuts

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