did

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Base58BTCMultibase byte = 'z'

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyRegistry

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

KeyRegistry implements a limit DID registry for the "key" method

func NewKeyRegistry

func NewKeyRegistry() *KeyRegistry

func (*KeyRegistry) Create

func (r *KeyRegistry) Create(key types.PubKey) (string, error)

Create generates a DID Key identifier from a PubKey Currently only cosmos-sdk secp256k1 keys are supported

func (*KeyRegistry) ResolveKey

func (r *KeyRegistry) ResolveKey(did string) (types.PubKey, error)

type Registry

type Registry interface {
	// ResolveKey resolves the did and returns the first key from it
	ResolveKey(did string) (types.PubKey, error)

	// Create prodcues a DID from a pub key
	Create(key types.PubKey) (string, error)
}

Registry model a DID method registry

Jump to

Keyboard shortcuts

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