generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57c58eb
commit 8d71e4b
Showing
14 changed files
with
331 additions
and
2 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
Binary file not shown.
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
Binary file modified
BIN
+1.74 MB
(320%)
bindings/swift/libweb5-rs.xcframework/macos-arm64/libweb5.dylib
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use dids::identifier::{Identifier as InternalIdentifier, IdentifierError}; | ||
|
||
#[derive(Default)] | ||
pub struct Identifier(InternalIdentifier); | ||
|
||
impl From<InternalIdentifier> for Identifier { | ||
fn from(value: InternalIdentifier) -> Self { | ||
Self(value) | ||
} | ||
} | ||
|
||
impl From<&Identifier> for InternalIdentifier { | ||
fn from(value: &Identifier) -> Self { | ||
Self { | ||
uri: value.0.uri.clone(), | ||
url: value.0.url.clone(), | ||
method: value.0.method.clone(), | ||
id: value.0.id.clone(), | ||
params: value.0.params.clone(), | ||
path: value.0.path.clone(), | ||
query: value.0.query.clone(), | ||
fragment: value.0.fragment.clone(), | ||
} | ||
} | ||
} | ||
|
||
impl Identifier { | ||
pub fn new(did_uri: String) -> Result<Self, IdentifierError> { | ||
let internal_identifier = InternalIdentifier::parse(&did_uri)?; | ||
Ok(Identifier::from(internal_identifier)) | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod identifier; |
Oops, something went wrong.