File tree Expand file tree Collapse file tree 3 files changed +11
-23
lines changed
Expand file tree Collapse file tree 3 files changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -605,28 +605,7 @@ enum WordCount {
605605
606606typedef interface Address;
607607
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;
630609
631610typedef interface Transaction;
632611
Original file line number Diff line number Diff line change @@ -150,12 +150,22 @@ impl Script {
150150impl_from_core_type ! ( BdkScriptBuf , Script ) ;
151151impl_into_core_type ! ( Script , BdkScriptBuf ) ;
152152
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 ) ]
153157pub struct Header {
158+ /// Block version, now repurposed for soft fork signalling.
154159 pub version : i32 ,
160+ /// Reference to the previous block in the chain.
155161 pub prev_blockhash : String ,
162+ /// The root hash of the merkle tree of transactions in the block.
156163 pub merkle_root : String ,
164+ /// The timestamp of the block, as claimed by the miner.
157165 pub time : u32 ,
166+ /// The target value below which the blockhash must lie.
158167 pub bits : u32 ,
168+ /// The nonce, selected to obtain a low enough blockhash.
159169 pub nonce : u32 ,
160170}
161171
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ mod wallet;
1414use crate :: bitcoin:: Address ;
1515use crate :: bitcoin:: Amount ;
1616use crate :: bitcoin:: FeeRate ;
17- use crate :: bitcoin:: Header ;
1817use crate :: bitcoin:: OutPoint ;
1918use crate :: bitcoin:: Script ;
2019use crate :: bitcoin:: Transaction ;
You can’t perform that action at this time.
0 commit comments