Feat/lighter connectors v3#2
Open
smartcrypto0 wants to merge 22 commits into
Open
Conversation
…ifacts, fix MANIFEST.in - Updated all lighter spot and perp connector files with April 21 QA-tested code - Updated all lighter spot and perp unit tests to match new connector code - Added NaN guard to perpetual_market_making to prevent crash on empty orderbook - Removed vendored binary include lines from MANIFEST.in (*.dll *.so *.dylib) - Removed dev testing scripts and JSON artifacts from scripts/ - All 234 lighter unit tests pass; 4731 total connector tests pass - QA verified: Spot 6/6, Perp 18/18 on live mainnet (April 21, 2026)
… changes - Rename lighter_api_key -> lighter_api_key_private_key and lighter_api_secret -> lighter_api_key_index in test fixtures - Remove lighter_private_key kwarg (EOA removal) - Rewrite test_get_signer_private_key_precedence_and_validation: now only _api_key is checked (no _private_key/_api_secret fallback) - Rewrite test_get_api_key_index_and_account_index: now only _api_key_index attr is checked - Wrap _update_balances() calls with assertRaises(IOError) for both success:False and empty data responses (implementation now raises) - Apply same config field rename fixes to perp utils and derivative tests (remove lighter_perpetual_private_key field, EOA removal) All 234 lighter connector tests pass.
… and hex key validation - Add lighter_api_key_public_key optional param to LighterExchange.__init__() - Store as self._api_key_public_key and use in authenticator property (falls back to account_index when not provided) - Add _is_hex_private_key() to spot exchange, matching perp implementation - Update _get_signer_private_key() to validate hex format before accepting key - Add lighter_api_key_public_key field to LighterConfigMap (mainnet + testnet) - Add lighter_perpetual_api_key_public_key field to LighterPerpetualConfigMap (mainnet + testnet) - Add lighter_perpetual_api_key_public_key optional param to LighterPerpetualDerivative.__init__() - All 4 connectors now consistently accept and use the public key credential - Fix connect_command.py to handle previous_keys kwarg correctly - Update all unit tests: 234 lighter tests pass, 6894/6895 full suite pass (1 failure is pre-existing decibel_perpetual unrelated to lighter)
…t orders, auth hardening, and test coverage improvements
- Fix F811 duplicate test method definitions in test_lighter_perpetual_derivative - Remove F401 unused import in perpetual derivative test - Fix false-cancel guard, partial-fill orphan, WS channel hardening - Fix perp balance available field, stale cross-margin freeze - Fix open order margin deduction local guard - Fix unmatched private event reconcile for perp - Add public key display in TUI connect command - Improve balance_command derivative validator - All 847 lighter connector tests pass, 82.76% coverage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before submitting this PR, please make sure:
A description of the changes proposed in the pull request:
Tests performed by the developer:
Tips for QA testing: