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

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

/// Request parameters for the `getMinimumBalanceForRentExemption` RPC method
/// Solana specification: <https://solana.com/docs/rpc/http/getminimumbalanceforrentexemption>
#[derive(Debug, Serialize, Deserialize, Validate)]
pub struct GetMinimumBalanceForRentExemptionRequest {
    /// The length of the data to check for rent exemption
    #[validate(range(
        min = 0,
        max = 10485760,
        message = "Data length must be between 0 and 10MB"
    ))]
    pub data_length: u64,
}
