Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions contract/universal-account/tests/universal_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use rstest::rstest;
use templar_universal_account::{
authentication::{
ed25519::{eip191, raw, sep53},
eip712,
passkey::{
self,
data::{AuthenticatorData, ClientDataJson},
Expand Down Expand Up @@ -46,7 +45,6 @@ fn mint(amount: u128) -> FunctionCallAction {
enum TestSigner {
Passkey(p256::SecretKey),
Ed25519Raw(ed25519_dalek::SigningKey),
Eip712(alloy::signers::local::PrivateKeySigner),
Sep53(ed25519_dalek::SigningKey),
Eip191(alloy::signers::local::PrivateKeySigner),
}
Expand All @@ -60,10 +58,6 @@ impl TestSigner {
Self::Ed25519Raw(ed25519_dalek::SigningKey::generate(&mut OsRng))
}

fn random_eip712() -> Self {
Self::Eip712(alloy::signers::local::PrivateKeySigner::random())
}

fn random_sep53() -> Self {
Self::Sep53(ed25519_dalek::SigningKey::generate(&mut OsRng))
}
Expand All @@ -76,7 +70,6 @@ impl TestSigner {
match self {
Self::Passkey(key) => passkey::VerifyKey(key.public_key().into()).into(),
Self::Ed25519Raw(key) => raw::VerifyKey(key.verifying_key().to_bytes().into()).into(),
Self::Eip712(key) => eip712::VerifyKey(key.address().into()).into(),
Self::Sep53(key) => sep53::VerifyKey(key.verifying_key().to_bytes().into()).into(),
Self::Eip191(key) => eip191::VerifyKey(key.address().into()).into(),
}
Expand Down Expand Up @@ -120,15 +113,6 @@ impl TestSigner {
}
.into()
}
TestSigner::Eip712(key) => {
let message = eip712::Message(payload);
let mws = message.sign(key).unwrap();
ExecuteArgsMessage {
key: eip712::VerifyKey(key.address().into()),
mws: Box::new(mws),
}
.into()
}
TestSigner::Sep53(key) => {
let message = sep53::Message::new(payload);
let signature = key.sign(&message.hash_for_signing()).to_bytes().into();
Expand Down Expand Up @@ -233,7 +217,6 @@ pub async fn universal_account(
(TestSigner::random_passkey(), true),
(TestSigner::random_ed25519_raw(), false),
(TestSigner::random_ed25519_raw(), true),
(TestSigner::random_eip712(), false),
(TestSigner::random_sep53(), false),
(TestSigner::random_eip191(), false),
)]
Expand Down Expand Up @@ -343,7 +326,6 @@ async fn skip_nonce(
(TestSigner::random_passkey(), true),
(TestSigner::random_ed25519_raw(), false),
(TestSigner::random_ed25519_raw(), true),
(TestSigner::random_eip712(), false),
(TestSigner::random_sep53(), false),
(TestSigner::random_eip191(), false),
)]
Expand Down Expand Up @@ -420,7 +402,6 @@ async fn reuse_nonce(
(TestSigner::random_passkey(), true),
(TestSigner::random_ed25519_raw(), false),
(TestSigner::random_ed25519_raw(), true),
(TestSigner::random_eip712(), false),
(TestSigner::random_sep53(), false),
(TestSigner::random_eip191(), false),
)]
Expand Down
9 changes: 1 addition & 8 deletions service/relayer/src/route/universal_account/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use sha2::{Digest, Sha256};
use templar_universal_account::{
authentication::{
ed25519::{eip191, raw, sep53},
eip712, passkey,
passkey,
},
KeyId,
};
Expand Down Expand Up @@ -77,7 +77,6 @@ pub async fn index(State(app): State<App>) -> impl IntoResponse {
pub enum KeyQuery {
Passkey { key: passkey::VerifyKey },
Ed25519Raw { key: raw::VerifyKey },
Eip712 { key: eip712::VerifyKey },
Sep53 { key: sep53::VerifyKey },
Eip191 { key: eip191::VerifyKey },
}
Expand All @@ -87,7 +86,6 @@ impl From<KeyQuery> for KeyId {
match value {
KeyQuery::Passkey { key } => key.into(),
KeyQuery::Ed25519Raw { key } => key.into(),
KeyQuery::Eip712 { key } => key.into(),
KeyQuery::Sep53 { key } => key.into(),
KeyQuery::Eip191 { key } => key.into(),
}
Expand All @@ -101,7 +99,6 @@ impl From<KeyId> for KeyQuery {
match value {
KeyId::Passkey(key) => Self::Passkey { key },
KeyId::Ed25519Raw(key) => Self::Ed25519Raw { key },
KeyId::Eip712(key) => Self::Eip712 { key },
KeyId::Sep53(key) => Self::Sep53 { key },
KeyId::Eip191(key) => Self::Eip191 { key },
}
Expand Down Expand Up @@ -140,10 +137,6 @@ mod tests {
sep53::VerifyKey("GBPNJTA5DARWSGLGPAGUHZBE44IOCFSKCL525WK7VZK6BEX4DPLIJXZ7".parse().unwrap()).into(),
"3ccc6b968690",
)]
#[case::eip712(
eip712::VerifyKey("0xa2E641CcbEB84c6Ed1e1E43e18B720F6D5C5173E".parse().unwrap()).into(),
"8a98745b4d35",
)]
#[case::eip191(
eip191::VerifyKey("0x03a607faedb00b3f9c747a9cb303255ef86a4da8".parse().unwrap()).into(),
"6616024d8ced",
Expand Down
209 changes: 0 additions & 209 deletions universal-account/src/authentication/eip712/mod.rs

This file was deleted.

1 change: 0 additions & 1 deletion universal-account/src/authentication/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use schemars::JsonSchema;
use crate::PayloadExecutionParameters;

pub mod ed25519;
pub mod eip712;
pub mod passkey;
mod payload;
pub use payload::*;
Expand Down
Loading