monero-integrations / monerophp

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

Method not found “make_integrated_address" Laravel/PHP #119

Closed myusernameis69 closed 3 years ago

myusernameis69 commented 3 years ago

My code is written in Laravel. Whenever I try to generate an address + payment ID using make_integrated_address, I always get the fallowing error in laravel.log:

[2021-02-09 18:32:42] local.ERROR: Request have return error: Method not found;
Request: {"jsonrpc":"2.0","method":"make_integrated_address","params":{"payment_id":null}};

My code:


Thank you!

serhack commented 3 years ago

Have you ran Monero Wallet RPC with the flag --restricted-rpc ? Could you please share with us the flags of monero-wallet-rpc (redacting personal details), so we can try to reproduce this?

myusernameis69 commented 3 years ago

Have you ran Monero Wallet RPC with the flag --restricted-rpc ? Could you please share with us the flags of monero-wallet-rpc (redacting personal details), so we can try to reproduce this?

Hello, no, this is how i'm starting them:

monerod --config-file /root/.bitmonero/bitmonero.conf --confirm-external-bind

bitmonero.conf data
data-dir=/root/.bitmonero
#data-dir=/root/.bitmonero/monero.log
log-level=1
rpc-bind-ip=127.0.0.1
rpc-bind-port=18081
rpc-login=test:test

monero-wallet-rpc --wallet-file /root/.bitmonero/test3 --daemon-address 127.0.0.1:18081 --trusted-daemon --rpc-bind-port 18083 --password 'test3' --rpc-login test:test --daemon-login test:test --confirm-external-bind
serhack commented 3 years ago

The PHP file is trying to connect to 18083, correct? make_integrated_address is defined on Monero Wallet RPC interface. You need to connect only to Wallet RPC, so please make sure coins.monero.port is 18083.

monerod --config-file /root/.bitmonero/bitmonero.conf --confirm-external-bind

IIRC I do not think you need --confirm-external-bind if you plan to have monerod exposed only to your localhost.

myusernameis69 commented 3 years ago

The PHP file is trying to connect to 18083, correct? make_integrated_address is defined on Monero Wallet RPC interface. You need to connect only to Wallet RPC, so please make sure coins.monero.port is 18083.

monerod --config-file /root/.bitmonero/bitmonero.conf --confirm-external-bind

IIRC I do not think you need --confirm-external-bind if you plan to have monerod exposed only to your localhost.

Thank you so much! Yes, that was the problem, i was connecting to the node instead of the wallet-rpc.