-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Don't serialize empty signatures * Resolve key as fragment or full DID * Enforce inclusion of signature verification_method * Add LdDocument trait * Add Generic LdRead/LdWrite helpers * Add IotaDocument type * Move diff address helpers to IotaDocument * Dont hash twice when generating auth chain address * Test IotaDID, not deprecated mod
- Loading branch information
Showing
31 changed files
with
559 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
use identity_core::did::DID; | ||
use identity_core::did::{DiffDIDDocument, DID}; | ||
use identity_proof::{HasProof, LdSignature}; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::did::DIDProof; | ||
|
||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize)] | ||
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] | ||
pub struct DIDDiff { | ||
pub id: DID, | ||
pub diff: String, // TODO: Replace with DiffDIDDocument | ||
pub proof: DIDProof, | ||
pub diff: DiffDIDDocument, | ||
pub proof: LdSignature, | ||
} | ||
|
||
impl HasProof for DIDDiff { | ||
fn proof(&self) -> &LdSignature { | ||
&self.proof | ||
} | ||
|
||
fn proof_mut(&mut self) -> &mut LdSignature { | ||
&mut self.proof | ||
} | ||
} |
Oops, something went wrong.