LighterApiKey

Documentation for eth_defi.lighter.api_key.LighterApiKey Python class.

class LighterApiKey

Bases: object

A locally generated Lighter API-key pair.

The private scalar is intentionally excluded from repr(). Store it only in an explicitly secret-bearing deployment report.

Attributes summary

api_key_index

Lighter API-key slot, 4 through 254.

private_key

40-byte little-endian private scalar, hex encoded with a 0x prefix.

public_key

40-byte little-endian ECgFp5 public key, hex encoded with a 0x prefix.

Methods summary

__init__(api_key_index, private_key, public_key)

api_key_index: int

Lighter API-key slot, 4 through 254.

private_key: str

40-byte little-endian private scalar, hex encoded with a 0x prefix.

public_key: str

40-byte little-endian ECgFp5 public key, hex encoded with a 0x prefix.

__init__(api_key_index, private_key, public_key)
Parameters
  • api_key_index (int) –

  • private_key (str) –

  • public_key (str) –

Return type

None