Expand description
cow-types — Layer 1 protocol enums and shared types for the CoW Protocol SDK.
This crate defines the protocol-level enums used across the workspace:
| Enum | Purpose |
|---|---|
OrderKind | Sell / Buy direction |
TokenBalance | Erc20 / External / Internal balance source |
SigningScheme | Eip712 / EthSign / Eip1271 / PreSign |
EcdsaSigningScheme | ECDSA-only subset (Eip712 / EthSign) |
PriceQuality | Fast / Optimal / Verified quote hint |
Numeric constants (ZERO, ONE, MAX_UINT256, …) live in
cow-primitives.
Modules§
- flags
- Bitfield encoding and decoding of order and trade flags.
- trade
- Trade and swap encoding for
CoWProtocol settlements.
Structs§
- CowHook
- A single
CoWProtocol pre- or post-settlement interaction hook. - Onchain
Order Data - On-chain placement metadata for orders submitted directly on-chain (as opposed to the off-chain API).
- Unsigned
Order - An unsigned
CoWProtocol order ready to be hashed and signed.
Enums§
- Ecdsa
Signing Scheme - ECDSA-only signing schemes (EIP-712 or EIP-191).
- Order
Kind - Whether to sell an exact input amount or buy an exact output amount.
- Price
Quality - Quote price-quality hint passed to the orderbook.
- Signing
Scheme - Signing scheme for a
CoWProtocol order. - Token
Balance - The ERC-20 balance source/destination for
sellTokenandbuyToken.