This commit is contained in:
lz_db
2025-11-16 12:31:03 +08:00
commit 0fab423a18
1451 changed files with 743213 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
# utils to use starknet library in ccxt
from .constants import EC_ORDER
from ..starkware.crypto.signature import grind_key
def get_private_key_from_eth_signature(eth_signature_hex: str) -> int:
r = eth_signature_hex[2 : 64 + 2] if eth_signature_hex[0:2] == '0x' else eth_signature_hex[0 : 64]
return grind_key(int(r, 16), EC_ORDER)