mirror of
https://github.com/kevachat/kevacoin-php.git
synced 2025-01-22 04:24:28 +00:00
add kevaPut method
This commit is contained in:
parent
2ff2b02fcf
commit
a961e5e907
@ -315,4 +315,36 @@ class Client
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function kevaPut(
|
||||
string $namespace,
|
||||
string $key,
|
||||
string $value
|
||||
): ?string
|
||||
{
|
||||
$this->_id++;
|
||||
|
||||
$this->_prepare(
|
||||
'',
|
||||
'POST',
|
||||
[
|
||||
'method' => 'keva_put',
|
||||
'params' => [
|
||||
$namespace,
|
||||
$key,
|
||||
$value
|
||||
],
|
||||
'id' => $this->_id
|
||||
]
|
||||
);
|
||||
|
||||
$response = $this->_execute();
|
||||
|
||||
if (!empty($response['txid']) && is_string($response['txid']))
|
||||
{
|
||||
return $response['txid'];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user