-
Notifications
You must be signed in to change notification settings - Fork 137
Open
Description
Dear Lighter Team,
We are experiencing a critical issue with the withdrawal functionality (Mode 11) in the Lighter Python SDK, resulting in
transactions being rejected by your API with an invalid asset index error. This occurs even when using the latest available
codebase from your official GitHub repository.
Details of the Issue:
- Error Encountered: When attempting a withdrawal via create_market_order.py (which utilizes the lighter.SignerClient.withdraw
method), the Lighter server API consistently returns: code=21801 message='invalid asset index'. - Investigation into Cause:
- We performed a thorough investigation, including updating the local lighter-sdk Python code (lighter/signer_client.py,
lighter/nonce_manager.py) and the underlying binary signer files (lighter/signers/.dylib/.so/*.dll) to the absolute
latest versions from your elliottech/lighter-python GitHub repository. - Debugging revealed that the SignWithdraw function within these latest binary signer files (e.g.,
lighter-signer-darwin-arm64.dylib) still generates a transaction payload (JSON tx_info) that contains "USDCAmount" but
does not include an explicit"AssetId"field. - The latest Python signer_client.py calls this binary function with the signature SignWithdraw(usdc_amount, nonce,
api_key_index, account_index), confirming that no explicit asset_id parameter is passed from the Python layer.
- We performed a thorough investigation, including updating the local lighter-sdk Python code (lighter/signer_client.py,
- Conclusion: The invalid asset index error strongly indicates that your current Lighter API server for withdrawals now
requires an explicit AssetId field in the transaction payload. However, the latest publicly available Lighter Python SDK
(both the Python wrapper and the underlying binary signer) is generating an outdated transaction format that lacks this
required field, leading to rejection.
Action Required by the Lighter Team:
To resolve this critical incompatibility, please address the following:
- Update Binary Signer: The SignWithdraw function within the lighter/signers binary files must be updated to generate
transaction payloads that include the explicit AssetId field (e.g., "AssetId": 0 for USDC, or as per your latest API
specification). - Synchronize Python SDK: Ensure the Python wrapper code (lighter/signer_client.py) correctly reflects any changes in the
underlying binary's SignWithdraw function interface, including new parameters for asset_id if applicable. - Ensure Compatibility: Verify that the published Lighter Python SDK (both code and binaries) is fully compatible and
synchronized with the currently deployed Lighter API server specifications for all transaction types, especially
withdrawals.
This issue prevents users from performing withdrawals, which is a fundamental operation. Your prompt attention to this matter
would be greatly appreciated.
Thank you.
lly835
Metadata
Metadata
Assignees
Labels
No labels