我读过一些文章,我熟悉scriptsig是如何格式化的,以及如何从中提取相关信息。我遇到的问题是把它放入代码中。我读过这些帖子: https://bitcoin.stackexchange.com/questions/58853/how-do-you-figure-out-the-r-and-s-out-of-a-signature-using-pythonhttps://bitcoin.stackexchange.com/questions/2376/ecdsa-r-s-encoding-as-a-signature
我有一个scriptsig列表,还有一个函数(到目前为止)在scriptsig字符串上使用切片:
def scriptsig_to_ecdsa_sig(asn_sig):
strip1 = asn_sig[6:] #Remove first 6 characters
if strip1[:2] == "20" #Read next two characters to determine length of r
return {
'r': some list,
's': some list}
这是最好的路线吗?如果是这样的话,最好的方法是什么?在
弄明白了:
相关问题 更多 >
编程相关推荐