# SOLVED: After create\_send, how to sign and broadcast the transaction in Bitcoin?

**URL:** https://forums.counterparty.io/t/solved-after-create-send-how-to-sign-and-broadcast-the-transaction-in-bitcoin/2407
**Category:** Counterparty
**Created:** [October 19, 2016, 5:32pm UTC](https://forums.counterparty.io/t/solved-after-create-send-how-to-sign-and-broadcast-the-transaction-in-bitcoin/2407 "2016-10-19T17:32:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SpacePirate\_io](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/spacepirate_io/32/571_2.png) [@SpacePirate\_io](https://forums.counterparty.io/u/SpacePirate_io)
#### Post date: [October 19, 2016, 5:32pm UTC](https://forums.counterparty.io/t/solved-after-create-send-how-to-sign-and-broadcast-the-transaction-in-bitcoin/2407/1 "2016-10-19T17:32:54Z")

</div>

After a successful create\_send, I get a hex string output from counterparty. In reading the counterparty API documentation, I see I need to a sign and broadcast in the bitcoin client. Effectively, signrawtransaction and sendrawtransaction using bitcoind.

So, what I’m struggling with is the inputs required by signrawtransaction.

signrawtransaction “hexstring” ( [{“txid”:“id”,“vout”:n,“scriptPubKey”:“hex”,“redeemScript”:“hex”},…] [“privatekey1”,…] sighashtype )

I understand “hexstring” is the output from the previous step in create\_send. However, in order to get the other variables (txid, scriptpubkey:hex, redeemscript:hex) do I need to do a decoderawtransaction of the hexcode from create\_send?

Any help would be appreciated, thanks 🙂

---

<div class="post-metadata">

### Author: ![SpacePirate\_io](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/spacepirate_io/32/571_2.png) [@SpacePirate\_io](https://forums.counterparty.io/u/SpacePirate_io)
#### Post date: [October 19, 2016, 10:00pm UTC](https://forums.counterparty.io/t/solved-after-create-send-how-to-sign-and-broadcast-the-transaction-in-bitcoin/2407/2 "2016-10-19T22:00:55Z")

</div>

Step1: signrawtransaction hexcode\_from\_create\_send null ‘[“privatekey\_from\_counterparty\_send\_address”]’  
Step2: sendrawtransaction hexcode\_result\_from\_step1

What was throwing me off was the second argument for the signrawtransaction command. You can specify null since all the arguments are in the hexcode.
