Rust client library for managing DID operations for Sidetree API services

This library provides a set of client services to help work with DID operations for the Sidetree REST API. The goal is to provide access to Sidetree based DID methods using a cross platform library.

Requirements

This library required sidetree node to be running and expose API interface. Check the ION and Element implementations for running a node locally.

Install from crates.io

Specifications

Sidetree Operations

This library provides objects that are compatible with the API spec. The objects can be converted to JSON using Rust's serde_json crate.

Create Operation

To generate new DID, you can use the create() or create_config() methods.

Create new DID

To generate a request for new DID use the create() function. It will generate a request and document with random EC key for secp256k1 curve:

```rust use sidetree_client::*;

let create_operation = operations::create().unwrap();

// generate JSON request for use with API spec let json = serdejson::tostringpretty(&createoperation.operation_request);

println!("did:ion:{}", createoperation.didsuffix); println!("{}", json); ```

This operation returns an object of type OperationOutput which has the following fields

Update Operation

Add key to your DID Document

TODO

Remove key from your DID Document

TODO

Add service entry to your DID Document

TODO

Remove service entry from your DID Document

TODO

Recover Operation

TODO

Deactivate Operation

TODO

License

Apache 2.0