schema

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

Documentation

Index

Constants

View Source
const (
	CredentialOffered  = "offered"
	CredentialIssued   = "issued"
	CredentialAccepted = "accepted"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedProof

type AggregatedProof struct {
	CHash string    `json:"c_hash"`
	CList [][]uint8 `json:"c_list"`
}

type Attr

type Attr struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type ByCredDef

type ByCredDef func(q url.Values)

func ByCredDefID

func ByCredDefID(id string) ByCredDef

func ByCredDefIssuerDID

func ByCredDefIssuerDID(did string) ByCredDef

func ByCredDefSchemaID

func ByCredDefSchemaID(ID string) ByCredDef

func ByCredDefSchemaIssuerDID

func ByCredDefSchemaIssuerDID(did string) ByCredDef

func ByCredDefSchemaName

func ByCredDefSchemaName(name string) ByCredDef

func ByCredDefVersion

func ByCredDefVersion(version string) ByCredDef

type BySchema

type BySchema func(q url.Values)

func BySchemaID

func BySchemaID(ID string) BySchema

func BySchemaIssuerDID

func BySchemaIssuerDID(did string) BySchema

func BySchemaName

func BySchemaName(name string) BySchema

func BySchemaVersion

func BySchemaVersion(version string) BySchema

type CredentialDefinitionIDsResult

type CredentialDefinitionIDsResult struct {
	CredentialDefinitionIDs []string `json:"credential_definition_ids"`
}

type CredentialStatus

type CredentialStatus struct {
	ID    string `bson:"ID" json:"id"`
	State string `bson:"State" json:"state"`
	Type  string `bson:"Type" json:"type"`
}

type CryptoProof

type CryptoProof struct {
	Proofs     []*SubProof      `json:"proofs"`
	Aggregated *AggregatedProof `json:"aggregated_proof"`
}

type Identifier

type Identifier struct {
	SchemaID  string `json:"schema_id"`
	CredDefID string `json:"cred_def_id"`
	RevRegID  string `json:"rev_reg_id,omitempty"`
	Timestamp int64  `json:"timestamp"`
}

type IndyAttributeValue

type IndyAttributeValue struct {
	Raw     string `json:"raw"`
	Encoded string `json:"encoded"`
}

type IndyCredential

type IndyCredential struct {
	SchemaID                  string               `json:"schema_id"`
	CredDefID                 string               `json:"cred_def_id"`
	RevRegID                  string               `json:"rev_reg_id"`
	Signature                 json.RawMessage      `json:"signature"`
	SignatureCorrectnessProof json.RawMessage      `json:"signature_correctness_proof"`
	Values                    IndyCredentialValues `json:"values"`
}

type IndyCredentialOffer

type IndyCredentialOffer struct {
	SchemaID            string                 `json:"schema_id"`
	CredDefID           string                 `json:"cred_def_id"`
	KeyCorrectnessProof map[string]interface{} `json:"key_correctness_proof"`
	Nonce               string                 `json:"nonce"`
}

type IndyCredentialValues

type IndyCredentialValues map[string]*IndyAttributeValue

type IndyProof

type IndyProof struct {
	Proof          json.RawMessage     `json:"proof"`
	RequestedProof *IndyRequestedProof `json:"requested_proof"`
	Identifiers    []*Identifier       `json:"identifiers"`
}

type IndyProofRequest

type IndyProofRequest struct {
	Name                string                               `json:"name"`
	Version             string                               `json:"version"`
	Nonce               string                               `json:"nonce"`
	RequestedAttributes map[string]IndyProofRequestAttr      `json:"requested_attributes"`
	RequestedPredicates map[string]IndyProofRequestPredicate `json:"requested_predicates"`
}

type IndyProofRequestAttr

type IndyProofRequestAttr struct {
	Name         string             `json:"name"`
	Names        []string           `json:"names"`
	Restrictions interface{}        `json:"restrictions,omitempty"`
	NonRevoked   NonRevokedInterval `json:"non_revoked"`
}

type IndyProofRequestPredicate

type IndyProofRequestPredicate struct {
	Name         string             `json:"name"`
	PType        string             `json:"p_type"`
	PValue       int32              `json:"p_value"`
	Restrictions interface{}        `json:"restrictions"`
	NonRevoked   NonRevokedInterval `json:"non_revoked"`
}

type IndyRequestedAttribute

type IndyRequestedAttribute struct {
	CredID    string `json:"cred_id"`
	Timestamp int64  `json:"timestamp"`
	Revealed  bool   `json:"revealed"`
}

type IndyRequestedAttributeInfo

type IndyRequestedAttributeInfo struct {
	AttrReferent  string                `json:"attr_referent"`
	AttributeInfo *IndyProofRequestAttr `json:"attribute_info"`
	Revealed      bool                  `json:"revealed"`
}

type IndyRequestedCredentials

type IndyRequestedCredentials struct {
	SelfAttestedAttrs   map[string]string                  `json:"self_attested_attrs"`
	RequestedAttributes map[string]*IndyRequestedAttribute `json:"requested_attributes"`
	RequestedPredicates map[string]ProvingCredentialKey    `json:"requested_predicates"`
}

type IndyRequestedPredicateInfo

type IndyRequestedPredicateInfo struct {
	PredicateReferent string                     `json:"predicate_referent"`
	PredicateInfo     *IndyProofRequestPredicate `json:"predicate_info"`
}

type IndyRequestedProof

type IndyRequestedProof struct {
	RevealedAttrs      map[string]*RevealedAttributeInfo      `json:"revealed_attrs"`
	RevealedAttrGroups map[string]*RevealedAttributeGroupInfo `json:"revealed_attr_groups"`
	SelfAttestedAttrs  map[string]string                      `json:"self_attested_attrs"`
	UnrevealedAttrs    map[string]*SubProofReferent           `json:"unrevealed_attrs"`
	Predicates         map[string]*SubProofReferent           `json:"predicates"`
}

type NonRevocProof

type NonRevocProof struct {
}

type NonRevokedInterval

type NonRevokedInterval struct {
	From int64 `json:"from"`
	To   int64 `json:"to"`
}

type PrimaryEqualProof

type PrimaryEqualProof struct {
	RevealedAttrs map[string]string `json:"revealed_attrs"`
	APrime        string            `json:"a_prime"`
	E             string            `json:"e"`
	V             string            `json:"v"`
	M             map[string]string `json:"m"`
	M2            string            `json:"m_2"`
}

type PrimaryPredicateInequalityProof

type PrimaryPredicateInequalityProof struct {
	U         map[string]string         `json:"u"`
	R         map[string]string         `json:"r"`
	Mj        string                    `json:"mj"`
	Alpha     string                    `json:"alpha"`
	T         map[string]string         `json:"t"`
	Predicate IndyProofRequestPredicate `json:"predicate"`
}

type PrimaryProof

type PrimaryProof struct {
	EqProof PrimaryEqualProof                  `json:"eq_proof"`
	NeProof []*PrimaryPredicateInequalityProof `json:"ne_proof"`
}

type ProofRequestWebRequest

type ProofRequestWebRequest struct {
	ConnectionID string            `json:"connection_id"`
	ProofRequest *IndyProofRequest `json:"proof_request"`
}

type ProvingCredentialKey

type ProvingCredentialKey struct {
	CredID    string `json:"cred_id"`
	Timestamp int64  `json:"timestamp"`
}

type RevealedAttributeGroupInfo

type RevealedAttributeGroupInfo struct {
	SubProofIndex int32 `json:"sub_proof_index"`
	Values        map[string]*IndyAttributeValue
}

type RevealedAttributeInfo

type RevealedAttributeInfo struct {
	SubProofIndex int32  `json:"sub_proof_index"`
	Raw           string `json:"raw"`
	Encoded       string `json:"encoded"`
}

type SchemaIDsResult

type SchemaIDsResult struct {
	SchemaIDs []string `json:"schema_ids"`
}

type SubProof

type SubProof struct {
	Primary       *PrimaryProof  `json:"primary_proof"`
	NonRevocProof *NonRevocProof `json:"non_revoc_proof"`
}

func (*SubProof) RevealedAttrs

func (r *SubProof) RevealedAttrs() map[string]string

type SubProofReferent

type SubProofReferent struct {
	SubProofIndex int32 `json:"sub_proof_index"`
}

type TranscriptCredential

type TranscriptCredential struct {
	Name   string
	Date   string
	Degree string
	Age    string
}

func (*TranscriptCredential) MarshalAttrs

func (r *TranscriptCredential) MarshalAttrs() []*Attr

Jump to

Keyboard shortcuts

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