Skip to content
/ did_url Public

A parser for Decentralized Identifiers (DIDs)

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

l1h3r/did_url

Repository files navigation

did

A parser for Decentralized Identifiers (DIDs)


use did_url::DID;

let did = DID::parse("did:example:alice")?;

// Prints Method = example
println!("Method = {}", did.method());

// Prints Method Id = alice
println!("Method Id = {}", did.method_id());

// Prints DID = did:example:alice
println!("DID = {}", did);

// Prints Joined = did:example:alice?query=true#key-1
println!("Joined = {}", did.join("#key-1")?.join("?query=true")?);

References


License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A parser for Decentralized Identifiers (DIDs)

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages