monero-integrations / monerophp

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

Is this library compatible with Monero's new transaction address format? #99

Closed BarneyChambers closed 4 years ago

BarneyChambers commented 5 years ago

Monero recently did a hardfork to move away from the payment ID model, and implemented a new address format that included payment id in the address. Has this been implemented yet in this library? Thanks

serhack commented 5 years ago

Hi, I think you're meaning integrated address (with the payment ID encrypted). Yes, the PHP library supports the method call make_integrated_address

BarneyChambers commented 5 years ago

Sorry I think my question was unclear. How do we use $walletRPC->transfer() with integrated addresses? Is it just the same as using the transfer() function on normal transactions that do not have payment IDs?

cypherbits commented 5 years ago

Actually, integrated addresses were there from before and they will be removing them too. This is for anonymity. We will have to use subaddresses.

serhack commented 5 years ago

As @cypherbits wrote, integrated address are being deprecated (see this issue and this article for more information).

To send a transaction using RPC with an integrated address:

  1. Call the method split_integrated_address (as params, you have to pass the integrated address). This will return the details of the integrated address (payment id, public address and a bool called "is_subaddress").

  2. Call transfer method with the details you obtained before.