abtc_application/
queries.rs1use abtc_domain::primitives::{BlockHash, Txid};
6
7#[derive(Clone, Debug)]
9pub struct GetBlock {
10 pub hash: BlockHash,
11}
12
13impl GetBlock {
14 pub fn new(hash: BlockHash) -> Self {
15 GetBlock { hash }
16 }
17}
18
19#[derive(Clone, Debug)]
21pub struct GetBlockHeight {
22 pub hash: BlockHash,
23}
24
25impl GetBlockHeight {
26 pub fn new(hash: BlockHash) -> Self {
27 GetBlockHeight { hash }
28 }
29}
30
31#[derive(Clone, Debug)]
33pub struct GetTransaction {
34 pub txid: Txid,
35}
36
37impl GetTransaction {
38 pub fn new(txid: Txid) -> Self {
39 GetTransaction { txid }
40 }
41}
42
43#[derive(Clone, Debug)]
45pub struct GetBalance {
46 pub address: Option<String>,
47}
48
49impl GetBalance {
50 pub fn new(address: Option<String>) -> Self {
51 GetBalance { address }
52 }
53}
54
55#[derive(Clone, Debug)]
57pub struct GetChainInfo;
58
59#[derive(Clone, Debug)]
61pub struct GetMempool {
62 pub verbose: bool,
63}
64
65impl GetMempool {
66 pub fn new(verbose: bool) -> Self {
67 GetMempool { verbose }
68 }
69}
70
71#[derive(Clone, Debug)]
73pub struct EstimateFee {
74 pub target_blocks: u32,
75}
76
77impl EstimateFee {
78 pub fn new(target_blocks: u32) -> Self {
79 EstimateFee { target_blocks }
80 }
81}