Skip to content

Commit 784f583

Browse files
committed
Improve documentation around EcdsaSig
Improve the rustdocs for serialization methods of the `EcdsaSig` type.
1 parent bb495a2 commit 784f583

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/util/ecdsa.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ pub struct EcdsaSig {
3535
}
3636

3737
impl EcdsaSig {
38-
/// Constructs ECDSA bitcoin signature for [`EcdsaSighashType::All`]
38+
/// Constructs an ECDSA bitcoin signature for [`EcdsaSighashType::All`].
3939
pub fn sighash_all(sig: secp256k1::ecdsa::Signature) -> EcdsaSig {
4040
EcdsaSig {
4141
sig,
4242
hash_ty: EcdsaSighashType::All
4343
}
4444
}
4545

46-
/// Deserialize from slice following the standardness rules for [`EcdsaSighashType`]
46+
/// Deserializes from slice following the standardness rules for [`EcdsaSighashType`].
4747
pub fn from_slice(sl: &[u8]) -> Result<Self, EcdsaSigError> {
4848
let (hash_ty, sig) = sl.split_last()
4949
.ok_or(EcdsaSigError::EmptySignature)?;
@@ -54,7 +54,7 @@ impl EcdsaSig {
5454
Ok(EcdsaSig { sig, hash_ty })
5555
}
5656

57-
/// Serialize EcdsaSig
57+
/// Serializes an ECDSA signature (inner secp256k1 signature in DER format).
5858
pub fn to_vec(&self) -> Vec<u8> {
5959
// TODO: add support to serialize to a writer to SerializedSig
6060
self.sig.serialize_der()

0 commit comments

Comments
 (0)