licers 1.0.1

Licers license-key verification: Ed25519-signed responses, floating seats, usage credits, remote variables, offline licenses.
Documentation
//! # Licers
//!
//! License-key verification for Rust apps, against the Licers service. Every
//! answer is Ed25519-signed with your account key and checked here, with a
//! fresh nonce per call, so a fake or replayed license server is refused.
//!
//! ```no_run
//! use licers::LicenseClient;
//!
//! let client = LicenseClient::builder("YOUR_PUBLIC_KEY")
//!     .product_id("YOUR_PRODUCT_ID")
//!     .app_version(env!("CARGO_PKG_VERSION"))
//!     .build()?;
//!
//! let result = client.validate("XXXX-XXXX-XXXX-XXXX")?;
//! if !result.valid {
//!     eprintln!("Not licensed: {}", result.error.unwrap_or_default());
//!     std::process::exit(1);
//! }
//! if result.feature("pro") == Some(&serde_json::json!(true)) {
//!     // unlock pro features
//! }
//! # Ok::<(), licers::Error>(())
//! ```
//!
//! The API is blocking (no async runtime needed). From async code, call it
//! inside `spawn_blocking`.

mod client;
mod error;
mod hwid;
mod offline;
mod session;

pub use client::{ClientBuilder, HeartbeatState, Lease, LicenseClient, UpdateInfo, Usage, ValidationResult, DEFAULT_API, SDK_VERSION};
pub use error::{Error, Result};
pub use hwid::{detect_os, get_hwid};
pub use offline::verify_offline_license;
pub use session::FloatingSession;

// Re-exported so users can match on entitlement values without adding the crate.
pub use serde_json;