Version: v0.1.0 Latest Latest

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

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




View Source
const (
	MARKER    = "3"


This section is empty.


func AttrCommonView

func AttrCommonView(attr string) string

func BuildCredentialSchema

func BuildCredentialSchema(attrs []*datastore.Attribute) (*ursa.CredentialSchemaHandle, error)

func BuildNonCredentialSchema

func BuildNonCredentialSchema() (*ursa.NonCredentialSchemaHandle, error)

func CredDefPublicKey

func CredDefPublicKey(pkey, rkey string) (*ursa.CredentialDefPubKey, error)

func CredentialDefinitionID

func CredentialDefinitionID(did *datastore.DID, schemaID uint32, signatureType, tag string) string


type CredentialDefinition

type CredentialDefinition struct {
	// contains filtered or unexported fields

func NewCredentailDefinition

func NewCredentailDefinition() *CredentialDefinition

func (*CredentialDefinition) AddNonSchemaField

func (r *CredentialDefinition) AddNonSchemaField(f ...string)

func (*CredentialDefinition) AddSchemaFields

func (r *CredentialDefinition) AddSchemaFields(f ...string)

func (*CredentialDefinition) Finalize

func (r *CredentialDefinition) Finalize() error

func (*CredentialDefinition) KeyCorrectnessProof

func (r *CredentialDefinition) KeyCorrectnessProof() (map[string]interface{}, error)

func (*CredentialDefinition) PrivateKey

func (r *CredentialDefinition) PrivateKey() (map[string]interface{}, error)

func (*CredentialDefinition) PublicKey

func (r *CredentialDefinition) PublicKey() (map[string]interface{}, error)

func (*CredentialDefinition) UrsaPublicKey

func (r *CredentialDefinition) UrsaPublicKey() (*ursa.CredentialDefPubKey, error)

type CredentialRequest

type CredentialRequest struct {
	ProverDID                 string `json:"prover_did"`
	CredDefID                 string `json:"cred_def_id"`
	BlindedMS                 string `json:"blinded_ms"`
	BlindedMSCorrectnessProof string `json:"blinded_ms_correctness_proof"`
	Nonce                     string `json:"nonce"`

type CredentialRequestMetadata

type CredentialRequestMetadata struct {
	MasterSecretBlindingData string `json:"master_secret_blinding_data"`
	Nonce                    string `json:"nonce"`
	MasterSecretName         string `json:"master_secret_name"`

type CryptoOracle

type CryptoOracle struct{}

func (*CryptoOracle) NewNonce

func (r *CryptoOracle) NewNonce() (string, error)

type Prover

type Prover struct {
	// contains filtered or unexported fields

func NewProver

func NewProver(ctx proverProvider) (*Prover, error)

func (*Prover) CreateCredentialRequest

func (r *Prover) CreateCredentialRequest(proverDID string, credDef *vdr.ClaimDefData, offer *schema.IndyCredentialOffer, masterSecret string) (*CredentialRequest, *CredentialRequestMetadata, error)

func (*Prover) CreateMasterSecret

func (r *Prover) CreateMasterSecret(masterSecretID string) (string, error)

func (*Prover) CreateProof

func (r *Prover) CreateProof(credentials map[string]*schema.IndyCredential, proofReq *schema.IndyProofRequest, requestedCreds *schema.IndyRequestedCredentials,
	masterSecret string, schemas map[string]*datastore.Schema, credDefs map[string]*vdr.ClaimDefData) (*schema.IndyProof, error)

func (*Prover) GetMasterSecret

func (r *Prover) GetMasterSecret(masterSecretID string) (string, error)

func (*Prover) ProcessCredentialSignature

func (r *Prover) ProcessCredentialSignature(cred *schema.IndyCredential, credRequest *CredentialRequest,
	masterSecret, masterSecretBlindingData, credDefPKey string) (string, error)

Jump to

Keyboard shortcuts

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