pub struct AcademicCredential {Show 20 fields
pub credential_id: CredentialId,
pub subject_address: Address,
pub subcode: DocSubcode,
pub subject_commitment: [u8; 32],
pub issuer: Address,
pub institution_id: String,
pub jurisdiction: String,
pub schema_hash: [u8; 32],
pub content_commitment: [u8; 32],
pub metadata: CredentialMetadata,
pub issued_at: Timestamp,
pub valid_from: Timestamp,
pub expires_at: Timestamp,
pub payload_hash: Option<[u8; 32]>,
pub payload_hint: Option<String>,
pub encryption_meta: Option<EncryptionMeta>,
pub issuer_signature: [u8; 64],
pub issuer_key_id: String,
pub revocation_status: RevocationStatus,
pub superseded_by: Option<CredentialId>,
}Expand description
Base structure for academic/professional credentials
Fields§
§credential_id: CredentialIdUnique credential ID
subject_address: AddressSubject wallet address (for token ownership)
subcode: DocSubcodeDocument subcode (810, 811, 812, or 813)
subject_commitment: [u8; 32]Subject commitment (NOT the subject’s real identity)
issuer: AddressIssuer address (institution)
institution_id: StringInstitution identifier (e.g., “UCLA”, “MIT”)
jurisdiction: StringJurisdiction/country (ISO 3166-1 alpha-2)
schema_hash: [u8; 32]Schema hash defining the credential structure
content_commitment: [u8; 32]Commitment to the credential content
metadata: CredentialMetadataCredential metadata (non-PII, public info)
issued_at: TimestampIssuance timestamp
valid_from: TimestampValid from timestamp
expires_at: TimestampExpiry timestamp (0 = no expiry for most degrees)
payload_hash: Option<[u8; 32]>Optional encrypted payload reference
payload_hint: Option<String>Optional payload hint (storage location)
encryption_meta: Option<EncryptionMeta>Optional encryption metadata (algorithm, key commitment, nonce)
issuer_signature: [u8; 64]Issuer signature
issuer_key_id: StringKey ID used for signing
revocation_status: RevocationStatusRevocation status
superseded_by: Option<CredentialId>If superseded, the new credential ID
Trait Implementations§
Source§impl Clone for AcademicCredential
impl Clone for AcademicCredential
Source§fn clone(&self) -> AcademicCredential
fn clone(&self) -> AcademicCredential
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AcademicCredential
impl Debug for AcademicCredential
Source§impl<'de> Deserialize<'de> for AcademicCredential
impl<'de> Deserialize<'de> for AcademicCredential
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for AcademicCredential
impl PartialEq for AcademicCredential
Source§fn eq(&self, other: &AcademicCredential) -> bool
fn eq(&self, other: &AcademicCredential) -> bool
self and other values to be equal, and is used by ==.