Expand description
App-data document types for CoW Protocol order metadata.
This module defines the Rust types that mirror the CoW Protocol’s
app-data JSON schema (currently v1.14.0). Every type serialises to /
deserialises from camelCase JSON via serde, matching the on-chain
format exactly.
§Type overview
| Type | Role |
|---|---|
AppDataDoc | Root document — version, app code, metadata |
Metadata | Container for all optional metadata fields |
OrderClassKind | market / limit / liquidity / twap |
CowHook | Pre- or post-settlement interaction hook |
PartnerFee | Single or multi-entry partner fee policy |
Quote | Slippage tolerance embedded in the order |
Referrer | Partner referral tracking address |
Utm | UTM campaign tracking parameters |
Bridging | Cross-chain bridge metadata |
Flashloan | Flash loan execution metadata |
Structs§
- AppData
Doc - Root document for
CoWProtocol order app-data (schema v1.14.0). - Bridging
- Cross-chain bridging metadata.
- CowHook
- A single
CoWProtocol pre- or post-settlement interaction hook. - Flashloan
- Flash loan metadata.
- Metadata
- Metadata container — all fields are optional.
- Order
Class - Wrapper for
OrderClassKindas it appears in the metadata schema. - Order
Interaction Hooks - Pre- and post-settlement interaction hooks.
- Partner
FeeEntry - A single partner fee policy entry (schema v1.14.0).
- Quote
- Quote-level slippage settings embedded in app-data.
- Replaced
Order - Links this order to a previously submitted order it supersedes.
- User
Consent - User acceptance record for terms of service.
- Utm
- UTM campaign tracking parameters.
- Widget
- Widget integration metadata.
- Wrapper
Entry - A single token wrapper entry.
Enums§
- Order
Class Kind - High-level classification of the order’s intent.
- Partner
Fee - Partner fee attached to a
CoWProtocol order (schema v1.14.0). - Referrer
- Partner referral tracking information.
Constants§
- LATEST_
APP_ DATA_ VERSION - Latest app-data schema version this crate targets.
- LATEST_
HOOKS_ METADATA_ VERSION - Latest version of the hooks metadata schema.
- LATEST_
ORDER_ CLASS_ METADATA_ VERSION - Latest version of the order class metadata schema.
- LATEST_
PARTNER_ FEE_ METADATA_ VERSION - Latest version of the partner fee metadata schema.
- LATEST_
QUOTE_ METADATA_ VERSION - Latest version of the quote metadata schema.
- LATEST_
REFERRER_ METADATA_ VERSION - Latest version of the referrer metadata schema.
- LATEST_
REPLACED_ ORDER_ METADATA_ VERSION - Latest version of the replaced order metadata schema.
- LATEST_
SIGNER_ METADATA_ VERSION - Latest version of the signer metadata schema.
- LATEST_
USER_ CONSENTS_ METADATA_ VERSION - Latest version of the user consents metadata schema.
- LATEST_
UTM_ METADATA_ VERSION - Latest version of the UTM metadata schema.
- LATEST_
WIDGET_ METADATA_ VERSION - Latest version of the widget metadata schema.
- LATEST_
WRAPPERS_ METADATA_ VERSION - Latest version of the wrappers metadata schema.
Functions§
- get_
partner_ fee_ bps - Extract the first
volumeBpsvalue from an optionalPartnerFee.