I know that I can use the GUI to do this and I"m glad to do so...however how would I do this using a bash script? This is on a Mac but I would just change it for any OS in question.


PAYOUTS=cat ~/Desktop/weeklySummary.csv
WP= /Users/${USER}/.electrum/wallets
PASS= "my_wallet_password"
# echo $PAYOUTS

cd /
./Applications/Electrum.app/Contents/MacOS/Electrum paytomany && $PAYOUTS -w $WP -W PASS 

# this is not ready yet!  I have to figure out 
# whether or not change address, a fee, and a 
# from address are requried to use this 

I get thrown some errors for a few missing details. Am I required to have my wallet password, from address, and change address (I presume the answer is yes) but furthermore, what are the -h, -v, -P parameters mentioned here?

enter image description here


WOW....so this never got answered by anyone else....okay let's share the answer for you all as I eventually figured it out but had forgotten that I wrote this question:

electrum paytomany "[[\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05], [\"17Umi7fbYuKixnr8nRq16kMESWgJVc66s\", 0.05]]"

So each address to be paid must reside within its own array which is itself enclosed into a parent array of all those payout requests...the slashes are simply there to escape the quotes so they're included within the string. I actually ended up doing something other than bash but utlimately this is the string you need to format in order to paytomany using electrum. Still don't know what the -v nor the -h are for (op...nevermind they mean Help and Verbose)...-P for portable wallet (meaning it can be put onto something like a usb drive (a portable filesystem essentially)... Hope this can help some other fellow web traveller in the future ;)

  • You are a god! the documentation is awful, for thinking that the sentence "outputs list of ["address", amount]" implies this EXTREMELY specific data format at all Jul 4 '20 at 2:41
  • Note that the string '[["address_text", value]]' also works, by mixing single and double quotes you can avoid having to add escape characters \ to the whole thing. This is how the json.dumps library operates in python which is used to interpret this via json.loads See: github.com/spesmilo/electrum/blob/master/electrum/commands.py Jul 13 '20 at 12:03

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.