Update to latest rust-silentpayments
This commit is contained in:
parent
f899ee1369
commit
733d65b99b
@ -26,11 +26,13 @@ use sdk_common::sp_client::bitcoin::secp256k1::ecdh::shared_secret_point;
|
||||
use sdk_common::sp_client::bitcoin::secp256k1::{PublicKey, SecretKey};
|
||||
use sdk_common::sp_client::bitcoin::{Amount, Network, OutPoint, Psbt, Transaction, Txid};
|
||||
use sdk_common::sp_client::silentpayments::utils as sp_utils;
|
||||
use sdk_common::sp_client::silentpayments::{Error as SpError, Network as SpNetwork};
|
||||
use sdk_common::sp_client::silentpayments::{
|
||||
utils::{Network as SpNetwork, SilentPaymentAddress},
|
||||
Error as SpError,
|
||||
};
|
||||
use serde_json::{Error as SerdeJsonError, Value};
|
||||
use shamir::SecretData;
|
||||
|
||||
use sdk_common::sp_client::silentpayments::sending::SilentPaymentAddress;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tsify::Tsify;
|
||||
use wasm_bindgen::convert::FromWasmAbi;
|
||||
@ -451,11 +453,11 @@ fn handle_recover_transaction(
|
||||
}
|
||||
|
||||
// if we've found nothing we are being notified
|
||||
let shared_point = sp_utils::receiving::calculate_shared_point(
|
||||
let shared_point = sp_utils::receiving::calculate_ecdh_shared_secret(
|
||||
&tweak_data,
|
||||
&sp_wallet.get_client().get_scan_key(),
|
||||
);
|
||||
let shared_secret = AnkSharedSecret::new(PublicKey::from_slice(&shared_point)?);
|
||||
let shared_secret = AnkSharedSecret::new(shared_point);
|
||||
|
||||
debug!(
|
||||
"Shared secret: {}",
|
||||
@ -896,10 +898,12 @@ pub fn create_notification_transaction(
|
||||
|
||||
let partial_secret = sp_wallet.get_client().get_partial_secret_from_psbt(&psbt)?;
|
||||
|
||||
let shared_point =
|
||||
sp_utils::sending::calculate_shared_point(&sp_address.get_scan_key(), &partial_secret);
|
||||
let shared_point = sp_utils::sending::calculate_ecdh_shared_secret(
|
||||
&sp_address.get_scan_key(),
|
||||
&partial_secret,
|
||||
);
|
||||
|
||||
let shared_secret = AnkSharedSecret::new(PublicKey::from_slice(&shared_point)?);
|
||||
let shared_secret = AnkSharedSecret::new(shared_point);
|
||||
|
||||
debug!(
|
||||
"Created transaction with secret {}",
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::fmt::DebugStruct;
|
||||
|
||||
use sdk_common::sp_client::silentpayments::sending::SilentPaymentAddress;
|
||||
use sdk_common::sp_client::silentpayments::utils::SilentPaymentAddress;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{json, Value};
|
||||
use tsify::Tsify;
|
||||
|
@ -20,7 +20,7 @@ use std::sync::{Mutex, MutexGuard, OnceLock};
|
||||
|
||||
use sdk_common::sp_client::bitcoin::secp256k1::constants::SECRET_KEY_SIZE;
|
||||
use sdk_common::sp_client::silentpayments::bitcoin_hashes::sha256;
|
||||
use sdk_common::sp_client::silentpayments::sending::SilentPaymentAddress;
|
||||
use sdk_common::sp_client::silentpayments::utils::SilentPaymentAddress;
|
||||
use sdk_common::sp_client::spclient::SpendKey;
|
||||
use sdk_common::sp_client::spclient::{OutputList, SpWallet};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user