<p>Everything is fine with your tx.</p>

<p>Here it is: <a href="http://test.webbtc.com/tx/034dfa392aa7ea46bc0917cdaa2794a5f03e6f935b6518a103cb0f5e923a05be" rel="nofollow noreferrer">http://test.webbtc.com/tx/034dfa392aa7ea46bc0917cdaa2794a5f03e6f935b6518a103cb0f5e923a05be</a></p>

<p>I've pushed it to the network with this form: <a href="http://test.webbtc.com/relay_tx" rel="nofollow noreferrer">http://test.webbtc.com/relay_tx</a></p>

CC BY-SA 3.0
2014-07-03T13:23:20.643Z
weird I used http://tbtc.blockr.io/tx/push and got an error when trying to push, i'll use webbtc.com instead thanks !
JohnT
CC BY-SA 4.0
2014-07-03T13:18:49.627Z
2018-05-22T05:38:37.480Z
2018-05-22T05:38:37.480Z
amaclin
<p>I'm new to bitcoin programming and decided to give it a try with the release of bitcoinjs-lib 1.0. Here is how I generate the hex for the transaction</p>

<pre><code>var bitcoin = require('bitcoinjs-lib');

var key = bitcoin.ECKey.fromWIF("cS4fb6sHrJ2VrfqRNBkk6eHMCB5PY6Bayyo695VaSdfZLMbPZiGv");
var tx = new bitcoin.Transaction();

tx.addInput("129aa78e5649715ecc7121aee0cdba06527061976be9c38c3a9fd9ae258665c3", 0);
tx.addOutput("msj42CCGruhRsFrGATiUuh25dtxYtnpbTx", 15000)

tx.sign(0, key)

console.log(tx.toHex())
</code></pre>

<p>and here is the hex output</p>

<pre><code>0100000001c3658625aed99f3a8cc3e96b9761705206bacde0ae2171cc5e7149568ea79a12000000006b483045022100e807c222e6f53795d1fa5fcef7e50176e5a2cd9c164a9c955a5e717544a0ef250220743c40908d190bd13c407b8dbbf0dd2d685858c34bc998ee99e4de9f4e9eb2830121023cb4fea046a3747ee2e966ac382435cfca4570f959bcccb6b680fdcc812e15b9ffffffff01983a0000000000001976a91485eb47fe98f349065d6f044e27a4ac541af79ee288ac00000000
</code></pre>

<p>I looked through the lib but couldn't find where to inject the bitcoin.networks.testnet object and the documentation is empty</p>

<testnet><bitcoinjs>
Error pushing hex of tx, generated with bitcoinjs 1.0, on testnet
JohnT
# Error pushing hex of tx, generated with bitcoinjs 1.0, on testnet

(Asked by: username_0 on 2014-07-03)

I'm new to bitcoin programming and decided to give it a try with the release of bitcoinjs-lib 1.0. Here is how I generate the hex for the transaction

```
var bitcoin = require('bitcoinjs-lib');

var key = bitcoin.ECKey.fromWIF("cS4fb6sHrJ2VrfqRNBkk6eHMCB5PY6Bayyo695VaSdfZLMbPZiGv");
var tx = new bitcoin.Transaction();

tx.addInput("129aa78e5649715ecc7121aee0cdba06527061976be9c38c3a9fd9ae258665c3", 0);
tx.addOutput("msj42CCGruhRsFrGATiUuh25dtxYtnpbTx", 15000)

tx.sign(0, key)

console.log(tx.toHex())

```

and here is the hex output

```
0100000001c3658625aed99f3a8cc3e96b9761705206bacde0ae2171cc5e7149568ea79a12000000006b483045022100e807c222e6f53795d1fa5fcef7e50176e5a2cd9c164a9c955a5e717544a0ef250220743c40908d190bd13c407b8dbbf0dd2d685858c34bc998ee99e4de9f4e9eb2830121023cb4fea046a3747ee2e966ac382435cfca4570f959bcccb6b680fdcc812e15b9ffffffff01983a0000000000001976a91485eb47fe98f349065d6f044e27a4ac541af79ee288ac00000000

```

I looked through the lib but couldn't find where to inject the bitcoin.networks.testnet object and the documentation is empty

**Tags:** testnet, bitcoinjs


---

## 1 answers

### Answer by username_1 on 2014-07-03. Score: 1

Everything is fine with your tx.

Here it is: <http://test.webbtc.com/tx/034dfa392aa7ea46bc0917cdaa2794a5f03e6f935b6518a103cb0f5e923a05be>

I've pushed it to the network with this form: <http://test.webbtc.com/relay_tx>

> **Comments:**
> **username_0**: weird I used http://tbtc.blockr.io/tx/push and got an error when trying to push, i'll use webbtc.com instead thanks !  

---

