testutil

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 33 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 SignedClaimsCWTWithExistingPrivateKey added in v1.11.0

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

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