sidetree

package module
v1.0.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 20 Imported by: 5

Documentation

Overview

Package sidetree implements sidetree client

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 sidetree client.

func New

func New(opts ...Option) *Client

New return sidetree client.

func (*Client) CreateDID

func (c *Client) CreateDID(opts ...create.Option) (*docdid.DocResolution, error)

CreateDID create did doc.

func (*Client) DeactivateDID

func (c *Client) DeactivateDID(did string, opts ...deactivate.Option) error

DeactivateDID deactivate did doc.

func (*Client) RecoverDID

func (c *Client) RecoverDID(did string, opts ...recovery.Option) error

RecoverDID recover did doc.

func (*Client) UpdateDID

func (c *Client) UpdateDID(did string, opts ...update.Option) error

UpdateDID update did doc.

type Option

type Option func(opts *Client)

Option is a DID client instance option.

func WithAuthToken

func WithAuthToken(authToken string) Option

WithAuthToken add auth token.

func WithAuthTokenProvider

func WithAuthTokenProvider(p authTokenProvider) Option

WithAuthTokenProvider add auth token provider.

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Option

WithHTTPClient option is for custom http client.

func WithSidetreeOperationRequestFnc

func WithSidetreeOperationRequestFnc(fnc func(req []byte, getEndpoints func() ([]string, error)) ([]byte, error)) Option

WithSidetreeOperationRequestFnc overrides default sidetree operation request.

Directories

Path Synopsis
Package api include interface
Package api include interface
Package doc implements sidetree document
Package doc implements sidetree document
option
create
Package create implements sidetree create did option
Package create implements sidetree create did option
deactivate
Package deactivate implements sidetree deactivate did option
Package deactivate implements sidetree deactivate did option
recovery
Package recovery implements sidetree recovery did option
Package recovery implements sidetree recovery did option
update
Package update implements sidetree update did option
Package update implements sidetree update did option

Jump to

Keyboard shortcuts

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