rs-order-utils
🦀 Rust implementation of Polymarket CLOB (Central Limit Order Book) order utilities with EIP-712 typed data signatures.
This library provides a complete Rust port of the TypeScript clob-order-utils package, enabling you to create and sign Polymarket exchange orders using EIP-712 standard.
Installation
Add this to your Cargo.toml:
[]
= "0.2.1"
= "0.8"
= "0.8"
= { = "1.0", = ["full"] }
Quick Start
use ;
use PrivateKeySigner;
use ;
async
Usage
# Run examples
# Run tests
# Run tests with output
Security Considerations
- 🔒 Private Keys: Never hardcode private keys. Use environment variables or secure key management
- 🔐 EIP-712: All orders are signed using EIP-712 to prevent phishing attacks
- ✅ Signer Verification: The builder verifies that the signer matches the wallet address
- 🛡️ Domain Separation: Orders are bound to specific chain and contract addresses
Notice
⚠️ AI-Generated Code: This library was generated with AI assistance. While it has been tested, users should:
- Review the code thoroughly before using in production
- Conduct their own security audits
- Test extensively with their specific use cases
- Use at their own risk
License
MIT
Acknowledgments
- Original TypeScript implementation: Polymarket clob-order-utils
- Built with Alloy - the modern Ethereum Rust library
Made with 🦀 by the Polymarket community