issuer

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (

	// VerifiablePresentation vp type.
	VerifiablePresentation = "VerifiablePresentation"

	// ManifestCredentialType vc type.
	ManifestCredentialType = "IssuerManifestCredential"

	// DIDConnectCredentialType vc type.
	DIDConnectCredentialType = "DIDConnection"
)

Variables

This section is empty.

Functions

func CreateAuthorizationCredential

func CreateAuthorizationCredential(did string, docJSON []byte, rpDIDDoc,
	subjectDIDDoc *adaptervc.DIDDoc) *verifiable.Credential

CreateAuthorizationCredential creates authorization credential.

func CreateManifestCredential

func CreateManifestCredential(issuerName string, supportedContexts []string) ([]byte, error)

CreateManifestCredential creates issuer manifest credential.

func CreatePresentation

func CreatePresentation(vc *verifiable.Credential) (*verifiable.Presentation, error)

CreatePresentation creates presentation to be sent to the rp.

Types

type DIDConnectCredential

type DIDConnectCredential struct {
	Subject *DIDConnectCredentialSubject `json:"credentialSubject"`
}

DIDConnectCredential is a VC that contains the DID Connection response data.

type DIDConnectCredentialSubject

type DIDConnectCredentialSubject struct {
	ID              string `json:"id"`
	InviteeDID      string `json:"inviteeDID"`
	InviterDID      string `json:"inviterDID"`
	InviterLabel    string `json:"inviterLabel"`
	ThreadID        string `json:"threadID"`
	ConnectionState string `json:"connectionState"`
}

DIDConnectCredentialSubject is the custom credentialSubject of a DIDConnectCredential.

func ParseWalletResponse

func ParseWalletResponse(vpBytes []byte, docLoader ld.DocumentLoader) (*DIDConnectCredentialSubject, error)

ParseWalletResponse parses VP received from the wallet and returns the DIDConnect response.

type ManifestCredential

type ManifestCredential struct {
	Subject *ManifestCredentialSubject `json:"credentialSubject"`
}

ManifestCredential issuer manifest vc.

type ManifestCredentialSubject

type ManifestCredentialSubject struct {
	ID       string   `json:"id"`
	Contexts []string `json:"contexts"`
}

ManifestCredentialSubject struct for sending the issuer supported contexts.

Jump to

Keyboard shortcuts

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