Merge branch 'next' into next-polkadot-sdk

This commit is contained in:
Luke Parker
2025-09-03 16:44:26 -04:00
130 changed files with 1102 additions and 1172 deletions

View File

@@ -1,6 +1,6 @@
use std::io;
use ciphersuite::Ciphersuite;
use ciphersuite::*;
use ciphersuite_kp256::Secp256k1;
use bitcoin_serai::{
@@ -58,7 +58,7 @@ pub(crate) struct Output {
impl Output {
pub(crate) fn new(
getter: &impl Get,
key: <Secp256k1 as Ciphersuite>::G,
key: <Secp256k1 as WrappedGroup>::G,
tx: &Transaction,
output: WalletOutput,
) -> Self {
@@ -74,7 +74,7 @@ impl Output {
}
pub(crate) fn new_with_presumed_origin(
key: <Secp256k1 as Ciphersuite>::G,
key: <Secp256k1 as WrappedGroup>::G,
tx: &Transaction,
presumed_origin: Option<Address>,
output: WalletOutput,
@@ -91,7 +91,7 @@ impl Output {
}
}
impl ReceivedOutput<<Secp256k1 as Ciphersuite>::G, Address> for Output {
impl ReceivedOutput<<Secp256k1 as WrappedGroup>::G, Address> for Output {
type Id = OutputId;
type TransactionId = [u8; 32];
@@ -111,7 +111,7 @@ impl ReceivedOutput<<Secp256k1 as Ciphersuite>::G, Address> for Output {
res
}
fn key(&self) -> <Secp256k1 as Ciphersuite>::G {
fn key(&self) -> <Secp256k1 as WrappedGroup>::G {
// We read the key from the script pubkey so we don't have to independently store it
let script = &self.output.output().script_pubkey;
@@ -124,7 +124,7 @@ impl ReceivedOutput<<Secp256k1 as Ciphersuite>::G, Address> for Output {
.expect("last item in scanned v1 Taproot script wasn't a valid x-only public key");
// The output's key minus the output's offset is the root key
key - (<Secp256k1 as Ciphersuite>::G::GENERATOR * self.output.offset())
key - (<Secp256k1 as WrappedGroup>::G::GENERATOR * self.output.offset())
}
fn presumed_origin(&self) -> Option<Address> {