Documentation ¶
Overview ¶
Package models contains models.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VerificationKey ¶
VerificationKey holds either a JWK or a raw public key.
type VerificationMethod ¶
type VerificationMethod struct { ID string Type string Key VerificationKey }
VerificationMethod represents a DID verification method.
func NewVerificationMethod ¶
func NewVerificationMethod(keyID, vmType string, opt ...VerificationMethodOption) *VerificationMethod
NewVerificationMethod creates VerificationMethod with optional public key.
type VerificationMethodOption ¶
type VerificationMethodOption func(vm *VerificationMethod)
VerificationMethodOption provides an optional public key for initializing a verification method.
func WithJWK ¶
func WithJWK(pubKey *jwk.JWK) VerificationMethodOption
WithJWK initializes the VerificationMethod with public key in JWK format.
func WithRawKey ¶
func WithRawKey(rawKey []byte) VerificationMethodOption
WithRawKey initializes the VerificationMethod with public key in raw []byte format.
Click to show internal directories.
Click to hide internal directories.