rialo_api_types/constants.rs
1// Copyright (c) Subzero Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4//! Constants used throughout the API validation
5
6/// Minimum transaction size in bytes
7pub const MIN_TRANSACTION_SIZE: usize = 10;
8
9/// Maximum transaction size in bytes
10pub const MAX_TRANSACTION_SIZE: usize = 4096;
11
12/// Maximum possible kelvins (500 million RLO * 1e9 kelvins/RLO)
13pub const MAX_KELVINS: u64 = 500_000_000_000_000_000;
14
15/// Maximum airdrop amount in kelvins (1000 RLO)
16pub const MAX_AIRDROP_AMOUNT: u64 = 1_000_000_000_000;
17
18/// Maximum limit for paginated requests
19pub const MAX_PAGINATION_LIMIT: u64 = 1000;
20
21/// Maximum nonce length in characters
22pub const MAX_NONCE_LENGTH: usize = 64;
23
24/// Maximum signature length in base58 characters (for a 64-byte signature)
25/// Note: Minimum can be as low as 64 chars if signature has many leading zeros
26pub const MAX_SIGNATURE_LENGTH: usize = 88;
27
28/// Minimum blockhash length in base58 characters
29pub const MIN_BLOCKHASH_LENGTH: usize = 43;
30
31/// Maximum blockhash length in base58 characters
32pub const MAX_BLOCKHASH_LENGTH: usize = 44;