This SDK handles private keys, HMAC secrets, and order signing for real financial transactions.
If you discover a security vulnerability, do NOT open a public issue. Instead:
- Email: create a private security advisory on GitHub
- Include: description, reproduction steps, and potential impact
- We will respond within 48 hours
Security-relevant areas of this SDK:
- Private key handling (
crypto/signer.hpp) — key zeroing, memory safety - HMAC signing (
crypto/hmac.hpp) — secret storage, OpenSSL usage - V1 order signing (
order/order_builder.hpp) — EIP-712 domain version"1", legacy CTF Exchange0x4bFb…982E, sig types EOA/PolyProxy/PolyGnosisSafe - V2 order signing (
order/order_builder.hpp) — EIP-712 domain version"2", V2 CTF Exchange0xE111…996B(neg-risk0xe222…0F59), addsSignatureType::Poly1271 = 3for EIP-1271 smart-contract wallets,timestamp/metadata/builderfields signed into the order hash - TLS/SSL (
http_client.hpp,ws_client.cpp) — certificate verification, redirects only followed up toMAXREDIRS=3(V2 hostclob-v2301-redirects toclob.polymarket.com) - Salt generation (
order_builder.hpp) — CSPRNG quality
- Private keys zeroed on
Signerdestruction and move (OPENSSL_cleanse) - HMAC secrets decoded once, key material cleaned after use
SSL_VERIFY_PEERenabled for all TLS connections; libcurl stripsAuthorizationon cross-origin redirects by default- Salt generated via OS CSPRNG (
std::random_device), masked to 53 bits - No secrets logged or included in error messages
- Input validation on addresses (length check), token IDs (digit-only), decimals (non-negative)
- EIP-1271 (
Poly1271) signature path is V2-only — the SDK never sends asignatureType=3order against a V1 exchange (sign_order_v2selects the V2 verifying contract viacontract_config_v2)