<p>The information I have Source address Destination Address Source private key Amount That's it.</p>
<p>I don't know much about bitcoin, so I worked hard to get this information from the private key of the sender.</p>
<pre class="lang-js prettyprint-override"><code>{
    &quot;blockheight&quot;: 2396902,
    &quot;confirmations&quot;: 55942,
    &quot;fees&quot;: 0.0000096,
    &quot;time&quot;: 1672593257,
    &quot;txid&quot;: &quot;b17ed30654152beacfc023b6a07bfffe129a069d76154984fd1c65db4fd1a563&quot;,
    &quot;vin&quot;: [
        {
            &quot;addr&quot;: &quot;LaFNH65KaMk9j3yR2CRSet4nRVPPpFVVoq&quot;,
            &quot;txid&quot;: &quot;403f8513364e949505226825c2693657577c071561cb61247d7d3bb62e238718&quot;,
            &quot;value&quot;: &quot;0.00108063&quot;,
            &quot;vout&quot;: 0
        }
    ],
    &quot;vout&quot;: [
        {
            &quot;n&quot;: 0,
            &quot;scriptPubKey&quot;: {
                &quot;addresses&quot;: [
                    &quot;LZKd7zNB7FNBLDjLEeHmMgYfEjNSL5kAaa&quot;
                ],
                &quot;hex&quot;: &quot;76a9149aa4472a77a9ee9f150351fa4222b029ef80d92488ac&quot;
            },
            &quot;spentIndex&quot;: 1,
            &quot;spentTxId&quot;: &quot;2f591faa79d32228451139aad9c7a924a67357acd76a4f06adc1150af70f64cf&quot;,
            &quot;value&quot;: &quot;0.00107103&quot;
        }
    ],
    &quot;vsize&quot;: 192
}
</code></pre>
<p>How do I use this information to generate raw transaction data in Nodejs?</p>

CC BY-SA 4.0
2023-04-07T13:37:25.683Z
Would you be satisfied with an answer giving general principles or are you only interested in working JavaScript nodejs code?
RedGrittyBrick
CC BY-SA 4.0
2023-04-07T15:57:54.963Z
I want to build raw transaction data with Nodejs

I'm interested in the code.
scooby
CC BY-SA 4.0
2023-04-07T19:44:30.670Z
Anything wrong with articles like [How to create a raw transaction using bitcoinjs-lib](https://medium.com/@orweinberger/how-to-create-a-raw-transaction-using-bitcoinjs-lib-1347a502a3a) or [similar search results](https://www.google.com/search?q=javascript+nodejs+bitcoin+raw+transaction) - any specific problems?
RedGrittyBrick
CC BY-SA 4.0
2023-04-08T08:48:34.020Z
I don't know what the string used in the code in the article is.

As I wrote earlier, I only have the source address, the source private key, the destination address, and the amount (3.6e-05 BTC).

I got this information from the source address, but I don't know how to put this information into my code.

Once you have the information, edit and share your questions
scooby
<bitcoin-core><transactions>
I want to generate raw transaction data in Nodejs
scooby
# I want to generate raw transaction data in Nodejs

(Asked by: username_0 on 2023-04-07)

The information I have Source address Destination Address Source private key Amount That's it.
I don't know much about bitcoin, so I worked hard to get this information from the private key of the sender.
{
    "blockheight": 2396902,
    "confirmations": 55942,
    "fees": 0.0000096,
    "time": 1672593257,
    "txid": "b17ed30654152beacfc023b6a07bfffe129a069d76154984fd1c65db4fd1a563",
    "vin": [
        {
            "addr": "LaFNH65KaMk9j3yR2CRSet4nRVPPpFVVoq",
            "txid": "403f8513364e949505226825c2693657577c071561cb61247d7d3bb62e238718",
            "value": "0.00108063",
            "vout": 0
        }
    ],
    "vout": [
        {
            "n": 0,
            "scriptPubKey": {
                "addresses": [
                    "LZKd7zNB7FNBLDjLEeHmMgYfEjNSL5kAaa"
                ],
                "hex": "76a9149aa4472a77a9ee9f150351fa4222b029ef80d92488ac"
            },
            "spentIndex": 1,
            "spentTxId": "2f591faa79d32228451139aad9c7a924a67357acd76a4f06adc1150af70f64cf",
            "value": "0.00107103"
        }
    ],
    "vsize": 192
}

How do I use this information to generate raw transaction data in Nodejs?

**Tags:** bitcoin-core, transactions

> **Comments:**
> **username_1**: Would you be satisfied with an answer giving general principles or are you only interested in working JavaScript nodejs code?  
> **username_0**: I want to build raw transaction data with Nodejs  I'm interested in the code.  
> **username_1**: Anything wrong with articles like [How to create a raw transaction using bitcoinjs-lib](https://medium.com/@orweinberger/how-to-create-a-raw-transaction-using-bitcoinjs-lib-1347a502a3a) or [similar search results](https://www.google.com/search?q=javascript+nodejs+bitcoin+raw+transaction) - any specific problems?  
> **username_0**: I don't know what the string used in the code in the article is.  As I wrote earlier, I only have the source address, the source private key, the destination address, and the amount (3.6e-05 BTC).  I got this information from the source address, but I don't know how to put this information into my code.  Once you have the information, edit and share your questions  

---

## 0 answers

