holder

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: GPL-3.0 Imports: 15 Imported by: 1

Documentation

Overview

Package holder is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var VerifiableCredentialLDContextV1 = ssi.MustParseURI("https://www.w3.org/2018/credentials/v1")

VerifiableCredentialLDContextV1 holds the URI of the JSON-LD context for Verifiable Credentials.

View Source
var VerifiablePresentationLDType = ssi.MustParseURI("VerifiablePresentation")

VerifiablePresentationLDType holds the JSON-LD type for Verifiable Presentations.

Functions

This section is empty.

Types

type Holder

type Holder interface {
	// BuildVP builds and signs a Verifiable Presentation using the given Verifiable Credentials.
	// The assertion key used for signing it is taken from signerDID's DID document.
	// If signerDID is not provided, it will be derived from the credentials credentialSubject.id fields. But only if all provided credentials have the same (singular) credentialSubject.id field.
	BuildVP(credentials []vc.VerifiableCredential, proofOptions proof.ProofOptions, signerDID *did.DID, validateVC bool) (*vc.VerifiablePresentation, error)
}

Holder holds logic for Presenting credentials A Holder is a role an entity might perform by: * Possessing one or more verifiable credentials * Generating verifiable presentations from them Example holders include students, employees, and customers.

func New

func New(keyResolver vdr.KeyResolver, keyStore crypto.KeyStore, verifier verifier.Verifier, contextLoader ld.DocumentLoader) Holder

New creates a new Holder.

type MockHolder

type MockHolder struct {
	// contains filtered or unexported fields
}

MockHolder is a mock of Holder interface.

func NewMockHolder

func NewMockHolder(ctrl *gomock.Controller) *MockHolder

NewMockHolder creates a new mock instance.

func (*MockHolder) BuildVP

func (m *MockHolder) BuildVP(credentials []vc.VerifiableCredential, proofOptions proof.ProofOptions, signerDID *did.DID, validateVC bool) (*vc.VerifiablePresentation, error)

BuildVP mocks base method.

func (*MockHolder) EXPECT

func (m *MockHolder) EXPECT() *MockHolderMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

type MockHolderMockRecorder

type MockHolderMockRecorder struct {
	// contains filtered or unexported fields
}

MockHolderMockRecorder is the mock recorder for MockHolder.

func (*MockHolderMockRecorder) BuildVP

func (mr *MockHolderMockRecorder) BuildVP(credentials, proofOptions, signerDID, validateVC interface{}) *gomock.Call

BuildVP indicates an expected call of BuildVP.

Jump to

Keyboard shortcuts

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