ic_query/icrc/model/contracts/requests/ledger.rs
1//! Module: icrc::model::contracts::requests::ledger
2//!
3//! Responsibility: shared ICRC ledger identity and provenance requests.
4//! Does not own: account selection, history pagination, live transport, or reports.
5//! Boundary: captures the common ledger target used by point-in-time report builders.
6
7///
8/// IcrcLedgerRequest
9///
10/// Shared ledger identity and provenance for metadata and capability report builders.
11///
12
13#[derive(Clone, Debug, Eq, PartialEq)]
14pub struct IcrcLedgerRequest {
15 pub source_endpoint: String,
16 pub now_unix_secs: u64,
17 pub ledger_canister_id: String,
18}
19
20impl IcrcLedgerRequest {
21 #[must_use]
22 pub fn new(
23 source_endpoint: impl Into<String>,
24 now_unix_secs: u64,
25 ledger_canister_id: impl Into<String>,
26 ) -> Self {
27 Self {
28 source_endpoint: source_endpoint.into(),
29 now_unix_secs,
30 ledger_canister_id: ledger_canister_id.into(),
31 }
32 }
33}