use alloy_primitives::{Address, Bytes};
use serde::{Deserialize, Serialize};
use crate::{abis::entry_point::encode_handle_ops, user_operation::UserOperation};
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SignedUserOperation {
pub user_op: UserOperation,
pub entry_point: Address,
}
impl SignedUserOperation {
pub fn encode_handle_ops(&self, beneficiary: Address) -> Bytes {
encode_handle_ops(&self.user_op, beneficiary)
}
}