From fe9536413cd658a647b70d84db0f035bb05cbdb7 Mon Sep 17 00:00:00 2001 From: Yurii Koba Date: Wed, 20 Mar 2024 14:45:59 +0200 Subject: [PATCH] 1. make RpcRequest a public 2. reimport near_jsonrpc_primitives as primitives --- chain/jsonrpc/src/api/mod.rs | 2 +- chain/jsonrpc/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chain/jsonrpc/src/api/mod.rs b/chain/jsonrpc/src/api/mod.rs index 1feb48a44da..3d8f5feb899 100644 --- a/chain/jsonrpc/src/api/mod.rs +++ b/chain/jsonrpc/src/api/mod.rs @@ -22,7 +22,7 @@ mod status; mod transactions; mod validator; -pub(crate) trait RpcRequest: Sized { +pub trait RpcRequest: Sized { fn parse(value: Value) -> Result; } diff --git a/chain/jsonrpc/src/lib.rs b/chain/jsonrpc/src/lib.rs index 6a5e7e6c7a7..a8b499c0258 100644 --- a/chain/jsonrpc/src/lib.rs +++ b/chain/jsonrpc/src/lib.rs @@ -4,8 +4,7 @@ use actix_cors::Cors; use actix_web::http::header; use actix_web::HttpRequest; use actix_web::{get, http, middleware, web, App, Error as HttpError, HttpResponse, HttpServer}; -use api::RpcRequest; -pub use api::{RpcFrom, RpcInto}; +pub use api::{RpcFrom, RpcInto, RpcRequest}; use near_async::actix::ActixResult; use near_async::messaging::{ AsyncSendError, AsyncSender, CanSend, MessageWithCallback, SendAsync, Sender, @@ -19,6 +18,7 @@ use near_client::{ }; use near_client_primitives::types::GetSplitStorageInfo; pub use near_jsonrpc_client as client; +pub use near_jsonrpc_primitives as primitives; use near_jsonrpc_primitives::errors::{RpcError, RpcErrorKind}; use near_jsonrpc_primitives::message::{Message, Request}; use near_jsonrpc_primitives::types::config::{RpcProtocolConfigError, RpcProtocolConfigResponse};