peer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 18 Imported by: 18

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 DocFromGenesisDelta added in v0.1.8

func DocFromGenesisDelta(initialState string) (*did.Doc, error)

DocFromGenesisDelta parses a marshaled genesis delta, returning the doc contained within.

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.

func UnsignedGenesisDelta added in v0.1.8

func UnsignedGenesisDelta(doc *did.Doc) (string, error)

UnsignedGenesisDelta returns a marshaled and base64-encoded json array containing a single peer DID delta for the given doc.

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, opts ...vdrapi.DIDMethodOption) bool

Accept did method.

func (*VDR) Close

func (v *VDR) Close() error

Close frees resources being maintained by vdr.

func (*VDR) Create added in v0.1.6

func (v *VDR) Create(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 added in v0.1.6

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.DIDMethodOption) (*did.DocResolution, error)

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

func (*VDR) Update added in v0.1.6

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