-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcoinbase_transaction.js
43 lines (38 loc) · 2.1 KB
/
coinbase_transaction.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const coinbase_trxn = {
"version": 1,
"locktime": 0,
"vin": [
{
"txid": "0000000000000000000000000000000000000000000000000000000000000000",
"vout": 4294967295,
"scriptsig": "03233708184d696e656420627920416e74506f6f6c373946205b8160a4256c0000946e0100",
"scriptsig_asm": "",
"witness": [
"0000000000000000000000000000000000000000000000000000000000000000"
],
"is_coinbase": true,
"sequence": 429496729565
}
],
"vout": [
{
"scriptpubkey": "76a914edf10a7fac6b32e24daa5305c723f3de58db1bc888ac",
"scriptpubkey_asm": " ",
"scriptpubkey_type": "",
"scriptpubkey_address": "",
"value": "1268270308" //VALUE = SUBSIDY + FEES
//
},
{
"scriptpubkey": "6a24aa21a9edaa2808b675f4d2321c8910ddddc529293315db15d55a3626dbfb85fbe57a5a61", // wtxid commitment = aa2808b675f4d2321c8910ddddc529293315db15d55a3626dbfb85fbe57a5a61
"scriptpubkey_asm": "OP_RETURN OP_PUSHBYTES_36 aa2808b675f4d2321c8910ddddc529293315db15d55a3626dbfb85fbe57a5a61",
"scriptpubkey_type": "",
"scriptpubkey_address": "",
"value": 0
}
]
}
const final_txid = "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2503233708184d696e656420627920416e74506f6f6c373946205b8160a4256c0000946e0100ffffffff022d76634b000000001976a914edf10a7fac6b32e24daa5305c723f3de58db1bc888ac0000000000000000266a24aa21a9edaa2808b675f4d2321c8910ddddc529293315db15d55a3626dbfb85fbe57a5a6100000000"
const txid = "db23e7eb0c1c08b827c00b754d231dd425fd62e62690d6a658fdea2307832fb1"
const final_serialized = "010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff2503233708184d696e656420627920416e74506f6f6c373946205b8160a4256c0000946e0100ffffffff022d76634b000000001976a914edf10a7fac6b32e24daa5305c723f3de58db1bc888ac0000000000000000266a24aa21a9edaa2808b675f4d2321c8910ddddc529293315db15d55a3626dbfb85fbe57a5a610120000000000000000000000000000000000000000000000000000000000000000000000000"
module.exports = {final_txid,final_serialized}