use candid::Principal;
use std::collections::BTreeMap;
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CompletedLedgerAccountView {
pub owner: Principal,
pub cycles: u128,
}
#[derive(Debug)]
pub struct CompletedLedgerBalancesView {
pub(in crate::fleet_ensure) ledger: Principal,
pub(in crate::fleet_ensure) operator: CompletedLedgerAccountView,
pub(in crate::fleet_ensure) root_accounts: BTreeMap<String, CompletedLedgerAccountView>,
pub(in crate::fleet_ensure) other_canister_accounts:
BTreeMap<String, CompletedLedgerAccountView>,
pub(in crate::fleet_ensure) total_canister_ledger_cycles: u128,
}
impl CompletedLedgerBalancesView {
#[must_use]
pub const fn ledger(&self) -> Principal {
self.ledger
}
#[must_use]
pub const fn operator(&self) -> &CompletedLedgerAccountView {
&self.operator
}
#[must_use]
pub const fn root_accounts(&self) -> &BTreeMap<String, CompletedLedgerAccountView> {
&self.root_accounts
}
#[must_use]
pub const fn other_canister_accounts(&self) -> &BTreeMap<String, CompletedLedgerAccountView> {
&self.other_canister_accounts
}
#[must_use]
pub const fn total_canister_ledger_cycles(&self) -> u128 {
self.total_canister_ledger_cycles
}
}