pub async fn dispatch( state: &mut AppState, method: &str, params: Value, ) -> Result<Value, ServerError>