| Crates.io | tsp_sdk |
| lib.rs | tsp_sdk |
| version | 0.9.0-alpha2 |
| created_at | 2025-04-09 13:30:56.65145+00 |
| updated_at | 2025-11-03 08:00:19.828285+00 |
| description | Rust implementation of the Trust Spanning Protocol |
| homepage | https://github.com/openwallet-foundation-labs/tsp |
| repository | https://github.com/openwallet-foundation-labs/tsp |
| max_upload_size | |
| id | 1626781 |
| size | 544,749 |
Prototype Rust SDK for the Trust Spanning Protocol
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.
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 tsp/tsp_sdk
cargo test
If you want to test the language bindings for Python and JavaScript as well, you can run cargo test in the top level
directory of this repository. Please be aware that this requires a working Python installation on your system.
To build the documentation, run:
cargo doc --workspace --no-deps
Apart from the library, there are a few example executables. The CLI is most useful, see below how to install and use the CLI.
At this point in time, this repository is organized using Cargo workspaces. The workspace contains five crates, the TSP SDK crate, an examples crate, bindings for Python and JavaScript, and one for fuzzing.
The code is organized in various directories:
examples/ contains example programstsp_python contains the Python bindingstsp_javascript contains the JavaScript bindingstsp_sdk/ contains the TSP library, the source code is divided in the following modules / folders:
cesr/ provides minimalist CESR encoding/decoding support that is sufficient for generating and parsing TSP
messages; to keep complexity to a minimum, we explicitly do not provide a full CESR decoder/encoder.crypto/ contains the cryptographic core:
definitions/ defines several common data structures, traits and error types that are used throughout the project.transport/ code (built using tokio foundations) for actually sending and receiving data over
a transport layer.vid/ contains code for handling verified identifiers and identities. Currently, did:peer, did:web and did:webvh are
supported.Documentation on TSP and how to use our example projects (CLI / web interface) can be found on https://docs.teaspoon.world.
The development documentation is available at docs.rs.
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 --type web --alias bob bob
To verify a VID:
tsp verify --alias alice did:web:raw.githubusercontent.com:openwallet-foundation-labs:tsp:main:examples:test:alice
See https://docs.teaspoon.world for the full documentation.
See the documentation on how to implement custom VIDs.
See the documentation on how to create / set up an intermediary server.
See the documentation for the technical specification.