Documentation
¶
Index ¶
Constants ¶
View Source
const BJJSignatureProof = "BJJSignature2021"
BJJSignatureProof schema
View Source
const Iden3SparseMerkleProof = "Iden3SparseMerkleProof"
Iden3SparseMerkleProof schema
View Source
const JSONSchemaValidator2018 = "JsonSchemaValidator2018"
JSONSchemaValidator2018 JSON schema
View Source
const SparseMerkleProof = "SparseMerkleProof"
SparseMerkleProof schema
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicProof ¶
type BasicProof struct {
Type string `json:"@type"`
Issuer string `json:"issuer"`
HIndex string `json:"h_index"`
HValue string `json:"h_value"`
}
BasicProof is basic proof for Iden3Claim
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"`
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 MTP ¶
type MTP struct {
Type string `json:"@type,omitempty"`
Existence bool `json:"existence"`
Siblings []*mt.Hash `json:"siblings"`
NodeAux *struct {
HIndex string `json:"h_index,omitempty"`
HValue string `json:"h_value,omitempty"`
} `json:"node_aux,omitempty"`
}
MTP is merkle tree mtp but in lower case and with type
type MTPProof ¶
type MTPProof struct {
BasicProof
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"`
} `json:"state"`
Mtp MTP `json:"mtp"`
}
MTPProof JSON-LD merkle tree proof
type ProofPurpose ¶
type ProofPurpose string
ProofPurpose is alias for string, represents proof purpose
const ( // ProofPurposeAuthentication is a proof for authentication ProofPurposeAuthentication ProofPurpose = "Authentication" )
type SignatureProof ¶
type SignatureProof struct {
BasicProof
Created int64 `json:"created"`
IssuerMTP MTPProof `json:"issuer_mtp"`
VerificationMethod string `json:"verification_method"`
ProofValue string `json:"proof_value"`
ProofPurpose string `json:"proof_purpose"`
}
SignatureProof is proof that contains signature of content
Click to show internal directories.
Click to hide internal directories.