canic_core/dto/payment.rs
1use crate::types::Decimal;
2use candid::CandidType;
3use serde::{Deserialize, Serialize};
4
5///
6/// PriceQuote
7/// Canic-specific pricing envelope for frontends and integrators.
8///
9/// - `usd_amount`: USD amount (candid `text`, backed by `rust_decimal`).
10/// - `icp_e8s`: ICP amount in e8s.
11/// - `usd_per_icp`: USD per ICP exchange rate (candid `text`, backed by `rust_decimal`).
12/// - `timestamp_seconds`: UNIX epoch time in seconds.
13///
14
15#[derive(CandidType, Clone, Debug, Deserialize, Serialize)]
16pub struct PriceQuote {
17 pub usd_amount: Decimal,
18 pub icp_e8s: u64,
19 pub usd_per_icp: Decimal,
20 pub timestamp_seconds: u64,
21}