Skip to content

UpdateAccountAssetConfig#150

Open
mihaimarcu2004 wants to merge 1 commit intomainfrom
UpdateAccountAssetConfig
Open

UpdateAccountAssetConfig#150
mihaimarcu2004 wants to merge 1 commit intomainfrom
UpdateAccountAssetConfig

Conversation

@mihaimarcu2004
Copy link
Copy Markdown
Contributor

@mihaimarcu2004 mihaimarcu2004 commented Apr 24, 2026

Summary

Python SDK support for the new UpdateAccountAssetConfig L2 tx (toggles whether an asset is used as margin for an account). Mirrors the changes in the corresponding lighter-go PR (elliottech/lighter-go#67) and ships rebuilt signer binaries.

Changes:

  • lighter/signer_client.py:
    • ctypes bindings for the new SignUpdateAccountAssetConfig export (int16, uint8, uint8, longlong, int, longlongSignedTxResponse).
    • New class constants ASSET_MARGIN_MODE_DISABLED = 0 and ASSET_MARGIN_MODE_ENABLED = 1.
    • New sign_update_account_asset_config(asset_index, asset_margin_mode, ...) and async update_account_asset_config(...) (decorated with @process_api_key_and_nonce, sends via send_tx).
  • lighter/signers/*: rebuilt prebuilt shared libraries for darwin-arm64, linux-amd64, linux-arm64, and windows-amd64, plus their generated .h headers (adds the SignUpdateAccountAssetConfig symbol).
  • examples/: new runnable examples enable_eth_as_margin.py, disable_eth_as_margin.py, and add_eth_margin.py (full flow: flip trading mode → enable ETH as margin → transfer spot→perp and wait for state change).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants