monero-integrations / monerophp

Monero PHP library + JsonRPC Client
MIT License
120 stars 76 forks source link

fix method name in rpc #68

Closed mzk closed 6 years ago

mzk commented 6 years ago

https://getmonero.org/resources/developer-guides/wallet-rpc.html !

serhack commented 6 years ago

Hello, the methods name are developed on https://github.com/monero-project/monero/blob/master/src/wallet/wallet_rpc_server.h#L70

Since the command "get balance" is composed by two words and a space, it will be "get_balance".

Thank you!

mzk commented 6 years ago

I'm using this library for sumokoin (fork monero). And there don't have aliases.

look https://github.com/sumoprojects/sumokoin/blob/master/src/wallet/wallet_rpc_server.h

So I agree with your argument, but I prefer better compatibility (depends on documentation https://getmonero.org/resources/developer-guides/wallet-rpc.html, not on the code).

The Code can be changed.

mzk commented 6 years ago

The library monero-integrations/monerophp can offer an aliases ($client->getbalance(), $client->get_balance(), $client->getMyBalance()`.

But always call the default and documented method return $this->_run('getbalance', $params);. Not aliased method name. imho.

serhack commented 6 years ago

I'm using this library for sumokoin (fork monero).

I'm sorry. We don't support forks of Monero.

But always call the default and documented method return $this->_run('getbalance', $params);.

It's wrong, see https://github.com/monero-integrations/monerophp/blob/master/src/walletRPC.php#L128

mzk commented 6 years ago

I'm sorry. We don't support forks of Monero.

Ok

It's wrong, see https://github.com/monero-integrations/monerophp/blob/master/src/walletRPC.php#L128

nope: https://getmonero.org/resources/developer-guides/wallet-rpc.html#getbalance => getbalance not get_balance.

sneurlax commented 6 years ago

@mzk, that documentation is out of date. It even says so at the top. Our documentation is actually the most up to date, see /docs

What aliases would be required in order to support forks more easily?