0

I try to get the transaction by calling get_transfer, but I dont know how to send the $subaddr_indice to get the right answer back

i have:

[subaddr_indices] => Array
                    (
                        [0] => Array
                            (
                                [major] => 0
                                [minor] => 7
                            )

                    )

and if I try to send:

 $get_transfers = $walletRPC->get_transfers('in', 0, '[0][7]');

I get all the transfers back and not the one I search for, what is wrong? thx in advance

0

Per the documentation:

get_transfers
Look up transfers

Parameters:

$input_types <Array> Array of transfer type strings; possible values include 'all', 'in', 'out', 'pending', 'failed', and 'pool' (optional)
$account_index <number> Index of account to look (optional)
$subaddr_indices <String> Comma-separated list of subaddress indices to look up (optional)
$min_height <number> Minimum block height to use when looking up (optional)
$max_height <number> Maximum block height to use when looking up (optional)

So it should be:

$walletRPC->get_transfers(['in'], 0, "7");

to fetch incoming transfers for account index 0, subaddress index 7.

4
  • thank you, but this does not work, it shows all transfers and not only the one I am looking for with [minor] => 7 – pdevo Jan 14 at 7:46
  • You should file a bug report if it's not working as documented. These wrapper libraries like monerophp are a) really not needed as its simple to call the JSON RPC directly and b) they are often poorly maintained. – jtgrassie Jan 14 at 9:28
  • can you give me an example how to make the same call by JSON RPC with Curl? – pdevo Jan 15 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.