@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.
@@ -282,7 +282,7 @@ checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"
282
282
 
283
283
  [[package]]
284
284
  name = "ddk_ffi"
285
- version = "0.3.17"
285
+ version = "0.3.18"
286
286
  dependencies = [
287
287
  "bip39",
288
288
  "bitcoin",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "ddk_ffi"
3
- version = "0.3.17"
3
+ version = "0.3.18"
4
4
  edition = "2021"
5
5
  license = "MIT"
6
6
  description = "rust-dlc language bindings"
@@ -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
- secp.verify_ecdsa(&sig_hash_msg, &sig, &pk)
1600
- .map_err(|_| DLCError::InvalidSignature)?;
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bennyblader/ddk-rn",
3
- "version": "0.3.17",
3
+ "version": "0.3.18",
4
4
  "description": "dlcdevkit bindings for react-native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",