Orders
The Order interface represents a Gnosis Protocol v2 order with specific required fields for signing and settlement.
Order Interface
Order Types
Sell Orders
Specify an exact amount to sell with a minimum amount to receive:
Buy Orders
Specify an exact amount to receive with a maximum to spend:
Balance Management
Three balance modes are supported:
Utility Functions
normalizeOrder
Prepares orders for EIP-712 signing by converting Date objects to timestamps and normalizing optional fields.
hashOrder
Generates the EIP-712 hash needed for cryptographic signing.
computeOrderUid
Creates a 56-byte unique identifier combining order digest, owner address, and expiration.
Decodes order UID components back into individual parameters.
Constants
BUY_ETH_ADDRESS should only be used in the buyToken field. Using it elsewhere will cause unexpected behavior.