11use std:: { ops:: Deref , str:: FromStr } ;
22
33use alloy:: {
4- primitives:: { Address , B256 , PrimitiveSignature } ,
4+ primitives:: { Address , B256 , Signature , aliases :: B32 } ,
55 signers:: { SignerSync , local:: PrivateKeySigner } ,
66} ;
77use eyre:: ensure;
@@ -14,7 +14,7 @@ use crate::{
1414} ;
1515
1616#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
17- pub struct EcdsaSignature ( PrimitiveSignature ) ;
17+ pub struct EcdsaSignature ( Signature ) ;
1818
1919impl std:: fmt:: Display for EcdsaSignature {
2020 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
@@ -37,18 +37,18 @@ impl<'de> serde::Deserialize<'de> for EcdsaSignature {
3737 D : serde:: Deserializer < ' de > ,
3838 {
3939 let s = String :: deserialize ( deserializer) ?;
40- Ok ( Self ( PrimitiveSignature :: from_str ( & s) . map_err ( serde:: de:: Error :: custom) ?) )
40+ Ok ( Self ( Signature :: from_str ( & s) . map_err ( serde:: de:: Error :: custom) ?) )
4141 }
4242}
4343
44- impl From < PrimitiveSignature > for EcdsaSignature {
45- fn from ( signature : PrimitiveSignature ) -> Self {
44+ impl From < Signature > for EcdsaSignature {
45+ fn from ( signature : Signature ) -> Self {
4646 Self ( signature)
4747 }
4848}
4949
5050impl Deref for EcdsaSignature {
51- type Target = PrimitiveSignature ;
51+ type Target = Signature ;
5252
5353 fn deref ( & self ) -> & Self :: Target {
5454 & self . 0
0 commit comments