Author

Topic: Using offline transactions without Armory Online? (Read 801 times)

hero member
Activity: 560
Merit: 506
I prefer Zakir over Muhammed when mentioning me!
My apologies. Too late now, I guess.

No problem. This may help you. https://bitcointalk.org/index.php?action=search;advanced

You can use http://counterwallet.co/ as your online wallet. It give Armory-style transaction and you can broadcast it through your account or via sites which offers broadcasting after copying hex.(see last para)

Not an option. I just want to ditch Armory Online from my workflow, I won't sign up for an online wallet.

You don't need to import anything. Just neef to signup and create a watch-only address in it.

Or try this script. No warranty or guarantee from me. Use it at your own risk.
 {code}

From what I gather this script takes a regular bitcoind hex tx and converts it to an Armory tx in order to broadcast it with Armory Online. I want to do the opposite: take a signed Armory tx and convert it to a regular bitcoind tx to broadcast it elsewhere.

You first need to create an Armory-style transaction to be able to sign with Arnory. So you need to convert raw hex tx to Armory-style tx before signing and broadcasting

After signing with Armory, you can click "Copy (Hex)" which will copy raw transaction which you can broadcast via Blockchain.info or other sites which offers this.

Yes! That's more like it. So the output of the "Copy (Hex)" button is already fit for POSTing it into blockchain.info/pushtx?

Yes.

One last question, can I create signed tx's directly with Armory Offline? (as opposed to create unsigned tx's with Armory Online and bring them over to the airgapped machine for signing)

No. You need some details to create a transaction and for this you need to use Internet. You can get it by using an explorer and sign in it manually which is a complex. I suggest you to use https://coinb.in/#newTransaction, input your Bitcoin address and create a transaction. You will see a raw unsigned transaction. Convert it to Armory-style and sign it. Then, click "Copy (Hex)" and broadcast it through an online pc. Alternatively, you can reduce workload, by downloading coinb.in in your offline pc and use it to sign raw transaction. So you don't want to convert to Armory-style transaction.

P.S. If you opt for second option, i.e. not using Armory to sign transaction, I highly recommend you to continue using it for creating new address. Hence, saving root key helps you to recover funds. Print root key and keep it safe! https://bitcointalksearch.org/topic/please-backup-your-wallet-a-paper-backup-is-forever-152151

Edit: Below link may help you for broadcasting transactions if Blockchain.info isn't working or is offline.

https://en.bitcoin.it/wiki/Transaction_broadcasting

Thank you! I'm definitely bookmarking this link.

Anytime.
rax
member
Activity: 86
Merit: 12
It was already asked a few times. A search is better.

My apologies. Too late now, I guess.

You can use http://counterwallet.co/ as your online wallet. It give Armory-style transaction and you can broadcast it through your account or via sites which offers broadcasting after copying hex.(see last para)

Not an option. I just want to ditch Armory Online from my workflow, I won't sign up for an online wallet.

Or try this script. No warranty or guarantee from me. Use it at your own risk.

-snip-
EDIT: So I figured it out and wrote a script to do this, which will take a bitcoind hex raw txn and convert to an armory style txn, which should be good for signing and/or broadcasting (if already signed) I would think. I couldn't get the system path hack to fully work... it still complained about not being able to import a module in the jsonrpc folder. That being the case, you could just throw this script in /usr/lib/armory on the online armory box (with a full or watch-only wallet) and run it. Starts armory up, loads the blockchain, and spits out the armory-formatted txn.

Any suggestions to the script are welcome (and feel free to add this to the armory extras folder):

Code:
import sys
sys.path.append("/usr/lib/armory")
from armoryengine import *

#See https://bitcoinarmory.com/developers/python-scripting/

if len(sys.argv) != 3:
    print "Please pass wallet file, followed by hex encoded unsigned raw txn"
    sys.exit(2)

walletPath = sys.argv[1]
hexRawTxn = sys.argv[2]

wlt = PyBtcWallet().readWalletFile(walletPath)
# Register wallet and start blockchain scan
TheBDM.registerWallet(wlt)
TheBDM.setBlocking(True)
TheBDM.setOnlineMode(True)  # will take 20 min for rescan
# Need "syncWithBlockchain" every time TheBDM is updated
wlt.syncWithBlockchain()

#Translate raw txn
pytx = PyTx()
print("Encoding raw txn: %s" % hexRawTxn)
binTxn = hex_to_binary(hexRawTxn)
pytx.unserialize(binTxn)
tx = PyTxDistProposal(pytx)
print("\n\nOutput is:\n%s" % tx.serializeAscii())

TheBDM.execCleanShutdown()

From what I gather this script takes a regular bitcoind hex tx and converts it to an Armory tx in order to broadcast it with Armory Online. I want to do the opposite: take a signed Armory tx and convert it to a regular bitcoind tx to broadcast it elsewhere.

After signing with Armory, you can click "Copy (Hex)" which will copy raw transaction which you can broadcast via Blockchain.info or other sites which offers this.

Yes! That's more like it. So the output of the "Copy (Hex)" button is already fit for POSTing it into blockchain.info/pushtx?

One last question, can I create signed tx's directly with Armory Offline? (as opposed to create unsigned tx's with Armory Online and bring them over to the airgapped machine for signing)

Edit: Below link may help you for broadcasting transactions if Blockchain.info isn't working or is offline.

https://en.bitcoin.it/wiki/Transaction_broadcasting

Thank you! I'm definitely bookmarking this link.
hero member
Activity: 560
Merit: 506
I prefer Zakir over Muhammed when mentioning me!
It was already asked a few times. A search is better.

You can use http://counterwallet.co/ as your online wallet. It give Armory-style transaction and you can broadcast it through your account or via sites which offers broadcasting after copying hex.(see last para)

Or try this script. No warranty or guarantee from me. Use it at your own risk.

-snip-
EDIT: So I figured it out and wrote a script to do this, which will take a bitcoind hex raw txn and convert to an armory style txn, which should be good for signing and/or broadcasting (if already signed) I would think. I couldn't get the system path hack to fully work... it still complained about not being able to import a module in the jsonrpc folder. That being the case, you could just throw this script in /usr/lib/armory on the online armory box (with a full or watch-only wallet) and run it. Starts armory up, loads the blockchain, and spits out the armory-formatted txn.

Any suggestions to the script are welcome (and feel free to add this to the armory extras folder):

Code:
import sys
sys.path.append("/usr/lib/armory")
from armoryengine import *

#See https://bitcoinarmory.com/developers/python-scripting/

if len(sys.argv) != 3:
    print "Please pass wallet file, followed by hex encoded unsigned raw txn"
    sys.exit(2)

walletPath = sys.argv[1]
hexRawTxn = sys.argv[2]

wlt = PyBtcWallet().readWalletFile(walletPath)
# Register wallet and start blockchain scan
TheBDM.registerWallet(wlt)
TheBDM.setBlocking(True)
TheBDM.setOnlineMode(True)  # will take 20 min for rescan
# Need "syncWithBlockchain" every time TheBDM is updated
wlt.syncWithBlockchain()

#Translate raw txn
pytx = PyTx()
print("Encoding raw txn: %s" % hexRawTxn)
binTxn = hex_to_binary(hexRawTxn)
pytx.unserialize(binTxn)
tx = PyTxDistProposal(pytx)
print("\n\nOutput is:\n%s" % tx.serializeAscii())

TheBDM.execCleanShutdown()

After signing with Armory, you can click "Copy (Hex)" which will copy raw transaction which you can broadcast via Blockchain.info or other sites which offers this.

Edit: Below link may help you for broadcasting transactions if Blockchain.info isn't working or is offline.

https://en.bitcoin.it/wiki/Transaction_broadcasting
rax
member
Activity: 86
Merit: 12
My current setup:

[Win7] Armory Online with a fully synced blockchain and read-only wallets.
[Ubuntu] Armory Offline with no blockchain and the actual wallets.

My flow whenever I want to send an offline transaction:

1. Create an unsigned tx in Armory Online (which has the blockchain and therefore knows my account balances).
2. Copy the unsigned tx to the airgapped machine with Armory Offline and sign it.
3. Send the signed tx back to the online machine and broadcast it with Armory Online.


Keeping synced with the blockchain is a PitA, though, so I'd like to stop relying on Armory Online to create my tx's and broadcast 'em. I'd like to know if it's possible to:

1. Create signed transactions directly on the airgapped machine (even though it can't possibly know my account balances).
2. Broadcast them by any other means, for instance using Blockchain.info's Broadcast Transaction endpoint: https://blockchain.info/pushtx

Thank you
Jump to: