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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Format = "hlindy-zkp-v1.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func New

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

func (*Engine) Accept

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

func (*Engine) RequestPresentation

func (r *Engine) RequestPresentation(name, version string, attrInfo map[string]*schema.IndyProofRequestAttr,
	predicateInfo map[string]*schema.IndyProofRequestPredicate) (*decorator.AttachmentData, error)

RequestPresentationAttach

func (*Engine) RequestPresentationFormat

func (r *Engine) RequestPresentationFormat() string

RequestPresentationFormat

func (*Engine) Verify

func (r *Engine) Verify(presentation, request []byte, theirDID string, myDID string) error

type PresentationRequest

type PresentationRequest struct {
	Name                string                                       `json:"name,omitempty"`
	Version             string                                       `json:"version,omitempty"`
	Nonce               string                                       `json:"nonce,omitempty"`
	RequestedAttributes map[string]*schema.IndyProofRequestAttr      `json:"requested_attributes,omitempty"`
	RequestedPredicates map[string]*schema.IndyProofRequestPredicate `json:"requested_predicates,omitempty"`
	NonRevoked          schema.NonRevokedInterval                    `json:"non_revoked,omitempty"`
}

PresentationRequest to be encoded and sent as data in the RequestPresentation response Ref: https://github.com/hyperledger/indy-sdk/blob/57dcdae74164d1c7aa06f2cccecaae121cefac25/libindy/src/api/anoncreds.rs#L1214

type Provider

type Provider interface {
	IndyVDR() (indy.VDRClient, error)
	Store() datastore.Store
	Oracle() indy.Oracle
}

Jump to

Keyboard shortcuts

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