-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example and readme.md for did_peer crate
Signed-off-by: Patrik Stas <[email protected]>
- Loading branch information
1 parent
9570ba2
commit 4b17e8b
Showing
3 changed files
with
50 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# did_peer | ||
|
||
## Overview | ||
|
||
The Peer DID Rust Library is a comprehensive toolkit for handling decentralized identifiers (DIDs) in a peer-to-peer manner. This library is implemented in Rust and allows for the creation, parsing, validation, and resolution of Peer DIDs. Peer DIDs are a special type of decentralized identifiers designed for direct peer-to-peer interactions, without the need for a blockchain or other centralized registry. | ||
|
||
## Features | ||
- **Numalgo Support**: The library implements various numerical algorithms (numalgos) for DID creation and resolution. Currently | ||
supports numalgo 1, 2, and 3. | ||
- **DID Parsing**: Capability to parse `did:peer` strings, ensuring they comply with the Peer DID specifications. | ||
- **DID Creation from DIDDoc**: Functionality to create `did:peer` identifiers from DID documents. | ||
- **Numalgo Conversion**: Ability to convert between different numalgos, specifically from Numalgo 2 to Numalgo 3. | ||
- **Validation**: Comprehensive mechanisms to validate that DIDs adhere to the required specifications and format. | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
Ensure that you have Rust and Cargo installed on your system. You can install them from the official [Rust website](https://www.rust-lang.org/). | ||
|
||
### Installation | ||
|
||
Add the Peer DID library as a dependency in your `Cargo.toml` file: | ||
|
||
```toml | ||
[dependencies] | ||
peer_did = { tag = "0.61.0", git = "https://github.com/hyperledger/aries-vcx" } | ||
``` | ||
|
||
## Demo | ||
To get you off the ground, have a look at the [demo](./examples/demo.rs). It demonstrates how to create, parse. You can | ||
run the demo with the following command: | ||
```bash | ||
cargo run --example demo | ||
``` | ||
|
||
|
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