document

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInvalidDID         ErrorCode = "invalidDid"
	ErrMethodNotSupported ErrorCode = "methodNotSupported"
	ErrNotFound           ErrorCode = "notFound"
	ErrUnknownNetwork     ErrorCode = "unknownNetwork"

	StateType                            = "Iden3StateInfo2023"
	Iden3ResolutionMetadataType          = "Iden3ResolutionMetadata"
	EcdsaSecp256k1RecoveryMethod2020Type = "EcdsaSecp256k1RecoveryMethod2020"
)
View Source
const (
	EcdsaSecp256k1RecoveryContext = "https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-2.0.jsonld"
)
View Source
const EthereumEip712SignatureProof2021Type verifiable.ProofType = "EthereumEip712Signature2021"

EthereumEip712SignatureProof2021Type is a proof type for EIP172 signature proofs nolint:stylecheck // we need to keep the name as it is

Variables

This section is empty.

Functions

func DidResolutionMetadataSigContext added in v0.0.5

func DidResolutionMetadataSigContext() []string

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 {
	Context     []string            `json:"@context,omitempty"`
	Error       ErrorCode           `json:"error,omitempty"`
	Message     string              `json:"message,omitempty"`
	ContentType string              `json:"contentType,omitempty"`
	Retrieved   time.Time           `json:"retrieved,omitempty"`
	Type        string              `json:"type,omitempty"`
	Proof       DidResolutionProofs `json:"proof,omitempty"`
}

DidResolutionMetadata representation of resolution metadata.

type DidResolutionProof added in v0.0.5

type DidResolutionProof interface {
	ProofType() verifiable.ProofType
}

type DidResolutionProofs added in v0.0.5

type DidResolutionProofs []DidResolutionProof

type ErrorCode

type ErrorCode string

type EthereumEip712SignatureProof2021 added in v0.0.5

type EthereumEip712SignatureProof2021 struct {
	Type               verifiable.ProofType `json:"type"`
	ProofPurpose       string               `json:"proofPurpose"`
	ProofValue         string               `json:"proofValue"`
	VerificationMethod string               `json:"verificationMethod"`
	Created            time.Time            `json:"created"`
	Eip712             apitypes.TypedData   `json:"eip712"`
}

func (*EthereumEip712SignatureProof2021) ProofType added in v0.0.5

Jump to

Keyboard shortcuts

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