Documentation
¶
Index ¶
- Constants
- type BJJSignatureProof2021
- type CredentialStatus
- type CredentialStatusType
- type DIDDocument
- type DeviceMetadata
- type EncryptedDeviceMetadata
- type Iden3Credential
- type Iden3SparseMerkleProof
- type IssuerData
- type ProofData
- type ProofPurpose
- type PushMetadata
- type PushService
- type RevocationStatus
- type Service
- type State
- type StatusIssuer
- type ZKProof
Constants ¶
const ( // Iden3CommServiceType is service type for iden3comm protocol Iden3CommServiceType = "iden3-communication" // PushNotificationServiceType is service type for delivering push notifications to identity PushNotificationServiceType = "push-notification" )
const BJJSignatureProofType = "BJJSignature2021"
BJJSignatureProofType schema type
const ( // DIDDocumentJSONSchema is a basic schema of did document DIDDocumentJSONSchema = `` /* 4391-byte string literal not displayed */ )
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"`
Issuer string `json:"issuer,omitempty"`
StatusIssuer *StatusIssuer `json:"statusIssuer,omitempty"`
}
CredentialStatus contains type and revocation Url
type CredentialStatusType ¶
type CredentialStatusType string
CredentialStatusType type for understanding revocation type
const Iden3ReverseSparseMerkleTreeProof CredentialStatusType = "Iden3ReverseSparseMerkleTreeProof"
Iden3ReverseSparseMerkleTreeProof is CredentialStatusType
const SparseMerkleTreeProof CredentialStatusType = "SparseMerkleTreeProof"
SparseMerkleTreeProof is CredentialStatusType
type DIDDocument ¶ added in v0.2.0
type DIDDocument struct {
Context []string `json:"@context"`
ID string `json:"id"`
Service []interface{} `json:"service"`
}
DIDDocument defines current supported did doc model.
type DeviceMetadata ¶ added in v0.2.0
DeviceMetadata describes the structure of device metadata
type EncryptedDeviceMetadata ¶ added in v0.2.0
type EncryptedDeviceMetadata struct {
Ciphertext string `json:"ciphertext"` // base64 encoded
Alg string `json:"alg"`
}
EncryptedDeviceMetadata describes the structure of encrypted device metadata
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 PushMetadata ¶ added in v0.2.0
type PushMetadata struct {
Devices []EncryptedDeviceMetadata `json:"devices"`
}
PushMetadata describes the structure of the data for push notifications
type PushService ¶ added in v0.2.0
type PushService struct {
Service
Metadata PushMetadata `json:"metadata"`
}
PushService describes the services of push notifications
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 Service ¶ added in v0.2.0
type Service struct {
ID string `json:"id"`
Type string `json:"type"`
ServiceEndpoint string `json:"serviceEndpoint"`
}
Service describes standard DID document service field.
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
type StatusIssuer ¶ added in v0.2.0
type StatusIssuer struct {
ID string `json:"id"`
Type CredentialStatusType `json:"type"`
}
StatusIssuer represents the URL to fetch claim revocation info directly from the issuer.