From d11b4e67d132a84e77f6b046f72a4299807fe065 Mon Sep 17 00:00:00 2001 From: Jainil Sutaria Date: Wed, 7 May 2025 17:02:19 -0400 Subject: [PATCH 1/2] chore(signing): Update to use sign typed data instead of sign message --- hyperliquid/utils/signing.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hyperliquid/utils/signing.py b/hyperliquid/utils/signing.py index db71dd72..29104239 100644 --- a/hyperliquid/utils/signing.py +++ b/hyperliquid/utils/signing.py @@ -392,8 +392,7 @@ def sign_token_delegate_action(wallet, action, is_mainnet): def sign_inner(wallet, data): - structured_data = encode_typed_data(full_message=data) - signed = wallet.sign_message(structured_data) + signed = wallet.sign_typed_data(**data) return {"r": to_hex(signed["r"]), "s": to_hex(signed["s"]), "v": signed["v"]} From ef04cced5f528819cec2962b761fbd264a5b39f7 Mon Sep 17 00:00:00 2001 From: Jainil Sutaria Date: Wed, 7 May 2025 18:53:32 -0400 Subject: [PATCH 2/2] Push full message --- hyperliquid/utils/signing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperliquid/utils/signing.py b/hyperliquid/utils/signing.py index 29104239..e3353b33 100644 --- a/hyperliquid/utils/signing.py +++ b/hyperliquid/utils/signing.py @@ -392,7 +392,7 @@ def sign_token_delegate_action(wallet, action, is_mainnet): def sign_inner(wallet, data): - signed = wallet.sign_typed_data(**data) + signed = wallet.sign_typed_data(full_message=data) return {"r": to_hex(signed["r"]), "s": to_hex(signed["s"]), "v": signed["v"]}