From d5dd832b910a9d479129aad05342c82de1cba841 Mon Sep 17 00:00:00 2001 From: cryptochangements34 Date: Fri, 8 Jun 2018 14:39:50 -0500 Subject: [PATCH] add get_outputs function --- monero/library.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/monero/library.php b/monero/library.php index d5e895f..3fa9f17 100644 --- a/monero/library.php +++ b/monero/library.php @@ -366,6 +366,22 @@ class NodeTools return $array['data']['txs']; } + public function get_outputs($address, $viewkey) + { + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_RETURNTRANSFER => 1, + CURLOPT_URL => $this->url . '/api/outputsblocks?address=' . $address . '&viewkey=' . $viewkey . '&limit=5&mempool=0', + )); + $resp = curl_exec($curl); + curl_close($curl); + + $array = json_decode($resp, true); + + return $array['data']['outputs']; + } + public function check_tx($tx_hash, $address, $viewKey) { $curl = curl_init();