Crates.io | zk-citadel-moat |
lib.rs | zk-citadel-moat |
version | 0.1.1 |
source | src |
created_at | 2023-12-01 15:58:17.089222 |
updated_at | 2023-12-01 16:13:34.956379 |
description | SDK for Citadel, a ZK-based SSI system integrated in Dusk Network. |
homepage | |
repository | |
max_upload_size | |
id | 1055298 |
size | 131,448 |
Moat (a.k.a. the Citadel SDK) contains all the required tools for using and implementing self-sovereign identity systems using the Citadel protocol integrated into the Dusk Blockchain.
Moat requires a reachable Rusk node installed and running, or selecting a trusted one. You can set up a node as explained here. It also requires an installed wallet connected to the given Rusk node, as explained here.
You can test if the environment you set up and the library are working properly by specifying the testing Rusk node address in integration-tests/config.toml
, and executing the following (note that the wallet needs to use password
as password for the tests to succeed):
cargo t --release --features="exp_tests" -- --test-threads=1
cargo t --release --features="int_tests" -- --test-threads=1
The moat-cli
utility can be used from the POV of any of the parties involved in the Citadel protocol, let them be:
To use the CLI, you should specify the Rusk node address in moat-cli/config.toml
. Then, you can execute the CLI for any of the involved parties as follows.
Users can request licenses and use them. To run the user CLI, simply run:
cargo r --release --bin moat-cli-user -- --wallet-pass <PASSWORD>
LPs can scan the Blockchain for requests and issue licenses if the requests are valid. To run the LP CLI, simply run:
cargo r --release --bin moat-cli-lp -- --wallet-pass <PASSWORD>
SPs can get requests from users to grant their services, and accept or deny them by checking if the session cookies provided by the users are valid. To run the SP CLI, simply run:
cargo r --release --bin moat-cli-sp -- --wallet-pass <PASSWORD>
An API meant for developers willing to integrate Citadel in their code is available here. You can find an example on how to use the API into moat-example
.