testutil

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocumentLoader

func DocumentLoader(t *testing.T, extraContexts ...ldcontext.Document) *ld.DocumentLoader

DocumentLoader returns a document loader with preloaded test contexts.

func SignedClaimsJWTWithExistingPrivateKey added in v1.1.0

func SignedClaimsJWTWithExistingPrivateKey(
	t *testing.T, verMethodDIDKeyID string, signer api.FixedKeySigner, claims interface{}) string

func SignedVC

SignedVC returns signed VC represented by vcBytes.

func SignedVPWithExistingPrivateKey added in v1.1.0

func SignedVPWithExistingPrivateKey(
	t *testing.T,
	presentation *verifiable.Presentation,
	format vcs.Format,
	verMethodDIDKeyID string,
	keyType kms.KeyType,
	signer api.FixedKeySigner,
	opts ...LDPOpt,
) *verifiable.Presentation

SignedVPWithExistingPrivateKey returns signed presentation using kh.

Types

type LDPOpt added in v1.1.0

type LDPOpt func(ldpc *verifiable.LinkedDataProofContext)

func WithChallenge added in v1.1.0

func WithChallenge(challenge string) LDPOpt

func WithDomain added in v1.1.0

func WithDomain(domain string) LDPOpt

type SignedClaimsJWTResult added in v1.1.0

type SignedClaimsJWTResult struct {
	JWT               string
	VDR               vdrapi.Registry
	Signer            api.FixedKeySigner
	VerMethodDIDKeyID string
	VerMethodDID      string
	KeyType           kms.KeyType
}

func SignedClaimsJWT added in v1.1.0

func SignedClaimsJWT(t *testing.T, claims interface{}) *SignedClaimsJWTResult

type SignedPresentationResult added in v1.1.0

type SignedPresentationResult struct {
	Presentation      *verifiable.Presentation
	VDR               vdrapi.Registry
	Kh                *jwk.JWK
	VerMethodDIDKeyID string
}

func SignedVP

func SignedVP(
	t *testing.T,
	vpBytes []byte,
	format vcs.Format,
	opts ...LDPOpt,
) *SignedPresentationResult

SignedVP returns signed Presentation represented by vpBytes.

Jump to

Keyboard shortcuts

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