Skip to content

Commit

Permalink
new_unchecked
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr committed Oct 22, 2024
1 parent 86cc188 commit e5e7102
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/eip7702/src/auth_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ pub struct SignedAuthorization {
}

impl SignedAuthorization {
/// Creates a new signed authorization from raw signature values.
pub fn new_unchecked(inner: Authorization, y_parity: U8, r: U256, s: U256) -> Self {
Self { inner, y_parity, r, s }
}

/// Gets the `signature` for the authorization. Returns [`SignatureError`] if signature could
/// not be constructed from vrs values.
pub fn signature(&self) -> Result<Signature, SignatureError> {
Expand Down

0 comments on commit e5e7102

Please sign in to comment.