implement getReceivedByAccount method

This commit is contained in:
ghost 2024-02-18 00:49:07 +02:00
parent 7f01ecb141
commit 1aed6f73d7

View File

@ -529,6 +529,34 @@ class Client
return null;
}
public function getReceivedByAccount(string $account, ?int $minconf = 0): ?float
{
$this->_id++;
$this->_prepare(
'',
'POST',
[
'method' => 'getreceivedbyaccount',
'params' =>
[
$account,
$minconf
],
'id' => $this->_id
]
);
$response = $this->_execute();
if (isset($response['result']) && is_float($response['result']))
{
return $response['result'];
}
return null;
}
public function sendToAddress(
string $address,
float $amount,