abtc_application/
commands.rs1use abtc_domain::primitives::{Block, Transaction};
6
7#[derive(Clone, Debug)]
9pub struct SendTransaction {
10 pub tx: Transaction,
11}
12
13impl SendTransaction {
14 pub fn new(tx: Transaction) -> Self {
16 SendTransaction { tx }
17 }
18}
19
20#[derive(Clone, Debug)]
22pub struct SubmitBlock {
23 pub block: Block,
24}
25
26impl SubmitBlock {
27 pub fn new(block: Block) -> Self {
29 SubmitBlock { block }
30 }
31}
32
33#[derive(Clone, Debug)]
35pub struct MineBlock {
36 pub coinbase_address: String,
37}
38
39impl MineBlock {
40 pub fn new(coinbase_address: String) -> Self {
42 MineBlock { coinbase_address }
43 }
44}
45
46#[derive(Clone, Debug)]
48pub struct UpdateChainTip {
49 pub block_hash: String,
50 pub height: u32,
51}
52
53impl UpdateChainTip {
54 pub fn new(block_hash: String, height: u32) -> Self {
56 UpdateChainTip { block_hash, height }
57 }
58}