Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePresentation ¶
func CreatePresentation( holderDID string, holderPrivateKey ed25519.PrivateKey, credentials []string, audience string, nonce string, ) (string, error)
CreatePresentation creates a signed Verifiable Presentation
func GenerateNonce ¶
GenerateNonce creates a random nonce for challenge-response
Types ¶
type VPClaims ¶
type VPClaims struct {
Issuer string `json:"iss"`
Subject string `json:"sub"`
Audience string `json:"aud"`
Nonce string `json:"nonce"`
IssuedAt time.Time `json:"iat"`
ExpiresAt time.Time `json:"exp"`
VP VerifiablePresentation `json:"vp"`
}
VPClaims represents the PASETO claims for a Verifiable Presentation
type VerifiablePresentation ¶
type VerifiablePresentation struct {
Context []string `json:"@context"`
Type []string `json:"type"`
ID string `json:"id,omitempty"`
Holder string `json:"holder"`
VerifiableCredential []string `json:"verifiableCredential"`
}
VerifiablePresentation represents a VP containing one or more VCs
Click to show internal directories.
Click to hide internal directories.