Skip to content
Open
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
180 changes: 180 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion bedrock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,31 @@ chrono = { version = "0.4.41", default-features = false, features = [
"now",
"std",
] }
dryoc = { git = "https://github.com/brndnmtthws/dryoc", rev = "e0e0ef0" }
getrandom = "0.2"
hex = "0.4.3"
http = "1.0"
log = "0.4.22"
proc-macro2 = "1.0"
quote = "1.0"
rand = "0.9.1"
ruint = { version = "1.15.0", default-features = false, features = ["serde"] }
semaphore-rs-utils = "0.5.0"
serde = "1.0.219"
serde_json = "1.0"
syn = { version = "2.0", features = ["full"] }
thiserror = "2.0.12"
tokio = { version = "1.45.1", features = ["time"], optional = true }
time = { version = "0.3", features = [
"serde",
"formatting",
"macros",
"parsing",
] }
tokio = { version = "1.45.1", features = [
"time",
"rt",
"rt-multi-thread",
], optional = true }
uniffi = { workspace = true, features = ["build", "tokio"] }

[dev-dependencies]
Expand All @@ -55,5 +69,8 @@ alloy = { version = "1.0.17", default-features = false, features = [
"reqwest-rustls-tls",
] }
dotenvy = "0.15.7"
pretty_assertions = "1.4.0"
sha2 = "0.10.8"
siwe = "0.6.1"
tokio = { version = "1.45.1", features = ["time"] }
tokio-test = "0.4.4"
9 changes: 9 additions & 0 deletions bedrock/src/smart_account/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,20 @@ mod transaction;
/// Reference: <https://docs.uniswap.org/contracts/permit2/overview>
mod permit2;

/// Adds SIWE (Sign-In with Ethereum) capabilities to `SafeSmartAccount`
mod siwe;

pub use transaction_4337::{
EncodedSafeOpStruct, PackedUserOperation, UserOperation, ENTRYPOINT_4337,
GNOSIS_SAFE_4337_MODULE,
};

// Re-export SIWE types for external use
pub use siwe::{
AuthConfig, SiweCapable, SiweSignatureResponse, SiweValidationResponse,
ValidationSuccess, WorldAppAuthFlow,
};

const RESTRICTED_TYPED_DATA_CONTRACTS: &[Address] = &[
// Permit2 requires using the custom `sign_permit2_transfer` method which has additional validation and other permission verification.
PERMIT2_ADDRESS,
Expand Down
Loading
Loading