Skip to content

Commit

Permalink
feat: add serde feature and update signer to use PrimitiveSignature
Browse files Browse the repository at this point in the history
  • Loading branch information
incubator4 committed Nov 6, 2024
1 parent a33401c commit ce3b077
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/signer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ pub use config::SignerConfig;
use crate::prelude::*;
use alloy::{
network::{EthereumWallet, TxSigner},
primitives::Address,
primitives::{Address, PrimitiveSignature},
signers::{
aws::AwsSigner,
gcp::{GcpKeyRingRef, GcpSigner, KeySpecifier},
local::{coins_bip39::English, LocalSigner, MnemonicBuilder, PrivateKeySigner},
Signature,
},
};

Expand All @@ -18,8 +17,10 @@ use gcloud_sdk::{
};

impl SignerConfig {
async fn signer(&self) -> Result<Box<dyn TxSigner<Signature> + Send + Sync + 'static>> {
let signer: Box<dyn TxSigner<Signature> + Send + Sync + 'static> = match self {
async fn signer(
&self,
) -> Result<Box<dyn TxSigner<PrimitiveSignature> + Send + Sync + 'static>> {
let signer: Box<dyn TxSigner<PrimitiveSignature> + Send + Sync + 'static> = match self {
SignerConfig::PrivateKey(key) => Box::new(key.parse::<PrivateKeySigner>()?),
SignerConfig::Mnemonic(mnemonic) => Box::new(
MnemonicBuilder::<English>::default()
Expand Down

0 comments on commit ce3b077

Please sign in to comment.