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
59
60
61
62
63
//! Official Rust SDK for the [Invoance](https://invoance.com) compliance API —
//! cryptographic proof, document anchoring, and AI attestation.
//!
//! The SDK is async (built on `tokio` + `reqwest`). Construct a client, then
//! reach each product surface through a resource accessor:
//!
//! ```no_run
//! # async fn run() -> Result<(), invoance::Error> {
//! use invoance::InvoanceClient;
//! use invoance::models::IngestEventParams;
//! use serde_json::json;
//!
//! let client = InvoanceClient::new()?; // reads INVOANCE_API_KEY from env
//!
//! let event = client
//! .events()
//! .ingest(IngestEventParams {
//! event_type: "policy.approval".into(),
//! payload: json!({ "policy_id": "pol_001", "decision": "approved" })
//! .as_object()
//! .unwrap()
//! .clone(),
//! ..Default::default()
//! })
//! .await?;
//! println!("{}", event.event_id);
//! # Ok(()) }
//! ```
//!
//! ## Error handling
//!
//! Every fallible call returns `Result<T, `[`Error`]`>`. Classify with the
//! boolean predicates (`is_authentication()`, `is_quota_exceeded()`, …) or by
//! matching the [`Error`] variants.
//!
//! ## Offline crypto helpers
//!
//! - [`audit_verify::verify_audit_event`] — verify an audit event's Ed25519
//! signature without trusting the server.
//! - [`audit_canonical`] — the `invoance.audit/1` canonicalizer.
//! - [`resources::content_idempotency_key`] — derive a content-stable
//! idempotency key from a request body.
pub use ;
pub use ;
pub use ;
pub use ClientConfig;
pub use ;
pub use content_idempotency_key;
pub use SDK_VERSION;