Documentation ¶
Index ¶
- Constants
- func CreateAuthorizationCredential(did string, docJSON []byte, rpDIDDoc, subjectDIDDoc *adaptervc.DIDDoc) *verifiable.Credential
- func CreateManifestCredential(issuerName string, supportedContexts []string) ([]byte, error)
- func CreatePresentation(vc *verifiable.Credential) (*verifiable.Presentation, error)
- type DIDConnectCredential
- type DIDConnectCredentialSubject
- type ManifestCredential
- type ManifestCredentialSubject
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 ¶
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 ¶
ManifestCredentialSubject struct for sending the issuer supported contexts.
Click to show internal directories.
Click to hide internal directories.