validate_lighter_pubkey
Documentation for eth_defi.lighter.pubkey.validate_lighter_pubkey function.
- validate_lighter_pubkey(pubkey)
Validate a Lighter API-key public key client-side.
Mirrors the on-chain checks in
ZkLighter.changePubKeyso callers fail fast before submitting a transaction: the pubkey must be exactlyPUB_KEY_BYTES_SIZEbytes, each 8-byte little-endian limb must be strictly belowGOLDILOCKS_MODULUS, and it must not be all-zero.- Parameters
pubkey (bytes) – The API-key public key, as produced by the Lighter SDK.
- Raises
ValueError – If the pubkey is malformed.
- Return type
None