LighterAPIConfig
Documentation for eth_defi.lighter.constants.LighterAPIConfig Python class.
- class LighterAPIConfig
Bases:
objectConfiguration for one independently indexed Lighter deployment.
Lighter account indexes are only unique within a deployment. In particular, account
281474976710654exists on both Ethereum Lighter and Robinhood Lighter, so downstream storage must always pair an account index withslug.Attributes summary
Stable storage identifier for the deployment.
Human-readable scanner and scheduling name.
Synthetic vault-dataset chain ID.
Real EVM chain associated with this deployment.
REST API base URL.
Web application base URL used for vault links.
Synthetic vault address prefix.
Pool collateral symbol.
Public-pool withdrawal cooldown reported by
systemConfig.Canonical LLP account override for deployments with unreliable system configuration.
Return the PyArrow regex for this deployment's pool addresses.
Methods summary
__init__(slug, name, chain_id, ...[, ...])format_pool_address(account_index)Create a globally unique synthetic pool address.
format_pool_link(account_index)Create the deployment-specific public-pool application link.
matches_pool_address(address)Check whether a synthetic pool address belongs to this deployment.
- slug: str
Stable storage identifier for the deployment.
- name: str
Human-readable scanner and scheduling name.
- chain_id: int
Synthetic vault-dataset chain ID.
This remains the primary identity used for price partitions and
VaultSpecrecords.
- deployment_chain_id: int
Real EVM chain associated with this deployment.
Do not use this value as the Lighter vault’s primary
chain_id. The syntheticchain_idis still required to keep native Lighter price rows separate from ordinary ERC-4626 vaults. Both Lighter deployments share that synthetic ID and use deployment-specific address prefixes for uniqueness. For now this second chain ID supports Lighter on Robinhood in downstream lifetime-metrics exports.
- api_url: str
REST API base URL.
- app_url: str
Web application base URL used for vault links.
- address_prefix: str
Synthetic vault address prefix.
Deployment-specific prefixes prevent address-only metadata rules from leaking between deployments.
- denomination: str
Pool collateral symbol.
- lockup: datetime.timedelta
Public-pool withdrawal cooldown reported by
systemConfig.
- llp_account_index_override: Optional[int]
Canonical LLP account override for deployments with unreliable system configuration.
NonetrustssystemConfig. For now only Lighter on Robinhood uses an override because its live system configuration points at an uninitialised account.
- format_pool_address(account_index)
Create a globally unique synthetic pool address.
- Parameters
account_index (int) – Deployment-local Lighter account index.
- Returns
Synthetic address accepted by
eth_defi.vault.base.VaultSpec.- Return type
- format_pool_link(account_index)
Create the deployment-specific public-pool application link.
- matches_pool_address(address)
Check whether a synthetic pool address belongs to this deployment.
A numeric suffix is required because the backwards-compatible Ethereum prefix
lighter-poolis also the beginning of the Robinhood prefixlighter-pool-robinhood. This exact check lets partial price merges distinguish the two deployments without relying on prefix ordering.
- property pool_address_pattern: str
Return the PyArrow regex for this deployment’s pool addresses.
- Returns
Anchored regular expression matching synthetic pool addresses.
- __init__(slug, name, chain_id, deployment_chain_id, api_url, app_url, address_prefix, denomination, lockup, llp_account_index_override=None)