peer

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StoreNamespace store name space for DID Store.
	StoreNamespace = "peer"
)

Variables

This section is empty.

Functions

func NewDoc

func NewDoc(publicKey []did.PublicKey, authentication []did.VerificationMethod,
	opts ...did.DocOption) (*did.Doc, error)

NewDoc returns the resolved variant of the genesis version of the peer DID document.

Types

type VDRI

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

VDRI implements building new peer dids.

func New

func New(s storage.Provider) (*VDRI, error)

New return new instance of peer vdri.

func (*VDRI) Accept

func (v *VDRI) Accept(method string) bool

Accept did method.

func (*VDRI) Build

func (v *VDRI) Build(pubKey *vdriapi.PubKey, opts ...vdriapi.DocOpts) (*did.Doc, error)

Build builds new DID Document.

func (*VDRI) Close

func (v *VDRI) Close() error

Close frees resources being maintained by vdri.

func (*VDRI) Get

func (v *VDRI) Get(id string) (*did.Doc, error)

Get returns Peer DID Document.

func (*VDRI) Read

func (v *VDRI) Read(didID string, _ ...vdriapi.ResolveOpts) (*did.Doc, error)

Read implements didresolver.DidMethod.Read interface (https://w3c-ccg.github.io/did-resolution/#resolving-input)

func (*VDRI) Store

func (v *VDRI) Store(doc *did.Doc, by *[]vdriapi.ModifiedBy) error

Store saves Peer DID Document along with user key/signature.

Jump to

Keyboard shortcuts

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