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
//! Async Canton Ledger API client (gRPC + JSON).
//!
//! [`CantonClient`] speaks the gRPC Ledger API v2: command submission
//! (fire-and-forget [`CantonClient::submit`] and
//! [`CantonClient::submit_and_wait_for_transaction`]) with change-ID
//! de-duplication and completion-based recovery, ACS + update streaming
//! (paging, reverse-order, event query, and offset-**resumable** streams), a
//! node health check, and an opt-in retry pipeline. [`JsonClient`] mirrors the
//! core surface over the HTTP JSON Ledger API (submit + bounded reads, plus
//! WebSocket streaming behind the `ws` feature). Both share the
//! [`canton_core`] connection kernel (endpoint, [`Auth`],
//! TLS, retry) and error model.
//!
//! ```no_run
//! # async fn run() -> canton_ledger::Result<()> {
//! use canton_ledger::{CantonClient, Config};
//!
//! let client = CantonClient::connect_lazy(Config::new("http://localhost:3901"))?;
//! println!("ledger api version: {}", client.version().await?);
//! # Ok(())
//! # }
//! ```
// `doc(cfg)` marks the `ws`-gated items on docs.rs, and that attribute is
// nightly-only. docs.rs builds with `--cfg docsrs`, so without this the
// attributes below are a hard error there and the crate documents as failed —
// while a plain `cargo doc`, which never sets `docsrs`, stays green.
pub use ;
pub use ServingStatus;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// The generated Ledger API v2 protobuf types, for the **dynamic** (untyped)
/// command path. For typed payloads generated from a DAR, see `canton-codegen`
/// and the `canton-daml` runtime.
///
/// **Stability:** these wire types are *protocol-stable*, not SemVer-stable —
/// they track the vendored protos pinned to a Canton release and are exempt
/// from this crate's SemVer guarantees (see the `canton-proto` stability
/// policy). The hand-written SDK surface carries the SemVer promise.
pub use v2 as proto;