identifiers

package
v0.0.0-...-b33cbf9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DIDRegEx = regexp.MustCompile("^[a-z0-9]+:([a-z0-9]+):(.*)$")

Functions

func AbbreviateVerkey

func AbbreviateVerkey(did, verkey string) string

func ConvertSeed

func ConvertSeed(seed string) ([]byte, error)

Types

type DID

type DID struct {
	DIDVal DIDValue
	Verkey string
}

func CreateDID

func CreateDID(info *MyDIDInfo) (*DID, error)

func (*DID) AbbreviateVerkey

func (r *DID) AbbreviateVerkey() string

func (*DID) MethodID

func (r *DID) MethodID() string

func (*DID) String

func (r *DID) String() string

type DIDValue

type DIDValue struct {
	MethodSpecificID string
	Method           string
}

func ParseDID

func ParseDID(did string) DIDValue

func (*DIDValue) Abbreviatable

func (r *DIDValue) Abbreviatable() bool

func (*DIDValue) String

func (r *DIDValue) String() string

type KeyPair

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

func NewKeyPair

func NewKeyPair(pubk []byte, id string) *KeyPair

func (*KeyPair) ID

func (r *KeyPair) ID() string

func (*KeyPair) PublicKey

func (r *KeyPair) PublicKey() string

func (*KeyPair) RawPublicKey

func (r *KeyPair) RawPublicKey() ed25519.PublicKey

type MyDIDInfo

type MyDIDInfo struct {
	DID        string
	PublicKey  []byte
	Cid        bool
	MethodName string
}

Jump to

Keyboard shortcuts

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