0

I read the documentation on the wallet.transfer() function but there was no origin wallet parameter. Can I choose to use a subaddress generated through wallet.new_address() to send monero form? If not how can I send the monero on a subaddress through monero-python?

Edit: I tried using address.transfer() and got the error ''SubAddress' object has no attribute 'transfer_multiple''.

from monero.address import address
address = address(str(subaddress))

txs = address.transfer_multiple([(...)])

What should I do to use the monero on a subaddress?

https://monero-python.readthedocs.io/en/latest/transactions.html

1 Answers1

1

This is one of the main problems of using 3rd party wrapper libraries like this: they often don't fully implement the API they are wrapping!

If you're proficient enough to make simple HTTP requests and parse JSON, it's far more sensible to just call the wallet API directly, and not use a wrapper library. In this case, it's merely a matter of calling either transfer or transfer_split of the Wallet RPC, which both accept optional parameters account_index and subaddr_indices, to transfer from specific account/subaddress(s).

jtgrassie
  • 19,111
  • 4
  • 14
  • 51