![](/_next/image?url=%2Fimages%2Fgradient-top-bg.png&w=1920&q=75)
use super::*; #[derive(Copy, Clone, Eq, PartialEq, Debug, Display, Ord, PartialOrd, Deserialize, Serialize)] #[serde(transparent)] pub struct Sat(pub u64); impl Sat { pub(crate) const LAST: Self = Self(Self::SUPPLY - 1); pub(crate) const SUPPLY: u64 = 2099999997690000; pub(crate) fn n(self) -> u64 { self.0 } pub(crate) fn degree(self) -> Degree { self.into() } pub(crate) fn height(self) -> Height { self.epoch().starting_height() + u32::try_from(self.epoch_position() / self.epoch().subsidy()).unwrap() } pub(crate) fn cycle(self) -> u32 { Epoch::from(self).0 / CYCLE_EPOCHS } pub(crate) fn nineball(self) -> bool { self.n() >= 50 * COIN_VALUE * 9 && self.n() < 50 * COIN_VALUE * 10 } pub(crate) fn percentile(self) -> String { format!("{}%", (self.0 as f64 / Self::LAST.0 as f64) * 100.0) } pub(crate) fn epoch(self) -> Epoch { self.into() } pub(crate) fn period(self) -> u32 { self.height().n() / DIFFCHANGE_INTERVAL } pub(crate) fn third(self) -> u64 {
Inscription #44972007
Collection
Ord
Owner
bc1qun6scu...qsmsv602udID
346893552b...aadc1260i0
Detail
History
Sign Up for our Newsletter
And be the first to know about any updates!