This repository contains tooling to interact with the Turnkey API using Rust, and is organized as a collection of Rust crates.
| Crate | Description | crates.io | Docs | Changelog | Source |
|---|---|---|---|---|---|
turnkey_api_key_stamper |
Utilities to use Turnkey API keys | CHANGELOG | api_key_stamper |
||
turnkey_client |
Rust client to interact with the Turnkey API | CHANGELOG | client |
||
turnkey_enclave_encrypt |
Utilities to decrypt and encrypt data from and to Turnkey secure enclaves | CHANGELOG | enclave_encrypt |
||
turnkey_proofs |
Utilities to verify Turnkey secure enclave proofs | CHANGELOG | proofs |
For fully working code examples, see our examples folder.
This project uses make to encapsulate common tasks:
make lintwill run rust fmt and clippymake testruns the unit testsmake examplesruns the examples (requires a local.envfile, see instructions)make generatere-generatesclient::generatedfrom theprotofolder. Code generation logic lives incodegen
This project uses release-plz. Install it with:
cargo install --locked release-plzOnce you have it installed you can try a release locally, to see what the release PR would be:
release-plz update
When PRs are merged to main, release-plz automatically opens a Release PR if it doesn't exist yet, or updates the existing one.
The PR is opened by the release-plz bot and tagged release. A human is expected to double check this PR and manually push any fixes to the release PR if necessary (usually: cosmetic changes to the CHANGELOGs).
Once the PR is merged, the release-plz release workflow is triggered and crates are published automatically.
DO NOT bump crates manually in standard PRs, let release-plz take care of this for you!
If something goes wrong during a release and you want to retry, you can open a PR tagged release and with a branch named release-plz-**** to kick off the release workflow again (the release tag is necessary to trigger the workflow, and the branch name prefix is how release-plz determines that the PR is a release PR -- see this)
If you are working on a project in Rust and would benefit from improvements to this SDK, please open an issue or get in touch with us (hello@turnkey.com) and we can discuss prioritizing this.