indy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLSignatureType = "CL"
	DefaultTag      = "default"
)
View Source
const Indy = "hlindy-zkp-v1.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialEngine

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

func New

func New(prov Provider) (*CredentialEngine, error)

func (*CredentialEngine) Accept

func (r *CredentialEngine) Accept(format string) bool

func (*CredentialEngine) CreateCredentialOffer

func (r *CredentialEngine) CreateCredentialOffer(issuer *datastore.DID, _ string, s *datastore.Schema, _ []byte) (string, *decorator.AttachmentData, error)

func (*CredentialEngine) CreateSchema

func (r *CredentialEngine) CreateSchema(issuer *datastore.DID, s *datastore.Schema) (string, error)

func (*CredentialEngine) GetSchemaForProposal

func (r *CredentialEngine) GetSchemaForProposal(proposal []byte) (string, error)

func (*CredentialEngine) IssueCredential

func (r *CredentialEngine) IssueCredential(issuerDID *datastore.DID, s *datastore.Schema, offerID string,
	requestAttachment decorator.AttachmentData, values map[string]interface{}) (*decorator.AttachmentData, error)

func (*CredentialEngine) RegisterSchema

func (r *CredentialEngine) RegisterSchema(registrant *datastore.DID, s *datastore.Schema) error

type CredentialProposal

type CredentialProposal struct {
	SchemaID string `json:"schema_id"`
}

type MockProvider

type MockProvider struct {
	mock.Mock
}

MockProvider is an autogenerated mock type for the Provider type

func (*MockProvider) IndyVDR

func (_m *MockProvider) IndyVDR() (VDRClient, error)

IndyVDR provides a mock function with given fields:

func (*MockProvider) KMS

func (_m *MockProvider) KMS() kms.KeyManager

KMS provides a mock function with given fields:

func (*MockProvider) Oracle

func (_m *MockProvider) Oracle() Oracle

Oracle provides a mock function with given fields:

func (*MockProvider) StorageProvider

func (_m *MockProvider) StorageProvider() storage.Provider

StorageProvider provides a mock function with given fields:

type Oracle

type Oracle interface {
	NewNonce() (string, error)
}

type Provider

type Provider interface {
	IndyVDR() (VDRClient, error)
	KMS() kms.KeyManager
	StorageProvider() storage.Provider
	Oracle() Oracle
}

type VDRClient

type VDRClient interface {
	SetEndpoint(did, from string, ep string, signer vdr.Signer) error
	CreateSchema(issuerDID, name, version string, attrs []string, signer vdr.Signer) (string, error)
	CreateClaimDef(from string, ref uint32, pubKey, revocation map[string]interface{}, signer vdr.Signer) (string, error)
	GetCredDef(credDefID string) (*vdr.ReadReply, error)
	GetSchema(schemaID string) (*vdr.ReadReply, error)
	CreateNym(did, verkey, role, from string, signer vdr.Signer) error
	GetNym(did string) (*vdr.ReadReply, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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