Rust libraries for the MANY protocol.
Features
- MANY module interfaces
- MANY common types
- MANY message and transport layers
- MANY client and server
- Hardware Security Module
- CLI developer's tools
- Concise Binary Object Representation (CBOR): RFC 8949
- CBOR Object Signing and Encryption (COSE): RFC 8152
- Platform-independent API to cryptographic tokens: PKCS #11
- CBOR playground: CBOR.me
- CBOR diagnostic utilities: cbor-diag
- Software Hardware Security Module (HSM): SoftHSM2
Here's a list of crates published by this repository and their purposes. You can visit their crates entries (linked below) for more information.
The dependency graph between the crates in this repository looks like this:
graph TD;
many-identity --> many-client;
many-identity-dsa --> many-client;
many-modules --> many-client;
many-protocol --> many-client;
many-server --> many-client;
many-error --> many-identity-dsa;
many-identity --> many-identity-dsa;
many-error --> many-identity-hsm;
many-identity --> many-identity-hsm;
many-identity-dsa --> many-identity-hsm;
many-protocol --> many-identity-hsm;
many-error --> many-identity-webauthn;
many-identity --> many-identity-webauthn;
many-identity-dsa --> many-identity-webauthn;
many-protocol --> many-identity-webauthn;
many-error --> many-identity;
many-client --> many-mock;
many-error --> many-mock;
many-identity --> many-mock;
many-identity-dsa --> many-mock;
many-identity-webauthn --> many-mock;
many-modules --> many-mock;
many-protocol --> many-mock;
many-server --> many-mock;
many-error --> many-modules;
many-identity --> many-modules;
many-identity-dsa --> many-modules;
many-macros --> many-modules;
many-protocol --> many-modules;
many-types --> many-modules;
many-error --> many-protocol;
many-identity --> many-protocol;
many-types --> many-protocol;
many-error --> many-server;
many-identity --> many-server;
many-identity-dsa --> many-server;
many-macros --> many-server;
many-modules --> many-server;
many-protocol --> many-server;
many-types --> many-server;
many-error --> many-types;
many-identity --> many-types;
many-client --> many;
many-error --> many;
many-identity --> many;
many-identity-dsa --> many;
many-identity-hsm --> many;
many-mock --> many;
many-modules --> many;
many-protocol --> many;
many-server --> many;
many-types --> many;
many
(crates, docs) – Contains the CLI tool to contact and diagnose MANY servers.many-client
(crates, docs) – Types and methods to talk to the MANY network.many-error
(crates, docs) – Error and Reason types, as defined by the specification.many-identity
(crates, docs) – Types for managing an identity, its address and traits related to signing/verification of messages.many-identity-dsa
(crates, docs) – Digital Signature identity, verifiers and utility functions. This crate has features for all supported algorithms (e.g.ed25519
).many-identity-hsm
(crates, docs) – Hardware Security Module based identity, verifiers and utility functions.many-identity-webauthn
(crates, docs) – Verifiers for WebAuthn signed envelopes. This uses our custom WebAuthn format, which is not fully compliant with the WebAuthn standard. See the Lifted WebAuthn Auth Paper.many-macros
(crates, docs) – Contains macros to help with server and module declaration and implementations.many-mock
(crates, docs) – Utility types for creating mocked MANY servers.many-modules
(crates, docs) – All modules declared in the specification.many-protocol
(crates, docs) – Types exclusively associated with the protocol. This does not include types that are related to attributes or modules.many-server
(crates, docs) – Types and methods to create a MANY network server and neighborhood.many-types
(crates, docs) – General types related to CBOR encoding, or to the specification.
- Update your package database
# Ubuntu
$ sudo apt update
# CentOS
$ sudo yum update
# Archlinux
$ sudo pacman -Syu
- Install Rust using rustup
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ source $HOME/.cargo/env
- Install build dependencies
# Ubuntu
$ sudo apt install build-essential pkg-config clang libssl-dev libsofthsm2
# CentOS
$ sudo yum install clang gcc softhsm git pkgconf
# Archlinux
$ sudo pacman -S clang gcc softhsm git pkgconf
# macOS
$ git # and follow the instructions
- Build
many-rs
$ git clone https://github.com/liftedinit/many-rs.git
$ cd many-rs
$ cargo build
- Run tests
$ cargo test
Below are some examples of how to use the many
CLI.
# Generate a new Ed25519 key
$ openssl genpkey -algorithm Ed25519 -out id1.pem
# Print the MANY ID of the key
$ ./target/debug/many id id1.pem
mafdzlw6ktmpncikho6wwswzej7rpja7fgtbn33xzwkfngdygc
$ ./target/debug/many message --server https://alberto.app/api 'status' '{}'
{_
0: 1,
1: "AbciModule(many-ledger)",
2: h'a5010103270481022006215820e5cd546d5292af5d9f0ffd54b57ff555c51b91a249b9cf544010a3c01cfa75a2',
3: 10000_1(h'01378dd9916915fb276116ff4bc13c04a4e413f663e04b710199c46021'),
4: [0, 1, 2, 4, 6, 8, 9, 1002_1],
5: "0.1.0",
7: 300_1,
}
- Read our Contributing Guidelines
- Fork the project (https://github.com/liftedinit/many-rs/fork)
- Create a feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request (https://github.com/liftedinit/many-rs/pull/new)