|
@@ 361-368 (lines=8) @@
|
| 358 |
|
* @param string $identifier a unique identifier to associate with this webhook |
| 359 |
|
* @return array associative array containing the response |
| 360 |
|
*/ |
| 361 |
|
public function setupWebhook($url, $identifier = null) { |
| 362 |
|
$postData = [ |
| 363 |
|
'url' => $url, |
| 364 |
|
'identifier' => $identifier |
| 365 |
|
]; |
| 366 |
|
$response = $this->client->post("webhook", null, $postData, RestClient::AUTH_HTTP_SIG); |
| 367 |
|
return self::jsonDecode($response->body(), true); |
| 368 |
|
} |
| 369 |
|
|
| 370 |
|
/** |
| 371 |
|
* update an existing webhook |
|
@@ 474-480 (lines=7) @@
|
| 471 |
|
* @param string $identifier the unique identifier of the webhook to be triggered |
| 472 |
|
* @return array associative array containing the response |
| 473 |
|
*/ |
| 474 |
|
public function subscribeNewBlocks($identifier) { |
| 475 |
|
$postData = [ |
| 476 |
|
'event_type' => 'block', |
| 477 |
|
]; |
| 478 |
|
$response = $this->client->post("webhook/{$identifier}/events", null, $postData, RestClient::AUTH_HTTP_SIG); |
| 479 |
|
return self::jsonDecode($response->body(), true); |
| 480 |
|
} |
| 481 |
|
|
| 482 |
|
/** |
| 483 |
|
* removes an transaction event subscription from a webhook |
|
@@ 1623-1630 (lines=8) @@
|
| 1620 |
|
* @param integer $limit pagination: records per page |
| 1621 |
|
* @return array associative array containing the response |
| 1622 |
|
*/ |
| 1623 |
|
public function allWallets($page = 1, $limit = 20) { |
| 1624 |
|
$queryString = [ |
| 1625 |
|
'page' => $page, |
| 1626 |
|
'limit' => $limit |
| 1627 |
|
]; |
| 1628 |
|
$response = $this->client->get("wallets", $queryString, RestClient::AUTH_HTTP_SIG); |
| 1629 |
|
return self::jsonDecode($response->body(), true); |
| 1630 |
|
} |
| 1631 |
|
|
| 1632 |
|
/** |
| 1633 |
|
* send raw transaction |
|
@@ 1651-1657 (lines=7) @@
|
| 1648 |
|
* @return mixed |
| 1649 |
|
* @throws \Exception |
| 1650 |
|
*/ |
| 1651 |
|
public function faucetWithdrawl($address, $amount = 10000) { |
| 1652 |
|
$response = $this->client->post("faucet/withdrawl", null, [ |
| 1653 |
|
'address' => $address, |
| 1654 |
|
'amount' => $amount, |
| 1655 |
|
], RestClient::AUTH_HTTP_SIG); |
| 1656 |
|
return self::jsonDecode($response->body(), true); |
| 1657 |
|
} |
| 1658 |
|
|
| 1659 |
|
/** |
| 1660 |
|
* verify a message signed bitcoin-core style |