1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! # tamga
//!
//! Official Rust SDK for [Tamga](https://tamga.sh) — license activation, offline
//! verification, and machine management for Rust applications.
//!
//! ## Shape
//!
//! A single [`client::Client`] built from a [`client::ClientConfig`] exposes every
//! server endpoint (validate, check-in, checkout, machine management,
//! components/processes, entitlements, offline proof) as an async method. In
//! addition, standalone verification functions in [`checkout`] and [`proof`]
//! work with **no network access at all** once the relevant public key
//! material is embedded in the application — this offline-verification path
//! is the core value proposition of this SDK over hand-rolling HTTP calls.
//!
//! ## Offline licence files are format v2 only
//!
//! [`checkout::license_file::verify_license_file`] accepts only an `alg`
//! ending in `+v2` and enforces the signed `exp` claim (60 second clock-skew
//! tolerance). A v1-issued `.lic` file is rejected outright — there is no
//! fallback path. See [`checkout::license_file`] for why.
//!
//! ## Rate limiting
//!
//! The server does return `429 Too Many Requests`. It surfaces as
//! [`error::TamgaError::RateLimited`] carrying the parsed `Retry-After`, and
//! safe requests are retried automatically first — see
//! [`client::ClientConfigBuilder::max_retries`].
//!
//! ## Known server-side gaps
//!
//! Modelled here but not fully live server-side today:
//!
//! - Only 14 of the 24 [`models::validation::ValidationCode`] variants are
//! reachable; the rest are declared for forward-compatibility.
//! - The `entitlements`/`fingerprint`/`version`/`checksum` fields of
//! [`models::validation::ScopeObject`] are parsed but not enforced.
//! - Freshly created policies report `"DENY_ACCESS"`/`"NO_RESURRECTION"` —
//! neither is a real variant. See [`models::policy`] for how this crate
//! normalizes them.
//! - Release/auto-update checking is not part of this crate's surface.
// Promoted from `warn` to `deny` once doc coverage across the public API
// was complete — a genuinely undocumented public item is now a build
// failure, not a silent gap.
// Re-exports of the crate's most commonly used public API surface.
pub use ;
pub use TamgaError;