pub struct SiweMessage {
pub domain: String,
pub address: String,
pub statement: Option<String>,
pub uri: String,
pub version: String,
pub chain_id: u64,
pub nonce: String,
pub issued_at: String,
pub expiration_time: Option<String>,
pub not_before: Option<String>,
pub request_id: Option<String>,
pub resources: Vec<String>,
}Expand description
Ethereum-signed-message recovery + EIP-4361 message validation.
pylon implements the recovery using ring’s low-level primitives
to avoid pulling in a dedicated secp256k1 crate. If the signature
verifier becomes a hot path, swap in secp256k1 (the libsecp256k1
bindings) — currently it’d be O(1 sign-in per minute per user)
so the overhead is negligible.
Fields§
§domain: String<scheme>://<host>[:<port>] — must match the configured
origin allowlist.
address: StringLowercased EVM address (0x-prefixed, 42 chars).
statement: Option<String>Optional human-readable statement — shown in the wallet UI.
uri: String§version: String§chain_id: u64§nonce: String§issued_at: StringISO-8601 timestamp.
expiration_time: Option<String>§not_before: Option<String>§request_id: Option<String>§resources: Vec<String>Trait Implementations§
Source§impl Clone for SiweMessage
impl Clone for SiweMessage
Source§fn clone(&self) -> SiweMessage
fn clone(&self) -> SiweMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SiweMessage
impl Debug for SiweMessage
Source§impl PartialEq for SiweMessage
impl PartialEq for SiweMessage
impl Eq for SiweMessage
impl StructuralPartialEq for SiweMessage
Auto Trait Implementations§
impl Freeze for SiweMessage
impl RefUnwindSafe for SiweMessage
impl Send for SiweMessage
impl Sync for SiweMessage
impl Unpin for SiweMessage
impl UnsafeUnpin for SiweMessage
impl UnwindSafe for SiweMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more