Hot answers tagged

15

There are several. Python: https://github.com/tippero/python-monero Node js: https://github.com/ShenNoether/monero-nodejs Php: https://github.com/PsychicCat/monero-php I think the node and php libraries are for interacting more with simplewallet in particular, but the Python library is for both daemon and wallet I believe.


3

That's because you're using the wrong ticker. Try XMR. https://min-api.cryptocompare.com/data/price?fsym=XMR&tsyms=BTC,USD,EUR


2

I'm assuming the monero-wallet-rpc is on the same host as the website. In init.php, define a username and password for the rpc wallet: // RPC login credentials for monero-wallet-rpc. Use --rpc-login user:pass when starting the rpc wallet. // Example: monero-wallet-rpc --rpc-login user:pass --wallet-file wallet.bin --rpc-bind-ip 127.0.0.1 --rpc-bind-port ...


2

For python, you can use MoneroPy. It is still pre-beta and under development, but has pure python implementations for wallet account creation, TX Extra parsing, integrated address encoding and decoding, transaction ID generation, and other goodies. Speed improvements and Monero Core library wrappers are planned for offloading calculations to same code at ...


2

There is another PHP library developed by serhack. https://github.com/monero-integrations/monerophp


2

I would suggest creating a subaddress per customer. Therefore, you will be calling the RPC method create_address (if using the monero-wallet-rpc directly), or the equivalent method in your referenced PHP wrapper library. To check for incoming payments, you can use incoming_transfers (or the equivalent library method). Depending on your use case, you can ...


1

Your log shows you converting the string '0.1253721' to 106372099999.99998, which is an invalid amount. Whereas your other string '0.1253728' gets converted to 106372800000.0, which is passing through OK. The number sent to the wallet RPC should be an integer. Your function _buildTransfer is the culprit. Either cast when assigning or wrap in intval(...). E....


1

The wallet RPC and daemon RPC are different. Refer to the projects documentation on how to run both wallet and daemon RPCs. The node you reference at node.xmr.to is a daemon RPC, not a wallet RPC, therefore you cannot use it for any of the wallet commands, only daemon commands. To use a wallet RPC (like you are trying to do from php), you have to run ...


1

Line 72 in that file has a variable name that doesn't match the parameter name (notice the lowercase k in spendkey). Just edit that line replacing $spendkey with $spendKey should fix it.


1

getblockcount is a daemon RPC, but you mention monero-wallet-rpc mostly. It is likely you are trying to call this RPC on the wallet, not on the daemon, and the wallet rightfully errors out.


Only top voted, non community-wiki answers of a minimum length are eligible