generate_lighter_api_key
Documentation for eth_defi.lighter.api_key.generate_lighter_api_key function.
- generate_lighter_api_key(api_key_index=4)
Generate a Lighter API-key pair for deployment registration.
Uses Python’s cryptographic random source for a non-zero scalar and derives only its public key locally. The caller must register the public key on L1 before using the private key for Lighter trading.
- Parameters
api_key_index (int) – Lighter API-key slot in the user range 4 through 254.
- Returns
A private/public API-key pair. Its private key is not included in
repr().- Return type