vct

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

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
}

Client represents VCT client.

func New

func New(endpoint string, signer signer, metrics metricsProvider, opts ...ClientOpt) *Client

New returns the client.

func (*Client) Witness

func (c *Client) Witness(anchorCred []byte) ([]byte, error)

Witness credentials.

type ClientOpt

type ClientOpt func(*clientOptions)

ClientOpt represents client option func.

func WithAuthReadToken

func WithAuthReadToken(authToken string) ClientOpt

WithAuthReadToken add auth token.

func WithAuthWriteToken

func WithAuthWriteToken(authToken string) ClientOpt

WithAuthWriteToken add auth token.

func WithDocumentLoader

func WithDocumentLoader(loader ld.DocumentLoader) ClientOpt

WithDocumentLoader allows providing document loader.

func WithHTTPClient

func WithHTTPClient(client HTTPClient) ClientOpt

WithHTTPClient allows providing HTTP client.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient represents HTTP client.

type Proof

type Proof struct {
	Context interface{}      `json:"@context"`
	Proof   verifiable.Proof `json:"proof"`
}

Proof represents response.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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