File tree 3 files changed +11
-23
lines changed
3 files changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -605,28 +605,7 @@ enum WordCount {
605
605
606
606
typedef interface Address;
607
607
608
- /// Bitcoin block header.
609
- /// Contains all the block’s information except the actual transactions, but including a root of a merkle tree
610
- /// committing to all transactions in the block.
611
- dictionary Header {
612
- /// Block version, now repurposed for soft fork signalling.
613
- i32 version;
614
-
615
- /// Reference to the previous block in the chain.
616
- string prev_blockhash;
617
-
618
- /// The root hash of the merkle tree of transactions in the block.
619
- string merkle_root;
620
-
621
- /// The timestamp of the block, as claimed by the miner.
622
- u32 time;
623
-
624
- /// The target value below which the blockhash must lie.
625
- u32 bits;
626
-
627
- /// The nonce, selected to obtain a low enough blockhash.
628
- u32 nonce;
629
- };
608
+ typedef dictionary Header;
630
609
631
610
typedef interface Transaction;
632
611
Original file line number Diff line number Diff line change @@ -150,12 +150,22 @@ impl Script {
150
150
impl_from_core_type ! ( BdkScriptBuf , Script ) ;
151
151
impl_into_core_type ! ( Script , BdkScriptBuf ) ;
152
152
153
+ /// Bitcoin block header.
154
+ /// Contains all the block’s information except the actual transactions, but including a root of a merkle tree
155
+ /// committing to all transactions in the block.
156
+ #[ derive( uniffi:: Record ) ]
153
157
pub struct Header {
158
+ /// Block version, now repurposed for soft fork signalling.
154
159
pub version : i32 ,
160
+ /// Reference to the previous block in the chain.
155
161
pub prev_blockhash : String ,
162
+ /// The root hash of the merkle tree of transactions in the block.
156
163
pub merkle_root : String ,
164
+ /// The timestamp of the block, as claimed by the miner.
157
165
pub time : u32 ,
166
+ /// The target value below which the blockhash must lie.
158
167
pub bits : u32 ,
168
+ /// The nonce, selected to obtain a low enough blockhash.
159
169
pub nonce : u32 ,
160
170
}
161
171
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ mod wallet;
14
14
use crate :: bitcoin:: Address ;
15
15
use crate :: bitcoin:: Amount ;
16
16
use crate :: bitcoin:: FeeRate ;
17
- use crate :: bitcoin:: Header ;
18
17
use crate :: bitcoin:: OutPoint ;
19
18
use crate :: bitcoin:: Script ;
20
19
use crate :: bitcoin:: Transaction ;
You can’t perform that action at this time.
0 commit comments