Add full stops to rustdocs
Mildly improve the docs by adding full stops to every rustdoc comment.
This commit is contained in:
parent
11c046b707
commit
92059c2841
|
@ -108,32 +108,32 @@ pub struct Input {
|
||||||
/// other scripts necessary for this input to pass validation.
|
/// other scripts necessary for this input to pass validation.
|
||||||
pub final_script_witness: Option<Witness>,
|
pub final_script_witness: Option<Witness>,
|
||||||
/// TODO: Proof of reserves commitment
|
/// TODO: Proof of reserves commitment
|
||||||
/// RIPEMD160 hash to preimage map
|
/// RIPEMD160 hash to preimage map.
|
||||||
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))]
|
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))]
|
||||||
pub ripemd160_preimages: BTreeMap<ripemd160::Hash, Vec<u8>>,
|
pub ripemd160_preimages: BTreeMap<ripemd160::Hash, Vec<u8>>,
|
||||||
/// SHA256 hash to preimage map
|
/// SHA256 hash to preimage map.
|
||||||
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))]
|
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))]
|
||||||
pub sha256_preimages: BTreeMap<sha256::Hash, Vec<u8>>,
|
pub sha256_preimages: BTreeMap<sha256::Hash, Vec<u8>>,
|
||||||
/// HSAH160 hash to preimage map
|
/// HSAH160 hash to preimage map.
|
||||||
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))]
|
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))]
|
||||||
pub hash160_preimages: BTreeMap<hash160::Hash, Vec<u8>>,
|
pub hash160_preimages: BTreeMap<hash160::Hash, Vec<u8>>,
|
||||||
/// HAS256 hash to preimage map
|
/// HAS256 hash to preimage map.
|
||||||
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))]
|
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_byte_values"))]
|
||||||
pub hash256_preimages: BTreeMap<sha256d::Hash, Vec<u8>>,
|
pub hash256_preimages: BTreeMap<sha256d::Hash, Vec<u8>>,
|
||||||
/// Serialized schnorr signature with sighash type for key spend
|
/// Serialized schnorr signature with sighash type for key spend.
|
||||||
pub tap_key_sig: Option<SchnorrSig>,
|
pub tap_key_sig: Option<SchnorrSig>,
|
||||||
/// Map of <xonlypubkey>|<leafhash> with signature
|
/// Map of <xonlypubkey>|<leafhash> with signature.
|
||||||
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
|
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
|
||||||
pub tap_script_sigs: BTreeMap<(XOnlyPublicKey, TapLeafHash), SchnorrSig>,
|
pub tap_script_sigs: BTreeMap<(XOnlyPublicKey, TapLeafHash), SchnorrSig>,
|
||||||
/// Map of Control blocks to Script version pair
|
/// Map of Control blocks to Script version pair.
|
||||||
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
|
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
|
||||||
pub tap_scripts: BTreeMap<ControlBlock, (Script, LeafVersion)>,
|
pub tap_scripts: BTreeMap<ControlBlock, (Script, LeafVersion)>,
|
||||||
/// Map of tap root x only keys to origin info and leaf hashes contained in it
|
/// Map of tap root x only keys to origin info and leaf hashes contained in it.
|
||||||
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
|
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
|
||||||
pub tap_key_origins: BTreeMap<XOnlyPublicKey, (Vec<TapLeafHash>, KeySource)>,
|
pub tap_key_origins: BTreeMap<XOnlyPublicKey, (Vec<TapLeafHash>, KeySource)>,
|
||||||
/// Taproot Internal key
|
/// Taproot Internal key.
|
||||||
pub tap_internal_key : Option<XOnlyPublicKey>,
|
pub tap_internal_key : Option<XOnlyPublicKey>,
|
||||||
/// Taproot Merkle root
|
/// Taproot Merkle root.
|
||||||
pub tap_merkle_root : Option<TapBranchHash>,
|
pub tap_merkle_root : Option<TapBranchHash>,
|
||||||
/// Proprietary key-value pairs for this input.
|
/// Proprietary key-value pairs for this input.
|
||||||
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq_byte_values"))]
|
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq_byte_values"))]
|
||||||
|
|
|
@ -38,7 +38,7 @@ pub trait Map {
|
||||||
/// Attempt to merge with another key-value map of the same type.
|
/// Attempt to merge with another key-value map of the same type.
|
||||||
fn merge(&mut self, other: Self) -> Result<(), psbt::Error>;
|
fn merge(&mut self, other: Self) -> Result<(), psbt::Error>;
|
||||||
|
|
||||||
/// Encodes map data with bitcoin consensus encoding
|
/// Encodes map data with bitcoin consensus encoding.
|
||||||
fn consensus_encode_map<S: io::Write>(
|
fn consensus_encode_map<S: io::Write>(
|
||||||
&self,
|
&self,
|
||||||
mut s: S,
|
mut s: S,
|
||||||
|
|
|
@ -58,11 +58,11 @@ pub struct Output {
|
||||||
/// corresponding master key fingerprints and derivation paths.
|
/// corresponding master key fingerprints and derivation paths.
|
||||||
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
|
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
|
||||||
pub bip32_derivation: BTreeMap<secp256k1::PublicKey, KeySource>,
|
pub bip32_derivation: BTreeMap<secp256k1::PublicKey, KeySource>,
|
||||||
/// The internal pubkey
|
/// The internal pubkey.
|
||||||
pub tap_internal_key: Option<XOnlyPublicKey>,
|
pub tap_internal_key: Option<XOnlyPublicKey>,
|
||||||
/// Taproot Output tree
|
/// Taproot Output tree.
|
||||||
pub tap_tree: Option<TapTree>,
|
pub tap_tree: Option<TapTree>,
|
||||||
/// Map of tap root x only keys to origin info and leaf hashes contained in it
|
/// Map of tap root x only keys to origin info and leaf hashes contained in it.
|
||||||
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
|
#[cfg_attr(feature = "serde", serde(with = "::serde_utils::btreemap_as_seq"))]
|
||||||
pub tap_key_origins: BTreeMap<XOnlyPublicKey, (Vec<TapLeafHash>, KeySource)>,
|
pub tap_key_origins: BTreeMap<XOnlyPublicKey, (Vec<TapLeafHash>, KeySource)>,
|
||||||
/// Proprietary key-value pairs for this output.
|
/// Proprietary key-value pairs for this output.
|
||||||
|
@ -79,7 +79,7 @@ pub struct Output {
|
||||||
pub unknown: BTreeMap<raw::Key, Vec<u8>>,
|
pub unknown: BTreeMap<raw::Key, Vec<u8>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Taproot Tree representing a finalized [`TaprootBuilder`] (a complete binary tree)
|
/// Taproot Tree representing a finalized [`TaprootBuilder`] (a complete binary tree).
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
pub struct TapTree(pub(crate) TaprootBuilder);
|
pub struct TapTree(pub(crate) TaprootBuilder);
|
||||||
|
@ -103,7 +103,7 @@ impl TapTree {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convert a [`TaprootBuilder`] into a tree if it is complete binary tree.
|
/// Convert a [`TaprootBuilder`] into a tree if it is complete binary tree.
|
||||||
/// Returns the inner as Err if it is not a complete tree
|
/// Returns the inner as Err if it is not a complete tree.
|
||||||
pub fn from_inner(inner: TaprootBuilder) -> Result<Self, TaprootBuilder> {
|
pub fn from_inner(inner: TaprootBuilder) -> Result<Self, TaprootBuilder> {
|
||||||
if inner.is_complete() {
|
if inner.is_complete() {
|
||||||
Ok(TapTree(inner))
|
Ok(TapTree(inner))
|
||||||
|
|
Loading…
Reference in New Issue