sdjwt

package
v0.0.0-...-dec6028 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	VCSDJWTType = "vc+sd-jwt"
	VPSDJWTType = "vp+sd-jwt"
)

Variables

This section is empty.

Functions

func SignVerifiableCredential

func SignVerifiableCredential(vc credential.VerifiableCredential, disclosurePaths []DisclosurePath, key jwk.Key) (*string, error)

SignVerifiableCredential creates an SD-JWT from a VerifiableCredential, making specified fields selectively disclosable according to the provided paths.

func SignVerifiablePresentation

func SignVerifiablePresentation(vp credential.VerifiablePresentation, disclosurePaths []DisclosurePath, key jwk.Key) (*string, error)

SignVerifiablePresentation creates an SD-JWT from a VerifiablePresentation, making specified fields selectively disclosable according to the provided paths.

func VerifyVerifiableCredential

func VerifyVerifiableCredential(sdJWT string, key jwk.Key) (*credential.VerifiableCredential, error)

VerifyVerifiableCredential verifies an SD-JWT credential and returns the disclosed claims

func VerifyVerifiablePresentation

func VerifyVerifiablePresentation(sdJWT string, key jwk.Key) (*credential.VerifiablePresentation, error)

VerifyVerifiablePresentation verifies an SD-JWT presentation and returns the disclosed claims

Types

type DisclosurePath

type DisclosurePath string

DisclosurePath represents a path to a field that should be made selectively disclosable Example paths: - "credentialSubject.id" - "credentialSubject.address.streetAddress" - "credentialSubject.nationalities[0]" for array element

Jump to

Keyboard shortcuts

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