Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit a08f018

Browse files
authored
Merge pull request #22 from instagibbs/get_p2pk
add get_p2pk_input_script helper
2 parents 7c7a9e7 + f98a954 commit a08f018

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

btchip/btchipUtils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ def get_p2sh_input_script(redeemScript, sigHashtypeList):
8888
result.extend(redeemScript)
8989
return bytearray(result)
9090

91+
def get_p2pk_input_script(sigHashtype):
92+
if len(sigHashtype) >= 0x4c:
93+
raise BTChipException("Invalid sigHashtype")
94+
result = [ len(sigHashtype) ]
95+
result.extend(sigHashtype)
96+
return bytearray(result)
97+
9198
def get_output_script(amountScriptArray):
9299
result = [ len(amountScriptArray) ]
93100
for amountScript in amountScriptArray:

0 commit comments

Comments
 (0)