Get started
Install
bash
cargo add decane
cargo add tokio --features rt-multi-thread,macrosOr in Cargo.toml:
tomlCargo.toml
[dependencies]
decane = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }Rust 1.85 or later, edition 2024. HTTP is reqwest with rustls, so there is no OpenSSL to install. The crate forbids unsafe. It is on crates.io/crates/decane.
Credentials
Verification needs no secret. The other features each need one credential from the Decane dashboard, read from the environment in build() when you do not set it:
| Credential | Env var | Needed for |
|---|---|---|
| Project id | DECANE_APP_ID (set it yourself) | Checking a token belongs to your project |
| Verification key | DECANE_VERIFICATION_KEY | Offline verification (optional) |
API key dck_live_… | DECANE_API_KEY | Server-side sign-in |
Project secret dck_sk_… | DECANE_PROJECT_SECRET | Records by user id, wallet creation |
!
The API key and project secret are secrets. Keep them in server environment variables; never ship them to a browser or a mobile app.