@@ -53,6 +53,10 @@ const UINT256_ONE: [u8; 32] = [
53
53
] ;
54
54
55
55
/// A reference to a transaction output.
56
+ ///
57
+ /// ### Bitcoin Core References
58
+ ///
59
+ /// * [COutPoint definition](https://github.com/bitcoin/bitcoin/blob/345457b542b6a980ccfbc868af0970a6f91d1b82/src/primitives/transaction.h#L26)
56
60
#[ derive( Copy , Clone , Debug , Eq , Hash , PartialEq , PartialOrd , Ord ) ]
57
61
pub struct OutPoint {
58
62
/// The referenced transaction's txid.
@@ -187,7 +191,15 @@ impl ::core::str::FromStr for OutPoint {
187
191
}
188
192
}
189
193
190
- /// A transaction input, which defines old coins to be consumed
194
+ /// Bitcoin transaction input.
195
+ ///
196
+ /// It contains the location of the previous transaction's output,
197
+ /// that it spends and set of scripts that satisfy its spending
198
+ /// conditions.
199
+ ///
200
+ /// ### Bitcoin Core References
201
+ ///
202
+ /// * [CTxIn definition](https://github.com/bitcoin/bitcoin/blob/345457b542b6a980ccfbc868af0970a6f91d1b82/src/primitives/transaction.h#L65)
191
203
#[ derive( Clone , PartialEq , Eq , PartialOrd , Ord , Debug , Hash ) ]
192
204
#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
193
205
pub struct TxIn {
@@ -220,7 +232,17 @@ impl Default for TxIn {
220
232
}
221
233
}
222
234
223
- /// A transaction output, which defines new coins to be created from old ones.
235
+ /// Bitcoin transaction output.
236
+ ///
237
+ /// Defines new coins to be created as a result of the transaction,
238
+ /// along with spending conditions ("script", aka "output script"),
239
+ /// which an input spending it must satisfy.
240
+ ///
241
+ /// An output that is not yet spent by an input is called Unspent Transaction Output ("UTXO").
242
+ ///
243
+ /// ### Bitcoin Core References
244
+ ///
245
+ /// * [CTxOut definition](https://github.com/bitcoin/bitcoin/blob/345457b542b6a980ccfbc868af0970a6f91d1b82/src/primitives/transaction.h#L148)
224
246
#[ derive( Clone , PartialEq , Eq , PartialOrd , Ord , Debug , Hash ) ]
225
247
#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
226
248
pub struct TxOut {
@@ -237,7 +259,19 @@ impl Default for TxOut {
237
259
}
238
260
}
239
261
240
- /// A Bitcoin transaction, which describes an authenticated movement of coins.
262
+ /// Bitcoin transaction.
263
+ ///
264
+ /// An authenticated movement of coins.
265
+ ///
266
+ /// See [Bitcoin Wiki: Transaction][wiki-transaction] for more information.
267
+ ///
268
+ /// [wiki-transaction]: https://en.bitcoin.it/wiki/Transaction
269
+ ///
270
+ /// ### Bitcoin Core References
271
+ ///
272
+ /// * [CTtransaction definition](https://github.com/bitcoin/bitcoin/blob/345457b542b6a980ccfbc868af0970a6f91d1b82/src/primitives/transaction.h#L279)
273
+ ///
274
+ /// ### Serialization notes
241
275
///
242
276
/// If any inputs have nonempty witnesses, the entire transaction is serialized
243
277
/// in the post-BIP141 Segwit format which includes a list of witnesses. If all
0 commit comments