mirror of
https://github.com/floor-licker/polyfill-rs.git
synced 2026-08-17 14:38:07 +00:00
feat: Add EIP-712 signing for L1 authentication (src/auth.rs), HMAC-SHA256 for L2 API authentication, create_api_key(), derive_api_key(), create_or_derive_api_key(), Add set_api_creds() for credential management, Add create_order() and create_market_order() with EIP-712 signing, Add post_order() and create_and_post_order() for order submission, Add cancel(), cancel_orders(), cancel_all() for order management, Add OrderBuilder with proper tick size validation and rounding, Add get_orders() with filtering by ID, asset, market, Add get_trades() with filtering by time range, maker, asset, Add OpenOrderParams and TradeParams for query flexibility, Add balance_allowance() for balance and allowance queries, Add notifications() for push notification setup, Add get_midpoints() for efficient multi-token midpoint queries, Add get_prices() for batch bid/ask/mid price retrieval, Add BatchMidpointRequest/Response and BatchPriceRequest/Response types, Replace Decimal with u32 (Price) and i64 (Qty) on hot paths, Add decimal_to_price() and decimal_to_qty() conversion functions
This commit is contained in:
+7
-3
@@ -93,9 +93,11 @@ pub fn init() {
|
||||
|
||||
// Re-export main types
|
||||
pub use crate::types::{
|
||||
ApiCredentials, Balance, ClientConfig, FillEvent, MarketSnapshot, Order, OrderBook,
|
||||
OrderDelta, OrderRequest, OrderStatus, OrderType, Side, StreamMessage, WssAuth,
|
||||
WssSubscription, WssChannelType,
|
||||
ApiCredentials, Balance, BalanceAllowance, BatchMidpointRequest, BatchMidpointResponse,
|
||||
BatchPriceRequest, BatchPriceResponse, ClientConfig, FillEvent, MarketSnapshot,
|
||||
NotificationParams, OpenOrder, OpenOrderParams, Order, OrderBook, OrderDelta,
|
||||
OrderRequest, OrderStatus, OrderType, Side, StreamMessage, TokenPrice, TradeParams,
|
||||
WssAuth, WssSubscription, WssChannelType,
|
||||
};
|
||||
|
||||
// Re-export client
|
||||
@@ -121,11 +123,13 @@ pub use crate::utils::{
|
||||
};
|
||||
|
||||
// Module declarations
|
||||
pub mod auth;
|
||||
pub mod book;
|
||||
pub mod client;
|
||||
pub mod decode;
|
||||
pub mod errors;
|
||||
pub mod fill;
|
||||
pub mod orders;
|
||||
pub mod stream;
|
||||
pub mod types;
|
||||
pub mod utils;
|
||||
|
||||
Reference in New Issue
Block a user