Browse Source

implement getReceivedByAccount method

main
ghost 9 months ago
parent
commit
1aed6f73d7
  1. 28
      src/Client.php

28
src/Client.php

@ -529,6 +529,34 @@ class Client @@ -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,

Loading…
Cancel
Save