github.com/hyperledger/aries-framework-go@v0.3.2/pkg/doc/cl/model.go (about)

     1  /*
     2  Copyright Avast Software. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package cl
     8  
     9  // CredentialDefinition contains public data of CL CredDef.
    10  type CredentialDefinition struct {
    11  	CredPubKey              []byte
    12  	CredDefCorrectnessProof []byte
    13  	Attrs                   []string
    14  }
    15  
    16  // CredentialOffer contains nonce of CL CredOffer.
    17  type CredentialOffer struct {
    18  	Nonce []byte
    19  }
    20  
    21  // CredentialRequest contains nonce, proverID and blinded secrets of CL CredRequest.
    22  type CredentialRequest struct {
    23  	BlindedCredentialSecrets *BlindedCredentialSecrets
    24  	Nonce                    []byte
    25  	ProverID                 string
    26  }
    27  
    28  // BlindedCredentialSecrets contains handle, blinding factor and correctness proof of CL BlindedSecrets.
    29  type BlindedCredentialSecrets struct {
    30  	Handle           []byte
    31  	BlindingFactor   []byte
    32  	CorrectnessProof []byte
    33  }
    34  
    35  // Credential contains CL Credential's signature, correctness proof for it and related credential's values.
    36  type Credential struct {
    37  	Signature []byte
    38  	Values    map[string]interface{}
    39  	SigProof  []byte
    40  }
    41  
    42  // PresentationRequest contains items used for CL Proof generation.
    43  type PresentationRequest struct {
    44  	Items []*PresentationRequestItem
    45  	Nonce []byte
    46  }
    47  
    48  // PresentationRequestItem consists of revealed attributes and predicates upon which CL Proof is generated.
    49  type PresentationRequestItem struct {
    50  	RevealedAttrs []string
    51  	Predicates    []*Predicate
    52  }
    53  
    54  // Predicate defines predicate for CL Proof.
    55  type Predicate struct {
    56  	Attr  string
    57  	PType string
    58  	Value int32
    59  }
    60  
    61  // Proof wraps CL Proof in raw bytes.
    62  type Proof struct {
    63  	Proof []byte
    64  }