Level 1 EIP-712 authentication for CLOB API-key derivation.
Polymarket's current ClobAuth message includes nonce; omitting it produces
signatures that do not match the official v2 clients.
Summary
Functions
Builds L1 auth headers using the current Unix timestamp.
Builds L1 auth headers for an explicit, caller-supplied timestamp.
Signs a ClobAuth message and returns a 0x-prefixed Ethereum signature.
Functions
Builds L1 auth headers using the current Unix timestamp.
To supply your own timestamp, use headers_at/5. This arity intentionally
takes only the nonce as its last argument so a caller-supplied timestamp can
never be silently bound to the wrong positional and replaced by system time.
Builds L1 auth headers for an explicit, caller-supplied timestamp.
Prefer this over headers/4 whenever you need a specific timestamp: every
positional argument has a stable meaning here, so the timestamp can never be
mistaken for the nonce.
Signs a ClobAuth message and returns a 0x-prefixed Ethereum signature.