/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/@cowprotocol/sdk-app-data@5.0.0/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__glob=e=>t=>{var i=e[t];if(i)return i();throw new Error("Module not found in bundle: "+t)},__commonJS=(e,t)=>function(){return t||(0,e[__getOwnPropNames(e)[0]])((t={exports:{}}).exports,t),t.exports},__export=(e,t)=>{for(var i in t)__defProp(e,i,{get:t[i],enumerable:!0})},__copyProps=(e,t,i,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of __getOwnPropNames(t))__hasOwnProp.call(e,o)||o===i||__defProp(e,o,{get:()=>t[o],enumerable:!(r=__getOwnPropDesc(t,o))||r.enumerable});return e},__toESM=(e,t,i)=>(i=null!=e?__create(__getProtoOf(e)):{},__copyProps(!t&&e&&e.__esModule?i:__defProp(i,"default",{value:e,enumerable:!0}),e)),__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),require_v0_1_0=__commonJS({"schemas/v0.1.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",properties:{version:{readOnly:!0,default:"0.1.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",properties:{referrer:{$id:"#referrer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","address"],title:"Referrer",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}}}}}}}}),require_v0_10_0=__commonJS({"schemas/v0.10.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.10.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"0.10.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{$id:"#/properties/slippageBips",title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS)",examples:["5","10","20","100"],pattern:"^\\d+(\\.\\d+)?$",type:"string"}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/referrer/properties/address",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}}}}}}}}),require_v0_11_0=__commonJS({"schemas/v0.11.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.11.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"0.11.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{$id:"#/properties/slippageBips",title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS)",examples:["5","10","20","100"],pattern:"^\\d+(\\.\\d+)?$",type:"string"}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/referrer/properties/address",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}}}}}}}}),require_v0_2_0=__commonJS({"schemas/v0.2.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",properties:{version:{readOnly:!0,default:"0.2.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",properties:{referrer:{$id:"#referrer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","address"],title:"Referrer",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},quote:{$id:"#quote/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["sellAmount","buyAmount","version"],title:"Quote",type:"object",properties:{id:{$id:"#/properties/id",title:"Quote id",examples:["XA23443543534FF"],type:"string"},sellAmount:{$ref:"#/properties/metadata/properties/quote/properties/buyAmount",title:"Quote sell amount"},buyAmount:{title:"Quote buy amount",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"}}}}}}}}}),require_v0_3_0=__commonJS({"schemas/v0.3.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",properties:{version:{readOnly:!0,default:"0.3.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",properties:{referrer:{$id:"#referrer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","address"],title:"Referrer",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},quote:{$id:"#quote/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["sellAmount","buyAmount","version"],title:"Quote",type:"object",properties:{id:{$id:"#/properties/id",title:"Quote id",examples:["XA23443543534FF"],type:"string"},sellAmount:{$ref:"#/properties/metadata/properties/quote/properties/buyAmount",title:"Quote sell amount"},buyAmount:{title:"Quote buy amount",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"}}}}}}}}}),require_v0_4_0=__commonJS({"schemas/v0.4.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.4.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",properties:{version:{readOnly:!0,default:"0.4.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",properties:{referrer:{$id:"#referrer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","address"],title:"Referrer",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},quote:{$id:"#quote/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","slippageBips"],title:"Quote",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},slippageBips:{$id:"#/properties/slippageBips",title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS)",examples:["5","10","20","100"],pattern:"^\\d+(\\.\\d+)?$",type:"string"}}}}}}}}}),require_v0_5_0=__commonJS({"schemas/v0.5.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.5.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",properties:{version:{readOnly:!0,default:"0.5.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",properties:{referrer:{$id:"#referrer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","address"],title:"Referrer",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},quote:{$id:"#quote/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","slippageBips"],title:"Quote",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},slippageBips:{$id:"#/properties/slippageBips",title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS)",examples:["5","10","20","100"],pattern:"^\\d+(\\.\\d+)?$",type:"string"}}},orderClass:{$id:"#orderClass/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","orderClass"],title:"Order class",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity"],title:"Order class",type:"string",enum:["market","limit","liquidity"]}}}}}}}}}),require_v0_6_0=__commonJS({"schemas/v0.6.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.6.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",properties:{version:{readOnly:!0,default:"0.6.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",properties:{referrer:{$id:"#referrer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","address"],title:"Referrer",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},utm:{$id:"#utm/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","slippageBips"],title:"Quote",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},slippageBips:{$id:"#/properties/slippageBips",title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS)",examples:["5","10","20","100"],pattern:"^\\d+(\\.\\d+)?$",type:"string"}}},orderClass:{$id:"#orderClass/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","orderClass"],title:"Order class",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity"],title:"Order class",type:"string",enum:["market","limit","liquidity"]}}}}}}}}}),require_v0_7_0=__commonJS({"schemas/v0.7.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.7.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",properties:{version:{readOnly:!0,default:"0.7.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",properties:{referrer:{$id:"#referrer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","address"],title:"Referrer",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},utm:{$id:"#utm/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","slippageBips"],title:"Quote",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},slippageBips:{$id:"#/properties/slippageBips",title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS)",examples:["5","10","20","100"],pattern:"^\\d+(\\.\\d+)?$",type:"string"}}},orderClass:{$id:"#orderClass/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["version","orderClass"],title:"Order class",type:"object",properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}}}}}}}}),require_v0_8_0=__commonJS({"schemas/v0.8.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.8.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"0.8.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{$id:"#/properties/slippageBips",title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS)",examples:["5","10","20","100"],pattern:"^\\d+(\\.\\d+)?$",type:"string"}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}}}}}}}}),require_v0_9_0=__commonJS({"schemas/v0.9.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v0.9.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"0.9.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{$id:"#/properties/slippageBips",title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS)",examples:["5","10","20","100"],pattern:"^\\d+(\\.\\d+)?$",type:"string"}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/referrer/properties/address",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}}}}}}}}),require_v1_0_0=__commonJS({"schemas/v1.0.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.0.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$ref:"#/properties/metadata/properties/partnerFee/properties/bps"}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/referrer/properties/address",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["bps","recipient"],title:"Partner fee",type:"object",additionalProperties:!1,properties:{bps:{title:"Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner. One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$ref:"#/properties/metadata/properties/referrer/properties/address"}}}}}}}}}),require_v1_1_0=__commonJS({"schemas/v1.1.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.1.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$ref:"#/properties/metadata/properties/partnerFee/properties/bps"}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/referrer/properties/address",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["bps","recipient"],title:"Partner fee",type:"object",additionalProperties:!1,properties:{bps:{title:"Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner. One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$ref:"#/properties/metadata/properties/referrer/properties/address"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}}}}}}}}),require_v1_10_0=__commonJS({"schemas/v1.10.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.10.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.10.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Referrer address"}}},utm:{$id:"#utm/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampaign",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTerm",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{$ref:"#/properties/metadata/properties/bridging/properties/providerId",title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook."}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}},bridging:{$id:"#bridging/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["providerId","destinationChainId","destinationTokenAddress"],title:"Bridging",type:"object",additionalProperties:!1,properties:{providerId:{title:"Id of bridging provider",description:"The id links order with a bridging provider which processes it",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1},destinationChainId:{title:"Bridging destination chainId",description:"Id of a blockchain where funds will be received",$id:"#/definitions/chainId",pattern:"^[a-zA-Z0-9\\-_]{1,32}$",examples:["1","100","hedera-hashgraph"],type:"string"},destinationTokenAddress:{title:"Bridging destination token address",description:"Address of a token that will be received at destination chain. The chain might be EVM or non-EVM. Some chains might even not have a token address. E.g.: Bitcoin",type:"string",pattern:"^[a-zA-Z0-9\\-.]{1,64}$",examples:["0x00E989b87700514118Fa55326CD1cCE82faebEF6","A.b19436aae4d94622.FiatToken","0.0.456858","1337"]},quoteId:{title:"Bridge provider quote id",description:"An ID of a quote which is used for bridging",type:"string",examples:["60012"]},quoteSignature:{title:"Bridge provider quote signature",description:"Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity",type:"string",examples:["ed25519:Y54QM45ockDtJf3uAVhV8xndF79GPeQW5fJaZZLKfnaj8mW9NaBDsGg3uVXY1Fge73fYDAsdn9qokhjm2rsJATz"]}}},flashloan:{$id:"#flashloan/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Flashloan",description:"Information about flashloan parameters for the order",type:"object",required:["amount","liquidityProvider","protocolAdapter","receiver","token"],properties:{amount:{title:"Loan amount",description:"The amount of tokens to be flash loaned (in token units, as uint256)",$id:"#/definitions/bigPositiveNumber",pattern:"^[1-9]\\d*$",examples:["90741097240912730913","75891372","1"],type:"string"},liquidityProvider:{title:"Liquidity provider address",description:"The Ethereum address of the flashloan liquidity provider",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},protocolAdapter:{title:"Protocol adapter address",description:"The Ethereum address of the protocol adapter",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},receiver:{title:"Receiver address",description:"The Ethereum address of the flashloan receiver",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},token:{title:"Token address",description:"The Ethereum address of the token being borrowed",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}}}}}}}),require_v1_11_0=__commonJS({"schemas/v1.11.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.11.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.11.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Referrer address"}}},utm:{$id:"#utm/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampaign",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTerm",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{$ref:"#/properties/metadata/properties/bridging/properties/providerId",title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook."}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}},bridging:{$id:"#bridging/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["providerId","destinationChainId","destinationTokenAddress"],title:"Bridging",type:"object",additionalProperties:!1,properties:{providerId:{title:"Id of bridging provider",description:"The id links order with a bridging provider which processes it",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1},destinationChainId:{title:"Bridging destination chainId",description:"Id of a blockchain where funds will be received",$id:"#/definitions/chainId",pattern:"^[a-zA-Z0-9\\-_]{1,32}$",examples:["1","100","hedera-hashgraph"],type:"string"},destinationTokenAddress:{title:"Bridging destination token address",description:"Address of a token that will be received at destination chain. The chain might be EVM or non-EVM. Some chains might even not have a token address. E.g.: Bitcoin",type:"string",pattern:"^[a-zA-Z0-9\\-.]{1,64}$",examples:["0x00E989b87700514118Fa55326CD1cCE82faebEF6","A.b19436aae4d94622.FiatToken","0.0.456858","1337"]},quoteId:{title:"Bridge provider quote id",description:"An ID of a quote which is used for bridging",type:"string",examples:["60012"]},quoteSignature:{title:"Bridge provider quote signature",description:"Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity",type:"string",examples:["ed25519:Y54QM45ockDtJf3uAVhV8xndF79GPeQW5fJaZZLKfnaj8mW9NaBDsGg3uVXY1Fge73fYDAsdn9qokhjm2rsJATz"]}}},flashloan:{$id:"#flashloan/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Flashloan",description:"Information about flashloan parameters for the order",type:"object",required:["amount","liquidityProvider","protocolAdapter","receiver","token"],properties:{amount:{title:"Loan amount",description:"The amount of tokens to be flash loaned (in token units, as uint256)",$id:"#/definitions/bigPositiveNumber",pattern:"^[1-9]\\d*$",examples:["90741097240912730913","75891372","1"],type:"string"},liquidityProvider:{title:"Liquidity provider address",description:"The Ethereum address of the flashloan liquidity provider",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},protocolAdapter:{title:"Protocol adapter address",description:"The Ethereum address of the protocol adapter",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},receiver:{title:"Receiver address",description:"The Ethereum address of the flashloan receiver",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},token:{title:"Token address",description:"The Ethereum address of the token being borrowed",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},wrappers:{$id:"#wrappers/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Wrappers",description:"Information about wrappers to execute for the order",type:"array",items:{title:"Wrapper Entry",description:"Information about an individual wrapper to execute for the order",type:"object",required:["address"],properties:{address:{title:"Wrapper address",description:"The Ethereum address of the wrapper to execute",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},data:{title:"Wrapper data",description:"Any additional data. The format of this data will vary depending on the wrapper you are calling. If left unspecified, this field defaults to 0x (empty wrapper data)",$id:"#/definitions/hexData",pattern:"^0x[a-f0-9]*$",examples:["0x","0x1","0xfac282674bbdb"],type:"string"},is_omittable:{title:"Is Omittable",description:"Whether or not this wrapper must be executed exactly as given with the order. If left unspecified, this field defaults to `false` (wrapper data must be executed with the order exactly as given)",type:"boolean"}},additionalProperties:!1}}}}}}}}),require_v1_12_0=__commonJS({"schemas/v1.12.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.12.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.12.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Referrer address"}}},utm:{$id:"#utm/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampaign",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTerm",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{$ref:"#/properties/metadata/properties/bridging/properties/providerId",title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook."}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}},bridging:{$id:"#bridging/v0.4.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["providerId","destinationChainId","destinationTokenAddress"],title:"Bridging",type:"object",additionalProperties:!1,properties:{providerId:{title:"Id of bridging provider",description:"The id links order with a bridging provider which processes it",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1},destinationChainId:{title:"Bridging destination chainId",description:"Id of a blockchain where funds will be received",$id:"#/definitions/chainId",pattern:"^[a-zA-Z0-9\\-_]{1,32}$",examples:["1","100","hedera-hashgraph"],type:"string"},destinationTokenAddress:{title:"Bridging destination token address",description:"Address of a token that will be received at destination chain. The chain might be EVM or non-EVM. Some chains might even not have a token address. E.g.: Bitcoin",type:"string",pattern:"^[a-zA-Z0-9\\-.]{1,64}$",examples:["0x00E989b87700514118Fa55326CD1cCE82faebEF6","A.b19436aae4d94622.FiatToken","0.0.456858","1337"]},quoteId:{title:"Bridge provider quote id",description:"An ID of a quote which is used for bridging",type:"string",examples:["60012"]},quoteSignature:{title:"Bridge provider quote signature",description:"Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity",type:"string",examples:["ed25519:Y54QM45ockDtJf3uAVhV8xndF79GPeQW5fJaZZLKfnaj8mW9NaBDsGg3uVXY1Fge73fYDAsdn9qokhjm2rsJATz"]},attestationSignature:{title:"Bridge provider attestation signature",description:"For ReceiverAccountBridgeProvider, this is the attestation signature from the bridge provider that validates the deposit address. Empty for other provider types.",type:"string",examples:["0x1234567890abcdef..."]},quoteBody:{title:"Bridge provider quote body",description:"A stringified JSON of quote which is associated with the order.",type:"string",examples:['{"dry":false,"swapType":"EXACT_INPUT","slippageTolerance":100,...}']}}},flashloan:{$id:"#flashloan/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Flashloan",description:"Information about flashloan parameters for the order",type:"object",required:["amount","liquidityProvider","protocolAdapter","receiver","token"],properties:{amount:{title:"Loan amount",description:"The amount of tokens to be flash loaned (in token units, as uint256)",$id:"#/definitions/bigPositiveNumber",pattern:"^[1-9]\\d*$",examples:["90741097240912730913","75891372","1"],type:"string"},liquidityProvider:{title:"Liquidity provider address",description:"The Ethereum address of the flashloan liquidity provider",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},protocolAdapter:{title:"Protocol adapter address",description:"The Ethereum address of the protocol adapter",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},receiver:{title:"Receiver address",description:"The Ethereum address of the flashloan receiver",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},token:{title:"Token address",description:"The Ethereum address of the token being borrowed",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},wrappers:{$id:"#wrappers/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Wrappers",description:"Information about wrappers to execute for the order",type:"array",items:{title:"Wrapper Entry",description:"Information about an individual wrapper to execute for the order",type:"object",required:["address"],properties:{address:{title:"Wrapper address",description:"The Ethereum address of the wrapper to execute",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},data:{title:"Wrapper data",description:"Any additional data. The format of this data will vary depending on the wrapper you are calling. If left unspecified, this field defaults to 0x (empty wrapper data)",$id:"#/definitions/hexData",pattern:"^0x[a-f0-9]*$",examples:["0x","0x1","0xfac282674bbdb"],type:"string"},is_omittable:{title:"Is Omittable",description:"Whether or not this wrapper must be executed exactly as given with the order. If left unspecified, this field defaults to `false` (wrapper data must be executed with the order exactly as given)",type:"boolean"}},additionalProperties:!1}},userConsents:{$id:"#userConsents/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"User Consents",description:"Array of user consents for terms acceptance",type:"array",items:{type:"object",required:["terms","acceptedDate"],additionalProperties:!1,properties:{terms:{$id:"#/properties/terms",type:"string",description:"IPFS hash of the accepted terms",examples:["QmYwAPJzv5CZsnAzt8auVZRn5DfvPYg8X7yGvkb5sNqBmV"]},acceptedDate:{$id:"#/properties/acceptedDate",type:"string",description:"ISO 8601 date-time when user accepted the terms in the UI",examples:["2025-11-11T23:00:00Z"]}}}}}}}}}}),require_v1_13_0=__commonJS({"schemas/v1.13.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.13.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.13.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Referrer address"}}},utm:{$id:"#utm/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampaign",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTerm",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{$ref:"#/properties/metadata/properties/bridging/properties/providerId",title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook."}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}},bridging:{$id:"#bridging/v0.4.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["providerId","destinationChainId","destinationTokenAddress"],title:"Bridging",type:"object",additionalProperties:!1,properties:{providerId:{title:"Id of bridging provider",description:"The id links order with a bridging provider which processes it",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1},destinationChainId:{title:"Bridging destination chainId",description:"Id of a blockchain where funds will be received",$id:"#/definitions/chainId",pattern:"^[a-zA-Z0-9\\-_]{1,32}$",examples:["1","100","hedera-hashgraph"],type:"string"},destinationTokenAddress:{title:"Bridging destination token address",description:"Address of a token that will be received at destination chain. The chain might be EVM or non-EVM. Some chains might even not have a token address. E.g.: Bitcoin",type:"string",pattern:"^[a-zA-Z0-9\\-.]{1,64}$",examples:["0x00E989b87700514118Fa55326CD1cCE82faebEF6","A.b19436aae4d94622.FiatToken","0.0.456858","1337"]},quoteId:{title:"Bridge provider quote id",description:"An ID of a quote which is used for bridging",type:"string",examples:["60012"]},quoteSignature:{title:"Bridge provider quote signature",description:"Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity",type:"string",examples:["ed25519:Y54QM45ockDtJf3uAVhV8xndF79GPeQW5fJaZZLKfnaj8mW9NaBDsGg3uVXY1Fge73fYDAsdn9qokhjm2rsJATz"]},attestationSignature:{title:"Bridge provider attestation signature",description:"For ReceiverAccountBridgeProvider, this is the attestation signature from the bridge provider that validates the deposit address. Empty for other provider types.",type:"string",examples:["0x1234567890abcdef..."]},quoteBody:{title:"Bridge provider quote body",description:"A stringified JSON of quote which is associated with the order.",type:"string",examples:['{"dry":false,"swapType":"EXACT_INPUT","slippageTolerance":100,...}']}}},flashloan:{$id:"#flashloan/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Flashloan",description:"Information about flashloan parameters for the order",type:"object",required:["amount","liquidityProvider","protocolAdapter","receiver","token"],properties:{amount:{title:"Loan amount",description:"The amount of tokens to be flash loaned (in token units, as uint256)",$id:"#/definitions/bigPositiveNumber",pattern:"^[1-9]\\d*$",examples:["90741097240912730913","75891372","1"],type:"string"},liquidityProvider:{title:"Liquidity provider address",description:"The Ethereum address of the flashloan liquidity provider",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},protocolAdapter:{title:"Protocol adapter address",description:"The Ethereum address of the protocol adapter",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},receiver:{title:"Receiver address",description:"The Ethereum address of the flashloan receiver",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},token:{title:"Token address",description:"The Ethereum address of the token being borrowed",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},wrappers:{$id:"#wrappers/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Wrappers",description:"Information about wrappers to execute for the order",type:"array",items:{title:"Wrapper Entry",description:"Information about an individual wrapper to execute for the order",type:"object",required:["address"],properties:{address:{title:"Wrapper address",description:"The Ethereum address of the wrapper to execute",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},data:{title:"Wrapper data",description:"Any additional data. The format of this data will vary depending on the wrapper you are calling. If left unspecified, this field defaults to 0x (empty wrapper data)",$id:"#/definitions/hexData",pattern:"^0x[a-f0-9]*$",examples:["0x","0x1","0xfac282674bbdb"],type:"string"},isOmittable:{title:"Is Omittable",description:"Whether or not this wrapper must be executed exactly as given with the order. If left unspecified, this field defaults to `false` (wrapper data must be executed with the order exactly as given)",type:"boolean"}},additionalProperties:!1}},userConsents:{$id:"#userConsents/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"User Consents",description:"Array of user consents for terms acceptance",type:"array",items:{type:"object",required:["terms","acceptedDate"],additionalProperties:!1,properties:{terms:{$id:"#/properties/terms",type:"string",description:"IPFS hash of the accepted terms",examples:["QmYwAPJzv5CZsnAzt8auVZRn5DfvPYg8X7yGvkb5sNqBmV"]},acceptedDate:{$id:"#/properties/acceptedDate",type:"string",description:"ISO 8601 date-time when user accepted the terms in the UI",examples:["2025-11-11T23:00:00Z"]}}}}}}}}}}),require_v1_14_0=__commonJS({"schemas/v1.14.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.14.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.14.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Referrer",type:"object",additionalProperties:!1,required:["code"],properties:{code:{type:"string",title:"Referrer code",description:"Affiliate/referral code (case-insensitive, stored uppercase).",pattern:"^[A-Z0-9_-]{5,20}$"}}},utm:{$id:"#utm/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampaign",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTerm",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{$ref:"#/properties/metadata/properties/bridging/properties/providerId",title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook."}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}},bridging:{$id:"#bridging/v0.4.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["providerId","destinationChainId","destinationTokenAddress"],title:"Bridging",type:"object",additionalProperties:!1,properties:{providerId:{title:"Id of bridging provider",description:"The id links order with a bridging provider which processes it",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1},destinationChainId:{title:"Bridging destination chainId",description:"Id of a blockchain where funds will be received",$id:"#/definitions/chainId",pattern:"^[a-zA-Z0-9\\-_]{1,32}$",examples:["1","100","hedera-hashgraph"],type:"string"},destinationTokenAddress:{title:"Bridging destination token address",description:"Address of a token that will be received at destination chain. The chain might be EVM or non-EVM. Some chains might even not have a token address. E.g.: Bitcoin",type:"string",pattern:"^[a-zA-Z0-9\\-.]{1,64}$",examples:["0x00E989b87700514118Fa55326CD1cCE82faebEF6","A.b19436aae4d94622.FiatToken","0.0.456858","1337"]},quoteId:{title:"Bridge provider quote id",description:"An ID of a quote which is used for bridging",type:"string",examples:["60012"]},quoteSignature:{title:"Bridge provider quote signature",description:"Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity",type:"string",examples:["ed25519:Y54QM45ockDtJf3uAVhV8xndF79GPeQW5fJaZZLKfnaj8mW9NaBDsGg3uVXY1Fge73fYDAsdn9qokhjm2rsJATz"]},attestationSignature:{title:"Bridge provider attestation signature",description:"For ReceiverAccountBridgeProvider, this is the attestation signature from the bridge provider that validates the deposit address. Empty for other provider types.",type:"string",examples:["0x1234567890abcdef..."]},quoteBody:{title:"Bridge provider quote body",description:"A stringified JSON of quote which is associated with the order.",type:"string",examples:['{"dry":false,"swapType":"EXACT_INPUT","slippageTolerance":100,...}']}}},flashloan:{$id:"#flashloan/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Flashloan",description:"Information about flashloan parameters for the order",type:"object",required:["amount","liquidityProvider","protocolAdapter","receiver","token"],properties:{amount:{title:"Loan amount",description:"The amount of tokens to be flash loaned (in token units, as uint256)",$id:"#/definitions/bigPositiveNumber",pattern:"^[1-9]\\d*$",examples:["90741097240912730913","75891372","1"],type:"string"},liquidityProvider:{title:"Liquidity provider address",description:"The Ethereum address of the flashloan liquidity provider",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},protocolAdapter:{title:"Protocol adapter address",description:"The Ethereum address of the protocol adapter",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},receiver:{title:"Receiver address",description:"The Ethereum address of the flashloan receiver",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},token:{title:"Token address",description:"The Ethereum address of the token being borrowed",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},wrappers:{$id:"#wrappers/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Wrappers",description:"Information about wrappers to execute for the order",type:"array",items:{title:"Wrapper Entry",description:"Information about an individual wrapper to execute for the order",type:"object",required:["address"],properties:{address:{title:"Wrapper address",description:"The Ethereum address of the wrapper to execute",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},data:{title:"Wrapper data",description:"Any additional data. The format of this data will vary depending on the wrapper you are calling. If left unspecified, this field defaults to 0x (empty wrapper data)",$id:"#/definitions/hexData",pattern:"^0x[a-f0-9]*$",examples:["0x","0x1","0xfac282674bbdb"],type:"string"},isOmittable:{title:"Is Omittable",description:"Whether or not this wrapper must be executed exactly as given with the order. If left unspecified, this field defaults to `false` (wrapper data must be executed with the order exactly as given)",type:"boolean"}},additionalProperties:!1}},userConsents:{$id:"#userConsents/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"User Consents",description:"Array of user consents for terms acceptance",type:"array",items:{type:"object",required:["terms","acceptedDate"],additionalProperties:!1,properties:{terms:{$id:"#/properties/terms",type:"string",description:"IPFS hash of the accepted terms",examples:["QmYwAPJzv5CZsnAzt8auVZRn5DfvPYg8X7yGvkb5sNqBmV"]},acceptedDate:{$id:"#/properties/acceptedDate",type:"string",description:"ISO 8601 date-time when user accepted the terms in the UI",examples:["2025-11-11T23:00:00Z"]}}}}}}}}}}),require_v1_2_0=__commonJS({"schemas/v1.2.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.2.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.2.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$ref:"#/properties/metadata/properties/partnerFee/properties/bps"},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.1.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/referrer/properties/address",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["bps","recipient"],title:"Partner fee",type:"object",additionalProperties:!1,properties:{bps:{title:"Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner. One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$ref:"#/properties/metadata/properties/referrer/properties/address"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}}}}}}}}),require_v1_3_0=__commonJS({"schemas/v1.3.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.3.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.3.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{title:"Referrer address",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$ref:"#/properties/metadata/properties/partnerFee/properties/bps"},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/referrer/properties/address",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook.",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["bps","recipient"],title:"Partner fee",type:"object",additionalProperties:!1,properties:{bps:{title:"Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner. One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$ref:"#/properties/metadata/properties/referrer/properties/address"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}}}}}}}}),require_v1_4_0=__commonJS({"schemas/v1.4.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.4.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.4.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Referrer address"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook.",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}}}}}}}}),require_v1_5_0=__commonJS({"schemas/v1.5.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.5.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.5.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Referrer address"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook.",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}},bridging:{$id:"#bridging/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["destinationChainId","destinationTokenAddress"],title:"Bridging",type:"object",additionalProperties:!1,properties:{destinationChainId:{title:"Bridging destination chainId",description:"Id of a blockchain where funds will be received",$id:"#/definitions/chainId",pattern:"^[a-zA-Z0-9\\-_]{1,32}$",examples:["1","100","hedera-hashgraph"],type:"string"},destinationTokenAddress:{title:"Bridging destination token address",description:"Address of a token that will be received at destination chain. The chain might be EVM or non-EVM. Some chains might even not have a token address. E.g.: Bitcoin",type:"string",pattern:"^[a-zA-Z0-9\\-.]{1,64}$",examples:["0x00E989b87700514118Fa55326CD1cCE82faebEF6","A.b19436aae4d94622.FiatToken","0.0.456858","1337"]}}}}}}}}}),require_v1_6_0=__commonJS({"schemas/v1.6.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.6.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.6.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Referrer address"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook.",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}},bridging:{$id:"#bridging/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["destinationChainId","destinationTokenAddress"],title:"Bridging",type:"object",additionalProperties:!1,properties:{destinationChainId:{title:"Bridging destination chainId",description:"Id of a blockchain where funds will be received",$id:"#/definitions/chainId",pattern:"^[a-zA-Z0-9\\-_]{1,32}$",examples:["1","100","hedera-hashgraph"],type:"string"},destinationTokenAddress:{title:"Bridging destination token address",description:"Address of a token that will be received at destination chain. The chain might be EVM or non-EVM. Some chains might even not have a token address. E.g.: Bitcoin",type:"string",pattern:"^[a-zA-Z0-9\\-.]{1,64}$",examples:["0x00E989b87700514118Fa55326CD1cCE82faebEF6","A.b19436aae4d94622.FiatToken","0.0.456858","1337"]}}},flashloan:{$id:"#flashloan/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Flashloan",description:"Information about flashloan parameters for the order",type:"object",required:["lender","borrower","token","amount"],properties:{lender:{title:"Lender address",description:"The Ethereum address of the flashloan lender",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},borrower:{title:"Borrower address",description:"The Ethereum address of the flashloan borrower",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},token:{title:"Token address",description:"The Ethereum address of the token being borrowed",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},amount:{title:"Loan amount",description:"The amount of tokens to be flash loaned (in token units, as uint256)",$id:"#/definitions/bigPositiveNumber",pattern:"^[1-9]\\d*$",examples:["90741097240912730913","75891372","1"],type:"string"}},additionalProperties:!1}}}}}}}),require_v1_7_0=__commonJS({"schemas/v1.7.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.7.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.7.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Referrer address"}}},utm:{$id:"#utm/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampagin",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTem",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook.",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}},bridging:{$id:"#bridging/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["destinationChainId","destinationTokenAddress"],title:"Bridging",type:"object",additionalProperties:!1,properties:{destinationChainId:{title:"Bridging destination chainId",description:"Id of a blockchain where funds will be received",$id:"#/definitions/chainId",pattern:"^[a-zA-Z0-9\\-_]{1,32}$",examples:["1","100","hedera-hashgraph"],type:"string"},destinationTokenAddress:{title:"Bridging destination token address",description:"Address of a token that will be received at destination chain. The chain might be EVM or non-EVM. Some chains might even not have a token address. E.g.: Bitcoin",type:"string",pattern:"^[a-zA-Z0-9\\-.]{1,64}$",examples:["0x00E989b87700514118Fa55326CD1cCE82faebEF6","A.b19436aae4d94622.FiatToken","0.0.456858","1337"]}}},flashloan:{$id:"#flashloan/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Flashloan",description:"Information about flashloan parameters for the order",type:"object",required:["amount","liquidityProvider","protocolAdapter","receiver","token"],properties:{amount:{title:"Loan amount",description:"The amount of tokens to be flash loaned (in token units, as uint256)",$id:"#/definitions/bigPositiveNumber",pattern:"^[1-9]\\d*$",examples:["90741097240912730913","75891372","1"],type:"string"},liquidityProvider:{title:"Liquidity provider address",description:"The Ethereum address of the flashloan liquidity provider",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},protocolAdapter:{title:"Protocol adapter address",description:"The Ethereum address of the protocol adapter",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},receiver:{title:"Receiver address",description:"The Ethereum address of the flashloan receiver",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},token:{title:"Token address",description:"The Ethereum address of the token being borrowed",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}}}}}}}),require_v1_8_0=__commonJS({"schemas/v1.8.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.8.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.8.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Referrer address"}}},utm:{$id:"#utm/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampaign",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTerm",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook.",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}},bridging:{$id:"#bridging/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["destinationChainId","destinationTokenAddress"],title:"Bridging",type:"object",additionalProperties:!1,properties:{destinationChainId:{title:"Bridging destination chainId",description:"Id of a blockchain where funds will be received",$id:"#/definitions/chainId",pattern:"^[a-zA-Z0-9\\-_]{1,32}$",examples:["1","100","hedera-hashgraph"],type:"string"},destinationTokenAddress:{title:"Bridging destination token address",description:"Address of a token that will be received at destination chain. The chain might be EVM or non-EVM. Some chains might even not have a token address. E.g.: Bitcoin",type:"string",pattern:"^[a-zA-Z0-9\\-.]{1,64}$",examples:["0x00E989b87700514118Fa55326CD1cCE82faebEF6","A.b19436aae4d94622.FiatToken","0.0.456858","1337"]}}},flashloan:{$id:"#flashloan/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Flashloan",description:"Information about flashloan parameters for the order",type:"object",required:["amount","liquidityProvider","protocolAdapter","receiver","token"],properties:{amount:{title:"Loan amount",description:"The amount of tokens to be flash loaned (in token units, as uint256)",$id:"#/definitions/bigPositiveNumber",pattern:"^[1-9]\\d*$",examples:["90741097240912730913","75891372","1"],type:"string"},liquidityProvider:{title:"Liquidity provider address",description:"The Ethereum address of the flashloan liquidity provider",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},protocolAdapter:{title:"Protocol adapter address",description:"The Ethereum address of the protocol adapter",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},receiver:{title:"Receiver address",description:"The Ethereum address of the flashloan receiver",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},token:{title:"Token address",description:"The Ethereum address of the token being borrowed",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}}}}}}}),require_v1_9_0=__commonJS({"schemas/v1.9.0.json"(e,t){t.exports={$id:"https://cowswap.exchange/schemas/app-data/v1.9.0.json",$schema:"http://json-schema.org/draft-07/schema",description:"Metadata JSON document for adding information to orders.",required:["version","metadata"],title:"AppData Root Schema",type:"object",additionalProperties:!1,properties:{version:{readOnly:!0,default:"1.9.0",$id:"#/definitions/version",description:"Semantic versioning of document.",examples:["1.0.0","1.2.3"],title:"Version",type:"string"},appCode:{$id:"#/properties/appCode",description:"The code identifying the CLI, UI, service generating the order.",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environment",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]},metadata:{$id:"#/properties/metadata",default:{},description:"Each metadata will specify one aspect of the order.",required:[],title:"Metadata",type:"object",additionalProperties:!1,properties:{signer:{$id:"#signer/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Signer",description:"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"},referrer:{$id:"#referrer/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["address"],title:"Referrer",type:"object",additionalProperties:!1,properties:{address:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Referrer address"}}},utm:{$id:"#utm/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:[],title:"UTM Codes",type:"object",additionalProperties:!1,properties:{utmSource:{$id:"#/properties/utmSource",title:"UTM Source",type:"string",examples:["twitter"],description:"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},utmMedium:{$id:"#/properties/utmMedium",title:"UTM Medium",type:"string",examples:["email"],description:"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},utmCampaign:{$id:"#/properties/utmCampaign",title:"UTM Campaign",type:"string",examples:["everyone-loves-cows-2023"],description:"Track the performance of a specific campaign"},utmContent:{$id:"#/properties/utmContent",title:"UTM Content",type:"string",examples:["big-fat-button"],description:"Track which link was clicked"},utmTerm:{$id:"#/properties/utmTerm",title:"UTM Keyword Term",type:"string",examples:["coincidence+of+wants"],description:"Track which keyword term a website visitor came from"}}},quote:{$id:"#quote/v1.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["slippageBips"],title:"Quote",type:"object",additionalProperties:!1,properties:{slippageBips:{title:"Slippage Bips",description:"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)",$id:"#/definitions/bps",examples:[0,10,50],type:"integer",maximum:1e4,minimum:0},smartSlippage:{title:"Smart Slippage",description:"Whether the given slippageBips used is originated from a Smart slippage suggestion",type:"boolean",default:!1}}},orderClass:{$id:"#orderClass/v0.3.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["orderClass"],title:"Order class",type:"object",additionalProperties:!1,properties:{orderClass:{$id:"#/definitions/orderClass",description:"Indicator of the order class.",examples:["market","limit","liquidity","twap"],title:"Order class",type:"string",enum:["market","limit","liquidity","twap"]}}},hooks:{$id:"#hooks/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",default:{},required:[],title:"Order interaction hooks",description:"Optional Pre and Post order interaction hooks attached to a single order",type:"object",additionalProperties:!1,properties:{version:{$ref:"#/properties/version",readOnly:!0,default:"0.2.0"},pre:{$id:"#/properties/hooks/pre",title:"Pre-Hooks",description:"CoW Hooks to call before an order executes",type:"array",items:{$id:"#hook/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["target","callData","gasLimit"],title:"CoW Hook",type:"object",additionalProperties:!1,properties:{target:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient",title:"Hook Target",description:"The contract to call for the hook"},callData:{$id:"#/properties/callData",title:"Hook CallData",description:"The calldata to use when calling the hook",type:"string",pattern:"^0x[a-fA-F0-9]*$",examples:["0x","0x01020304"]},gasLimit:{title:"Hook Gas Limit",description:"The gas limit (in gas units) for the hook",$id:"#/definitions/bigNumber",pattern:"^\\d+$",examples:["90741097240912730913","0","75891372"],type:"string"},dappId:{$ref:"#/properties/metadata/properties/bridging/properties/providerId",title:"Id of the dApp which has built the hook",description:"CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook."}}}},post:{$id:"#/properties/hooks/post",title:"Post-Hooks",description:"CoW Hooks to call after an order executes",type:"array",items:{$ref:"#/properties/metadata/properties/hooks/properties/pre/items"}}}},widget:{$id:"#widget/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["appCode"],title:"Widget",type:"object",additionalProperties:!1,properties:{appCode:{$id:"#/properties/appCodeWidget",description:"The code identifying the UI powering the widget",examples:["CoW Swap"],title:"App Code",type:"string"},environment:{$id:"#/properties/environmentWidget",description:"Environment from which the order came from.",title:"Environment",type:"string",examples:["production","development","staging","ens"]}}},partnerFee:{$id:"#partnerFee/v1.0.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Partner fee",oneOf:[{type:"array",items:{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}},{$ref:"#/properties/metadata/properties/partnerFee/definitions/partnerFeeObject"}],definitions:{partnerFeeObject:{type:"object",oneOf:[{required:["volumeBps","recipient"],properties:{volumeBps:{title:"Volume Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%)",$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["surplusBps","maxVolumeBps","recipient"],properties:{surplusBps:{title:"Surplus Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on surplus",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1},{required:["priceImprovementBps","maxVolumeBps","recipient"],properties:{priceImprovementBps:{title:"Price Improvement Basis Point (BPS)",description:"The fee in basis points (BPS) to be paid to the partner based on price improvement",type:"integer",maximum:9999,minimum:1},maxVolumeBps:{$ref:"#/properties/metadata/properties/partnerFee/definitions/maxVolumeBps"},recipient:{$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}]},maxVolumeBps:{title:"Max Volume Basis Point (BPS)",description:"The maximum volume in basis points (BPS) to be paid to the partner. Capped at protocol level to 100 BPS (1%). You can chose to go lower but not higher",type:"integer",maximum:100,minimum:1,default:100,examples:[10,50,100]},recipient:{title:"Partner account",description:"The Ethereum address of the partner to receive the fee.",$id:"#/definitions/ethereumAddress",pattern:"^0x[a-fA-F0-9]{40}$",examples:["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],type:"string"}}},replacedOrder:{$id:"#replacedOrder/v0.1.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["uid"],title:"Replaced order",type:"object",additionalProperties:!1,properties:{uid:{title:"Replaced order UID",description:"The replaced order UID.",$id:"#/definitions/orderUid",pattern:"^0x[a-fA-F0-9]{112}$",examples:["0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"],type:"string"}}},bridging:{$id:"#bridging/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",required:["providerId","destinationChainId","destinationTokenAddress"],title:"Bridging",type:"object",additionalProperties:!1,properties:{providerId:{title:"Id of bridging provider",description:"The id links order with a bridging provider which processes it",$id:"#/definitions/dappId",examples:["75716a3cb48fdbb43ebdff58ce6c541f6a2c269be690513131355800367f2da2"],type:"string",minLength:1},destinationChainId:{title:"Bridging destination chainId",description:"Id of a blockchain where funds will be received",$id:"#/definitions/chainId",pattern:"^[a-zA-Z0-9\\-_]{1,32}$",examples:["1","100","hedera-hashgraph"],type:"string"},destinationTokenAddress:{title:"Bridging destination token address",description:"Address of a token that will be received at destination chain. The chain might be EVM or non-EVM. Some chains might even not have a token address. E.g.: Bitcoin",type:"string",pattern:"^[a-zA-Z0-9\\-.]{1,64}$",examples:["0x00E989b87700514118Fa55326CD1cCE82faebEF6","A.b19436aae4d94622.FiatToken","0.0.456858","1337"]}}},flashloan:{$id:"#flashloan/v0.2.0.json",$schema:"http://json-schema.org/draft-07/schema",title:"Flashloan",description:"Information about flashloan parameters for the order",type:"object",required:["amount","liquidityProvider","protocolAdapter","receiver","token"],properties:{amount:{title:"Loan amount",description:"The amount of tokens to be flash loaned (in token units, as uint256)",$id:"#/definitions/bigPositiveNumber",pattern:"^[1-9]\\d*$",examples:["90741097240912730913","75891372","1"],type:"string"},liquidityProvider:{title:"Liquidity provider address",description:"The Ethereum address of the flashloan liquidity provider",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},protocolAdapter:{title:"Protocol adapter address",description:"The Ethereum address of the protocol adapter",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},receiver:{title:"Receiver address",description:"The Ethereum address of the flashloan receiver",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"},token:{title:"Token address",description:"The Ethereum address of the token being borrowed",$ref:"#/properties/metadata/properties/partnerFee/definitions/recipient"}},additionalProperties:!1}}}}}}}),src_exports={};__export(src_exports,{LATEST_APP_DATA_VERSION:()=>LATEST_APP_DATA_VERSION,LATEST_HOOKS_METADATA_VERSION:()=>LATEST_HOOKS_METADATA_VERSION,LATEST_ORDER_CLASS_METADATA_VERSION:()=>LATEST_ORDER_CLASS_METADATA_VERSION,LATEST_PARTNER_FEE_METADATA_VERSION:()=>LATEST_PARTNER_FEE_METADATA_VERSION,LATEST_QUOTE_METADATA_VERSION:()=>LATEST_QUOTE_METADATA_VERSION,LATEST_REFERRER_METADATA_VERSION:()=>LATEST_REFERRER_METADATA_VERSION,LATEST_REPLACED_ORDER_METADATA_VERSION:()=>LATEST_REPLACED_ORDER_METADATA_VERSION,LATEST_SIGNER_METADATA_VERSION:()=>LATEST_SIGNER_METADATA_VERSION,LATEST_USER_CONSENTS_METADATA_VERSION:()=>LATEST_USER_CONSENTS_METADATA_VERSION,LATEST_UTM_METADATA_VERSION:()=>LATEST_UTM_METADATA_VERSION,LATEST_WIDGET_METADATA_VERSION:()=>LATEST_WIDGET_METADATA_VERSION,LATEST_WRAPPERS_METADATA_VERSION:()=>LATEST_WRAPPERS_METADATA_VERSION,MetadataApi:()=>MetadataApi,cowAppDataLatestScheme:()=>v1_14_0_exports,stringifyDeterministic:()=>stringifyDeterministic,v0_10_0:()=>v0_10_0_exports,v0_11_0:()=>v0_11_0_exports,v0_1_0:()=>v0_1_0_exports,v0_2_0:()=>v0_2_0_exports,v0_3_0:()=>v0_3_0_exports,v0_4_0:()=>v0_4_0_exports,v0_5_0:()=>v0_5_0_exports,v0_6_0:()=>v0_6_0_exports,v0_7_0:()=>v0_7_0_exports,v0_8_0:()=>v0_8_0_exports,v0_9_0:()=>v0_9_0_exports,v1_0_0:()=>v1_0_0_exports,v1_10_0:()=>v1_10_0_exports,v1_11_0:()=>v1_11_0_exports,v1_12_0:()=>v1_12_0_exports,v1_13_0:()=>v1_13_0_exports,v1_14_0:()=>v1_14_0_exports,v1_1_0:()=>v1_1_0_exports,v1_2_0:()=>v1_2_0_exports,v1_3_0:()=>v1_3_0_exports,v1_4_0:()=>v1_4_0_exports,v1_5_0:()=>v1_5_0_exports,v1_6_0:()=>v1_6_0_exports,v1_7_0:()=>v1_7_0_exports,v1_8_0:()=>v1_8_0_exports,v1_9_0:()=>v1_9_0_exports}),module.exports=__toCommonJS(src_exports);var import_sdk_common4=require("@cowprotocol/sdk-common"),import_sdk_common=require("@cowprotocol/sdk-common"),DEFAULT_IPFS_READ_URI="https://cloudflare-ipfs.com/ipfs",DEFAULT_IPFS_WRITE_URI="https://api.pinata.cloud",MetaDataError=class extends Error{},import_cid=require("multiformats/cid");async function appDataHexToCid(e){const t=await _appDataHexToCid(e);return _assertCid(t,e),t}async function appDataHexToCidLegacy(e){const t=await _appDataHexToCidLegacy(e);return _assertCid(t,e),t}async function _assertCid(e,t){if(!e)throw new MetaDataError("Error getting CID from appDataHex: "+t)}async function _appDataHexToCid(e){const t=await _toCidBytes({version:1,multicodec:85,hashingAlgorithm:27,hashingLength:32,multihashHex:e}),{base16:i}=await import("multiformats/bases/base16");return i.encode(t)}async function _appDataHexToCidLegacy(e){const t=await _toCidBytes({version:1,multicodec:112,hashingAlgorithm:18,hashingLength:32,multihashHex:e});return import_cid.CID.decode(t).toV0().toString()}async function _toCidBytes(e){const t=(0,import_sdk_common.getGlobalAdapter)().utils.arrayify(e.multihashHex),i=Uint8Array.from([e.version,e.multicodec,e.hashingAlgorithm,e.hashingLength]),r=new Uint8Array(i.length+t.length);return r.set(i),r.set(t,i.length),r}var MULTIBASE_BASE16="f";async function parseCid(e){const{CID:t}=await import("multiformats/cid"),i=await getDecoder(e);return t.parse(e,i)}async function getDecoder(e){if(e[0]===MULTIBASE_BASE16){const{base16:e}=await import("multiformats/bases/base16");return e}}async function extractDigest(e){const t=await parseCid(e),{digest:i}=t.multihash;return`0x${Buffer.from(i).toString("hex")}`}async function cidToAppDataHex(e){return extractDigest(e)}async function fetchDocFromCid(e,t=DEFAULT_IPFS_READ_URI){const{default:i}=await import("cross-fetch"),r=await i(`${t}/${e}`);return await r.json()}async function fetchDocFromAppDataHex(e,t){return _fetchDocFromCidAux(appDataHexToCid,e,t)}async function fetchDocFromAppDataHexLegacy(e,t){return _fetchDocFromCidAux(appDataHexToCidLegacy,e,t)}async function _fetchDocFromCidAux(e,t,i){try{const r=await e(t);if(!r)throw new MetaDataError("Error getting serialized CID");return fetchDocFromCid(r,i)}catch(e){throw new MetaDataError(`Error decoding AppData: appDataHex=${t}, message=${e.message}`)}}var v0_1_0_exports={},v0_10_0_exports={},v0_11_0_exports={},v0_2_0_exports={},v0_3_0_exports={},v0_4_0_exports={},v0_5_0_exports={},v0_6_0_exports={},v0_7_0_exports={},v0_8_0_exports={},v0_9_0_exports={},v1_0_0_exports={},v1_1_0_exports={},v1_10_0_exports={},v1_11_0_exports={},v1_12_0_exports={},v1_13_0_exports={},v1_14_0_exports={},v1_2_0_exports={},v1_3_0_exports={},v1_4_0_exports={},v1_5_0_exports={},v1_6_0_exports={},v1_7_0_exports={},v1_8_0_exports={},v1_9_0_exports={},LATEST_APP_DATA_VERSION="1.14.0",LATEST_QUOTE_METADATA_VERSION="1.1.0",LATEST_REFERRER_METADATA_VERSION="1.0.0",LATEST_ORDER_CLASS_METADATA_VERSION="0.3.0",LATEST_UTM_METADATA_VERSION="0.3.0",LATEST_HOOKS_METADATA_VERSION="0.2.0",LATEST_SIGNER_METADATA_VERSION="0.1.0",LATEST_WIDGET_METADATA_VERSION="0.1.0",LATEST_PARTNER_FEE_METADATA_VERSION="1.0.0",LATEST_REPLACED_ORDER_METADATA_VERSION="0.1.0",LATEST_WRAPPERS_METADATA_VERSION="0.2.0",LATEST_USER_CONSENTS_METADATA_VERSION="0.1.0",DEFAULT_APP_CODE="CoW Swap",DEFAULT_APP_DATA_DOC={appCode:DEFAULT_APP_CODE,metadata:{},version:LATEST_APP_DATA_VERSION};async function generateAppDataDoc(e){return{...DEFAULT_APP_DATA_DOC,...e,version:LATEST_APP_DATA_VERSION}}var import_sdk_common3=require("@cowprotocol/sdk-common"),import_json_stringify_deterministic=__toESM(require("json-stringify-deterministic"));async function stringifyDeterministic(e){return(0,import_json_stringify_deterministic.default)(e)}var _ajvPromise,import_sdk_common2=require("@cowprotocol/sdk-common"),globImport_schemas_v_json=__glob({"../schemas/v0.1.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_1_0()))),"../schemas/v0.10.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_10_0()))),"../schemas/v0.11.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_11_0()))),"../schemas/v0.2.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_2_0()))),"../schemas/v0.3.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_3_0()))),"../schemas/v0.4.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_4_0()))),"../schemas/v0.5.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_5_0()))),"../schemas/v0.6.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_6_0()))),"../schemas/v0.7.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_7_0()))),"../schemas/v0.8.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_8_0()))),"../schemas/v0.9.0.json":()=>Promise.resolve().then((()=>__toESM(require_v0_9_0()))),"../schemas/v1.0.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_0_0()))),"../schemas/v1.1.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_1_0()))),"../schemas/v1.10.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_10_0()))),"../schemas/v1.11.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_11_0()))),"../schemas/v1.12.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_12_0()))),"../schemas/v1.13.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_13_0()))),"../schemas/v1.14.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_14_0()))),"../schemas/v1.2.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_2_0()))),"../schemas/v1.3.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_3_0()))),"../schemas/v1.4.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_4_0()))),"../schemas/v1.5.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_5_0()))),"../schemas/v1.6.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_6_0()))),"../schemas/v1.7.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_7_0()))),"../schemas/v1.8.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_8_0()))),"../schemas/v1.9.0.json":()=>Promise.resolve().then((()=>__toESM(require_v1_9_0())))});async function importSchema(e){if(!/^\d+\.\d+\.\d+$/.test(e))throw new Error(`AppData version ${e} is not a valid version`);try{return await globImport_schemas_v_json(`../schemas/v${e}.json`)}catch(t){throw console.log(t),new import_sdk_common2.CowError(`AppData version ${e} doesn't exist`)}}var _validatorPromises={};async function getAjv(){return _ajvPromise||(_ajvPromise=import("ajv").then((({default:e})=>new e))),_ajvPromise}async function _createValidator(e,t){let i=e.getSchema(t);if(!i){const r=await importSchema(t);e.addSchema(r,t),i=e.getSchema(t)}return i}async function getValidator(e,t){let i=_validatorPromises[t];return i||(i=_createValidator(e,t),_validatorPromises[t]=i),i}async function validateAppDataDoc(e){const{version:t}=e;try{const i=await getAjv(),r=await getValidator(i,t),o=!!r(e);return{success:o,errors:r.errors?i.errorsText(r.errors):void 0}}catch(e){if(e instanceof Error)return{success:!1,errors:e.message};throw e}}async function getAppDataInfo(e){return _appDataToCidAux(e,_appDataToCid)}async function getAppDataInfoLegacy(e){return _appDataToCidAux(JSON.stringify(e),_appDataToCidLegacy)}async function _appDataToCidAux(e,t){const[i,r]="string"==typeof e?[JSON.parse(e),e]:[e,await stringifyDeterministic(e)],o=await validateAppDataDoc(i);if(!o?.success)throw new MetaDataError(`Invalid appData provided: ${o?.errors}`);try{const e=await t(r),i=await extractDigest(e);if(!i)throw new MetaDataError(`Could not extract appDataHex from calculated cid ${e}`);return{cid:e,appDataHex:i,appDataContent:r}}catch(e){const t=e;throw console.error("Failed to calculate appDataHex",t),new MetaDataError(`Failed to calculate appDataHex: ${t.message}`)}}async function _appDataToCid(e){const t=(0,import_sdk_common3.getGlobalAdapter)();return appDataHexToCid(t.utils.keccak256(t.utils.toUtf8Bytes(e)))}async function _appDataToCidLegacy(e){const t="string"==typeof e?e:await stringifyDeterministic(e),{of:i}=await import("ipfs-only-hash");return i(t,{cidVersion:0})}async function getAppDataSchema(e){try{return await importSchema(e)}catch(e){throw new MetaDataError(e.message)}}async function uploadMetadataDocToIpfsLegacy(e,t){const{IpfsHash:i}=await _pinJsonInPinataIpfs(e,t);return{appData:await extractDigest(i),cid:i}}async function _pinJsonInPinataIpfs(e,{writeUri:t=DEFAULT_IPFS_WRITE_URI,pinataApiKey:i="",pinataApiSecret:r=""}){const{default:o}=await import("cross-fetch");if(!i||!r)throw new MetaDataError("You need to pass IPFS api credentials.");const a=await stringifyDeterministic({pinataContent:e,pinataMetadata:{name:"appData"}}),s=`${t}/pinning/pinJSONToIPFS`,p=await o(s,{method:"POST",body:a,headers:{"Content-Type":"application/json",pinata_api_key:i,pinata_secret_api_key:r}}),n=await p.json();if(200!==p.status)throw new Error(n.error.details||n.error);return n}var MetadataApi=class{constructor(e){e&&(0,import_sdk_common4.setGlobalAdapter)(e)}getAppDataSchema=getAppDataSchema;generateAppDataDoc=generateAppDataDoc;validateAppDataDoc=validateAppDataDoc;getAppDataInfo=getAppDataInfo;appDataHexToCid=appDataHexToCid;cidToAppDataHex=cidToAppDataHex;fetchDocFromAppDataHex=fetchDocFromAppDataHex;legacy={fetchDocFromCid:fetchDocFromCid,uploadMetadataDocToIpfs:uploadMetadataDocToIpfsLegacy,appDataToCid:getAppDataInfoLegacy,appDataHexToCid:appDataHexToCidLegacy,fetchDocFromAppDataHex:fetchDocFromAppDataHexLegacy}};
//# sourceMappingURL=/sm/a5cd75e5a6af03e2df1354f3185f1b4a87e4f636540f579a17e4c77a55bf783e.map