document

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EcdsaSecp256k1RecoveryContext = "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-2.0.jsonld"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DidDocumentMetadata

type DidDocumentMetadata struct{}

DidDocumentMetadata metadata of did document.

type DidResolution

type DidResolution struct {
	Context     string                  `json:"@context,omitempty"`
	DidDocument *verifiable.DIDDocument `json:"didDocument"`
	// should exist in responses, but can be empty.
	// https://www.w3.org/TR/did-core/#did-resolution
	DidResolutionMetadata *DidResolutionMetadata `json:"didResolutionMetadata"`
	DidDocumentMetadata   *DidDocumentMetadata   `json:"didDocumentMetadata"`
}

DidResolution representation of did resolution.

func NewDidErrorResolution

func NewDidErrorResolution(errCode ErrorCode, errMsg string) *DidResolution

func NewDidInvalidResolution

func NewDidInvalidResolution(msg string) *DidResolution

func NewDidMethodNotSupportedResolution

func NewDidMethodNotSupportedResolution(msg string) *DidResolution

func NewDidNotFoundResolution

func NewDidNotFoundResolution(msg string) *DidResolution

func NewDidResolution

func NewDidResolution() *DidResolution

NewDidResolution create did resolution with default values.

func NewNetworkNotSupportedForDID

func NewNetworkNotSupportedForDID(msg string) *DidResolution

type DidResolutionMetadata

type DidResolutionMetadata struct {
	Error       ErrorCode `json:"error,omitempty"`
	Message     string    `json:"message,omitempty"`
	ContentType string    `json:"contentType,omitempty"`
	Retrieved   time.Time `json:"retrieved,omitempty"`
}

DidResolutionMetadata representation of resolution metadata.

type ErrorCode

type ErrorCode string
const (
	ErrInvalidDID         ErrorCode = "invalidDid"
	ErrMethodNotSupported ErrorCode = "methodNotSupported"
	ErrNotFound           ErrorCode = "notFound"
	ErrUnknownNetwork     ErrorCode = "unknownNetwork"

	StateType                            = "Iden3StateInfo2023"
	EcdsaSecp256k1RecoveryMethod2020Type = "EcdsaSecp256k1RecoveryMethod2020"
)

Jump to

Keyboard shortcuts

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