mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 05:29:25 +00:00
Merge branch 'next' into next-polkadot-sdk
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::io;
|
||||
|
||||
use ciphersuite::{group::Group, Ciphersuite};
|
||||
use ciphersuite::WrappedGroup;
|
||||
use dalek_ff_group::Ed25519;
|
||||
|
||||
use monero_wallet::WalletOutput;
|
||||
@@ -34,7 +34,7 @@ impl AsMut<[u8]> for OutputId {
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
pub(crate) struct Output(pub(crate) WalletOutput);
|
||||
impl ReceivedOutput<<Ed25519 as Ciphersuite>::G, Address> for Output {
|
||||
impl ReceivedOutput<<Ed25519 as WrappedGroup>::G, Address> for Output {
|
||||
type Id = OutputId;
|
||||
type TransactionId = [u8; 32];
|
||||
|
||||
@@ -63,12 +63,12 @@ impl ReceivedOutput<<Ed25519 as Ciphersuite>::G, Address> for Output {
|
||||
self.0.transaction()
|
||||
}
|
||||
|
||||
fn key(&self) -> <Ed25519 as Ciphersuite>::G {
|
||||
fn key(&self) -> <Ed25519 as WrappedGroup>::G {
|
||||
// The spend key will be a key we generated, so it'll be in the prime-order subgroup
|
||||
// The output's key is the spend key + (key_offset * G), so it's in the prime-order subgroup if
|
||||
// the spend key is
|
||||
dalek_ff_group::EdwardsPoint(
|
||||
self.0.key() - (*<Ed25519 as Ciphersuite>::G::generator() * self.0.key_offset()),
|
||||
self.0.key() - (*<Ed25519 as WrappedGroup>::generator() * self.0.key_offset()),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user