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

Commit f98a954

Browse files
committed
add get_p2pk_input_script helper
1 parent 5988ca2 commit f98a954

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
@@ -85,6 +85,13 @@ def get_p2sh_input_script(redeemScript, sigHashtypeList):
8585
result.extend(redeemScript)
8686
return bytearray(result)
8787

88+
def get_p2pk_input_script(sigHashtype):
89+
if len(sigHashtype) >= 0x4c:
90+
raise BTChipException("Invalid sigHashtype")
91+
result = [ len(sigHashtype) ]
92+
result.extend(sigHashtype)
93+
return bytearray(result)
94+
8895
def get_output_script(amountScriptArray):
8996
result = [ len(amountScriptArray) ]
9097
for amountScript in amountScriptArray:

0 commit comments

Comments
 (0)