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