PolymarketClob.Order.Signing (PolymarketClob v0.2.0)

Copy Markdown View Source

EIP-712 signing for Polymarket CLOB exchange orders.

This module signs fully specified order maps. Use PolymarketClob.Order.Builder for Python-parity amount calculation and local limit/market order construction.

Summary

Functions

Returns the EIP-712 order hash used by the official Python client.

Signs an unsigned order with the supplied exchange domain.

Returns official-client-compatible EIP-712 typed data for an unsigned order.

Functions

order_hash(order, chain_id, exchange_address)

@spec order_hash(map(), integer(), String.t()) :: String.t()

Returns the EIP-712 order hash used by the official Python client.

sign(order, private_key, chain_id, exchange_address)

@spec sign(map(), String.t() | binary(), integer(), String.t()) :: String.t()

Signs an unsigned order with the supplied exchange domain.

typed_data(order, chain_id, exchange_address)

@spec typed_data(map(), integer(), String.t()) :: map()

Returns official-client-compatible EIP-712 typed data for an unsigned order.