@bennyblader/ddk-rn 0.3.18 → 0.3.20

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.18"
285
+ version = "0.3.20"
286
286
  dependencies = [
287
287
  "bip39",
288
288
  "bitcoin",
@@ -295,7 +295,7 @@ dependencies = [
295
295
  [[package]]
296
296
  name = "dlc"
297
297
  version = "0.7.1"
298
- source = "git+https://github.com/bennyhodl/dlcdevkit.git?branch=deterministic-contract-keys#7ea0a69ed6ae8888adda4576b411deb4f26a4ec3"
298
+ source = "git+https://github.com/bennyhodl/dlcdevkit.git?branch=master#95e7450cf9254ac8d872ad8c4a2491cb26500e19"
299
299
  dependencies = [
300
300
  "bitcoin",
301
301
  "miniscript",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "ddk_ffi"
3
- version = "0.3.18"
3
+ version = "0.3.20"
4
4
  edition = "2021"
5
5
  license = "MIT"
6
6
  description = "rust-dlc language bindings"
@@ -15,7 +15,7 @@ crate-type = ["cdylib", "staticlib", "rlib"]
15
15
  [dependencies]
16
16
  uniffi = { version = "0.29.4", features = ["cli"] }
17
17
  # dlc = { path = "../../../ernest/dlcdevkit/dlc", features = ["use-serde"] }
18
- dlc = { git = "https://github.com/bennyhodl/dlcdevkit.git", branch = "deterministic-contract-keys", features = ["use-serde"] }
18
+ dlc = { git = "https://github.com/bennyhodl/dlcdevkit.git", branch = "master", features = ["use-serde"] }
19
19
  bitcoin = "0.32.7"
20
20
  thiserror = "2.0.12"
21
21
  secp256k1-zkp = "0.11.0"
@@ -800,7 +800,9 @@ pub fn sign_cet(
800
800
  let funding_sk = SecretKey::from_slice(&funding_secret_key)
801
801
  .map_err(|_| DLCError::InvalidArgument("Invalid funding secret key".to_string()))?;
802
802
  let other_pk = PublicKey::from_slice(&other_pubkey).map_err(|_| DLCError::InvalidPublicKey)?;
803
- let funding_script = Script::from_bytes(&funding_script_pubkey);
803
+ let funding_pubkey =
804
+ PublicKey::from_slice(&funding_script_pubkey).map_err(|_| DLCError::InvalidPublicKey)?;
805
+ let dlc_redeem_script = dlc::make_funding_redeemscript(&funding_pubkey, &other_pk);
804
806
  let secp = get_secp_context();
805
807
 
806
808
  dlc::sign_cet(
@@ -810,7 +812,7 @@ pub fn sign_cet(
810
812
  &[oracle_sigs],
811
813
  &funding_sk,
812
814
  &other_pk,
813
- funding_script,
815
+ dlc_redeem_script.as_script(),
814
816
  Amount::from_sat(fund_output_value),
815
817
  )
816
818
  .map_err(|e| DLCError::Secp256k1Error(e.to_string()))?;
@@ -1717,7 +1719,7 @@ mod tests {
1717
1719
  oracle_signatures[0].clone(),
1718
1720
  accept_fund_sk.secret_bytes().to_vec(),
1719
1721
  offer_party_params.fund_pubkey.clone(),
1720
- funding_script_pubkey.clone().into_bytes(),
1722
+ accept_party_params.fund_pubkey.clone(),
1721
1723
  fund_output_value,
1722
1724
  );
1723
1725
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bennyblader/ddk-rn",
3
- "version": "0.3.18",
3
+ "version": "0.3.20",
4
4
  "description": "dlcdevkit bindings for react-native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",