@@ -7,8 +7,6 @@ extern crate throttled_json_rpc;
77
88use std:: collections:: HashMap ;
99
10- pub type SerializedData = String ;
11-
1210#[ derive( Serialize , Deserialize , Clone , Debug ) ]
1311pub struct Block {
1412 pub hash : String ,
@@ -52,7 +50,7 @@ pub struct FullBlock {
5250
5351#[ derive( Serialize , Deserialize , Clone , Debug ) ]
5452pub struct Transaction {
55- pub txid : String ,
53+ pub txid : Option < String > ,
5654 pub version : i32 ,
5755 #[ serde( rename = "type" ) ]
5856 pub tx_type : i32 ,
@@ -131,10 +129,11 @@ pub enum Vin {
131129#[ derive( Serialize , Deserialize , Clone , Debug ) ]
132130#[ serde( rename_all = "camelCase" ) ]
133131pub struct VinTx {
134- pub txid : String ,
135- pub vout : i32 ,
136- pub script_sig : ScriptSig ,
137- pub sequence : i64 ,
132+ pub coinbase : Option < String > ,
133+ pub txid : Option < String > ,
134+ pub vout : Option < i32 > ,
135+ pub script_sig : Option < ScriptSig > ,
136+ pub sequence : Option < i64 > ,
138137}
139138
140139#[ derive( Serialize , Deserialize , Clone , Debug ) ]
@@ -169,9 +168,10 @@ pub struct BlockChainInfo {
169168}
170169
171170#[ derive( Serialize , Debug , serde:: Deserialize , Clone ) ]
171+ #[ serde( rename_all = "camelCase" ) ]
172172pub struct ShieldPoolValue {
173- pub chainValue : f64 ,
174- pub valueDelta : f64 ,
173+ pub chain_value : f64 ,
174+ pub value_delta : f64 ,
175175}
176176
177177#[ derive( Serialize , Debug , serde:: Deserialize ) ]
@@ -192,7 +192,8 @@ pub struct Upgrades {
192192 pub pos : Upgrade ,
193193 #[ serde( rename = "PoS v2" ) ]
194194 pub pos_v2 : Upgrade ,
195- pub Zerocoin : Upgrade ,
195+ #[ serde( rename = "Zerocoin" ) ]
196+ pub zerocoin : Upgrade ,
196197 #[ serde( rename = "Zerocoin v2" ) ]
197198 pub zerocoin_v2 : Upgrade ,
198199 #[ serde( rename = "BIP65" ) ]
@@ -245,7 +246,7 @@ pub struct ScriptPubKey {
245246 #[ serde( rename = "reqSigs" ) ]
246247 pub req_sigs : Option < i64 > ,
247248 #[ serde( rename = "type" ) ]
248- pub script_type : String ,
249+ pub script_type : Option < String > ,
249250 pub addresses : Option < Vec < String > > ,
250251}
251252
0 commit comments