vct

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 13 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, 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 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 []string         `json:"@context"`
	Proof   verifiable.Proof `json:"proof"`
}

Proof represents response.

Jump to

Keyboard shortcuts

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