Skip to main content

Crate cow_types

Crate cow_types 

Source
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:

EnumPurpose
OrderKindSell / Buy direction
TokenBalanceErc20 / External / Internal balance source
SigningSchemeEip712 / EthSign / Eip1271 / PreSign
EcdsaSigningSchemeECDSA-only subset (Eip712 / EthSign)
PriceQualityFast / 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 CoW Protocol settlements.

Structs§

CowHook
A single CoW Protocol pre- or post-settlement interaction hook.
OnchainOrderData
On-chain placement metadata for orders submitted directly on-chain (as opposed to the off-chain API).
UnsignedOrder
An unsigned CoW Protocol order ready to be hashed and signed.

Enums§

EcdsaSigningScheme
ECDSA-only signing schemes (EIP-712 or EIP-191).
OrderKind
Whether to sell an exact input amount or buy an exact output amount.
PriceQuality
Quote price-quality hint passed to the orderbook.
SigningScheme
Signing scheme for a CoW Protocol order.
TokenBalance
The ERC-20 balance source/destination for sellToken and buyToken.