From f74e3c6f987f30e9736535737b4b424501d3b64b Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 18 Feb 2024 00:53:38 +0200 Subject: [PATCH] implement getAccountAddress method --- src/Client.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/Client.php b/src/Client.php index 638fc0f..3fa904e 100644 --- a/src/Client.php +++ b/src/Client.php @@ -627,6 +627,33 @@ class Client return null; } + public function getAccountAddress(string $account): ?string + { + $this->_id++; + + $this->_prepare( + '', + 'POST', + [ + 'method' => 'getaccountaddress', + 'params' => + [ + $account + ], + 'id' => $this->_id + ] + ); + + $response = $this->_execute(); + + if (isset($response['result']) && is_string($response['result'])) + { + return $response['result']; + } + + return null; + } + public function listAccounts(): ?array { $this->_id++;