-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c80537
commit 2ddd53e
Showing
7 changed files
with
86 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,34 @@ | ||
COINBASE_TRANSACTION = { | ||
"version": 2, | ||
"locktime": 0xffffffff, | ||
"vin": [ | ||
{ | ||
"txid": "0000000000000000000000000000000000000000000000000000000000000000", | ||
"vout": 0xffffffff, | ||
"sequence": 0xffffffff, | ||
"is_coinbase": True, | ||
"scriptsig": "160014fd91039e25b0827748473fce351afd8ead4ecdce", | ||
"scriptsig_asm": "OP_PUSHBYTES_22 0014fd91039e25b0827748473fce351afd8ead4ecdce", | ||
"witness": [ | ||
"0000000000000000000000000000000000000000000000000000000000000000", | ||
BLOCKREWARD = 1250000000 | ||
|
||
def create_coinbase(total_fee): | ||
return { | ||
"version": 2, | ||
"locktime": 0xffffffff, | ||
"vin": [ | ||
{ | ||
"txid": "0000000000000000000000000000000000000000000000000000000000000000", | ||
"vout": 0xffffffff, | ||
"sequence": 0xffffffff, | ||
"is_coinbase": True, | ||
"scriptsig": "160014fd91039e25b0827748473fce351afd8ead4ecdce", | ||
"scriptsig_asm": "OP_PUSHBYTES_22 0014fd91039e25b0827748473fce351afd8ead4ecdce", | ||
"witness": [ | ||
"0000000000000000000000000000000000000000000000000000000000000000" | ||
] | ||
} | ||
], | ||
"vout": [ | ||
{ | ||
"scriptpubkey": "0014ad4cc1cc859c57477bf90d0f944360d90a3998bf", | ||
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 ad4cc1cc859c57477bf90d0f944360d90a3998bf", | ||
"scriptpubkey_type": "v0_p2wpkh", | ||
"scriptpubkey_address": "bc1q44xvrny9n3t5w7lep58egsmqmy9rnx9lt6u0tc", | ||
"value": BLOCKREWARD + total_fee | ||
}, | ||
{ | ||
"scriptpubkey": "", | ||
"scriptpubkey_type": "op_return", | ||
"value": 0 | ||
} | ||
] | ||
} | ||
], | ||
"vout": [ | ||
{ | ||
"scriptpubkey": "0014ad4cc1cc859c57477bf90d0f944360d90a3998bf", | ||
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 ad4cc1cc859c57477bf90d0f944360d90a3998bf", | ||
"scriptpubkey_type": "v0_p2wpkh", | ||
"scriptpubkey_address": "bc1q44xvrny9n3t5w7lep58egsmqmy9rnx9lt6u0tc", | ||
"value": 100000 | ||
}, | ||
{ | ||
"scriptpubkey": "", | ||
"scriptpubkey_type": "op_return", | ||
"value": 0 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.