1

Is the mms available through the JSON RPC?

I was having luck without using the mms by using the JSON RPC multisig calls, by subclassing monero-python's JSONRPCWallet, up until creating a transaction. I was able to manually finish the process via the wallet CLI, however it was not ideal.

Using the RPC to create the transaction with wallet.transfer(address, amount) I would either get:

as an Address object

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Projects\Monero\server\venv\lib\site-packages\monero\backends\jsonrpc.py", line 428, in transfer
    'destinations': list(map(
TypeError: 'Address' object is not iterable 

or as a string

ValueError: Address must be either 95 or 106 characters long base58-encoded string, is 9 (1 chars length)

Trying to create the tranaction from the Wallet class I would get:


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Projects\Monero\server\venv\lib\site-packages\monero\wallet.py", line 257, in transfer
    return self.accounts[0].transfer(
  File "C:\Projects\Monero\server\venv\lib\site-packages\monero\account.py", line 92, in transfer
    return self._backend.transfer(
  File "C:\Projects\Monero\server\venv\lib\site-packages\monero\backends\jsonrpc.py", line 443, in transfer
    zip(*[_transfers[k] for k in (
  File "C:\Projects\Monero\server\venv\lib\site-packages\monero\backends\jsonrpc.py", line 443, in <listcomp>
    zip(*[_transfers[k] for k in (
KeyError: 'tx_hash_list'

Creating the transaction worked from monero-cli using the standard transfer command, which created the multisig_monero_tx file. If I could interact with the mms through python that would simplify things, but I would rather not use Popen to create the transaction via the CLI.

Can anyone point me in the right direction?

Below is from another SO question but I am not certain it is correct that the RPC uses the mms 'under the hood', as the RPC calls I used did not rely on pyBitmessage.

The only reference I can find in Monero RPC source code to MMS is in wallet2.h mms::message_store& get_message_store() { return m_message_store; }; const mms::message_store& get_message_store() const { return m_message_store; }; mms::multisig_wallet_state get_multisig_wallet_state() const; – Anelito Sep 9 '20 at 10:56

Multisig, which is exposed in the RPC, uses MMS, which is part of wallet2. There are a lot more references to "mms" than what you have found! I suspect you're searching on GitHub (which excludes large files). – jtgrassie♦ Sep 9 '20 at 15:24

I can't invoke any MMS command via RPC, I tried "mms", "mms init", etc. I was referring to RPC calls mentioning MMS, apparently it is not possible to invoke mms commands from an external third party interacting to monero-wallet-rpc – Anelito Sep 10 '20 at 9:05 Here's the disconnect, you want to use MMS directly, but it's used under the hood by the multisig command's, which are what are exposed -- it doesn't need talking to directly. – jtgrassie♦ Sep 10 '20 at 15:17

I need to run mms commands automatically, how would you do it? – Anelito Sep 10 '20 at 15:53

0

monero-python package does not support mms at this time.

See discussion here: https://github.com/monero-ecosystem/monero-python/issues/45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.