peer

package
v0.1.6-0...-5c25bcb Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StoreNamespace store name space for DID Store.
	StoreNamespace = "peer"
	// DefaultServiceType default service type.
	DefaultServiceType = "defaultServiceType"
	// DefaultServiceEndpoint default service endpoint.
	DefaultServiceEndpoint = "defaultServiceEndpoint"
)
View Source
const (

	// DIDMethod is the peer did method name: https://identity.foundation/peer-did-method-spec/#method-name.
	DIDMethod = "peer"
)

Variables

This section is empty.

Functions

func NewDoc

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

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

Types

type VDR

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

VDR implements building new peer dids.

func New

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

New return new instance of peer vdr.

func (*VDR) Accept

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

Accept did method.

func (*VDR) Close

func (v *VDR) Close() error

Close frees resources being maintained by vdr.

func (*VDR) Create

func (v *VDR) Create(keyManager kms.KeyManager, didDoc *did.Doc,
	opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)

Create create new DID Document. TODO https://github.com/hyperledger/aries-framework-go/issues/2466

func (*VDR) Deactivate

func (v *VDR) Deactivate(did string, opts ...vdrapi.DIDMethodOption) error

Deactivate did doc.

func (*VDR) Get

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

Get returns Peer DID Document.

func (*VDR) Read

func (v *VDR) Read(didID string, _ ...vdrapi.ResolveOption) (*did.DocResolution, error)

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

func (*VDR) Update

func (v *VDR) Update(didDoc *diddoc.Doc, opts ...vdrapi.DIDMethodOption) error

Update did doc.

Jump to

Keyboard shortcuts

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