jwk

package
v0.0.0-...-f93f300 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Prefix did:jwk prefix
	Prefix = "did:jwk"
)

Variables

This section is empty.

Functions

func GetSupportedDIDJWKTypes

func GetSupportedDIDJWKTypes() []crypto.KeyType

GetSupportedDIDJWKTypes returns all supported did:jwk key types

func IsSupportedJWKType

func IsSupportedJWKType(kt crypto.KeyType) bool

IsSupportedJWKType returns if a given key type is supported for the did:jwk method

Types

type JWK

type JWK string

func CreateDIDJWK

func CreateDIDJWK(publicKeyJWK jwx.PublicKeyJWK) (*JWK, error)

CreateDIDJWK creates a did:jwk from a JWK public key by following the steps in the spec: https://github.com/quartzjer/did-jwk/blob/main/spec.md

func GenerateDIDJWK

func GenerateDIDJWK(kt crypto.KeyType) (gocrypto.PrivateKey, *JWK, error)

GenerateDIDJWK takes in a key type value that this library supports and constructs a conformant did:jwk identifier.

func (JWK) Expand

func (d JWK) Expand() (*did.Document, error)

Expand turns the DID JWK into a compliant DID Document

func (JWK) IsValid

func (d JWK) IsValid() bool

func (JWK) Method

func (JWK) Method() did.Method

func (JWK) String

func (d JWK) String() string

func (JWK) Suffix

func (d JWK) Suffix() (string, error)

Suffix returns the value without the `did:jwk` prefix

type Resolver

type Resolver struct{}

func (Resolver) Methods

func (Resolver) Methods() []did.Method

func (Resolver) Resolve

Jump to

Keyboard shortcuts

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