vcutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefVCContext = "https://www.w3.org/2018/credentials/v1"
)

Variables

This section is empty.

Functions

func DecodeTypedIDFromJSONRaw

func DecodeTypedIDFromJSONRaw(typedIDBytes json.RawMessage) ([]verifiable.TypedID, error)

DecodeTypedIDFromJSONRaw decodes verifiable type ID from JSON raw.

func GetContextsFromJSONRaw

func GetContextsFromJSONRaw(raw json.RawMessage) ([]string, error)

GetContextsFromJSONRaw reads contexts from raw JSON.

func PrependCredentialPrefix

func PrependCredentialPrefix(credential *verifiable.Credential, prefix string)

PrependCredentialPrefix prepends prefix to credential.ID.

func UpdateIssuer

func UpdateIssuer(credential *verifiable.Credential, issuerDID, issuerName string, overwriteIssuer bool)

UpdateIssuer overrides credential issuer for profile if profile.OverwriteIssuer=true or credential issuer is missing. Credential issuer will always be DID.

func UpdateSignatureTypeContext

func UpdateSignatureTypeContext(credential *verifiable.Credential, signatureType vcsverifiable.SignatureType)

UpdateSignatureTypeContext updates context for JSONWebSignature2020.

Types

This section is empty.

Jump to

Keyboard shortcuts

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