Closed jeffro256 closed 3 years ago
Been there, done that. Talking to monero-wallet-cli
via pipes is a mess of lags and parsing problems. Definitely, I don't recommend.
Is that a general idea, or there's an objective you want to achieve?
Even though it is a complete mess, I've personally had need to do that before. A project I'm currently working on communicates with monero-wallet-cli
on a user's computer to grab its one-time outputs and then searches the blockchain for txs which use those outputs as decoys.
I wish there was a --json
option or something similar to get some standardized, easily parse-able output from monero-wallet-cli
I guess I'll close this for right now because it isn't THAT important.
BTW, I've just realized I have similar project in my github. Just in case you wanted to check alternative implementation: https://github.com/emesik/monerowalletpool/blob/master/monerowalletpool/__init__.py However, I don't recommend using it.
That is some good code, but yeah it looks like more trouble than it's worth.
I think it would be cool if we had a backend that uses the
monero-wallet-cli
command to interact with a wallet. The backend could take a path/alias/command to themonero-wallet-cli
executable and a path to a wallet file. Then we would be able to write something like this:I could start working on it if you think its a good idea. The advantage of this is that you don't have to have a wallet server running on your computer.