// Copyright (c) Subzero Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//! Types and validation for the `getSnapshotData` RPC method.

use serde::{Deserialize, Serialize};
use validator::Validate;

/// Message to retrieve a specific blob from a specific checkpoint
/// with a given file block hash.
/// The response is returned as raw binary bytes (not json)
#[derive(Debug, Deserialize, Serialize, Clone, Validate)]
#[serde(rename_all = "camelCase")]
pub struct GetSnapshotDataRequest {
    /// block_height of the checkpoint that we want.
    pub block_height: u64,
    /// hex-encoded hash for the block we want.
    pub hash: String,
}
