@@ -89,6 +89,150 @@ pub struct Onchain {
8989 /// The confirmation status of this payment.
9090 #[ prost( message, optional, tag = "2" ) ]
9191 pub status : :: core:: option:: Option < ConfirmationStatus > ,
92+ /// The classification of this transaction, as reported by LDK when it was broadcast.
93+ ///
94+ /// Unset for plain on-chain sends, and for payments recorded before this classification was
95+ /// tracked.
96+ #[ prost( message, optional, tag = "3" ) ]
97+ pub tx_type : :: core:: option:: Option < TransactionType > ,
98+ }
99+ /// A channel referenced by a TransactionType variant.
100+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
101+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
102+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
103+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
104+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
105+ pub struct TransactionChannel {
106+ /// The `node_id` of the channel counterparty.
107+ #[ prost( string, tag = "1" ) ]
108+ pub counterparty_node_id : :: prost:: alloc:: string:: String ,
109+ /// The ID of the channel.
110+ #[ prost( string, tag = "2" ) ]
111+ pub channel_id : :: prost:: alloc:: string:: String ,
112+ }
113+ /// The classification of an on-chain transaction, mirroring LDK's
114+ /// `lightning::chain::chaininterface::TransactionType`.
115+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
116+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
117+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
118+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
119+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
120+ pub struct TransactionType {
121+ #[ prost( oneof = "transaction_type::Type" , tags = "1, 2, 3, 4, 5, 6, 7" ) ]
122+ pub r#type : :: core:: option:: Option < transaction_type:: Type > ,
123+ }
124+ /// Nested message and enum types in `TransactionType`.
125+ pub mod transaction_type {
126+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
127+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
128+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
129+ #[ derive( Clone , PartialEq , :: prost:: Oneof ) ]
130+ pub enum Type {
131+ #[ prost( message, tag = "1" ) ]
132+ Funding ( super :: Funding ) ,
133+ #[ prost( message, tag = "2" ) ]
134+ CooperativeClose ( super :: CooperativeClose ) ,
135+ #[ prost( message, tag = "3" ) ]
136+ UnilateralClose ( super :: UnilateralClose ) ,
137+ #[ prost( message, tag = "4" ) ]
138+ AnchorBump ( super :: AnchorBump ) ,
139+ #[ prost( message, tag = "5" ) ]
140+ Claim ( super :: Claim ) ,
141+ #[ prost( message, tag = "6" ) ]
142+ Sweep ( super :: Sweep ) ,
143+ #[ prost( message, tag = "7" ) ]
144+ InteractiveFunding ( super :: InteractiveFunding ) ,
145+ }
146+ }
147+ /// A funding transaction establishing one or more new channels.
148+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
149+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
150+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
151+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
152+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
153+ pub struct Funding {
154+ /// The channels being funded.
155+ #[ prost( message, repeated, tag = "1" ) ]
156+ pub channels : :: prost:: alloc:: vec:: Vec < TransactionChannel > ,
157+ }
158+ /// A transaction cooperatively closing a channel.
159+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
160+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
161+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
162+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
163+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
164+ pub struct CooperativeClose {
165+ /// The `node_id` of the channel counterparty.
166+ #[ prost( string, tag = "1" ) ]
167+ pub counterparty_node_id : :: prost:: alloc:: string:: String ,
168+ /// The ID of the channel being closed.
169+ #[ prost( string, tag = "2" ) ]
170+ pub channel_id : :: prost:: alloc:: string:: String ,
171+ }
172+ /// A transaction force-closing a channel.
173+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
174+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
175+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
176+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
177+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
178+ pub struct UnilateralClose {
179+ /// The `node_id` of the channel counterparty.
180+ #[ prost( string, tag = "1" ) ]
181+ pub counterparty_node_id : :: prost:: alloc:: string:: String ,
182+ /// The ID of the channel being force-closed.
183+ #[ prost( string, tag = "2" ) ]
184+ pub channel_id : :: prost:: alloc:: string:: String ,
185+ }
186+ /// An anchor transaction CPFP fee-bumping a closing transaction.
187+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
188+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
189+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
190+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
191+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
192+ pub struct AnchorBump {
193+ /// The `node_id` of the channel counterparty.
194+ #[ prost( string, tag = "1" ) ]
195+ pub counterparty_node_id : :: prost:: alloc:: string:: String ,
196+ /// The ID of the channel whose closing transaction is being fee-bumped.
197+ #[ prost( string, tag = "2" ) ]
198+ pub channel_id : :: prost:: alloc:: string:: String ,
199+ }
200+ /// A transaction resolving an output spendable by both us and our counterparty.
201+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
202+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
203+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
204+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
205+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
206+ pub struct Claim {
207+ /// The `node_id` of the channel counterparty.
208+ #[ prost( string, tag = "1" ) ]
209+ pub counterparty_node_id : :: prost:: alloc:: string:: String ,
210+ /// The ID of the channel from which outputs are being claimed.
211+ #[ prost( string, tag = "2" ) ]
212+ pub channel_id : :: prost:: alloc:: string:: String ,
213+ }
214+ /// A transaction sweeping spendable outputs to the on-chain wallet.
215+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
216+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
217+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
218+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
219+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
220+ pub struct Sweep {
221+ /// The channels from which outputs are being swept, if known.
222+ #[ prost( message, repeated, tag = "1" ) ]
223+ pub channels : :: prost:: alloc:: vec:: Vec < TransactionChannel > ,
224+ }
225+ /// An interactively-negotiated funding transaction: a splice, or (once supported) a V2
226+ /// dual-funded channel open.
227+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
228+ #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
229+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
230+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
231+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
232+ pub struct InteractiveFunding {
233+ /// The channels participating in the negotiation.
234+ #[ prost( message, repeated, tag = "1" ) ]
235+ pub channels : :: prost:: alloc:: vec:: Vec < TransactionChannel > ,
92236}
93237#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
94238#[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
0 commit comments