Skip to main content

decode_and_validate_key_authorization

Function decode_and_validate_key_authorization 

Source
fn decode_and_validate_key_authorization(
    authorization: &str,
    expected_account: Option<Address>,
) -> Result<(KeyAuthorization, bool, Option<Address>)>
Expand description

Decode a hex RLP key authorization (signed or unsigned) and validate its account binding.

Tries the signed shape first, then the unsigned one. Returns the authorization, whether the input was signed, and the best-effort recovered signer. When expected_account is set the decoded authorization must be bound to exactly that account.