Author

Topic: Load and broadcast signed transaction in Android electrum (Read 230 times)

legendary
Activity: 3724
Merit: 1586
You will have to load the transaction on a PC and then have it display the transaction as a qr code which you scan with android electrum. To load the transaction on a PC go to tools menu > load transaction > from file. Then in the window that appears click on share in the bottom left > show as QR code. On android electrum go to send and then tap scan. Scan the QR code and you'll get the option to sign and broadcast it.
sr. member
Activity: 278
Merit: 251
Bitcoin-Note-and-Voucher-Printing-Empowerer
legendary
Activity: 2646
Merit: 6681
Self-proclaimed Genius
Any ideas? How can I broadcast a "scriptsig-not-pushonly" signed transaction? It seems to be valid, but servers seem to reject it...
Usually, nodes throws that error if the signature in the transaction is invalid.
And based from your tries, it's not limited to Electrum servers (which are Bitcoin nodes too), blockexplorers' Bitcoin nodes reject it as well.

It verifies correctly on "https://coinb.in/#verify" but I cannot broadcast it anywhere. I always get error messages like these:
The problem is, coinb.in doesn't verify the validity of the signature in that page.
It just checks if the raw transaction's structure is correct.
It'll mark it as "signed" if it detected the presence of scriptSig whether it's valid or not.

(you can try this with a signed raw transaction edited with the wrong signature)

Why do you have to use v1.7x anyways?
old "electrum.dat" wallet files and its seed phrase are still supported by the latest version.
sr. member
Activity: 278
Merit: 251
Bitcoin-Note-and-Voucher-Printing-Empowerer
I created a raw transaction with an older electrum version (1.7x or so). It verifies correctly on "https://coinb.in/#verify" but I cannot broadcast it anywhere. I always get error messages like these:

https://coinb.in/#broadcast
--> the transaction was rejected by network rules. scriptsig-not-pushonly

https://blockstream.info/tx/push
--> RPC error

https://www.blockchain.com/de/explorer/assets/btc/broadcast-transaction
--> "Code: -26, Error: scriptsig-not-pushonly"

https://www.viabtc.com/tools/broadcast
--> Raw transaction send failed

https://live.blockcypher.com/btc/pushtx/
--> Error validating transaction: Rejected script for input 0 referencing ......

https://blockchair.com/broadcast
--> An error has occurred, please verify the transaction hash and selected network and try again.

https://bitaps.com/broadcast
--> Mempool accept test failed: scriptsig-not-pushonly

Finally I tried Electrum on Android with the "paste" button from clipboard. Again same problem (I translate error message to English):
--> The server has answered with an error. Try to select another server ot to install an update of Electrum. scriptsig-not-push-only
(I tried about 10 different servers - all the same problem, then gave up)

Any ideas? How can I broadcast a "scriptsig-not-pushonly" signed transaction? It seems to be valid, but servers seem to reject it...
legendary
Activity: 2268
Merit: 18775
The QR code approach is not that useful (since you would use that PC to broadcast the transaction anyway).
The QR code approach is in fact the best option.

If the computer the signed transaction is currently stored on has an internet connection, then you can just use that computer to broadcast the transaction. If the computer does not have an internet connection, then chances are it is because you are using it as airgapped cold storage and want to move transactions back and forth from a live watch only wallet. The best way to do this is with QR codes, since it removes the attack vector of malware being transferred on removable media, or your private keys being leaked via removable media.
HCP
legendary
Activity: 2086
Merit: 4363
open the .txn file using any text editor on your mobile, copy its content then load it on Electrum by clicking the paste button. It worked for me.
That is a very nice (and somewhat undocumented) feature... thanks for sharing!




So I guess the only option is to broadcast it using coinb.in
As above, you can follow khaled0111's tip and just "copy" the raw hex using a text editor on your Android device, and then in Electrum Android, on the "Send" tab... click the "paste" icon... it'll give you a preview of the signed transaction and the option to broadcast
hero member
Activity: 773
Merit: 528
I see. The QR code approach is not that useful (since you would use that PC to broadcast the transaction anyway).

So I guess the only option is to broadcast it using coinb.in
HCP
legendary
Activity: 2086
Merit: 4363
You can't load .txn files into the android version of Electrum. That is only available on the desktop version.

EDIT: but, as per Khaled0111's tip above, you can load raw hex text into Android Electrum using the "paste" button on the "send" tab! Wink


If you have a signed transaction in .txn file, it should be just a plaintext file with the "Raw HEX" version of the transaction... any transaction broadcast tool/website should be able to send this out for you:

https://www.blockchain.com/btc/pushtx
https://live.blockcypher.com/btc/pushtx/
https://btc.com/tools/tx/publish
https://coinb.in/#broadcast

Note, I would advise that you use a "decode raw transaction" tool prior to broadcasting it, to double check it and make sure that all of the details (addresses and amounts etc) are correct:
https://www.blockchain.com/btc/decode-tx
https://live.blockcypher.com/btc/decodetx/
https://btc.com/tools/tx/decode
https://coinb.in/#verify
legendary
Activity: 2772
Merit: 3114
Top Crypto Casino
Electrum on Android does not support this feature. You can't import a raw transaction saved as .txn file.

This leaves you with two options: Either save the transaction as a QR-Code and scan it using your mobile as o_e_l_e_o suggested or open the .txn file using any text editor on your mobile, copy its content then load it on Electrum by clicking the paste button. It worked for me.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
Did you try to click copy and then the paste icon and save icon (the one that looks like a memory card)?

Otherwise, I'd go here: https://coinb.in/#broadcast and paste it in there. You could use the python idle app to open its contents and extract what you need (downloaded) if its not readable at the moment.
legendary
Activity: 2268
Merit: 18775
Open your Electrum wallet on desktop, load the signed transaction, and click the button at the bottom left which says "Export", and then click "Show as QR code".

On your mobile wallet, press the button on the page you have screenshotted which says "Scan". Scan the QR code from your computer. Broadcast the transaction.
hero member
Activity: 773
Merit: 528
hero member
Activity: 773
Merit: 528
Its at the bottom of one of the menus at the top (I think it's Tools but it could be wallet).

Can't find it. In the send tab, there are only 4 icons, then scan, then pay, no option to load txn file
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
Its at the bottom of one of the menus at the top (I think it's Tools but it could be wallet).
hero member
Activity: 773
Merit: 528
I have a signed transaction file .txn (signed on a PC) and want to load and broadcast it in Android electrum. I don't see such an option, is there any way? Maybe can broadcast it using another app or website?
Jump to: