@@ -117,8 +117,16 @@ pub struct GetAddressInfo {
117117 pub is_mine : bool ,
118118 /// If the address is watchonly.
119119 pub is_watch_only : bool ,
120+ /// Whether we know how to spend coins sent to this address, ignoring the possible lack of private keys.
121+ pub solvable : Option < bool > ,
122+ /// A descriptor for spending coins sent to this address (only when solvable).
123+ pub descriptor : Option < String > ,
124+ /// The descriptor used to derive this address if this is a descriptor wallet
125+ pub parent_descriptor : Option < String > ,
120126 /// If the key is a script.
121- pub is_script : bool ,
127+ pub is_script : Option < bool > ,
128+ /// If the address was used for change output.
129+ pub is_change : Option < bool > ,
122130 /// If the address is a witness address.
123131 pub is_witness : bool ,
124132 /// The version number of the witness program.
@@ -140,18 +148,20 @@ pub struct GetAddressInfo {
140148 pub pubkey : Option < PublicKey > ,
141149 /// Information about the address embedded in P2SH or P2WSH, if relevant and known.
142150 pub embedded : Option < GetAddressInfoEmbedded > ,
143- /// If the address is compressed.
144- pub is_compressed : bool ,
151+ /// If the pubkey is compressed.
152+ pub is_compressed : Option < bool > ,
145153 /// The label associated with the address, "" is the default account.
146- pub label : String ,
154+ pub label : Option < String > ,
147155 /// The creation time of the key if available in seconds since epoch (Jan 1 1970 GMT).
148156 pub timestamp : Option < u32 > ,
149157 /// The HD keypath if the key is HD and available.
150158 pub hd_key_path : Option < bip32:: DerivationPath > ,
151159 /// The Hash160 of the HD seed.
152160 pub hd_seed_id : Option < hash160:: Hash > ,
161+ /// The fingerprint of the master key.
162+ pub hd_master_fingerprint : Option < bip32:: Fingerprint > ,
153163 /// Labels associated with the address.
154- pub labels : Vec < AddressLabel > ,
164+ pub labels : Vec < String > ,
155165}
156166
157167/// An address script type.
@@ -177,16 +187,6 @@ pub enum ScriptType {
177187 WitnessUnknown ,
178188}
179189
180- /// An address label.
181- #[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
182- #[ serde( deny_unknown_fields) ]
183- pub struct AddressLabel {
184- /// The address label.
185- pub name : String ,
186- /// Purpose of address (send or receive).
187- pub purpose : AddressPurpose ,
188- }
189-
190190/// The `embedded` field of `GetAddressInfo`.
191191///
192192/// It includes all getaddressinfo output fields for the embedded address, excluding metadata
@@ -200,8 +200,16 @@ pub struct GetAddressInfoEmbedded {
200200 pub address : Address < NetworkUnchecked > ,
201201 /// The hex encoded scriptPubKey generated by the address.
202202 pub script_pubkey : ScriptBuf ,
203+ /// Whether we know how to spend coins sent to this address, ignoring the possible lack of private keys.
204+ pub solvable : Option < bool > ,
205+ /// A descriptor for spending coins sent to this address (only when solvable).
206+ pub descriptor : Option < String > ,
207+ /// The descriptor used to derive this address if this is a descriptor wallet
208+ pub parent_descriptor : Option < String > ,
203209 /// If the key is a script.
204- pub is_script : bool ,
210+ pub is_script : Option < bool > ,
211+ /// If the address was used for change output.
212+ pub is_change : Option < bool > ,
205213 /// If the address is a witness address.
206214 pub is_witness : bool ,
207215 /// The version number of the witness program.
@@ -215,17 +223,17 @@ pub struct GetAddressInfoEmbedded {
215223 /// The redeemscript for the p2sh address.
216224 pub hex : Option < ScriptBuf > ,
217225 /// Array of pubkeys associated with the known redeemscript (only if "script" is "multisig").
218- pub pubkeys : Vec < PublicKey > ,
226+ pub pubkeys : Option < Vec < PublicKey > > ,
219227 /// Number of signatures required to spend multisig output (only if "script" is "multisig").
220228 pub sigs_required : Option < u32 > ,
221229 /// The hex value of the raw public key, for single-key addresses (possibly embedded in P2SH or P2WSH).
222230 pub pubkey : Option < PublicKey > ,
223231 /// If the address is compressed.
224- pub is_compressed : bool ,
232+ pub is_compressed : Option < bool > ,
225233 /// The label associated with the address, "" is the default account.
226- pub label : String ,
234+ pub label : Option < String > ,
227235 /// Labels associated with the address.
228- pub labels : Vec < AddressLabel > ,
236+ pub labels : Option < Vec < String > > ,
229237}
230238
231239/// Models the result of JSON-RPC method `getbalance`.
0 commit comments