From 7d7bbbb4568777d30cf6710d06afa321c17473ce Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 17 Jan 2025 07:00:20 -0400 Subject: [PATCH] Add Monero supply API --- Modules/Common/CryptoNoteMainModule.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Modules/Common/CryptoNoteMainModule.php b/Modules/Common/CryptoNoteMainModule.php index e22c3ab..aa9b41d 100644 --- a/Modules/Common/CryptoNoteMainModule.php +++ b/Modules/Common/CryptoNoteMainModule.php @@ -265,4 +265,12 @@ function ($raw_value) { $currency = ' ' . $this->currency_details['smallest'] ?? return $specials->return(); } + + final public function api_get_currency_supply(string $currency): string + { + return requester_single($this->select_node(), + endpoint: 'api/emission', + timeout: $this->timeout, + result_in: 'data')['coinbase']; + } }