pkg

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TrustedEntities = trustedEntitiesStore{
	Issuers: make(map[string]bool),
}

Functions

func BuildExampleUniversityVC

func BuildExampleUniversityVC(universityID, recipient string) (*credential.VerifiableCredential, error)

BuildExampleUniversityVC Makes a Verifiable Credential using the VC data type directly. Alternatively, use the builder. A VC is set of tamper-evident claims and metadata that cryptographically proves who issued it. Building a VC means using the CredentialBuilder as part of the credentials package in the ssk-sdk. VerifiableCredential is the verifiable credential model outlined in the vc-data-model spec: https://www.w3.org/TR/2021/REC-vc-data-model-20211109/#basic-concept

func BuildPresentationSubmission

func BuildPresentationSubmission(presentationRequest []byte, signer crypto.JWTSigner, verifier crypto.JWTVerifier, vc credential.VerifiableCredential) ([]byte, error)

BuildPresentationSubmission builds a submission using... https://github.com/TBD54566975/ssi-sdk/blob/d279ca2779361091a70b8aa3c685a388067409a9/credential/exchange/submission.go#L126

func GenerateDIDPeer

func GenerateDIDPeer() (did.DID, error)

func MakePresentationData

func MakePresentationData(id string, inputID string) (exchange.PresentationDefinition, error)

MakePresentationData Makes a dummy presentation definition. These are eventually transported via Presentation Request. For more information on presentation definitions view the spec here: https://identity.foundation/presentation-exchange/#term:presentation-definition

func MakePresentationRequest

func MakePresentationRequest(jwk cryptosuite.JSONWebKey2020, presentationData exchange.PresentationDefinition, targetID string) (pr []byte, signer *crypto.JWTSigner, err error)

MakePresentationRequest Builds a presentation request (PR). A PR is sent by a holder to a verifier. It can be sent over multiple mechanisms. For more information, please go to here: https://identity.foundation/presentation-exchange/#presentation-request and for the source code with the sdk, https://github.com/TBD54566975/ssi-sdk/blob/main/credential/exchange/request.go is appropriate to start off with.

func ValidateAccess

func ValidateAccess(verifier crypto.JWTVerifier, data []byte) error

ValidateAccess is a very simple validation process against a Presentation Submission It checks: 1. That the VC is valid 2. That the VC was issued by a trusted entity

Types

type Entity

type Entity struct {
	Name string
	// contains filtered or unexported fields
}

func NewEntity

func NewEntity(name string, keyType string) (*Entity, error)

func (*Entity) GetWallet

func (e *Entity) GetWallet() *example.SimpleWallet

Jump to

Keyboard shortcuts

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