Skip to content

library_test.py issue #2

@Alf71

Description

@Alf71

KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU75NBY2dKG
True
Traceback (most recent call last):
File "/mnt/v/GITHUB/AlexCurl/Secp256k1_PythonLibrary-main/Secp256k1_PythonLibrary-main/library_test.py", line 95, in
pk1 = secp256k1.wif_to_privatekey("5K2jRkYtEju8Ds2Y3HwwNBut1a6vADjy6B4Eu5N8NZbkiaZ5DTZ")
File "/mnt/v/GITHUB/AlexCurl/Secp256k1_PythonLibrary-main/Secp256k1_PythonLibrary-main/secp256k1.py", line 217, in wif_to_privatekey
return int.from_bytes(res)
TypeError: from_bytes() missing required argument 'byteorder' (pos 2)

Open secp256k1.py.

Locate the wif_to_privatekey function (around line 217).

Change the line:
python

return int.from_bytes(res)

to:
python

return int.from_bytes(res, 'big')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions