Documentation ¶
Index ¶
Constants ¶
const BJJSignatureProofType = "BJJSignature2021"
BJJSignatureProofType schema type
const Iden3SparseMerkleProofType = "Iden3SparseMerkleProof"
Iden3SparseMerkleProofType schema
const JSONSchemaValidator2018 = "JsonSchemaValidator2018"
JSONSchemaValidator2018 JSON schema
const SparseMerkleProof = "SparseMerkleProof"
SparseMerkleProof schema
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BJJSignatureProof2021 ¶ added in v0.0.23
type BJJSignatureProof2021 struct { Type string `json:"@type"` IssuerData IssuerData `json:"issuer_data"` Signature string `json:"signature"` }
BJJSignatureProof2021 JSON-LD BBJJSignatureProof
type CredentialStatus ¶
type CredentialStatus struct { ID string `json:"id"` Type CredentialStatusType `json:"type"` }
CredentialStatus contains type and revocation Url
type CredentialStatusType ¶
type CredentialStatusType string
CredentialStatusType type for understanding revocation type
const SparseMerkleTreeProof CredentialStatusType = "SparseMerkleTreeProof"
SparseMerkleTreeProof is CredentialStatusType
type Iden3Credential ¶
type Iden3Credential struct { ID string `json:"id"` Context []string `json:"@context"` Type []string `json:"@type"` Expiration time.Time `json:"expiration,omitempty"` Updatable bool `json:"updatable"` Version uint32 `json:"version"` RevNonce uint64 `json:"rev_nonce"` CredentialSubject map[string]interface{} `json:"credentialSubject"` CredentialStatus *CredentialStatus `json:"credentialStatus,omitempty"` SubjectPosition string `json:"subject_position,omitempty"` CredentialSchema struct { ID string `json:"@id"` Type string `json:"type"` } `json:"credentialSchema"` Proof interface{} `json:"proof,omitempty"` }
Iden3Credential is struct that represents claim json-ld document
type Iden3SparseMerkleProof ¶
type Iden3SparseMerkleProof struct { Type string `json:"@type"` IssuerData IssuerData `json:"issuer_data"` MTP *mt.Proof `json:"mtp"` }
Iden3SparseMerkleProof JSON-LD structure
type IssuerData ¶ added in v0.0.23
type IssuerData struct { ID *core.ID `json:"id,omitempty"` State State `json:"state,omitempty"` AuthClaim *core.Claim `json:"auth_claim,omitempty"` MTP *mt.Proof `json:"mtp,omitempty"` RevocationStatus string `json:"revocation_status,omitempty"` }
IssuerData is the data that is used to create a proof
type ProofData ¶ added in v0.0.19
type ProofData struct { A []string `json:"pi_a"` B [][]string `json:"pi_b"` C []string `json:"pi_c"` Protocol string `json:"protocol"` }
ProofData is structure that represents SnarkJS library result of proof generation
type ProofPurpose ¶
type ProofPurpose string
ProofPurpose is alias for string, represents proof purpose
const ( // ProofPurposeAuthentication is a proof for authentication ProofPurposeAuthentication ProofPurpose = "Authentication" )
type RevocationStatus ¶ added in v0.0.19
type RevocationStatus struct { Issuer struct { State *string `json:"state,omitempty"` RootOfRoots *string `json:"root_of_roots,omitempty"` ClaimsTreeRoot *string `json:"claims_tree_root,omitempty"` RevocationTreeRoot *string `json:"revocation_tree_root,omitempty"` } `json:"issuer"` MTP mt.Proof `json:"mtp"` }
RevocationStatus status of revocation nonce. Info required to check revocation state of claim in circuits
type State ¶ added in v0.0.23
type State struct { TxID *string `json:"tx_id,omitempty"` BlockTimestamp *int `json:"block_timestamp,omitempty"` BlockNumber *int `json:"block_number,omitempty"` RootOfRoots *string `json:"root_of_roots,omitempty"` ClaimsTreeRoot *string `json:"claims_tree_root,omitempty"` RevocationTreeRoot *string `json:"revocation_tree_root,omitempty"` Value *string `json:"value,omitempty"` Status string `json:"status,omitempty"` }
State represents the state of the issuer