Add EcdsaSig::sighash_all convenience constructor
This commit is contained in:
parent
f332a1967e
commit
c36a3da6f0
|
@ -425,6 +425,13 @@ pub struct EcdsaSig {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EcdsaSig {
|
impl EcdsaSig {
|
||||||
|
/// Constructs ECDSA bitcoin signature for [`EcdsaSigHashType::All`]
|
||||||
|
pub fn sighash_all(sig: secp256k1::Signature) -> EcdsaSig {
|
||||||
|
EcdsaSig {
|
||||||
|
sig,
|
||||||
|
hash_ty: EcdsaSigHashType::All
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Deserialize from slice
|
/// Deserialize from slice
|
||||||
pub fn from_slice(sl: &[u8]) -> Result<Self, EcdsaSigError> {
|
pub fn from_slice(sl: &[u8]) -> Result<Self, EcdsaSigError> {
|
||||||
|
|
Loading…
Reference in New Issue