            Ok(base64::encode(encode_protobuf(res)?))
        },
    )?;
    Ok(())
}

fn delegator_key_operation<F>(reply_to: String, mut operation: F) -> anyhow::Result<()>
where
    F: FnMut(Vec<u8>, Vec<u8>) -> anyhow::Result<String> + Clone + Sync + Send + 'static,
{