@bennyblader/ddk-rn 0.3.18 → 0.3.19
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 +5 -3
- package/package.json +1 -1
package/ddk-ffi/Cargo.lock
CHANGED
package/ddk-ffi/Cargo.toml
CHANGED
package/ddk-ffi/src/lib.rs
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
-
|
|
1722
|
+
accept_party_params.fund_pubkey.clone(),
|
|
1721
1723
|
fund_output_value,
|
|
1722
1724
|
);
|
|
1723
1725
|
|