diff --git a/.idea/cmake.xml b/.idea/cmake.xml
index 2c46369e..2969d964 100644
--- a/.idea/cmake.xml
+++ b/.idea/cmake.xml
@@ -2,7 +2,7 @@
-
+
\ No newline at end of file
diff --git a/.idea/copyright/LTHN.xml b/.idea/copyright/LTHN.xml
new file mode 100644
index 00000000..f0ba8df8
--- /dev/null
+++ b/.idea/copyright/LTHN.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
index 312baeb9..b48d188d 100644
--- a/.idea/copyright/profiles_settings.xml
+++ b/.idea/copyright/profiles_settings.xml
@@ -1,7 +1,8 @@
-
+
-
+
+
\ No newline at end of file
diff --git a/.idea/editor.xml b/.idea/editor.xml
index ead1d8a3..0093ef66 100644
--- a/.idea/editor.xml
+++ b/.idea/editor.xml
@@ -244,5 +244,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/scopes/apiserver.xml b/.idea/scopes/apiserver.xml
new file mode 100644
index 00000000..2d1a9d7f
--- /dev/null
+++ b/.idea/scopes/apiserver.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/api/ApiServer.cpp b/src/api/ApiServer.cpp
index 43243c73..fbfd8ad7 100644
--- a/src/api/ApiServer.cpp
+++ b/src/api/ApiServer.cpp
@@ -1,7 +1,23 @@
+// Copyright (c) 2017-2025 Lethean (https://lt.hn)
+//
+// Licensed under the European Union Public Licence (EUPL) version 1.2.
+// You may obtain a copy of the licence at:
+//
+// https://joinup.ec.europa.eu/software/page/eupl/licence-eupl
+//
+// The EUPL is a copyleft licence that is compatible with the MIT/X11
+// licence used by the original projects; but maintains OSS status,
+// where regional copyright law requires ownership to dictate licence terms.
+//
+// SPDX‑License‑Identifier: EUPL-1.2
+//
+
#include "ApiServer.hpp"
#include "controller/ApiCoreInfoComponent.hpp"
-#include "controller/InfoController.hpp"
-#include "controller/BlockController.hpp"
+#include "controller/path/info.hpp"
+#include "controller/path/block.hpp"
+#include "controller/path/block/hash.hpp"
+#include "controller/path/block/id.hpp"
#include "oatpp/network/Server.hpp"
#include "oatpp-swagger/Controller.hpp"
@@ -49,15 +65,24 @@ void ApiServer::run() {
auto docEndpoints = std::make_shared();
+ /* Create and register controllers */
auto infoController = std::make_shared();
docEndpoints->append(infoController->getEndpoints());
+ router->addController(infoController);
auto blockController = std::make_shared();
docEndpoints->append(blockController->getEndpoints());
-
- router->addController(infoController);
router->addController(blockController);
+ auto blockByHashController = std::make_shared();
+ docEndpoints->append(blockByHashController->getEndpoints());
+ router->addController(blockByHashController);
+
+ auto blockByIdController = std::make_shared();
+ docEndpoints->append(blockByIdController->getEndpoints());
+ router->addController(blockByIdController);
+
+
OATPP_CREATE_COMPONENT(std::shared_ptr, swaggerDocumentInfo)
([]
{
diff --git a/src/api/ApiServer.hpp b/src/api/ApiServer.hpp
index 20eeff66..b94d41c4 100644
--- a/src/api/ApiServer.hpp
+++ b/src/api/ApiServer.hpp
@@ -1,3 +1,17 @@
+// Copyright (c) 2017-2025 Lethean (https://lt.hn)
+//
+// Licensed under the European Union Public Licence (EUPL) version 1.2.
+// You may obtain a copy of the licence at:
+//
+// https://joinup.ec.europa.eu/software/page/eupl/licence-eupl
+//
+// The EUPL is a copyleft licence that is compatible with the MIT/X11
+// licence used by the original projects; but maintains OSS status,
+// where regional copyright law requires ownership to dictate licence terms.
+//
+// SPDX‑License‑Identifier: EUPL-1.2
+//
+
#ifndef ApiServer_hpp
#define ApiServer_hpp
diff --git a/src/api/controller/ApiCoreInfoComponent.hpp b/src/api/controller/ApiCoreInfoComponent.hpp
index 0a9ca071..7946b263 100644
--- a/src/api/controller/ApiCoreInfoComponent.hpp
+++ b/src/api/controller/ApiCoreInfoComponent.hpp
@@ -1,3 +1,17 @@
+// Copyright (c) 2017-2025 Lethean (https://lt.hn)
+//
+// Licensed under the European Union Public Licence (EUPL) version 1.2.
+// You may obtain a copy of the licence at:
+//
+// https://joinup.ec.europa.eu/software/page/eupl/licence-eupl
+//
+// The EUPL is a copyleft licence that is compatible with the MIT/X11
+// licence used by the original projects; but maintains OSS status,
+// where regional copyright law requires ownership to dictate licence terms.
+//
+// SPDX‑License‑Identifier: EUPL-1.2
+//
+
#ifndef ApiCoreInfoComponent_hpp
#define ApiCoreInfoComponent_hpp
diff --git a/src/api/controller/InfoController.hpp b/src/api/controller/InfoController.hpp
deleted file mode 100644
index c1eb2dc7..00000000
--- a/src/api/controller/InfoController.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2014-2018 Zano Project
-// Copyright (c) 2014-2018 The Louisdor Project
-// Copyright (c) 2012-2013 The Boolberry developers
-// Copyright (c) 2017-2025 Lethean (https://lt.hn)
-//
-// Licensed under the European Union Public Licence (EUPL) version 1.2.
-// You may obtain a copy of the licence at:
-//
-// https://joinup.ec.europa.eu/software/page/eupl/licence-eupl
-//
-// The EUPL is a copyleft licence that is compatible with the MIT/X11
-// licence used by the original projects; the MIT terms are therefore
-// considered “grandfathered” under the EUPL for this code.
-//
-// SPDX‑License‑Identifier: EUPL-1.2
-//
-
-#ifndef InfoController_hpp
-#define InfoController_hpp
-
-#include "oatpp/web/server/api/ApiController.hpp"
-#include "oatpp/core/macro/codegen.hpp"
-#include "version.h"
-#include "dto/VersionDto.hpp"
-
-#include OATPP_CODEGEN_BEGIN(ApiController)
-
-/**
- * Info Controller
- */
-class InfoController : public oatpp::web::server::api::ApiController {
-public:
- InfoController(OATPP_COMPONENT(std::shared_ptr, objectMapper))
- : oatpp::web::server::api::ApiController(objectMapper)
- {}
-public:
-
- #include "partials/info/version.hpp"
-};
-
-#include OATPP_CODEGEN_END(ApiController)
-
-#endif /* InfoController_hpp */
diff --git a/src/api/controller/path/block.hpp b/src/api/controller/path/block.hpp
new file mode 100644
index 00000000..0c071a07
--- /dev/null
+++ b/src/api/controller/path/block.hpp
@@ -0,0 +1,122 @@
+// Copyright (c) 2017-2025 Lethean (https://lt.hn)
+//
+// Licensed under the European Union Public Licence (EUPL) version 1.2.
+// You may obtain a copy of the licence at:
+//
+// https://joinup.ec.europa.eu/software/page/eupl/licence-eupl
+//
+// The EUPL is a copyleft licence that is compatible with the MIT/X11
+// licence used by the original projects; but maintains OSS status,
+// where regional copyright law requires ownership to dictate licence terms.
+//
+// SPDX‑License‑Identifier: EUPL-1.2
+//
+
+#ifndef BlockController_hpp
+#define BlockController_hpp
+
+#include "dto/BlockDetailsDto.hpp"
+#include "dto/TransactionDetailsDto.hpp"
+#include "controller/ApiCoreInfoComponent.hpp"
+
+#include "oatpp/web/server/api/ApiController.hpp"
+#include "oatpp/core/macro/codegen.hpp"
+#include "oatpp/parser/json/mapping/ObjectMapper.hpp"
+
+#include "rpc/core_rpc_server_commands_defs.h"
+#include // For std::string and std::stoull
+
+#include OATPP_CODEGEN_BEGIN(ApiController)
+
+/**
+ * Block Controller
+ * Acts as a proxy to fetch blocks by hash or by height (ID).
+ */
+class BlockController : public oatpp::web::server::api::ApiController {
+private:
+ OATPP_COMPONENT(std::shared_ptr, m_core_info);
+public:
+ explicit BlockController(OATPP_COMPONENT(std::shared_ptr, objectMapper))
+ : oatpp::web::server::api::ApiController(objectMapper)
+ {}
+public:
+
+ ENDPOINT_INFO(getBlock) {
+ info->summary = "Get a block by its hash or height (ID)";
+ info->addTag("Block");
+ info->pathParams["identifier"].description = "The hash (hex string) or height (integer) of the block to retrieve.";
+ info->addResponse