aoprovider

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OakClient

type OakClient struct {
	// contains filtered or unexported fields
}

OakClient implements Oak client.

func New

func New(namespace string, cas common.CASReader, opts ...Option) (*OakClient, error)

New creates new Oak client.

func (*OakClient) GetAnchorOrigin

func (c *OakClient) GetAnchorOrigin(cid, suffix string) (interface{}, error)

GetAnchorOrigin will retrieve anchor credential based on CID, parse Sidetree core index file referenced in anchor credential and return anchor origin.

type Option

type Option func(opts *OakClient)

Option is an option for document handler.

func WithCurrentProtocolVersion

func WithCurrentProtocolVersion(version string) Option

WithCurrentProtocolVersion sets optional current protocol versions. Defaults to the latest in the protocol versions list.

func WithDisableProofCheck

func WithDisableProofCheck(disableProofCheck bool) Option

WithDisableProofCheck sets optional disable proof check flag.

func WithJSONLDDocumentLoader

func WithJSONLDDocumentLoader(docLoader ld.DocumentLoader) Option

WithJSONLDDocumentLoader sets optional document loader.

func WithProtocolVersions

func WithProtocolVersions(versions []string) Option

WithProtocolVersions sets optional client protocol versions.

func WithPublicKeyFetcher

func WithPublicKeyFetcher(pkf verifiable.PublicKeyFetcher) Option

WithPublicKeyFetcher sets optional public key fetcher.

Jump to

Keyboard shortcuts

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