pub const JSONRPC_VERSION: &str = "2.0";
pub const DEFAULT_RPC_ENDPOINT: &str = "/rpc";
pub const DEFAULT_RPC_MAX_BODY_SIZE: usize = 1024 * 1024;
pub const DEFAULT_RPC_MAX_BATCH_SIZE: usize = 64;
pub const RPC_PARSE_ERROR: i64 = -32700;
pub const RPC_INVALID_REQUEST: i64 = -32600;
pub const RPC_METHOD_NOT_FOUND: i64 = -32601;
pub const RPC_INVALID_PARAMS: i64 = -32602;
pub const RPC_INTERNAL_ERROR: i64 = -32603;
pub(crate) const MSG_PARSE_ERROR: &str = "Parse error";
pub(crate) const MSG_INVALID_REQUEST: &str = "Invalid Request";
pub(crate) const MSG_METHOD_NOT_FOUND: &str = "Method not found";
pub(crate) const MSG_INVALID_PARAMS: &str = "Invalid params";
pub(crate) const MSG_INTERNAL_ERROR: &str = "Internal error";
pub(crate) const PREBUILT_PARSE_ERROR: &[u8] =
br#"{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error"},"id":null}"#;
pub(crate) const PREBUILT_INVALID_REQUEST: &[u8] =
br#"{"jsonrpc":"2.0","error":{"code":-32600,"message":"Invalid Request"},"id":null}"#;
pub(crate) const PREBUILT_BATCH_TOO_LARGE: &[u8] = br#"{"jsonrpc":"2.0","error":{"code":-32600,"message":"Batch size exceeds configured limit"},"id":null}"#;
pub(crate) const RPC_SINGLE_RESPONSE_CAP: usize = 64;
pub(crate) const RPC_JSON_PREFIX: &[u8] = br#"{"jsonrpc":"2.0","id":"#;
pub(crate) const RPC_JSON_RESULT_KEY: &[u8] = br#","result":"#;
pub(crate) const RPC_JSON_ERROR_KEY: &[u8] = br#","error":"#;