mirror of
https://github.com/kevachat/kevacoin-php.git
synced 2025-02-02 01:44:36 +00:00
implement getAccount method
This commit is contained in:
parent
1aed6f73d7
commit
852d92cd4f
@ -600,6 +600,33 @@ class Client
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAccount(string $address): ?string
|
||||||
|
{
|
||||||
|
$this->_id++;
|
||||||
|
|
||||||
|
$this->_prepare(
|
||||||
|
'',
|
||||||
|
'POST',
|
||||||
|
[
|
||||||
|
'method' => 'getaccount',
|
||||||
|
'params' =>
|
||||||
|
[
|
||||||
|
$address
|
||||||
|
],
|
||||||
|
'id' => $this->_id
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$response = $this->_execute();
|
||||||
|
|
||||||
|
if (isset($response['result']) && is_string($response['result']))
|
||||||
|
{
|
||||||
|
return $response['result'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public function listAccounts(): ?array
|
public function listAccounts(): ?array
|
||||||
{
|
{
|
||||||
$this->_id++;
|
$this->_id++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user