Home

Awesome

rust-tsp

Prototype Rust SDK for the Trust Spanning Protocol

Status

This project is in its initial state. Development is ongoing and interfaces or structure of the repository are likely to change. Nothing in this repository at this moment represents a "final design" or to be overriding the Trust Spanning Protocol specification, or indicating a future direction of the Trust Spanning Protocol.

In short, it is not the reference implementation yet.

How to build this project

You will need to install the most recent Rust compiler, by following the these instructions.

Then, you can use these commands to check out and test the repository:

git clone https://github.com/openwallet-foundation-labs/tsp.git
cd rust-tsp
cargo test

To build the documentation, run:

cargo doc --workspace --no-deps

Apart from the library, there are a few example executables. The CLI is most usefull, see below how to install and use the CLI.

Organization of the project folder

At this point in time, this repository is organized using Cargo workspaces. The workspace contains only two crates, the TSP crate and an examples crate.

The code is organizes is various directories:

Documentation

The development documentation is published at https://docs.tsp-test.org/tsp/

Documentation on how to use our example projects (CLI / web interface) can be found on https://book.tsp-test.org/

In the future, documentation will be available at docs.rs.

Test CLI

The examples crate contains a test CLI interface for this library.

Install it by running the following command in the project root:

cargo install --path examples/ --bin tsp

To create an identity:

tsp create bob

To verify a VID:

tsp verify did:web:tsp-test.org:user:alice

To listen for - and receive messages:

tsp receive --one did:web:tsp-test.org:user:bob

To send a message:

echo "Hello World!" | tsp send -s did:web:tsp-test.org:user:alice -r did:web:tsp-test.org:user:bob

See https://book.tsp-test.org/ for the full documentation.

Implement custom VIDs

See the documentation on how to implement custom VIDs.

Intermediary server

See the documentation on how to create / setup an intermediary server.

Technical specification

See https://hackmd.io/@2JvzP98CRBm6AyIDDz-2tw/H147MYkjp for the technical specification.