@bennyblader/ddk-rn 0.3.17 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ddk-ffi/Cargo.lock +1 -1
- package/ddk-ffi/Cargo.toml +1 -1
- package/ddk-ffi/src/lib.rs +9 -4
- package/package.json +1 -1
package/ddk-ffi/Cargo.lock
CHANGED
package/ddk-ffi/Cargo.toml
CHANGED
package/ddk-ffi/src/lib.rs
CHANGED
|
@@ -1592,12 +1592,17 @@ mod tests {
|
|
|
1592
1592
|
let secp = get_secp_context();
|
|
1593
1593
|
let btc_txn = transaction_to_btc_tx(&tx)?;
|
|
1594
1594
|
let script = ScriptBuf::from_bytes(script_pubkey);
|
|
1595
|
-
let sig_hash_msg =
|
|
1596
|
-
dlc::util::get_sig_hash_msg(&btc_txn, input_index, &script, Amount::from_sat(value))?;
|
|
1597
1595
|
let sig = EcdsaSignature::from_der(&signature).map_err(|_| DLCError::InvalidSignature)?;
|
|
1598
1596
|
let pk = PublicKey::from_slice(&pk).map_err(|_| DLCError::InvalidPublicKey)?;
|
|
1599
|
-
|
|
1600
|
-
|
|
1597
|
+
dlc::verify_tx_input_sig(
|
|
1598
|
+
secp,
|
|
1599
|
+
&sig,
|
|
1600
|
+
&btc_txn,
|
|
1601
|
+
input_index,
|
|
1602
|
+
&script,
|
|
1603
|
+
Amount::from_sat(value),
|
|
1604
|
+
&pk,
|
|
1605
|
+
)?;
|
|
1601
1606
|
Ok(())
|
|
1602
1607
|
}
|
|
1603
1608
|
|