models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 1 Imported by: 3

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

type VerificationKey struct {
	JSONWebKey *jwk.JWK
	Raw        []byte
}

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.

Directories

Path Synopsis
Package issuer contains models for representing an issuer's metadata.
Package issuer contains models for representing an issuer's metadata.

Jump to

Keyboard shortcuts

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