pub struct DataIntegrityProof {
pub type_: String,
pub cryptosuite: CryptoSuite,
pub created: Option<String>,
pub verification_method: String,
pub proof_purpose: String,
pub proof_value: Option<String>,
pub context: Option<Vec<String>>,
}Fields§
§type_: StringMust be ‘DataIntegrityProof’
cryptosuite: CryptoSuite§created: Option<String>§verification_method: String§proof_purpose: String§proof_value: Option<String>§context: Option<Vec<String>>Implementations§
Source§impl DataIntegrityProof
impl DataIntegrityProof
Sourcepub async fn sign_jcs_data<S>(
data_doc: &S,
context: Option<Vec<String>>,
signer: &dyn Signer,
created: Option<String>,
) -> Result<DataIntegrityProof, DataIntegrityError>where
S: Serialize,
pub async fn sign_jcs_data<S>(
data_doc: &S,
context: Option<Vec<String>>,
signer: &dyn Signer,
created: Option<String>,
) -> Result<DataIntegrityProof, DataIntegrityError>where
S: Serialize,
Creates a JCS (JSON Canonicalization Scheme) signature for the given data. data_doc: Serializable Struct context: Optional context for the proof signer: Implementation of the Signer trait (e.g. a Secret, or a KMS/HSM backend) created: Optional timestamp for the proof creation (“2023-02-24T23:36:38Z”)
Returns a Result containing a proof if successful
Sourcepub async fn sign_rdfc_data(
data_doc: &Value,
context: Option<Vec<String>>,
signer: &dyn Signer,
created: Option<String>,
) -> Result<DataIntegrityProof, DataIntegrityError>
pub async fn sign_rdfc_data( data_doc: &Value, context: Option<Vec<String>>, signer: &dyn Signer, created: Option<String>, ) -> Result<DataIntegrityProof, DataIntegrityError>
Creates an RDFC (RDF Dataset Canonicalization) signature for the given JSON-LD data.
data_doc: JSON-LD document (must contain @context)
context: Optional context override for the proof; if None, uses the document’s @context
signer: Implementation of the Signer trait (e.g. a Secret, or a KMS/HSM backend)
created: Optional timestamp for the proof creation (“2023-02-24T23:36:38Z”)
Returns a Result containing a proof if successful
Trait Implementations§
Source§impl Clone for DataIntegrityProof
impl Clone for DataIntegrityProof
Source§fn clone(&self) -> DataIntegrityProof
fn clone(&self) -> DataIntegrityProof
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more