mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-06 20:29:10 -07:00
mcp: readme
This commit is contained in:
15
crates/brk_core/src/structs/addressdata.rs
Normal file
15
crates/brk_core/src/structs/addressdata.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use crate::{Dollars, Sats};
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct AddressData {
|
||||
pub sent: Sats,
|
||||
pub received: Sats,
|
||||
pub realized_cap: Dollars,
|
||||
pub outputs_len: u32,
|
||||
}
|
||||
|
||||
impl AddressData {
|
||||
pub fn amount(&self) -> Sats {
|
||||
(u64::from(self.received) - u64::from(self.sent)).into()
|
||||
}
|
||||
}
|
||||
8
crates/brk_core/src/structs/emptyaddressdata.rs
Normal file
8
crates/brk_core/src/structs/emptyaddressdata.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
use crate::Sats;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct EmptyAddressData {
|
||||
pub transfered: Sats,
|
||||
}
|
||||
|
||||
impl EmptyAddressData {}
|
||||
@@ -1,5 +1,6 @@
|
||||
mod addressbytes;
|
||||
mod addressbyteshash;
|
||||
mod addressdata;
|
||||
mod bitcoin;
|
||||
mod blockhash;
|
||||
mod blockhashprefix;
|
||||
@@ -9,6 +10,7 @@ mod dateindex;
|
||||
mod decadeindex;
|
||||
mod difficultyepoch;
|
||||
mod dollars;
|
||||
mod emptyaddressdata;
|
||||
mod emptyoutputindex;
|
||||
mod feerate;
|
||||
mod halvingepoch;
|
||||
@@ -54,6 +56,7 @@ mod yearindex;
|
||||
|
||||
pub use addressbytes::*;
|
||||
pub use addressbyteshash::*;
|
||||
pub use addressdata::*;
|
||||
pub use bitcoin::*;
|
||||
pub use blockhash::*;
|
||||
pub use blockhashprefix::*;
|
||||
@@ -63,6 +66,7 @@ pub use dateindex::*;
|
||||
pub use decadeindex::*;
|
||||
pub use difficultyepoch::*;
|
||||
pub use dollars::*;
|
||||
pub use emptyaddressdata::*;
|
||||
pub use emptyoutputindex::*;
|
||||
pub use feerate::*;
|
||||
pub use halvingepoch::*;
|
||||
|
||||
Reference in New Issue
Block a user