did

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DIDFromPubKey added in v0.3.0

func DIDFromPubKey(pk cryptotypes.PubKey) (string, error)

DIDFromPubKey constructs and returns a DID from a public key.

func IsValidDID added in v0.3.0

func IsValidDID(didStr string) error

IsValidDID verifies the validity of the specified did string.

func IssueDID added in v0.3.0

func IssueDID(acc sdk.AccountI) (string, error)

IssueDID produces a DID for a SourceHub account.

func IssueModuleDID added in v0.3.0

func IssueModuleDID(moduleName string) string

IssueModuleDID produces a DID for a SourceHub module, based on its name.

The issued did uses a pseudo-method named "module", which simply appends the module name.

func ProduceDID added in v0.3.0

func ProduceDID() (string, stdcrypto.Signer, error)

Types

type DIDDocument added in v0.3.0

type DIDDocument struct {
	*did.Document
}

type KeyResolver added in v0.3.0

type KeyResolver struct {
}

func (*KeyResolver) Resolve added in v0.3.0

func (r *KeyResolver) Resolve(ctx context.Context, did string) (DIDDocument, error)

type Resolver added in v0.3.0

type Resolver interface {
	Resolve(ctx context.Context, did string) (DIDDocument, error)
}

Jump to

Keyboard shortcuts

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