request

package
v0.0.0-...-55a0270 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsV1Credential

func IsV1Credential(credStr string) bool

Types

type ProofRequestHolder

type ProofRequestHolder struct {
	ProofRequest          presentation.CompositeProofRequestInstanceChallenge
	ProofResponseElements map[int]presentation.FulfilledCriterion
}

ProofRequestHolder holds both the challenge issued by the Verifier and the set of proof responses that the user has selected to satisfy the request.

func (*ProofRequestHolder) CheckVerifierSignature

func (p *ProofRequestHolder) CheckVerifierSignature(verifierDIDDoc ledger.DIDDoc) error

func (*ProofRequestHolder) FulfillCriteria

func (p *ProofRequestHolder) FulfillCriteria(criteria *presentation.CriteriaHolder, creds []credential.RawCredential, keyRef string, signingKey ed25519.PrivateKey) error

func (*ProofRequestHolder) GenerateProofResponse

func (p *ProofRequestHolder) GenerateProofResponse(keyRef string, signingKey ed25519.PrivateKey) (*presentation.CompositeProofResponseSubmission, error)

func (*ProofRequestHolder) GetCriteria

func (p *ProofRequestHolder) GetCriteria(index int) (*presentation.CriteriaHolder, error)

GetCriteria returns the Criterion at a given index in the underlying Proof Request. The Criterion and the necessary variables for evaluating any predicate conditions will be returned in a CriteriaHolder. An error is returned if the index is outside of the range of the proof request, see GetNumberOfCriteria.

func (*ProofRequestHolder) GetNumberOfCriteria

func (p *ProofRequestHolder) GetNumberOfCriteria() int

GetNumberOfCriteria returns the number of data criteria requested. Each criterion represents a different data request against a particular schema.

func (*ProofRequestHolder) GetVerifierIdentity

func (p *ProofRequestHolder) GetVerifierIdentity() did.DID

GetVerifierIdentity returns the decentralized identifier of the Verifier that issued the request.

Jump to

Keyboard shortcuts

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