Documentation
¶
Index ¶
- Constants
- func CreateCredential(subjects []*models.CredentialSubject, nodeURL string, issuer string, ...) ([]*models.Credential, error)
- func RenewCredential(credentialID string, subject *models.CredentialSubject, nodeURL string, ...) (*models.Credential, error)
- func RevokeCredential(credentialID string, nodeURL string, privateKey string, ...) error
- func SendCredential(credentials []*models.Credential, nodeURL string, publicAddress string, ...) (*models.VerifyResponse, error)
- func ValidateDid(DID string) (bool, error)
- func VerifyCredential(credentials []*models.CredentialData, nodeURL string, publicAddress string, ...) (*models.VerifyResponse, error)
Constants ¶
View Source
const ( // Replace sender@example.com with your "From" address. // This address must be verified with Amazon SES. Sender = "adrianp@iadb.org" // Replace us-west-2 with the AWS Region you're using for Amazon SES. AwsRegion = "us-east-1" // The subject line for the email. Subject = "Your Credential Verifiable" //The email body for recipients with non-HTML email clients. TextBody = "This is your credential verifiable which contains information about the document that was hashed" // The character encoding for the email. CharSet = "UTF-8" )
Variables ¶
This section is empty.
Functions ¶
func CreateCredential ¶
func CreateCredential(subjects []*models.CredentialSubject, nodeURL string, issuer string, privateKey string, verificationContract string, repositoryContract string) ([]*models.Credential, error)
CreateCredential saving the hash into blockchain
func RenewCredential ¶
func RenewCredential(credentialID string, subject *models.CredentialSubject, nodeURL string, issuer string, privateKey string, verificationContract string, repositoryContract string) (*models.Credential, error)
RenewCredential revoking old credential and saving the new credential hash into blockchain
func RevokeCredential ¶
func RevokeCredential(credentialID string, nodeURL string, privateKey string, revocationContract string, repositoryContract string) error
RevokeCredential into blockchain
func SendCredential ¶
func SendCredential(credentials []*models.Credential, nodeURL string, publicAddress string, verificationContract string) (*models.VerifyResponse, error)
SendCredential saved into blockchain
func ValidateDid ¶
ValidateDid Signature and tamper proof using JWT format
func VerifyCredential ¶
func VerifyCredential(credentials []*models.CredentialData, nodeURL string, publicAddress string, verificationContract string) (*models.VerifyResponse, error)
VerifyCredential saved into blockchain
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.