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 Answer 1

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).

1
  • Thanks for the answer. Even tough I don't have experience in working with JSON I think will try doing that. Commented May 20, 2023 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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