File tree Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -610,6 +610,8 @@ pub struct ListUnspentItem {
610
610
pub spendable : bool ,
611
611
/// Whether we know how to spend this output, ignoring the lack of keys.
612
612
pub solvable : bool ,
613
+ /// A descriptor for spending this output (only when solvable)
614
+ pub descriptor : Option < String > ,
613
615
/// Whether this output is considered safe to spend. Unconfirmed transactions from outside keys
614
616
/// and unconfirmed replacement transactions are considered unsafe and are not eligible for
615
617
/// spending by fundrawtransaction and sendtoaddress.
Original file line number Diff line number Diff line change @@ -668,6 +668,7 @@ impl ListUnspentItem {
668
668
redeem_script,
669
669
spendable : self . spendable ,
670
670
solvable : self . solvable ,
671
+ descriptor : None ,
671
672
safe : self . safe ,
672
673
} )
673
674
}
Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ impl ListUnspentItem {
72
72
. redeem_script
73
73
. map ( |hex| ScriptBuf :: from_hex ( & hex) . map_err ( E :: RedeemScript ) )
74
74
. transpose ( ) ?;
75
-
76
75
Ok ( model:: ListUnspentItem {
77
76
txid,
78
77
vout,
@@ -84,6 +83,7 @@ impl ListUnspentItem {
84
83
redeem_script,
85
84
spendable : self . spendable ,
86
85
solvable : self . solvable ,
86
+ descriptor : self . descriptor ,
87
87
safe : self . safe ,
88
88
} )
89
89
}
Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ pub struct ListUnspentItem {
76
76
pub spendable : bool ,
77
77
/// Whether we know how to spend this output, ignoring the lack of keys.
78
78
pub solvable : bool ,
79
+ /// A descriptor for spending this output (only when solvable)
80
+ #[ serde( rename = "desc" ) ]
81
+ pub descriptor : Option < String > ,
79
82
/// Whether this output is considered safe to spend. Unconfirmed transactions from outside keys
80
83
/// and unconfirmed replacement transactions are considered unsafe and are not eligible for
81
84
/// spending by fundrawtransaction and sendtoaddress.
You can’t perform that action at this time.
0 commit comments