I have the private key, and its unspent outputs.
Address: 18hxCUw1SYXoaeQtbZvNiM79h6hQk1HU6F
I am getting unspent outputs from here:
https://blockchain.info/unspent?active=18hxCUw1SYXoaeQtbZvNiM79h6hQk1HU6Fand running this command (pycoin):
root@server:~# tx c54ffd2b302b03f81342fe0c2c42960dd160d6b1ad8db7d3539f83a1ca8cb5d5/0/76a9145487988c725c2181dd1c9e78cf6a8cf290adc05e88ac/77174 18hxCUw1SYXoaeQtbZvNiM79h6hQk1HU6F -F 30000
warning: transaction fees recommendations casually calculated and estimates may be incorrect
warning: transaction fee of 0.3 exceeds expected value of 0.1 mBTC
Version: 1 tx hash c33a9c444a5ca6244b1df8d6886876e1eab90ace3c7b57d16e602138ef8ed8b5 85 bytes
TxIn count: 1; TxOut count: 1
Lock time: 0 (valid anytime)
Input:
0: 18hxCUw1SYXoaeQtbZvNiM79h6hQk1HU6F from c54ffd2b302b03f81342fe0c2c42960dd160d6b1ad8db7d3539f83a1ca8cb5d5:0 0.77174 mBTC BAD SIG
Output:
0: 18hxCUw1SYXoaeQtbZvNiM79h6hQk1HU6F receives 0.47174 mBTC
Total input 0.77174 mBTC
Total output 0.47174 mBTC
Total fees 0.30000 mBTC
including unspents in hex dump since transaction not fully signed
0100000001d5b58ccaa1839f53d3b78dadb1d660d10d96422c0cfe4213f8032b302bfd4fc50000000000ffffffff0146b80000000000001976a9145487988c725c2181dd1c9e78cf6a8cf290adc05e88ac00000000762d0100000000001976a9145487988c725c2181dd1c9e78cf6a8cf290adc05e88ac
*** can't validate source transactions as untampered: hash id c54ffd2b302b03f81342fe0c2c42960dd160d6b1ad8db7d3539f83a1ca8cb5d5 not in tx_db
warning: no service providers found for tx_for_tx_hash; consider setting environment variable PYCOIN_BTC_PROVIDERS
root@server:~#
Here I got raw transaction. I sign it with pybtctool:
root@server:~# pybtctool sign 0100000001d5b58ccaa1839f53d3b78dadb1d660d10d96422c0cfe4213f8032b302bfd4fc50000000000ffffffff0146b80000000000001976a9145487988c725c2181dd1c9e78cf6a8cf290adc05e88ac00000000762d0100000000001976a9145487988c725c2181dd1c9e78cf6a8cf290adc05e88ac 0 [i]PRIVATE_KEY[/i]
0100000001d5b58ccaa1839f53d3b78dadb1d660d10d96422c0cfe4213f8032b302bfd4fc5000000008b483045022100d6a5589b65607f7f6698b6aa47223a46e9892089f04419a6d856721f85dffb2f022001061847f0e4c5ab15c2b4ccd3f22f9977218aa01c084d08450e9b3d3a22fbd80141043fcc0663bca106863ebdae80cc7ceca39775c8978c7de706f613a7e68e490e19e675395bb26778cb372177db42d0b496d2e335a5476214d093e897b25bee8f9fffffffff0146b80000000000001976a9145487988c725c2181dd1c9e78cf6a8cf290adc05e88ac00000000
I have the signed transaction, but when I try to broadcast it I am getting this error
"Missing inputs"
I saw that in raw transaction does not have script of input even though I give script
I also tried creating TX with pybtctool (it does not ask for transaction script);
root@server:~# pybtctool mktx c54ffd2b302b03f81342fe0c2c42960dd160d6b1ad8db7d3539f83a1ca8cb5d5:0 18hxCUw1SYXoaeQtbZvNiM79h6hQk1HU6F:57174
0100000001d5b58ccaa1839f53d3b78dadb1d660d10d96422c0cfe4213f8032b302bfd4fc50000000000ffffffff0156df0000000000001976a9145487988c725c2181dd1c9e78cf6a8cf290adc05e88ac00000000
And it still does not show script when I decode it, so I can't broadcast it.
So I have few questions;
- Can I broadcast without input script?
- How can I create raw input with transaction script? (I don't want to download whole blockchain)
- How can I directly pay from private key?
Thanks!