From 184e740452f0081abf32a012e8c14e76898f369d Mon Sep 17 00:00:00 2001 From: itssteven Date: Fri, 11 Jan 2019 16:49:08 +0000 Subject: [PATCH] Subaddresses `get_address_index` for getting the index number of a specific subaddress, `get_transfers` to get in&pool transfers for that subaddresss index number, `store` required in create_address and create_address required to create new subaddresses --- include/class-monero-wallet-rpc.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/class-monero-wallet-rpc.php b/include/class-monero-wallet-rpc.php index 5940dda..4ff7f58 100644 --- a/include/class-monero-wallet-rpc.php +++ b/include/class-monero-wallet-rpc.php @@ -349,4 +349,30 @@ class Monero_Wallet_Rpc $get_bulk_payments = $this->_run('get_bulk_payments', $get_bulk_payments_parameters); return $get_bulk_payments; } + + public function get_transfers($arr) + { + $get_parameters = $arr; + $get_transfers = $this->_run('get_transfers', $get_parameters); + return $get_transfers; + } + + public function get_address_index($subaddress) + { + $params = array('address' => $subaddress); + return $this->_run('get_address_index', $params); + } + + public function store() + { + return $this->_run('store'); + } + + public function create_address($account_index = 0, $label = '') + { + $params = array('account_index' => $account_index, 'label' => $label); + $create_address_method = $this->_run('create_address', $params); + $save = $this->store(); // Save wallet state after subaddress creation + return $create_address_method; + } }