Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using the example order.py #218

Open
NeoSephiroth opened this issue Nov 29, 2023 · 1 comment
Open

Error using the example order.py #218

NeoSephiroth opened this issue Nov 29, 2023 · 1 comment

Comments

@NeoSephiroth
Copy link

Hi! I tried using both python 3.9 and 3.11 but I always get the same error:

r, s = sign(self.hash, int(private_key_hex, 16))
                           ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: int() can't convert non-string with explicit base

the error is traced to signable.py in this function:

def sign(self, private_key_hex):
     """Sign the hash of the object using the given private key."""
     r, s = sign(self.hash, int(private_key_hex, 16))
     return serialize_signature(r, s)

if I print the stark key I get this ( I print it just a few lines of code before the
order_response = client.private.create_order(**order_params)
line of codes where the error generates

My stark key is ( I will just delete the last 15 digits of the private key, but anyway the wallet linked has just test tokens so I don't mind if you even find the private key of my eth wallet ):

{'public_key': '0x36992ce4d3eee06485afbbeedb34b82e42ed481935baebe989bfcfff3e67193', 'public_key_y_coordinate': '0x56a72417ea2c445f858c2c07841a7b643411f70528627664a622adb6ff149b1', 'private_key': '0x4499ce78a19b9dae7865dc65e425f65e6d9d8c82365c8d11XXXXXXXXXXXXXXX'}

@NeoSephiroth
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant