Merge rust-bitcoin/rust-bitcoin#3022: Update Key documentation
164b72e07b
Update Key documentation (Shing Him Ng) Pull request description: The documentation for `Key` was a bit confusing since `<key> := <keylen> <keytype> <keydata>` was right above the `key` field, when in reality the `key` field represents the key data. Moving the documentation that describes a `Key` as a whole to the struct itself and specifying that `key` represents key data will hopefully clear things up a bit ACKs for top commit: Kixunil: ACK164b72e07b
tcharding: ACK164b72e07b
Tree-SHA512: 33c2b24d3006a0ed85a5d96351e0a01c1365c8ea01472233b024de54941319cdbefa0126f8b9538385e8f33ba7e2e3895f0dc5b6a36a1c501c8b97ebbede6502
This commit is contained in:
commit
9477ddc57b
|
@ -17,14 +17,15 @@ use crate::prelude::{DisplayHex, Vec};
|
|||
use crate::psbt::Error;
|
||||
|
||||
/// A PSBT key in its raw byte form.
|
||||
///
|
||||
/// `<key> := <keylen> <keytype> <keydata>`
|
||||
#[derive(Debug, PartialEq, Hash, Eq, Clone, Ord, PartialOrd)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))]
|
||||
pub struct Key {
|
||||
/// The type of this PSBT key.
|
||||
pub type_value: u8,
|
||||
/// The key itself in raw byte form.
|
||||
/// `<key> := <keylen> <keytype> <keydata>`
|
||||
/// The key data itself in raw byte form.
|
||||
#[cfg_attr(feature = "serde", serde(with = "crate::serde_utils::hex_bytes"))]
|
||||
pub key: Vec<u8>,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue