import { AbstractProviderAdapter } from '@cowprotocol/sdk-common'; /** * Convert an app-data hex string to a CID * * @param appDataHex - The app-data hex string (app-data part of the order struct) * @returns The IPFS CID v1 of the content */ declare function appDataHexToCid(appDataHex: string): Promise; /** * Convert a CID to an app-data hex string * * @param cid - The IPFS CID to extract the app-data hex from. * @returns The app-data hex string (app-data part of the order struct) */ declare function cidToAppDataHex(cid: string): Promise; /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$q = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$q = string; /** * Semantic versioning of document. */ type Version1$p = string; type ReferrerAddress$o = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$q { version: Version$q; appCode?: AppCode$q; metadata: Metadata$q; [k: string]: unknown; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$q { referrer?: Referrer$q; [k: string]: unknown; } interface Referrer$q { version: Version1$p; address: ReferrerAddress$o; [k: string]: unknown; } declare namespace v0_1_0 { export type { AppCode$q as AppCode, AppDataRootSchema$q as AppDataRootSchema, Metadata$q as Metadata, Referrer$q as Referrer, ReferrerAddress$o as ReferrerAddress, Version$q as Version, Version1$p as Version1 }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$p = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$p = string; /** * Environment from which the order came from. */ type Environment$o = string; /** * 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. */ type Signer$h = string; type ReferrerAddress$n = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$l = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$l = string; /** * Track the performance of a specific campaign */ type UTMCampaign$l = string; /** * Track which link was clicked */ type UTMContent$l = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$l = string; /** * Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS) */ type SlippageBips$n = string; /** * Indicator of the order class. */ type OrderClass1$m = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$o = string; /** * The contract to call for the hook */ type HookTarget$i = string; /** * The calldata to use when calling the hook */ type HookCallData$i = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$i = string; /** * CoW Hooks to call before an order executes */ type PreHooks$i = CoWHook$i[]; /** * CoW Hooks to call after an order executes */ type PostHooks$i = CoWHook$i[]; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$p { version: Version$p; appCode?: AppCode$p; environment?: Environment$o; metadata: Metadata$p; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$p { signer?: Signer$h; referrer?: Referrer$p; utm?: UTMCodes$l; quote?: Quote$p; orderClass?: OrderClass$m; hooks?: OrderInteractionHooks$i; } interface Referrer$p { address: ReferrerAddress$n; } interface UTMCodes$l { utmSource?: UTMSource$l; utmMedium?: UTMMedium$l; utmCampaign?: UTMCampaign$l; utmContent?: UTMContent$l; utmTerm?: UTMKeywordTerm$l; } interface Quote$p { slippageBips: SlippageBips$n; } interface OrderClass$m { orderClass: OrderClass1$m; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$i { version?: Version1$o; pre?: PreHooks$i; post?: PostHooks$i; } interface CoWHook$i { target: HookTarget$i; callData: HookCallData$i; gasLimit: HookGasLimit$i; } declare namespace v0_10_0 { export type { AppCode$p as AppCode, AppDataRootSchema$p as AppDataRootSchema, CoWHook$i as CoWHook, Environment$o as Environment, HookCallData$i as HookCallData, HookGasLimit$i as HookGasLimit, HookTarget$i as HookTarget, Metadata$p as Metadata, OrderClass$m as OrderClass, OrderClass1$m as OrderClass1, OrderInteractionHooks$i as OrderInteractionHooks, PostHooks$i as PostHooks, PreHooks$i as PreHooks, Quote$p as Quote, Referrer$p as Referrer, ReferrerAddress$n as ReferrerAddress, Signer$h as Signer, SlippageBips$n as SlippageBips, UTMCampaign$l as UTMCampaign, UTMCodes$l as UTMCodes, UTMContent$l as UTMContent, UTMKeywordTerm$l as UTMKeywordTerm, UTMMedium$l as UTMMedium, UTMSource$l as UTMSource, Version$p as Version, Version1$o as Version1 }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$o = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$o = string; /** * Environment from which the order came from. */ type Environment$n = string; /** * 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. */ type Signer$g = string; type ReferrerAddress$m = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$k = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$k = string; /** * Track the performance of a specific campaign */ type UTMCampaign$k = string; /** * Track which link was clicked */ type UTMContent$k = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$k = string; /** * Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS) */ type SlippageBips$m = string; /** * Indicator of the order class. */ type OrderClass1$l = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$n = string; /** * The contract to call for the hook */ type HookTarget$h = string; /** * The calldata to use when calling the hook */ type HookCallData$h = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$h = string; /** * CoW Hooks to call before an order executes */ type PreHooks$h = CoWHook$h[]; /** * CoW Hooks to call after an order executes */ type PostHooks$h = CoWHook$h[]; /** * The code identifying the UI powering the widget */ type AppCode1$g = string; /** * Environment from which the order came from. */ type Environment1$g = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$o { version: Version$o; appCode?: AppCode$o; environment?: Environment$n; metadata: Metadata$o; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$o { signer?: Signer$g; referrer?: Referrer$o; utm?: UTMCodes$k; quote?: Quote$o; orderClass?: OrderClass$l; hooks?: OrderInteractionHooks$h; widget?: Widget$g; } interface Referrer$o { address: ReferrerAddress$m; } interface UTMCodes$k { utmSource?: UTMSource$k; utmMedium?: UTMMedium$k; utmCampaign?: UTMCampaign$k; utmContent?: UTMContent$k; utmTerm?: UTMKeywordTerm$k; } interface Quote$o { slippageBips: SlippageBips$m; } interface OrderClass$l { orderClass: OrderClass1$l; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$h { version?: Version1$n; pre?: PreHooks$h; post?: PostHooks$h; } interface CoWHook$h { target: HookTarget$h; callData: HookCallData$h; gasLimit: HookGasLimit$h; } interface Widget$g { appCode: AppCode1$g; environment?: Environment1$g; } declare namespace v0_11_0 { export type { AppCode$o as AppCode, AppCode1$g as AppCode1, AppDataRootSchema$o as AppDataRootSchema, CoWHook$h as CoWHook, Environment$n as Environment, Environment1$g as Environment1, HookCallData$h as HookCallData, HookGasLimit$h as HookGasLimit, HookTarget$h as HookTarget, Metadata$o as Metadata, OrderClass$l as OrderClass, OrderClass1$l as OrderClass1, OrderInteractionHooks$h as OrderInteractionHooks, PostHooks$h as PostHooks, PreHooks$h as PreHooks, Quote$o as Quote, Referrer$o as Referrer, ReferrerAddress$m as ReferrerAddress, Signer$g as Signer, SlippageBips$m as SlippageBips, UTMCampaign$k as UTMCampaign, UTMCodes$k as UTMCodes, UTMContent$k as UTMContent, UTMKeywordTerm$k as UTMKeywordTerm, UTMMedium$k as UTMMedium, UTMSource$k as UTMSource, Version$o as Version, Version1$n as Version1, Widget$g as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$n = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$n = string; /** * Semantic versioning of document. */ type Version1$m = string; type ReferrerAddress$l = string; type QuoteId$1 = string; type QuoteSellAmount$1 = string; type QuoteBuyAmount$1 = string; /** * Semantic versioning of document. */ type Version2$5 = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$n { version: Version$n; appCode?: AppCode$n; metadata: Metadata$n; [k: string]: unknown; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$n { referrer?: Referrer$n; quote?: Quote$n; [k: string]: unknown; } interface Referrer$n { version: Version1$m; address: ReferrerAddress$l; [k: string]: unknown; } interface Quote$n { id?: QuoteId$1; sellAmount: QuoteSellAmount$1; buyAmount: QuoteBuyAmount$1; version: Version2$5; [k: string]: unknown; } declare namespace v0_2_0 { export type { AppCode$n as AppCode, AppDataRootSchema$n as AppDataRootSchema, Metadata$n as Metadata, Quote$n as Quote, QuoteBuyAmount$1 as QuoteBuyAmount, QuoteId$1 as QuoteId, QuoteSellAmount$1 as QuoteSellAmount, Referrer$n as Referrer, ReferrerAddress$l as ReferrerAddress, Version$n as Version, Version1$m as Version1, Version2$5 as Version2 }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$m = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$m = string; /** * Environment from which the order came from */ type Environment$m = string; /** * Semantic versioning of document. */ type Version1$l = string; type ReferrerAddress$k = string; type QuoteId = string; type QuoteSellAmount = string; type QuoteBuyAmount = string; /** * Semantic versioning of document. */ type Version2$4 = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$m { version: Version$m; appCode?: AppCode$m; environment?: Environment$m; metadata: Metadata$m; [k: string]: unknown; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$m { referrer?: Referrer$m; quote?: Quote$m; [k: string]: unknown; } interface Referrer$m { version: Version1$l; address: ReferrerAddress$k; [k: string]: unknown; } interface Quote$m { id?: QuoteId; sellAmount: QuoteSellAmount; buyAmount: QuoteBuyAmount; version: Version2$4; [k: string]: unknown; } type v0_3_0_QuoteBuyAmount = QuoteBuyAmount; type v0_3_0_QuoteId = QuoteId; type v0_3_0_QuoteSellAmount = QuoteSellAmount; declare namespace v0_3_0 { export type { AppCode$m as AppCode, AppDataRootSchema$m as AppDataRootSchema, Environment$m as Environment, Metadata$m as Metadata, Quote$m as Quote, v0_3_0_QuoteBuyAmount as QuoteBuyAmount, v0_3_0_QuoteId as QuoteId, v0_3_0_QuoteSellAmount as QuoteSellAmount, Referrer$m as Referrer, ReferrerAddress$k as ReferrerAddress, Version$m as Version, Version1$l as Version1, Version2$4 as Version2 }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$l = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$l = string; /** * Environment from which the order came from. */ type Environment$l = string; /** * Semantic versioning of document. */ type Version1$k = string; type ReferrerAddress$j = string; /** * Semantic versioning of document. */ type Version2$3 = string; /** * Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS) */ type SlippageBips$l = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$l { version: Version$l; appCode?: AppCode$l; environment?: Environment$l; metadata: Metadata$l; [k: string]: unknown; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$l { referrer?: Referrer$l; quote?: Quote$l; [k: string]: unknown; } interface Referrer$l { version: Version1$k; address: ReferrerAddress$j; [k: string]: unknown; } interface Quote$l { version: Version2$3; slippageBips: SlippageBips$l; [k: string]: unknown; } declare namespace v0_4_0 { export type { AppCode$l as AppCode, AppDataRootSchema$l as AppDataRootSchema, Environment$l as Environment, Metadata$l as Metadata, Quote$l as Quote, Referrer$l as Referrer, ReferrerAddress$j as ReferrerAddress, SlippageBips$l as SlippageBips, Version$l as Version, Version1$k as Version1, Version2$3 as Version2 }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$k = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$k = string; /** * Environment from which the order came from. */ type Environment$k = string; /** * Semantic versioning of document. */ type Version1$j = string; type ReferrerAddress$i = string; /** * Semantic versioning of document. */ type Version2$2 = string; /** * Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS) */ type SlippageBips$k = string; /** * Semantic versioning of document. */ type Version3$2 = string; /** * Indicator of the order class. */ type OrderClass1$k = "market" | "limit" | "liquidity"; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$k { version: Version$k; appCode?: AppCode$k; environment?: Environment$k; metadata: Metadata$k; [k: string]: unknown; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$k { referrer?: Referrer$k; quote?: Quote$k; orderClass?: OrderClass$k; [k: string]: unknown; } interface Referrer$k { version: Version1$j; address: ReferrerAddress$i; [k: string]: unknown; } interface Quote$k { version: Version2$2; slippageBips: SlippageBips$k; [k: string]: unknown; } interface OrderClass$k { version: Version3$2; orderClass: OrderClass1$k; [k: string]: unknown; } declare namespace v0_5_0 { export type { AppCode$k as AppCode, AppDataRootSchema$k as AppDataRootSchema, Environment$k as Environment, Metadata$k as Metadata, OrderClass$k as OrderClass, OrderClass1$k as OrderClass1, Quote$k as Quote, Referrer$k as Referrer, ReferrerAddress$i as ReferrerAddress, SlippageBips$k as SlippageBips, Version$k as Version, Version1$j as Version1, Version2$2 as Version2, Version3$2 as Version3 }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$j = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$j = string; /** * Environment from which the order came from. */ type Environment$j = string; /** * Semantic versioning of document. */ type Version1$i = string; type ReferrerAddress$h = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$j = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$j = string; /** * Track the performance of a specific campaign */ type UTMCampaign$j = string; /** * Track which link was clicked */ type UTMContent$j = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$j = string; /** * Semantic versioning of document. */ type Version2$1 = string; /** * Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS) */ type SlippageBips$j = string; /** * Semantic versioning of document. */ type Version3$1 = string; /** * Indicator of the order class. */ type OrderClass1$j = "market" | "limit" | "liquidity"; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$j { version: Version$j; appCode?: AppCode$j; environment?: Environment$j; metadata: Metadata$j; [k: string]: unknown; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$j { referrer?: Referrer$j; utm?: UTMCodes$j; quote?: Quote$j; orderClass?: OrderClass$j; [k: string]: unknown; } interface Referrer$j { version: Version1$i; address: ReferrerAddress$h; [k: string]: unknown; } interface UTMCodes$j { utmSource?: UTMSource$j; utmMedium?: UTMMedium$j; utmCampaign?: UTMCampaign$j; utmContent?: UTMContent$j; utmTerm?: UTMKeywordTerm$j; [k: string]: unknown; } interface Quote$j { version: Version2$1; slippageBips: SlippageBips$j; [k: string]: unknown; } interface OrderClass$j { version: Version3$1; orderClass: OrderClass1$j; [k: string]: unknown; } declare namespace v0_6_0 { export type { AppCode$j as AppCode, AppDataRootSchema$j as AppDataRootSchema, Environment$j as Environment, Metadata$j as Metadata, OrderClass$j as OrderClass, OrderClass1$j as OrderClass1, Quote$j as Quote, Referrer$j as Referrer, ReferrerAddress$h as ReferrerAddress, SlippageBips$j as SlippageBips, UTMCampaign$j as UTMCampaign, UTMCodes$j as UTMCodes, UTMContent$j as UTMContent, UTMKeywordTerm$j as UTMKeywordTerm, UTMMedium$j as UTMMedium, UTMSource$j as UTMSource, Version$j as Version, Version1$i as Version1, Version2$1 as Version2, Version3$1 as Version3 }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$i = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$i = string; /** * Environment from which the order came from. */ type Environment$i = string; /** * Semantic versioning of document. */ type Version1$h = string; type ReferrerAddress$g = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$i = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$i = string; /** * Track the performance of a specific campaign */ type UTMCampaign$i = string; /** * Track which link was clicked */ type UTMContent$i = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$i = string; /** * Semantic versioning of document. */ type Version2 = string; /** * Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS) */ type SlippageBips$i = string; /** * Semantic versioning of document. */ type Version3 = string; /** * Indicator of the order class. */ type OrderClass1$i = "market" | "limit" | "liquidity" | "twap"; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$i { version: Version$i; appCode?: AppCode$i; environment?: Environment$i; metadata: Metadata$i; [k: string]: unknown; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$i { referrer?: Referrer$i; utm?: UTMCodes$i; quote?: Quote$i; orderClass?: OrderClass$i; [k: string]: unknown; } interface Referrer$i { version: Version1$h; address: ReferrerAddress$g; [k: string]: unknown; } interface UTMCodes$i { utmSource?: UTMSource$i; utmMedium?: UTMMedium$i; utmCampaign?: UTMCampaign$i; utmContent?: UTMContent$i; utmTerm?: UTMKeywordTerm$i; [k: string]: unknown; } interface Quote$i { version: Version2; slippageBips: SlippageBips$i; [k: string]: unknown; } interface OrderClass$i { version: Version3; orderClass: OrderClass1$i; [k: string]: unknown; } type v0_7_0_Version2 = Version2; type v0_7_0_Version3 = Version3; declare namespace v0_7_0 { export type { AppCode$i as AppCode, AppDataRootSchema$i as AppDataRootSchema, Environment$i as Environment, Metadata$i as Metadata, OrderClass$i as OrderClass, OrderClass1$i as OrderClass1, Quote$i as Quote, Referrer$i as Referrer, ReferrerAddress$g as ReferrerAddress, SlippageBips$i as SlippageBips, UTMCampaign$i as UTMCampaign, UTMCodes$i as UTMCodes, UTMContent$i as UTMContent, UTMKeywordTerm$i as UTMKeywordTerm, UTMMedium$i as UTMMedium, UTMSource$i as UTMSource, Version$i as Version, Version1$h as Version1, v0_7_0_Version2 as Version2, v0_7_0_Version3 as Version3 }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$h = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$h = string; /** * Environment from which the order came from. */ type Environment$h = string; type ReferrerAddress$f = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$h = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$h = string; /** * Track the performance of a specific campaign */ type UTMCampaign$h = string; /** * Track which link was clicked */ type UTMContent$h = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$h = string; /** * Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS) */ type SlippageBips$h = string; /** * Indicator of the order class. */ type OrderClass1$h = "market" | "limit" | "liquidity" | "twap"; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$h { version: Version$h; appCode?: AppCode$h; environment?: Environment$h; metadata: Metadata$h; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$h { referrer?: Referrer$h; utm?: UTMCodes$h; quote?: Quote$h; orderClass?: OrderClass$h; } interface Referrer$h { address: ReferrerAddress$f; } interface UTMCodes$h { utmSource?: UTMSource$h; utmMedium?: UTMMedium$h; utmCampaign?: UTMCampaign$h; utmContent?: UTMContent$h; utmTerm?: UTMKeywordTerm$h; } interface Quote$h { slippageBips: SlippageBips$h; } interface OrderClass$h { orderClass: OrderClass1$h; } declare namespace v0_8_0 { export type { AppCode$h as AppCode, AppDataRootSchema$h as AppDataRootSchema, Environment$h as Environment, Metadata$h as Metadata, OrderClass$h as OrderClass, OrderClass1$h as OrderClass1, Quote$h as Quote, Referrer$h as Referrer, ReferrerAddress$f as ReferrerAddress, SlippageBips$h as SlippageBips, UTMCampaign$h as UTMCampaign, UTMCodes$h as UTMCodes, UTMContent$h as UTMContent, UTMKeywordTerm$h as UTMKeywordTerm, UTMMedium$h as UTMMedium, UTMSource$h as UTMSource, Version$h as Version }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$g = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$g = string; /** * Environment from which the order came from. */ type Environment$g = string; type ReferrerAddress$e = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$g = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$g = string; /** * Track the performance of a specific campaign */ type UTMCampaign$g = string; /** * Track which link was clicked */ type UTMContent$g = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$g = string; /** * Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS) */ type SlippageBips$g = string; /** * Indicator of the order class. */ type OrderClass1$g = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$g = string; /** * The contract to call for the hook */ type HookTarget$g = string; /** * The calldata to use when calling the hook */ type HookCallData$g = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$g = string; /** * CoW Hooks to call before an order executes */ type PreHooks$g = CoWHook$g[]; /** * CoW Hooks to call after an order executes */ type PostHooks$g = CoWHook$g[]; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$g { version: Version$g; appCode?: AppCode$g; environment?: Environment$g; metadata: Metadata$g; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$g { referrer?: Referrer$g; utm?: UTMCodes$g; quote?: Quote$g; orderClass?: OrderClass$g; hooks?: OrderInteractionHooks$g; } interface Referrer$g { address: ReferrerAddress$e; } interface UTMCodes$g { utmSource?: UTMSource$g; utmMedium?: UTMMedium$g; utmCampaign?: UTMCampaign$g; utmContent?: UTMContent$g; utmTerm?: UTMKeywordTerm$g; } interface Quote$g { slippageBips: SlippageBips$g; } interface OrderClass$g { orderClass: OrderClass1$g; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$g { version?: Version1$g; pre?: PreHooks$g; post?: PostHooks$g; } interface CoWHook$g { target: HookTarget$g; callData: HookCallData$g; gasLimit: HookGasLimit$g; } declare namespace v0_9_0 { export type { AppCode$g as AppCode, AppDataRootSchema$g as AppDataRootSchema, CoWHook$g as CoWHook, Environment$g as Environment, HookCallData$g as HookCallData, HookGasLimit$g as HookGasLimit, HookTarget$g as HookTarget, Metadata$g as Metadata, OrderClass$g as OrderClass, OrderClass1$g as OrderClass1, OrderInteractionHooks$g as OrderInteractionHooks, PostHooks$g as PostHooks, PreHooks$g as PreHooks, Quote$g as Quote, Referrer$g as Referrer, ReferrerAddress$e as ReferrerAddress, SlippageBips$g as SlippageBips, UTMCampaign$g as UTMCampaign, UTMCodes$g as UTMCodes, UTMContent$g as UTMContent, UTMKeywordTerm$g as UTMKeywordTerm, UTMMedium$g as UTMMedium, UTMSource$g as UTMSource, Version$g as Version, Version1$g as Version1 }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$f = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$f = string; /** * Environment from which the order came from. */ type Environment$f = string; /** * 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. */ type Signer$f = string; type ReferrerAddress$d = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$f = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$f = string; /** * Track the performance of a specific campaign */ type UTMCampaign$f = string; /** * Track which link was clicked */ type UTMContent$f = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$f = string; /** * 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) */ type SlippageBips$f = number; /** * Indicator of the order class. */ type OrderClass1$f = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$f = string; /** * The contract to call for the hook */ type HookTarget$f = string; /** * The calldata to use when calling the hook */ type HookCallData$f = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$f = string; /** * CoW Hooks to call before an order executes */ type PreHooks$f = CoWHook$f[]; /** * CoW Hooks to call after an order executes */ type PostHooks$f = CoWHook$f[]; /** * The code identifying the UI powering the widget */ type AppCode1$f = string; /** * Environment from which the order came from. */ type Environment1$f = string; /** * 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) */ type BasisPointBPS$3 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$f = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$f { version: Version$f; appCode?: AppCode$f; environment?: Environment$f; metadata: Metadata$f; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$f { signer?: Signer$f; referrer?: Referrer$f; utm?: UTMCodes$f; quote?: Quote$f; orderClass?: OrderClass$f; hooks?: OrderInteractionHooks$f; widget?: Widget$f; partnerFee?: PartnerFee$f; } interface Referrer$f { address: ReferrerAddress$d; } interface UTMCodes$f { utmSource?: UTMSource$f; utmMedium?: UTMMedium$f; utmCampaign?: UTMCampaign$f; utmContent?: UTMContent$f; utmTerm?: UTMKeywordTerm$f; } interface Quote$f { slippageBips: SlippageBips$f; } interface OrderClass$f { orderClass: OrderClass1$f; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$f { version?: Version1$f; pre?: PreHooks$f; post?: PostHooks$f; } interface CoWHook$f { target: HookTarget$f; callData: HookCallData$f; gasLimit: HookGasLimit$f; } interface Widget$f { appCode: AppCode1$f; environment?: Environment1$f; } interface PartnerFee$f { bps: BasisPointBPS$3; recipient: PartnerAccount$f; } declare namespace v1_0_0 { export type { AppCode$f as AppCode, AppCode1$f as AppCode1, AppDataRootSchema$f as AppDataRootSchema, BasisPointBPS$3 as BasisPointBPS, CoWHook$f as CoWHook, Environment$f as Environment, Environment1$f as Environment1, HookCallData$f as HookCallData, HookGasLimit$f as HookGasLimit, HookTarget$f as HookTarget, Metadata$f as Metadata, OrderClass$f as OrderClass, OrderClass1$f as OrderClass1, OrderInteractionHooks$f as OrderInteractionHooks, PartnerAccount$f as PartnerAccount, PartnerFee$f as PartnerFee, PostHooks$f as PostHooks, PreHooks$f as PreHooks, Quote$f as Quote, Referrer$f as Referrer, ReferrerAddress$d as ReferrerAddress, Signer$f as Signer, SlippageBips$f as SlippageBips, UTMCampaign$f as UTMCampaign, UTMCodes$f as UTMCodes, UTMContent$f as UTMContent, UTMKeywordTerm$f as UTMKeywordTerm, UTMMedium$f as UTMMedium, UTMSource$f as UTMSource, Version$f as Version, Version1$f as Version1, Widget$f as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$e = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$e = string; /** * Environment from which the order came from. */ type Environment$e = string; /** * 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. */ type Signer$e = string; type ReferrerAddress$c = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$e = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$e = string; /** * Track the performance of a specific campaign */ type UTMCampaign$e = string; /** * Track which link was clicked */ type UTMContent$e = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$e = string; /** * 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) */ type SlippageBips$e = number; /** * Indicator of the order class. */ type OrderClass1$e = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$e = string; /** * The contract to call for the hook */ type HookTarget$e = string; /** * The calldata to use when calling the hook */ type HookCallData$e = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$e = string; /** * CoW Hooks to call before an order executes */ type PreHooks$e = CoWHook$e[]; /** * CoW Hooks to call after an order executes */ type PostHooks$e = CoWHook$e[]; /** * The code identifying the UI powering the widget */ type AppCode1$e = string; /** * Environment from which the order came from. */ type Environment1$e = string; /** * 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) */ type BasisPointBPS$2 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$e = string; /** * The replaced order UID. */ type ReplacedOrderUID$e = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$e { version: Version$e; appCode?: AppCode$e; environment?: Environment$e; metadata: Metadata$e; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$e { signer?: Signer$e; referrer?: Referrer$e; utm?: UTMCodes$e; quote?: Quote$e; orderClass?: OrderClass$e; hooks?: OrderInteractionHooks$e; widget?: Widget$e; partnerFee?: PartnerFee$e; replacedOrder?: ReplacedOrder$e; } interface Referrer$e { address: ReferrerAddress$c; } interface UTMCodes$e { utmSource?: UTMSource$e; utmMedium?: UTMMedium$e; utmCampaign?: UTMCampaign$e; utmContent?: UTMContent$e; utmTerm?: UTMKeywordTerm$e; } interface Quote$e { slippageBips: SlippageBips$e; } interface OrderClass$e { orderClass: OrderClass1$e; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$e { version?: Version1$e; pre?: PreHooks$e; post?: PostHooks$e; } interface CoWHook$e { target: HookTarget$e; callData: HookCallData$e; gasLimit: HookGasLimit$e; } interface Widget$e { appCode: AppCode1$e; environment?: Environment1$e; } interface PartnerFee$e { bps: BasisPointBPS$2; recipient: PartnerAccount$e; } interface ReplacedOrder$e { uid: ReplacedOrderUID$e; } declare namespace v1_1_0 { export type { AppCode$e as AppCode, AppCode1$e as AppCode1, AppDataRootSchema$e as AppDataRootSchema, BasisPointBPS$2 as BasisPointBPS, CoWHook$e as CoWHook, Environment$e as Environment, Environment1$e as Environment1, HookCallData$e as HookCallData, HookGasLimit$e as HookGasLimit, HookTarget$e as HookTarget, Metadata$e as Metadata, OrderClass$e as OrderClass, OrderClass1$e as OrderClass1, OrderInteractionHooks$e as OrderInteractionHooks, PartnerAccount$e as PartnerAccount, PartnerFee$e as PartnerFee, PostHooks$e as PostHooks, PreHooks$e as PreHooks, Quote$e as Quote, Referrer$e as Referrer, ReferrerAddress$c as ReferrerAddress, ReplacedOrder$e as ReplacedOrder, ReplacedOrderUID$e as ReplacedOrderUID, Signer$e as Signer, SlippageBips$e as SlippageBips, UTMCampaign$e as UTMCampaign, UTMCodes$e as UTMCodes, UTMContent$e as UTMContent, UTMKeywordTerm$e as UTMKeywordTerm, UTMMedium$e as UTMMedium, UTMSource$e as UTMSource, Version$e as Version, Version1$e as Version1, Widget$e as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$d = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$d = string; /** * Environment from which the order came from. */ type Environment$d = string; /** * 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. */ type Signer$d = string; type ReferrerAddress$b = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$d = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$d = string; /** * Track the performance of a specific campaign */ type UTMCampaign$d = string; /** * Track which link was clicked */ type UTMContent$d = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$d = string; /** * 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) */ type SlippageBips$d = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$d = boolean; /** * Indicator of the order class. */ type OrderClass1$d = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$d = string; /** * The contract to call for the hook */ type HookTarget$d = string; /** * The calldata to use when calling the hook */ type HookCallData$d = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$d = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$c = string; /** * CoW Hooks to call before an order executes */ type PreHooks$d = CoWHook$d[]; /** * CoW Hooks to call after an order executes */ type PostHooks$d = CoWHook$d[]; /** * The code identifying the UI powering the widget */ type AppCode1$d = string; /** * Environment from which the order came from. */ type Environment1$d = string; type PartnerFee$d = ({ volumeBps: VolumeBasisPointBPS$b; recipient: PartnerAccount$d; } | { surplusBps: SurplusBasisPointBPS$b; maxVolumeBps: MaxVolumeBasisPointBPS$b; recipient: PartnerAccount$d; } | { priceImprovementBps: PriceImprovementBasisPointBPS$b; maxVolumeBps: MaxVolumeBasisPointBPS$b; recipient: PartnerAccount$d; })[] | ({ volumeBps: VolumeBasisPointBPS$b; recipient: PartnerAccount$d; } | { surplusBps: SurplusBasisPointBPS$b; maxVolumeBps: MaxVolumeBasisPointBPS$b; recipient: PartnerAccount$d; } | { priceImprovementBps: PriceImprovementBasisPointBPS$b; maxVolumeBps: MaxVolumeBasisPointBPS$b; recipient: PartnerAccount$d; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS$b = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$d = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$b = number; /** * 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 MaxVolumeBasisPointBPS$b = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$b = number; /** * The replaced order UID. */ type ReplacedOrderUID$d = string; /** * The id links order with a bridging provider which processes it */ type IdOfBridgingProvider$6 = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId$a = string; /** * 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 BridgingDestinationTokenAddress$a = string; /** * An ID of a quote which is used for bridging */ type BridgeProviderQuoteId$5 = string; /** * Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity */ type BridgeProviderQuoteSignature$5 = string; /** * The amount of tokens to be flash loaned (in token units, as uint256) */ type LoanAmount$9 = string; /** * The Ethereum address of the flashloan liquidity provider */ type LiquidityProviderAddress$8 = string; /** * The Ethereum address of the protocol adapter */ type ProtocolAdapterAddress$8 = string; /** * The Ethereum address of the flashloan receiver */ type ReceiverAddress$8 = string; /** * The Ethereum address of the token being borrowed */ type TokenAddress$9 = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$d { version: Version$d; appCode?: AppCode$d; environment?: Environment$d; metadata: Metadata$d; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$d { signer?: Signer$d; referrer?: Referrer$d; utm?: UTMCodes$d; quote?: Quote$d; orderClass?: OrderClass$d; hooks?: OrderInteractionHooks$d; widget?: Widget$d; partnerFee?: PartnerFee$d; replacedOrder?: ReplacedOrder$d; bridging?: Bridging$a; flashloan?: Flashloan$9; } interface Referrer$d { address: ReferrerAddress$b; } interface UTMCodes$d { utmSource?: UTMSource$d; utmMedium?: UTMMedium$d; utmCampaign?: UTMCampaign$d; utmContent?: UTMContent$d; utmTerm?: UTMKeywordTerm$d; } interface Quote$d { slippageBips: SlippageBips$d; smartSlippage?: SmartSlippage$d; } interface OrderClass$d { orderClass: OrderClass1$d; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$d { version?: Version1$d; pre?: PreHooks$d; post?: PostHooks$d; } interface CoWHook$d { target: HookTarget$d; callData: HookCallData$d; gasLimit: HookGasLimit$d; dappId?: IdOfTheDAppWhichHasBuiltTheHook$c; } interface Widget$d { appCode: AppCode1$d; environment?: Environment1$d; } interface ReplacedOrder$d { uid: ReplacedOrderUID$d; } interface Bridging$a { providerId: IdOfBridgingProvider$6; destinationChainId: BridgingDestinationChainId$a; destinationTokenAddress: BridgingDestinationTokenAddress$a; quoteId?: BridgeProviderQuoteId$5; quoteSignature?: BridgeProviderQuoteSignature$5; } /** * Information about flashloan parameters for the order */ interface Flashloan$9 { amount: LoanAmount$9; liquidityProvider: LiquidityProviderAddress$8; protocolAdapter: ProtocolAdapterAddress$8; receiver: ReceiverAddress$8; token: TokenAddress$9; } declare namespace v1_10_0 { export type { AppCode$d as AppCode, AppCode1$d as AppCode1, AppDataRootSchema$d as AppDataRootSchema, BridgeProviderQuoteId$5 as BridgeProviderQuoteId, BridgeProviderQuoteSignature$5 as BridgeProviderQuoteSignature, Bridging$a as Bridging, BridgingDestinationChainId$a as BridgingDestinationChainId, BridgingDestinationTokenAddress$a as BridgingDestinationTokenAddress, CoWHook$d as CoWHook, Environment$d as Environment, Environment1$d as Environment1, Flashloan$9 as Flashloan, HookCallData$d as HookCallData, HookGasLimit$d as HookGasLimit, HookTarget$d as HookTarget, IdOfBridgingProvider$6 as IdOfBridgingProvider, IdOfTheDAppWhichHasBuiltTheHook$c as IdOfTheDAppWhichHasBuiltTheHook, LiquidityProviderAddress$8 as LiquidityProviderAddress, LoanAmount$9 as LoanAmount, MaxVolumeBasisPointBPS$b as MaxVolumeBasisPointBPS, Metadata$d as Metadata, OrderClass$d as OrderClass, OrderClass1$d as OrderClass1, OrderInteractionHooks$d as OrderInteractionHooks, PartnerAccount$d as PartnerAccount, PartnerFee$d as PartnerFee, PostHooks$d as PostHooks, PreHooks$d as PreHooks, PriceImprovementBasisPointBPS$b as PriceImprovementBasisPointBPS, ProtocolAdapterAddress$8 as ProtocolAdapterAddress, Quote$d as Quote, ReceiverAddress$8 as ReceiverAddress, Referrer$d as Referrer, ReferrerAddress$b as ReferrerAddress, ReplacedOrder$d as ReplacedOrder, ReplacedOrderUID$d as ReplacedOrderUID, Signer$d as Signer, SlippageBips$d as SlippageBips, SmartSlippage$d as SmartSlippage, SurplusBasisPointBPS$b as SurplusBasisPointBPS, TokenAddress$9 as TokenAddress, UTMCampaign$d as UTMCampaign, UTMCodes$d as UTMCodes, UTMContent$d as UTMContent, UTMKeywordTerm$d as UTMKeywordTerm, UTMMedium$d as UTMMedium, UTMSource$d as UTMSource, Version$d as Version, Version1$d as Version1, VolumeBasisPointBPS$b as VolumeBasisPointBPS, Widget$d as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$c = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$c = string; /** * Environment from which the order came from. */ type Environment$c = string; /** * 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. */ type Signer$c = string; type ReferrerAddress$a = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$c = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$c = string; /** * Track the performance of a specific campaign */ type UTMCampaign$c = string; /** * Track which link was clicked */ type UTMContent$c = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$c = string; /** * 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) */ type SlippageBips$c = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$c = boolean; /** * Indicator of the order class. */ type OrderClass1$c = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$c = string; /** * The contract to call for the hook */ type HookTarget$c = string; /** * The calldata to use when calling the hook */ type HookCallData$c = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$c = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$b = string; /** * CoW Hooks to call before an order executes */ type PreHooks$c = CoWHook$c[]; /** * CoW Hooks to call after an order executes */ type PostHooks$c = CoWHook$c[]; /** * The code identifying the UI powering the widget */ type AppCode1$c = string; /** * Environment from which the order came from. */ type Environment1$c = string; type PartnerFee$c = ({ volumeBps: VolumeBasisPointBPS$a; recipient: PartnerAccount$c; } | { surplusBps: SurplusBasisPointBPS$a; maxVolumeBps: MaxVolumeBasisPointBPS$a; recipient: PartnerAccount$c; } | { priceImprovementBps: PriceImprovementBasisPointBPS$a; maxVolumeBps: MaxVolumeBasisPointBPS$a; recipient: PartnerAccount$c; })[] | ({ volumeBps: VolumeBasisPointBPS$a; recipient: PartnerAccount$c; } | { surplusBps: SurplusBasisPointBPS$a; maxVolumeBps: MaxVolumeBasisPointBPS$a; recipient: PartnerAccount$c; } | { priceImprovementBps: PriceImprovementBasisPointBPS$a; maxVolumeBps: MaxVolumeBasisPointBPS$a; recipient: PartnerAccount$c; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS$a = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$c = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$a = number; /** * 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 MaxVolumeBasisPointBPS$a = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$a = number; /** * The replaced order UID. */ type ReplacedOrderUID$c = string; /** * The id links order with a bridging provider which processes it */ type IdOfBridgingProvider$5 = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId$9 = string; /** * 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 BridgingDestinationTokenAddress$9 = string; /** * An ID of a quote which is used for bridging */ type BridgeProviderQuoteId$4 = string; /** * Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity */ type BridgeProviderQuoteSignature$4 = string; /** * The amount of tokens to be flash loaned (in token units, as uint256) */ type LoanAmount$8 = string; /** * The Ethereum address of the flashloan liquidity provider */ type LiquidityProviderAddress$7 = string; /** * The Ethereum address of the protocol adapter */ type ProtocolAdapterAddress$7 = string; /** * The Ethereum address of the flashloan receiver */ type ReceiverAddress$7 = string; /** * The Ethereum address of the token being borrowed */ type TokenAddress$8 = string; /** * The Ethereum address of the wrapper to execute */ type WrapperAddress$4 = string; /** * 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) */ type WrapperData$4 = string; /** * 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 IsOmittable$4 = boolean; /** * Information about wrappers to execute for the order */ type Wrappers$4 = WrapperEntry$4[]; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$c { version: Version$c; appCode?: AppCode$c; environment?: Environment$c; metadata: Metadata$c; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$c { signer?: Signer$c; referrer?: Referrer$c; utm?: UTMCodes$c; quote?: Quote$c; orderClass?: OrderClass$c; hooks?: OrderInteractionHooks$c; widget?: Widget$c; partnerFee?: PartnerFee$c; replacedOrder?: ReplacedOrder$c; bridging?: Bridging$9; flashloan?: Flashloan$8; wrappers?: Wrappers$4; } interface Referrer$c { address: ReferrerAddress$a; } interface UTMCodes$c { utmSource?: UTMSource$c; utmMedium?: UTMMedium$c; utmCampaign?: UTMCampaign$c; utmContent?: UTMContent$c; utmTerm?: UTMKeywordTerm$c; } interface Quote$c { slippageBips: SlippageBips$c; smartSlippage?: SmartSlippage$c; } interface OrderClass$c { orderClass: OrderClass1$c; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$c { version?: Version1$c; pre?: PreHooks$c; post?: PostHooks$c; } interface CoWHook$c { target: HookTarget$c; callData: HookCallData$c; gasLimit: HookGasLimit$c; dappId?: IdOfTheDAppWhichHasBuiltTheHook$b; } interface Widget$c { appCode: AppCode1$c; environment?: Environment1$c; } interface ReplacedOrder$c { uid: ReplacedOrderUID$c; } interface Bridging$9 { providerId: IdOfBridgingProvider$5; destinationChainId: BridgingDestinationChainId$9; destinationTokenAddress: BridgingDestinationTokenAddress$9; quoteId?: BridgeProviderQuoteId$4; quoteSignature?: BridgeProviderQuoteSignature$4; } /** * Information about flashloan parameters for the order */ interface Flashloan$8 { amount: LoanAmount$8; liquidityProvider: LiquidityProviderAddress$7; protocolAdapter: ProtocolAdapterAddress$7; receiver: ReceiverAddress$7; token: TokenAddress$8; } /** * Information about an individual wrapper to execute for the order */ interface WrapperEntry$4 { address: WrapperAddress$4; data?: WrapperData$4; is_omittable?: IsOmittable$4; } declare namespace v1_11_0 { export type { AppCode$c as AppCode, AppCode1$c as AppCode1, AppDataRootSchema$c as AppDataRootSchema, BridgeProviderQuoteId$4 as BridgeProviderQuoteId, BridgeProviderQuoteSignature$4 as BridgeProviderQuoteSignature, Bridging$9 as Bridging, BridgingDestinationChainId$9 as BridgingDestinationChainId, BridgingDestinationTokenAddress$9 as BridgingDestinationTokenAddress, CoWHook$c as CoWHook, Environment$c as Environment, Environment1$c as Environment1, Flashloan$8 as Flashloan, HookCallData$c as HookCallData, HookGasLimit$c as HookGasLimit, HookTarget$c as HookTarget, IdOfBridgingProvider$5 as IdOfBridgingProvider, IdOfTheDAppWhichHasBuiltTheHook$b as IdOfTheDAppWhichHasBuiltTheHook, IsOmittable$4 as IsOmittable, LiquidityProviderAddress$7 as LiquidityProviderAddress, LoanAmount$8 as LoanAmount, MaxVolumeBasisPointBPS$a as MaxVolumeBasisPointBPS, Metadata$c as Metadata, OrderClass$c as OrderClass, OrderClass1$c as OrderClass1, OrderInteractionHooks$c as OrderInteractionHooks, PartnerAccount$c as PartnerAccount, PartnerFee$c as PartnerFee, PostHooks$c as PostHooks, PreHooks$c as PreHooks, PriceImprovementBasisPointBPS$a as PriceImprovementBasisPointBPS, ProtocolAdapterAddress$7 as ProtocolAdapterAddress, Quote$c as Quote, ReceiverAddress$7 as ReceiverAddress, Referrer$c as Referrer, ReferrerAddress$a as ReferrerAddress, ReplacedOrder$c as ReplacedOrder, ReplacedOrderUID$c as ReplacedOrderUID, Signer$c as Signer, SlippageBips$c as SlippageBips, SmartSlippage$c as SmartSlippage, SurplusBasisPointBPS$a as SurplusBasisPointBPS, TokenAddress$8 as TokenAddress, UTMCampaign$c as UTMCampaign, UTMCodes$c as UTMCodes, UTMContent$c as UTMContent, UTMKeywordTerm$c as UTMKeywordTerm, UTMMedium$c as UTMMedium, UTMSource$c as UTMSource, Version$c as Version, Version1$c as Version1, VolumeBasisPointBPS$a as VolumeBasisPointBPS, Widget$c as Widget, WrapperAddress$4 as WrapperAddress, WrapperData$4 as WrapperData, WrapperEntry$4 as WrapperEntry, Wrappers$4 as Wrappers }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$b = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$b = string; /** * Environment from which the order came from. */ type Environment$b = string; /** * 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. */ type Signer$b = string; type ReferrerAddress$9 = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$b = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$b = string; /** * Track the performance of a specific campaign */ type UTMCampaign$b = string; /** * Track which link was clicked */ type UTMContent$b = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$b = string; /** * 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) */ type SlippageBips$b = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$b = boolean; /** * Indicator of the order class. */ type OrderClass1$b = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$b = string; /** * The contract to call for the hook */ type HookTarget$b = string; /** * The calldata to use when calling the hook */ type HookCallData$b = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$b = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$a = string; /** * CoW Hooks to call before an order executes */ type PreHooks$b = CoWHook$b[]; /** * CoW Hooks to call after an order executes */ type PostHooks$b = CoWHook$b[]; /** * The code identifying the UI powering the widget */ type AppCode1$b = string; /** * Environment from which the order came from. */ type Environment1$b = string; type PartnerFee$b = ({ volumeBps: VolumeBasisPointBPS$9; recipient: PartnerAccount$b; } | { surplusBps: SurplusBasisPointBPS$9; maxVolumeBps: MaxVolumeBasisPointBPS$9; recipient: PartnerAccount$b; } | { priceImprovementBps: PriceImprovementBasisPointBPS$9; maxVolumeBps: MaxVolumeBasisPointBPS$9; recipient: PartnerAccount$b; })[] | ({ volumeBps: VolumeBasisPointBPS$9; recipient: PartnerAccount$b; } | { surplusBps: SurplusBasisPointBPS$9; maxVolumeBps: MaxVolumeBasisPointBPS$9; recipient: PartnerAccount$b; } | { priceImprovementBps: PriceImprovementBasisPointBPS$9; maxVolumeBps: MaxVolumeBasisPointBPS$9; recipient: PartnerAccount$b; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS$9 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$b = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$9 = number; /** * 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 MaxVolumeBasisPointBPS$9 = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$9 = number; /** * The replaced order UID. */ type ReplacedOrderUID$b = string; /** * The id links order with a bridging provider which processes it */ type IdOfBridgingProvider$4 = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId$8 = string; /** * 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 BridgingDestinationTokenAddress$8 = string; /** * An ID of a quote which is used for bridging */ type BridgeProviderQuoteId$3 = string; /** * Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity */ type BridgeProviderQuoteSignature$3 = string; /** * For ReceiverAccountBridgeProvider, this is the attestation signature from the bridge provider that validates the deposit address. Empty for other provider types. */ type BridgeProviderAttestationSignature$3 = string; /** * A stringified JSON of quote which is associated with the order. */ type BridgeProviderQuoteBody$3 = string; /** * The amount of tokens to be flash loaned (in token units, as uint256) */ type LoanAmount$7 = string; /** * The Ethereum address of the flashloan liquidity provider */ type LiquidityProviderAddress$6 = string; /** * The Ethereum address of the protocol adapter */ type ProtocolAdapterAddress$6 = string; /** * The Ethereum address of the flashloan receiver */ type ReceiverAddress$6 = string; /** * The Ethereum address of the token being borrowed */ type TokenAddress$7 = string; /** * The Ethereum address of the wrapper to execute */ type WrapperAddress$3 = string; /** * 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) */ type WrapperData$3 = string; /** * 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 IsOmittable$3 = boolean; /** * Information about wrappers to execute for the order */ type Wrappers$3 = WrapperEntry$3[]; /** * Array of user consents for terms acceptance */ type UserConsents$3 = { /** * IPFS hash of the accepted terms */ terms: string; /** * ISO 8601 date-time when user accepted the terms in the UI */ acceptedDate: string; }[]; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$b { version: Version$b; appCode?: AppCode$b; environment?: Environment$b; metadata: Metadata$b; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$b { signer?: Signer$b; referrer?: Referrer$b; utm?: UTMCodes$b; quote?: Quote$b; orderClass?: OrderClass$b; hooks?: OrderInteractionHooks$b; widget?: Widget$b; partnerFee?: PartnerFee$b; replacedOrder?: ReplacedOrder$b; bridging?: Bridging$8; flashloan?: Flashloan$7; wrappers?: Wrappers$3; userConsents?: UserConsents$3; } interface Referrer$b { address: ReferrerAddress$9; } interface UTMCodes$b { utmSource?: UTMSource$b; utmMedium?: UTMMedium$b; utmCampaign?: UTMCampaign$b; utmContent?: UTMContent$b; utmTerm?: UTMKeywordTerm$b; } interface Quote$b { slippageBips: SlippageBips$b; smartSlippage?: SmartSlippage$b; } interface OrderClass$b { orderClass: OrderClass1$b; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$b { version?: Version1$b; pre?: PreHooks$b; post?: PostHooks$b; } interface CoWHook$b { target: HookTarget$b; callData: HookCallData$b; gasLimit: HookGasLimit$b; dappId?: IdOfTheDAppWhichHasBuiltTheHook$a; } interface Widget$b { appCode: AppCode1$b; environment?: Environment1$b; } interface ReplacedOrder$b { uid: ReplacedOrderUID$b; } interface Bridging$8 { providerId: IdOfBridgingProvider$4; destinationChainId: BridgingDestinationChainId$8; destinationTokenAddress: BridgingDestinationTokenAddress$8; quoteId?: BridgeProviderQuoteId$3; quoteSignature?: BridgeProviderQuoteSignature$3; attestationSignature?: BridgeProviderAttestationSignature$3; quoteBody?: BridgeProviderQuoteBody$3; } /** * Information about flashloan parameters for the order */ interface Flashloan$7 { amount: LoanAmount$7; liquidityProvider: LiquidityProviderAddress$6; protocolAdapter: ProtocolAdapterAddress$6; receiver: ReceiverAddress$6; token: TokenAddress$7; } /** * Information about an individual wrapper to execute for the order */ interface WrapperEntry$3 { address: WrapperAddress$3; data?: WrapperData$3; is_omittable?: IsOmittable$3; } declare namespace v1_12_0 { export type { AppCode$b as AppCode, AppCode1$b as AppCode1, AppDataRootSchema$b as AppDataRootSchema, BridgeProviderAttestationSignature$3 as BridgeProviderAttestationSignature, BridgeProviderQuoteBody$3 as BridgeProviderQuoteBody, BridgeProviderQuoteId$3 as BridgeProviderQuoteId, BridgeProviderQuoteSignature$3 as BridgeProviderQuoteSignature, Bridging$8 as Bridging, BridgingDestinationChainId$8 as BridgingDestinationChainId, BridgingDestinationTokenAddress$8 as BridgingDestinationTokenAddress, CoWHook$b as CoWHook, Environment$b as Environment, Environment1$b as Environment1, Flashloan$7 as Flashloan, HookCallData$b as HookCallData, HookGasLimit$b as HookGasLimit, HookTarget$b as HookTarget, IdOfBridgingProvider$4 as IdOfBridgingProvider, IdOfTheDAppWhichHasBuiltTheHook$a as IdOfTheDAppWhichHasBuiltTheHook, IsOmittable$3 as IsOmittable, LiquidityProviderAddress$6 as LiquidityProviderAddress, LoanAmount$7 as LoanAmount, MaxVolumeBasisPointBPS$9 as MaxVolumeBasisPointBPS, Metadata$b as Metadata, OrderClass$b as OrderClass, OrderClass1$b as OrderClass1, OrderInteractionHooks$b as OrderInteractionHooks, PartnerAccount$b as PartnerAccount, PartnerFee$b as PartnerFee, PostHooks$b as PostHooks, PreHooks$b as PreHooks, PriceImprovementBasisPointBPS$9 as PriceImprovementBasisPointBPS, ProtocolAdapterAddress$6 as ProtocolAdapterAddress, Quote$b as Quote, ReceiverAddress$6 as ReceiverAddress, Referrer$b as Referrer, ReferrerAddress$9 as ReferrerAddress, ReplacedOrder$b as ReplacedOrder, ReplacedOrderUID$b as ReplacedOrderUID, Signer$b as Signer, SlippageBips$b as SlippageBips, SmartSlippage$b as SmartSlippage, SurplusBasisPointBPS$9 as SurplusBasisPointBPS, TokenAddress$7 as TokenAddress, UTMCampaign$b as UTMCampaign, UTMCodes$b as UTMCodes, UTMContent$b as UTMContent, UTMKeywordTerm$b as UTMKeywordTerm, UTMMedium$b as UTMMedium, UTMSource$b as UTMSource, UserConsents$3 as UserConsents, Version$b as Version, Version1$b as Version1, VolumeBasisPointBPS$9 as VolumeBasisPointBPS, Widget$b as Widget, WrapperAddress$3 as WrapperAddress, WrapperData$3 as WrapperData, WrapperEntry$3 as WrapperEntry, Wrappers$3 as Wrappers }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$a = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$a = string; /** * Environment from which the order came from. */ type Environment$a = string; /** * 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. */ type Signer$a = string; type ReferrerAddress$8 = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$a = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$a = string; /** * Track the performance of a specific campaign */ type UTMCampaign$a = string; /** * Track which link was clicked */ type UTMContent$a = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$a = string; /** * 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) */ type SlippageBips$a = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$a = boolean; /** * Indicator of the order class. */ type OrderClass1$a = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$a = string; /** * The contract to call for the hook */ type HookTarget$a = string; /** * The calldata to use when calling the hook */ type HookCallData$a = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$a = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$9 = string; /** * CoW Hooks to call before an order executes */ type PreHooks$a = CoWHook$a[]; /** * CoW Hooks to call after an order executes */ type PostHooks$a = CoWHook$a[]; /** * The code identifying the UI powering the widget */ type AppCode1$a = string; /** * Environment from which the order came from. */ type Environment1$a = string; type PartnerFee$a = ({ volumeBps: VolumeBasisPointBPS$8; recipient: PartnerAccount$a; } | { surplusBps: SurplusBasisPointBPS$8; maxVolumeBps: MaxVolumeBasisPointBPS$8; recipient: PartnerAccount$a; } | { priceImprovementBps: PriceImprovementBasisPointBPS$8; maxVolumeBps: MaxVolumeBasisPointBPS$8; recipient: PartnerAccount$a; })[] | ({ volumeBps: VolumeBasisPointBPS$8; recipient: PartnerAccount$a; } | { surplusBps: SurplusBasisPointBPS$8; maxVolumeBps: MaxVolumeBasisPointBPS$8; recipient: PartnerAccount$a; } | { priceImprovementBps: PriceImprovementBasisPointBPS$8; maxVolumeBps: MaxVolumeBasisPointBPS$8; recipient: PartnerAccount$a; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS$8 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$a = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$8 = number; /** * 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 MaxVolumeBasisPointBPS$8 = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$8 = number; /** * The replaced order UID. */ type ReplacedOrderUID$a = string; /** * The id links order with a bridging provider which processes it */ type IdOfBridgingProvider$3 = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId$7 = string; /** * 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 BridgingDestinationTokenAddress$7 = string; /** * An ID of a quote which is used for bridging */ type BridgeProviderQuoteId$2 = string; /** * Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity */ type BridgeProviderQuoteSignature$2 = string; /** * For ReceiverAccountBridgeProvider, this is the attestation signature from the bridge provider that validates the deposit address. Empty for other provider types. */ type BridgeProviderAttestationSignature$2 = string; /** * A stringified JSON of quote which is associated with the order. */ type BridgeProviderQuoteBody$2 = string; /** * The amount of tokens to be flash loaned (in token units, as uint256) */ type LoanAmount$6 = string; /** * The Ethereum address of the flashloan liquidity provider */ type LiquidityProviderAddress$5 = string; /** * The Ethereum address of the protocol adapter */ type ProtocolAdapterAddress$5 = string; /** * The Ethereum address of the flashloan receiver */ type ReceiverAddress$5 = string; /** * The Ethereum address of the token being borrowed */ type TokenAddress$6 = string; /** * The Ethereum address of the wrapper to execute */ type WrapperAddress$2 = string; /** * 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) */ type WrapperData$2 = string; /** * 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 IsOmittable$2 = boolean; /** * Information about wrappers to execute for the order */ type Wrappers$2 = WrapperEntry$2[]; /** * Array of user consents for terms acceptance */ type UserConsents$2 = { /** * IPFS hash of the accepted terms */ terms: string; /** * ISO 8601 date-time when user accepted the terms in the UI */ acceptedDate: string; }[]; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$a { version: Version$a; appCode?: AppCode$a; environment?: Environment$a; metadata: Metadata$a; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$a { signer?: Signer$a; referrer?: Referrer$a; utm?: UTMCodes$a; quote?: Quote$a; orderClass?: OrderClass$a; hooks?: OrderInteractionHooks$a; widget?: Widget$a; partnerFee?: PartnerFee$a; replacedOrder?: ReplacedOrder$a; bridging?: Bridging$7; flashloan?: Flashloan$6; wrappers?: Wrappers$2; userConsents?: UserConsents$2; } interface Referrer$a { address: ReferrerAddress$8; } interface UTMCodes$a { utmSource?: UTMSource$a; utmMedium?: UTMMedium$a; utmCampaign?: UTMCampaign$a; utmContent?: UTMContent$a; utmTerm?: UTMKeywordTerm$a; } interface Quote$a { slippageBips: SlippageBips$a; smartSlippage?: SmartSlippage$a; } interface OrderClass$a { orderClass: OrderClass1$a; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$a { version?: Version1$a; pre?: PreHooks$a; post?: PostHooks$a; } interface CoWHook$a { target: HookTarget$a; callData: HookCallData$a; gasLimit: HookGasLimit$a; dappId?: IdOfTheDAppWhichHasBuiltTheHook$9; } interface Widget$a { appCode: AppCode1$a; environment?: Environment1$a; } interface ReplacedOrder$a { uid: ReplacedOrderUID$a; } interface Bridging$7 { providerId: IdOfBridgingProvider$3; destinationChainId: BridgingDestinationChainId$7; destinationTokenAddress: BridgingDestinationTokenAddress$7; quoteId?: BridgeProviderQuoteId$2; quoteSignature?: BridgeProviderQuoteSignature$2; attestationSignature?: BridgeProviderAttestationSignature$2; quoteBody?: BridgeProviderQuoteBody$2; } /** * Information about flashloan parameters for the order */ interface Flashloan$6 { amount: LoanAmount$6; liquidityProvider: LiquidityProviderAddress$5; protocolAdapter: ProtocolAdapterAddress$5; receiver: ReceiverAddress$5; token: TokenAddress$6; } /** * Information about an individual wrapper to execute for the order */ interface WrapperEntry$2 { address: WrapperAddress$2; data?: WrapperData$2; isOmittable?: IsOmittable$2; } declare namespace v1_13_0 { export type { AppCode$a as AppCode, AppCode1$a as AppCode1, AppDataRootSchema$a as AppDataRootSchema, BridgeProviderAttestationSignature$2 as BridgeProviderAttestationSignature, BridgeProviderQuoteBody$2 as BridgeProviderQuoteBody, BridgeProviderQuoteId$2 as BridgeProviderQuoteId, BridgeProviderQuoteSignature$2 as BridgeProviderQuoteSignature, Bridging$7 as Bridging, BridgingDestinationChainId$7 as BridgingDestinationChainId, BridgingDestinationTokenAddress$7 as BridgingDestinationTokenAddress, CoWHook$a as CoWHook, Environment$a as Environment, Environment1$a as Environment1, Flashloan$6 as Flashloan, HookCallData$a as HookCallData, HookGasLimit$a as HookGasLimit, HookTarget$a as HookTarget, IdOfBridgingProvider$3 as IdOfBridgingProvider, IdOfTheDAppWhichHasBuiltTheHook$9 as IdOfTheDAppWhichHasBuiltTheHook, IsOmittable$2 as IsOmittable, LiquidityProviderAddress$5 as LiquidityProviderAddress, LoanAmount$6 as LoanAmount, MaxVolumeBasisPointBPS$8 as MaxVolumeBasisPointBPS, Metadata$a as Metadata, OrderClass$a as OrderClass, OrderClass1$a as OrderClass1, OrderInteractionHooks$a as OrderInteractionHooks, PartnerAccount$a as PartnerAccount, PartnerFee$a as PartnerFee, PostHooks$a as PostHooks, PreHooks$a as PreHooks, PriceImprovementBasisPointBPS$8 as PriceImprovementBasisPointBPS, ProtocolAdapterAddress$5 as ProtocolAdapterAddress, Quote$a as Quote, ReceiverAddress$5 as ReceiverAddress, Referrer$a as Referrer, ReferrerAddress$8 as ReferrerAddress, ReplacedOrder$a as ReplacedOrder, ReplacedOrderUID$a as ReplacedOrderUID, Signer$a as Signer, SlippageBips$a as SlippageBips, SmartSlippage$a as SmartSlippage, SurplusBasisPointBPS$8 as SurplusBasisPointBPS, TokenAddress$6 as TokenAddress, UTMCampaign$a as UTMCampaign, UTMCodes$a as UTMCodes, UTMContent$a as UTMContent, UTMKeywordTerm$a as UTMKeywordTerm, UTMMedium$a as UTMMedium, UTMSource$a as UTMSource, UserConsents$2 as UserConsents, Version$a as Version, Version1$a as Version1, VolumeBasisPointBPS$8 as VolumeBasisPointBPS, Widget$a as Widget, WrapperAddress$2 as WrapperAddress, WrapperData$2 as WrapperData, WrapperEntry$2 as WrapperEntry, Wrappers$2 as Wrappers }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$9 = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$9 = string; /** * Environment from which the order came from. */ type Environment$9 = string; /** * 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. */ type Signer$9 = string; /** * Affiliate/referral code (case-insensitive, stored uppercase). */ type ReferrerCode$1 = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$9 = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$9 = string; /** * Track the performance of a specific campaign */ type UTMCampaign$9 = string; /** * Track which link was clicked */ type UTMContent$9 = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$9 = string; /** * 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) */ type SlippageBips$9 = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$9 = boolean; /** * Indicator of the order class. */ type OrderClass1$9 = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$9 = string; /** * The contract to call for the hook */ type HookTarget$9 = string; /** * The calldata to use when calling the hook */ type HookCallData$9 = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$9 = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$8 = string; /** * CoW Hooks to call before an order executes */ type PreHooks$9 = CoWHook$9[]; /** * CoW Hooks to call after an order executes */ type PostHooks$9 = CoWHook$9[]; /** * The code identifying the UI powering the widget */ type AppCode1$9 = string; /** * Environment from which the order came from. */ type Environment1$9 = string; type PartnerFee$9 = ({ volumeBps: VolumeBasisPointBPS$7; recipient: PartnerAccount$9; } | { surplusBps: SurplusBasisPointBPS$7; maxVolumeBps: MaxVolumeBasisPointBPS$7; recipient: PartnerAccount$9; } | { priceImprovementBps: PriceImprovementBasisPointBPS$7; maxVolumeBps: MaxVolumeBasisPointBPS$7; recipient: PartnerAccount$9; })[] | ({ volumeBps: VolumeBasisPointBPS$7; recipient: PartnerAccount$9; } | { surplusBps: SurplusBasisPointBPS$7; maxVolumeBps: MaxVolumeBasisPointBPS$7; recipient: PartnerAccount$9; } | { priceImprovementBps: PriceImprovementBasisPointBPS$7; maxVolumeBps: MaxVolumeBasisPointBPS$7; recipient: PartnerAccount$9; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS$7 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$9 = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$7 = number; /** * 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 MaxVolumeBasisPointBPS$7 = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$7 = number; /** * The replaced order UID. */ type ReplacedOrderUID$9 = string; /** * The id links order with a bridging provider which processes it */ type IdOfBridgingProvider$2 = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId$6 = string; /** * 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 BridgingDestinationTokenAddress$6 = string; /** * An ID of a quote which is used for bridging */ type BridgeProviderQuoteId$1 = string; /** * Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity */ type BridgeProviderQuoteSignature$1 = string; /** * For ReceiverAccountBridgeProvider, this is the attestation signature from the bridge provider that validates the deposit address. Empty for other provider types. */ type BridgeProviderAttestationSignature$1 = string; /** * A stringified JSON of quote which is associated with the order. */ type BridgeProviderQuoteBody$1 = string; /** * The amount of tokens to be flash loaned (in token units, as uint256) */ type LoanAmount$5 = string; /** * The Ethereum address of the flashloan liquidity provider */ type LiquidityProviderAddress$4 = string; /** * The Ethereum address of the protocol adapter */ type ProtocolAdapterAddress$4 = string; /** * The Ethereum address of the flashloan receiver */ type ReceiverAddress$4 = string; /** * The Ethereum address of the token being borrowed */ type TokenAddress$5 = string; /** * The Ethereum address of the wrapper to execute */ type WrapperAddress$1 = string; /** * 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) */ type WrapperData$1 = string; /** * 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 IsOmittable$1 = boolean; /** * Information about wrappers to execute for the order */ type Wrappers$1 = WrapperEntry$1[]; /** * Array of user consents for terms acceptance */ type UserConsents$1 = { /** * IPFS hash of the accepted terms */ terms: string; /** * ISO 8601 date-time when user accepted the terms in the UI */ acceptedDate: string; }[]; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$9 { version: Version$9; appCode?: AppCode$9; environment?: Environment$9; metadata: Metadata$9; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$9 { signer?: Signer$9; referrer?: Referrer$9; utm?: UTMCodes$9; quote?: Quote$9; orderClass?: OrderClass$9; hooks?: OrderInteractionHooks$9; widget?: Widget$9; partnerFee?: PartnerFee$9; replacedOrder?: ReplacedOrder$9; bridging?: Bridging$6; flashloan?: Flashloan$5; wrappers?: Wrappers$1; userConsents?: UserConsents$1; } interface Referrer$9 { code: ReferrerCode$1; } interface UTMCodes$9 { utmSource?: UTMSource$9; utmMedium?: UTMMedium$9; utmCampaign?: UTMCampaign$9; utmContent?: UTMContent$9; utmTerm?: UTMKeywordTerm$9; } interface Quote$9 { slippageBips: SlippageBips$9; smartSlippage?: SmartSlippage$9; } interface OrderClass$9 { orderClass: OrderClass1$9; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$9 { version?: Version1$9; pre?: PreHooks$9; post?: PostHooks$9; } interface CoWHook$9 { target: HookTarget$9; callData: HookCallData$9; gasLimit: HookGasLimit$9; dappId?: IdOfTheDAppWhichHasBuiltTheHook$8; } interface Widget$9 { appCode: AppCode1$9; environment?: Environment1$9; } interface ReplacedOrder$9 { uid: ReplacedOrderUID$9; } interface Bridging$6 { providerId: IdOfBridgingProvider$2; destinationChainId: BridgingDestinationChainId$6; destinationTokenAddress: BridgingDestinationTokenAddress$6; quoteId?: BridgeProviderQuoteId$1; quoteSignature?: BridgeProviderQuoteSignature$1; attestationSignature?: BridgeProviderAttestationSignature$1; quoteBody?: BridgeProviderQuoteBody$1; } /** * Information about flashloan parameters for the order */ interface Flashloan$5 { amount: LoanAmount$5; liquidityProvider: LiquidityProviderAddress$4; protocolAdapter: ProtocolAdapterAddress$4; receiver: ReceiverAddress$4; token: TokenAddress$5; } /** * Information about an individual wrapper to execute for the order */ interface WrapperEntry$1 { address: WrapperAddress$1; data?: WrapperData$1; isOmittable?: IsOmittable$1; } declare namespace v1_14_0 { export type { AppCode$9 as AppCode, AppCode1$9 as AppCode1, AppDataRootSchema$9 as AppDataRootSchema, BridgeProviderAttestationSignature$1 as BridgeProviderAttestationSignature, BridgeProviderQuoteBody$1 as BridgeProviderQuoteBody, BridgeProviderQuoteId$1 as BridgeProviderQuoteId, BridgeProviderQuoteSignature$1 as BridgeProviderQuoteSignature, Bridging$6 as Bridging, BridgingDestinationChainId$6 as BridgingDestinationChainId, BridgingDestinationTokenAddress$6 as BridgingDestinationTokenAddress, CoWHook$9 as CoWHook, Environment$9 as Environment, Environment1$9 as Environment1, Flashloan$5 as Flashloan, HookCallData$9 as HookCallData, HookGasLimit$9 as HookGasLimit, HookTarget$9 as HookTarget, IdOfBridgingProvider$2 as IdOfBridgingProvider, IdOfTheDAppWhichHasBuiltTheHook$8 as IdOfTheDAppWhichHasBuiltTheHook, IsOmittable$1 as IsOmittable, LiquidityProviderAddress$4 as LiquidityProviderAddress, LoanAmount$5 as LoanAmount, MaxVolumeBasisPointBPS$7 as MaxVolumeBasisPointBPS, Metadata$9 as Metadata, OrderClass$9 as OrderClass, OrderClass1$9 as OrderClass1, OrderInteractionHooks$9 as OrderInteractionHooks, PartnerAccount$9 as PartnerAccount, PartnerFee$9 as PartnerFee, PostHooks$9 as PostHooks, PreHooks$9 as PreHooks, PriceImprovementBasisPointBPS$7 as PriceImprovementBasisPointBPS, ProtocolAdapterAddress$4 as ProtocolAdapterAddress, Quote$9 as Quote, ReceiverAddress$4 as ReceiverAddress, Referrer$9 as Referrer, ReferrerCode$1 as ReferrerCode, ReplacedOrder$9 as ReplacedOrder, ReplacedOrderUID$9 as ReplacedOrderUID, Signer$9 as Signer, SlippageBips$9 as SlippageBips, SmartSlippage$9 as SmartSlippage, SurplusBasisPointBPS$7 as SurplusBasisPointBPS, TokenAddress$5 as TokenAddress, UTMCampaign$9 as UTMCampaign, UTMCodes$9 as UTMCodes, UTMContent$9 as UTMContent, UTMKeywordTerm$9 as UTMKeywordTerm, UTMMedium$9 as UTMMedium, UTMSource$9 as UTMSource, UserConsents$1 as UserConsents, Version$9 as Version, Version1$9 as Version1, VolumeBasisPointBPS$7 as VolumeBasisPointBPS, Widget$9 as Widget, WrapperAddress$1 as WrapperAddress, WrapperData$1 as WrapperData, WrapperEntry$1 as WrapperEntry, Wrappers$1 as Wrappers }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$8 = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$8 = string; /** * Environment from which the order came from. */ type Environment$8 = string; /** * 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. */ type Signer$8 = string; /** * Affiliate/referral code (case-insensitive, stored uppercase). */ type ReferrerCode = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$8 = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$8 = string; /** * Track the performance of a specific campaign */ type UTMCampaign$8 = string; /** * Track which link was clicked */ type UTMContent$8 = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$8 = string; /** * 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) */ type SlippageBips$8 = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$8 = boolean; /** * Indicator of the order class. */ type OrderClass1$8 = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$8 = string; /** * The contract to call for the hook */ type HookTarget$8 = string; /** * The calldata to use when calling the hook */ type HookCallData$8 = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$8 = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$7 = string; /** * CoW Hooks to call before an order executes */ type PreHooks$8 = CoWHook$8[]; /** * CoW Hooks to call after an order executes */ type PostHooks$8 = CoWHook$8[]; /** * The code identifying the UI powering the widget */ type AppCode1$8 = string; /** * Environment from which the order came from. */ type Environment1$8 = string; type PartnerFee$8 = ({ volumeBps: VolumeBasisPointBPS$6; recipient: PartnerAccount$8; } | { surplusBps: SurplusBasisPointBPS$6; maxVolumeBps: MaxVolumeBasisPointBPS$6; recipient: PartnerAccount$8; } | { priceImprovementBps: PriceImprovementBasisPointBPS$6; maxVolumeBps: MaxVolumeBasisPointBPS$6; recipient: PartnerAccount$8; })[] | ({ volumeBps: VolumeBasisPointBPS$6; recipient: PartnerAccount$8; } | { surplusBps: SurplusBasisPointBPS$6; maxVolumeBps: MaxVolumeBasisPointBPS$6; recipient: PartnerAccount$8; } | { priceImprovementBps: PriceImprovementBasisPointBPS$6; maxVolumeBps: MaxVolumeBasisPointBPS$6; recipient: PartnerAccount$8; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped to 9999 BPS (99%) */ type VolumeBasisPointBPS$6 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$8 = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$6 = number; /** * The maximum volume in basis points (BPS) to be paid to the partner. Capped to 9999 BPS (99.99%). You can chose to go lower but not higher */ type MaxVolumeBasisPointBPS$6 = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$6 = number; /** * The replaced order UID. */ type ReplacedOrderUID$8 = string; /** * The id links order with a bridging provider which processes it */ type IdOfBridgingProvider$1 = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId$5 = string; /** * 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 BridgingDestinationTokenAddress$5 = string; /** * An ID of a quote which is used for bridging */ type BridgeProviderQuoteId = string; /** * Provider who implement ReceiverAccountBridgeProvider must return a signature of a quote than will be used to verify the quote deposit address validity */ type BridgeProviderQuoteSignature = string; /** * For ReceiverAccountBridgeProvider, this is the attestation signature from the bridge provider that validates the deposit address. Empty for other provider types. */ type BridgeProviderAttestationSignature = string; /** * A stringified JSON of quote which is associated with the order. */ type BridgeProviderQuoteBody = string; /** * The amount of tokens to be flash loaned (in token units, as uint256) */ type LoanAmount$4 = string; /** * The Ethereum address of the flashloan liquidity provider */ type LiquidityProviderAddress$3 = string; /** * The Ethereum address of the protocol adapter */ type ProtocolAdapterAddress$3 = string; /** * The Ethereum address of the flashloan receiver */ type ReceiverAddress$3 = string; /** * The Ethereum address of the token being borrowed */ type TokenAddress$4 = string; /** * The Ethereum address of the wrapper to execute */ type WrapperAddress = string; /** * 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) */ type WrapperData = string; /** * 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 IsOmittable = boolean; /** * Information about wrappers to execute for the order */ type Wrappers = WrapperEntry[]; /** * Array of user consents for terms acceptance */ type UserConsents = { /** * IPFS hash of the accepted terms */ terms: string; /** * ISO 8601 date-time when user accepted the terms in the UI */ acceptedDate: string; }[]; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$8 { version: Version$8; appCode?: AppCode$8; environment?: Environment$8; metadata: Metadata$8; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$8 { signer?: Signer$8; referrer?: Referrer$8; utm?: UTMCodes$8; quote?: Quote$8; orderClass?: OrderClass$8; hooks?: OrderInteractionHooks$8; widget?: Widget$8; partnerFee?: PartnerFee$8; replacedOrder?: ReplacedOrder$8; bridging?: Bridging$5; flashloan?: Flashloan$4; wrappers?: Wrappers; userConsents?: UserConsents; } interface Referrer$8 { code: ReferrerCode; } interface UTMCodes$8 { utmSource?: UTMSource$8; utmMedium?: UTMMedium$8; utmCampaign?: UTMCampaign$8; utmContent?: UTMContent$8; utmTerm?: UTMKeywordTerm$8; } interface Quote$8 { slippageBips: SlippageBips$8; smartSlippage?: SmartSlippage$8; } interface OrderClass$8 { orderClass: OrderClass1$8; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$8 { version?: Version1$8; pre?: PreHooks$8; post?: PostHooks$8; } interface CoWHook$8 { target: HookTarget$8; callData: HookCallData$8; gasLimit: HookGasLimit$8; dappId?: IdOfTheDAppWhichHasBuiltTheHook$7; } interface Widget$8 { appCode: AppCode1$8; environment?: Environment1$8; } interface ReplacedOrder$8 { uid: ReplacedOrderUID$8; } interface Bridging$5 { providerId: IdOfBridgingProvider$1; destinationChainId: BridgingDestinationChainId$5; destinationTokenAddress: BridgingDestinationTokenAddress$5; quoteId?: BridgeProviderQuoteId; quoteSignature?: BridgeProviderQuoteSignature; attestationSignature?: BridgeProviderAttestationSignature; quoteBody?: BridgeProviderQuoteBody; } /** * Information about flashloan parameters for the order */ interface Flashloan$4 { amount: LoanAmount$4; liquidityProvider: LiquidityProviderAddress$3; protocolAdapter: ProtocolAdapterAddress$3; receiver: ReceiverAddress$3; token: TokenAddress$4; } /** * Information about an individual wrapper to execute for the order */ interface WrapperEntry { address: WrapperAddress; data?: WrapperData; isOmittable?: IsOmittable; } type v1_15_0_BridgeProviderAttestationSignature = BridgeProviderAttestationSignature; type v1_15_0_BridgeProviderQuoteBody = BridgeProviderQuoteBody; type v1_15_0_BridgeProviderQuoteId = BridgeProviderQuoteId; type v1_15_0_BridgeProviderQuoteSignature = BridgeProviderQuoteSignature; type v1_15_0_IsOmittable = IsOmittable; type v1_15_0_ReferrerCode = ReferrerCode; type v1_15_0_UserConsents = UserConsents; type v1_15_0_WrapperAddress = WrapperAddress; type v1_15_0_WrapperData = WrapperData; type v1_15_0_WrapperEntry = WrapperEntry; type v1_15_0_Wrappers = Wrappers; declare namespace v1_15_0 { export type { AppCode$8 as AppCode, AppCode1$8 as AppCode1, AppDataRootSchema$8 as AppDataRootSchema, v1_15_0_BridgeProviderAttestationSignature as BridgeProviderAttestationSignature, v1_15_0_BridgeProviderQuoteBody as BridgeProviderQuoteBody, v1_15_0_BridgeProviderQuoteId as BridgeProviderQuoteId, v1_15_0_BridgeProviderQuoteSignature as BridgeProviderQuoteSignature, Bridging$5 as Bridging, BridgingDestinationChainId$5 as BridgingDestinationChainId, BridgingDestinationTokenAddress$5 as BridgingDestinationTokenAddress, CoWHook$8 as CoWHook, Environment$8 as Environment, Environment1$8 as Environment1, Flashloan$4 as Flashloan, HookCallData$8 as HookCallData, HookGasLimit$8 as HookGasLimit, HookTarget$8 as HookTarget, IdOfBridgingProvider$1 as IdOfBridgingProvider, IdOfTheDAppWhichHasBuiltTheHook$7 as IdOfTheDAppWhichHasBuiltTheHook, v1_15_0_IsOmittable as IsOmittable, LiquidityProviderAddress$3 as LiquidityProviderAddress, LoanAmount$4 as LoanAmount, MaxVolumeBasisPointBPS$6 as MaxVolumeBasisPointBPS, Metadata$8 as Metadata, OrderClass$8 as OrderClass, OrderClass1$8 as OrderClass1, OrderInteractionHooks$8 as OrderInteractionHooks, PartnerAccount$8 as PartnerAccount, PartnerFee$8 as PartnerFee, PostHooks$8 as PostHooks, PreHooks$8 as PreHooks, PriceImprovementBasisPointBPS$6 as PriceImprovementBasisPointBPS, ProtocolAdapterAddress$3 as ProtocolAdapterAddress, Quote$8 as Quote, ReceiverAddress$3 as ReceiverAddress, Referrer$8 as Referrer, v1_15_0_ReferrerCode as ReferrerCode, ReplacedOrder$8 as ReplacedOrder, ReplacedOrderUID$8 as ReplacedOrderUID, Signer$8 as Signer, SlippageBips$8 as SlippageBips, SmartSlippage$8 as SmartSlippage, SurplusBasisPointBPS$6 as SurplusBasisPointBPS, TokenAddress$4 as TokenAddress, UTMCampaign$8 as UTMCampaign, UTMCodes$8 as UTMCodes, UTMContent$8 as UTMContent, UTMKeywordTerm$8 as UTMKeywordTerm, UTMMedium$8 as UTMMedium, UTMSource$8 as UTMSource, v1_15_0_UserConsents as UserConsents, Version$8 as Version, Version1$8 as Version1, VolumeBasisPointBPS$6 as VolumeBasisPointBPS, Widget$8 as Widget, v1_15_0_WrapperAddress as WrapperAddress, v1_15_0_WrapperData as WrapperData, v1_15_0_WrapperEntry as WrapperEntry, v1_15_0_Wrappers as Wrappers }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$7 = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$7 = string; /** * Environment from which the order came from. */ type Environment$7 = string; /** * 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. */ type Signer$7 = string; type ReferrerAddress$7 = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$7 = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$7 = string; /** * Track the performance of a specific campaign */ type UTMCampaign$7 = string; /** * Track which link was clicked */ type UTMContent$7 = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$7 = string; /** * 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) */ type SlippageBips$7 = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$7 = boolean; /** * Indicator of the order class. */ type OrderClass1$7 = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$7 = string; /** * The contract to call for the hook */ type HookTarget$7 = string; /** * The calldata to use when calling the hook */ type HookCallData$7 = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$7 = string; /** * CoW Hooks to call before an order executes */ type PreHooks$7 = CoWHook$7[]; /** * CoW Hooks to call after an order executes */ type PostHooks$7 = CoWHook$7[]; /** * The code identifying the UI powering the widget */ type AppCode1$7 = string; /** * Environment from which the order came from. */ type Environment1$7 = string; /** * 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) */ type BasisPointBPS$1 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$7 = string; /** * The replaced order UID. */ type ReplacedOrderUID$7 = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$7 { version: Version$7; appCode?: AppCode$7; environment?: Environment$7; metadata: Metadata$7; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$7 { signer?: Signer$7; referrer?: Referrer$7; utm?: UTMCodes$7; quote?: Quote$7; orderClass?: OrderClass$7; hooks?: OrderInteractionHooks$7; widget?: Widget$7; partnerFee?: PartnerFee$7; replacedOrder?: ReplacedOrder$7; } interface Referrer$7 { address: ReferrerAddress$7; } interface UTMCodes$7 { utmSource?: UTMSource$7; utmMedium?: UTMMedium$7; utmCampaign?: UTMCampaign$7; utmContent?: UTMContent$7; utmTerm?: UTMKeywordTerm$7; } interface Quote$7 { slippageBips: SlippageBips$7; smartSlippage?: SmartSlippage$7; } interface OrderClass$7 { orderClass: OrderClass1$7; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$7 { version?: Version1$7; pre?: PreHooks$7; post?: PostHooks$7; } interface CoWHook$7 { target: HookTarget$7; callData: HookCallData$7; gasLimit: HookGasLimit$7; } interface Widget$7 { appCode: AppCode1$7; environment?: Environment1$7; } interface PartnerFee$7 { bps: BasisPointBPS$1; recipient: PartnerAccount$7; } interface ReplacedOrder$7 { uid: ReplacedOrderUID$7; } declare namespace v1_2_0 { export type { AppCode$7 as AppCode, AppCode1$7 as AppCode1, AppDataRootSchema$7 as AppDataRootSchema, BasisPointBPS$1 as BasisPointBPS, CoWHook$7 as CoWHook, Environment$7 as Environment, Environment1$7 as Environment1, HookCallData$7 as HookCallData, HookGasLimit$7 as HookGasLimit, HookTarget$7 as HookTarget, Metadata$7 as Metadata, OrderClass$7 as OrderClass, OrderClass1$7 as OrderClass1, OrderInteractionHooks$7 as OrderInteractionHooks, PartnerAccount$7 as PartnerAccount, PartnerFee$7 as PartnerFee, PostHooks$7 as PostHooks, PreHooks$7 as PreHooks, Quote$7 as Quote, Referrer$7 as Referrer, ReferrerAddress$7 as ReferrerAddress, ReplacedOrder$7 as ReplacedOrder, ReplacedOrderUID$7 as ReplacedOrderUID, Signer$7 as Signer, SlippageBips$7 as SlippageBips, SmartSlippage$7 as SmartSlippage, UTMCampaign$7 as UTMCampaign, UTMCodes$7 as UTMCodes, UTMContent$7 as UTMContent, UTMKeywordTerm$7 as UTMKeywordTerm, UTMMedium$7 as UTMMedium, UTMSource$7 as UTMSource, Version$7 as Version, Version1$7 as Version1, Widget$7 as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$6 = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$6 = string; /** * Environment from which the order came from. */ type Environment$6 = string; /** * 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. */ type Signer$6 = string; type ReferrerAddress$6 = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$6 = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$6 = string; /** * Track the performance of a specific campaign */ type UTMCampaign$6 = string; /** * Track which link was clicked */ type UTMContent$6 = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$6 = string; /** * 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) */ type SlippageBips$6 = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$6 = boolean; /** * Indicator of the order class. */ type OrderClass1$6 = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$6 = string; /** * The contract to call for the hook */ type HookTarget$6 = string; /** * The calldata to use when calling the hook */ type HookCallData$6 = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$6 = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$6 = string; /** * CoW Hooks to call before an order executes */ type PreHooks$6 = CoWHook$6[]; /** * CoW Hooks to call after an order executes */ type PostHooks$6 = CoWHook$6[]; /** * The code identifying the UI powering the widget */ type AppCode1$6 = string; /** * Environment from which the order came from. */ type Environment1$6 = string; /** * 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) */ type BasisPointBPS = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$6 = string; /** * The replaced order UID. */ type ReplacedOrderUID$6 = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$6 { version: Version$6; appCode?: AppCode$6; environment?: Environment$6; metadata: Metadata$6; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$6 { signer?: Signer$6; referrer?: Referrer$6; utm?: UTMCodes$6; quote?: Quote$6; orderClass?: OrderClass$6; hooks?: OrderInteractionHooks$6; widget?: Widget$6; partnerFee?: PartnerFee$6; replacedOrder?: ReplacedOrder$6; } interface Referrer$6 { address: ReferrerAddress$6; } interface UTMCodes$6 { utmSource?: UTMSource$6; utmMedium?: UTMMedium$6; utmCampaign?: UTMCampaign$6; utmContent?: UTMContent$6; utmTerm?: UTMKeywordTerm$6; } interface Quote$6 { slippageBips: SlippageBips$6; smartSlippage?: SmartSlippage$6; } interface OrderClass$6 { orderClass: OrderClass1$6; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$6 { version?: Version1$6; pre?: PreHooks$6; post?: PostHooks$6; } interface CoWHook$6 { target: HookTarget$6; callData: HookCallData$6; gasLimit: HookGasLimit$6; dappId?: IdOfTheDAppWhichHasBuiltTheHook$6; } interface Widget$6 { appCode: AppCode1$6; environment?: Environment1$6; } interface PartnerFee$6 { bps: BasisPointBPS; recipient: PartnerAccount$6; } interface ReplacedOrder$6 { uid: ReplacedOrderUID$6; } type v1_3_0_BasisPointBPS = BasisPointBPS; declare namespace v1_3_0 { export type { AppCode$6 as AppCode, AppCode1$6 as AppCode1, AppDataRootSchema$6 as AppDataRootSchema, v1_3_0_BasisPointBPS as BasisPointBPS, CoWHook$6 as CoWHook, Environment$6 as Environment, Environment1$6 as Environment1, HookCallData$6 as HookCallData, HookGasLimit$6 as HookGasLimit, HookTarget$6 as HookTarget, IdOfTheDAppWhichHasBuiltTheHook$6 as IdOfTheDAppWhichHasBuiltTheHook, Metadata$6 as Metadata, OrderClass$6 as OrderClass, OrderClass1$6 as OrderClass1, OrderInteractionHooks$6 as OrderInteractionHooks, PartnerAccount$6 as PartnerAccount, PartnerFee$6 as PartnerFee, PostHooks$6 as PostHooks, PreHooks$6 as PreHooks, Quote$6 as Quote, Referrer$6 as Referrer, ReferrerAddress$6 as ReferrerAddress, ReplacedOrder$6 as ReplacedOrder, ReplacedOrderUID$6 as ReplacedOrderUID, Signer$6 as Signer, SlippageBips$6 as SlippageBips, SmartSlippage$6 as SmartSlippage, UTMCampaign$6 as UTMCampaign, UTMCodes$6 as UTMCodes, UTMContent$6 as UTMContent, UTMKeywordTerm$6 as UTMKeywordTerm, UTMMedium$6 as UTMMedium, UTMSource$6 as UTMSource, Version$6 as Version, Version1$6 as Version1, Widget$6 as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$5 = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$5 = string; /** * Environment from which the order came from. */ type Environment$5 = string; /** * 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. */ type Signer$5 = string; type ReferrerAddress$5 = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$5 = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$5 = string; /** * Track the performance of a specific campaign */ type UTMCampaign$5 = string; /** * Track which link was clicked */ type UTMContent$5 = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$5 = string; /** * 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) */ type SlippageBips$5 = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$5 = boolean; /** * Indicator of the order class. */ type OrderClass1$5 = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$5 = string; /** * The contract to call for the hook */ type HookTarget$5 = string; /** * The calldata to use when calling the hook */ type HookCallData$5 = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$5 = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$5 = string; /** * CoW Hooks to call before an order executes */ type PreHooks$5 = CoWHook$5[]; /** * CoW Hooks to call after an order executes */ type PostHooks$5 = CoWHook$5[]; /** * The code identifying the UI powering the widget */ type AppCode1$5 = string; /** * Environment from which the order came from. */ type Environment1$5 = string; type PartnerFee$5 = ({ volumeBps: VolumeBasisPointBPS$5; recipient: PartnerAccount$5; } | { surplusBps: SurplusBasisPointBPS$5; maxVolumeBps: MaxVolumeBasisPointBPS$5; recipient: PartnerAccount$5; } | { priceImprovementBps: PriceImprovementBasisPointBPS$5; maxVolumeBps: MaxVolumeBasisPointBPS$5; recipient: PartnerAccount$5; })[] | ({ volumeBps: VolumeBasisPointBPS$5; recipient: PartnerAccount$5; } | { surplusBps: SurplusBasisPointBPS$5; maxVolumeBps: MaxVolumeBasisPointBPS$5; recipient: PartnerAccount$5; } | { priceImprovementBps: PriceImprovementBasisPointBPS$5; maxVolumeBps: MaxVolumeBasisPointBPS$5; recipient: PartnerAccount$5; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS$5 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$5 = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$5 = number; /** * 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 MaxVolumeBasisPointBPS$5 = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$5 = number; /** * The replaced order UID. */ type ReplacedOrderUID$5 = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$5 { version: Version$5; appCode?: AppCode$5; environment?: Environment$5; metadata: Metadata$5; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$5 { signer?: Signer$5; referrer?: Referrer$5; utm?: UTMCodes$5; quote?: Quote$5; orderClass?: OrderClass$5; hooks?: OrderInteractionHooks$5; widget?: Widget$5; partnerFee?: PartnerFee$5; replacedOrder?: ReplacedOrder$5; } interface Referrer$5 { address: ReferrerAddress$5; } interface UTMCodes$5 { utmSource?: UTMSource$5; utmMedium?: UTMMedium$5; utmCampaign?: UTMCampaign$5; utmContent?: UTMContent$5; utmTerm?: UTMKeywordTerm$5; } interface Quote$5 { slippageBips: SlippageBips$5; smartSlippage?: SmartSlippage$5; } interface OrderClass$5 { orderClass: OrderClass1$5; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$5 { version?: Version1$5; pre?: PreHooks$5; post?: PostHooks$5; } interface CoWHook$5 { target: HookTarget$5; callData: HookCallData$5; gasLimit: HookGasLimit$5; dappId?: IdOfTheDAppWhichHasBuiltTheHook$5; } interface Widget$5 { appCode: AppCode1$5; environment?: Environment1$5; } interface ReplacedOrder$5 { uid: ReplacedOrderUID$5; } declare namespace v1_4_0 { export type { AppCode$5 as AppCode, AppCode1$5 as AppCode1, AppDataRootSchema$5 as AppDataRootSchema, CoWHook$5 as CoWHook, Environment$5 as Environment, Environment1$5 as Environment1, HookCallData$5 as HookCallData, HookGasLimit$5 as HookGasLimit, HookTarget$5 as HookTarget, IdOfTheDAppWhichHasBuiltTheHook$5 as IdOfTheDAppWhichHasBuiltTheHook, MaxVolumeBasisPointBPS$5 as MaxVolumeBasisPointBPS, Metadata$5 as Metadata, OrderClass$5 as OrderClass, OrderClass1$5 as OrderClass1, OrderInteractionHooks$5 as OrderInteractionHooks, PartnerAccount$5 as PartnerAccount, PartnerFee$5 as PartnerFee, PostHooks$5 as PostHooks, PreHooks$5 as PreHooks, PriceImprovementBasisPointBPS$5 as PriceImprovementBasisPointBPS, Quote$5 as Quote, Referrer$5 as Referrer, ReferrerAddress$5 as ReferrerAddress, ReplacedOrder$5 as ReplacedOrder, ReplacedOrderUID$5 as ReplacedOrderUID, Signer$5 as Signer, SlippageBips$5 as SlippageBips, SmartSlippage$5 as SmartSlippage, SurplusBasisPointBPS$5 as SurplusBasisPointBPS, UTMCampaign$5 as UTMCampaign, UTMCodes$5 as UTMCodes, UTMContent$5 as UTMContent, UTMKeywordTerm$5 as UTMKeywordTerm, UTMMedium$5 as UTMMedium, UTMSource$5 as UTMSource, Version$5 as Version, Version1$5 as Version1, VolumeBasisPointBPS$5 as VolumeBasisPointBPS, Widget$5 as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$4 = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$4 = string; /** * Environment from which the order came from. */ type Environment$4 = string; /** * 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. */ type Signer$4 = string; type ReferrerAddress$4 = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$4 = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$4 = string; /** * Track the performance of a specific campaign */ type UTMCampaign$4 = string; /** * Track which link was clicked */ type UTMContent$4 = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$4 = string; /** * 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) */ type SlippageBips$4 = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$4 = boolean; /** * Indicator of the order class. */ type OrderClass1$4 = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$4 = string; /** * The contract to call for the hook */ type HookTarget$4 = string; /** * The calldata to use when calling the hook */ type HookCallData$4 = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$4 = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$4 = string; /** * CoW Hooks to call before an order executes */ type PreHooks$4 = CoWHook$4[]; /** * CoW Hooks to call after an order executes */ type PostHooks$4 = CoWHook$4[]; /** * The code identifying the UI powering the widget */ type AppCode1$4 = string; /** * Environment from which the order came from. */ type Environment1$4 = string; type PartnerFee$4 = ({ volumeBps: VolumeBasisPointBPS$4; recipient: PartnerAccount$4; } | { surplusBps: SurplusBasisPointBPS$4; maxVolumeBps: MaxVolumeBasisPointBPS$4; recipient: PartnerAccount$4; } | { priceImprovementBps: PriceImprovementBasisPointBPS$4; maxVolumeBps: MaxVolumeBasisPointBPS$4; recipient: PartnerAccount$4; })[] | ({ volumeBps: VolumeBasisPointBPS$4; recipient: PartnerAccount$4; } | { surplusBps: SurplusBasisPointBPS$4; maxVolumeBps: MaxVolumeBasisPointBPS$4; recipient: PartnerAccount$4; } | { priceImprovementBps: PriceImprovementBasisPointBPS$4; maxVolumeBps: MaxVolumeBasisPointBPS$4; recipient: PartnerAccount$4; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS$4 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$4 = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$4 = number; /** * 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 MaxVolumeBasisPointBPS$4 = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$4 = number; /** * The replaced order UID. */ type ReplacedOrderUID$4 = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId$4 = string; /** * 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 BridgingDestinationTokenAddress$4 = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$4 { version: Version$4; appCode?: AppCode$4; environment?: Environment$4; metadata: Metadata$4; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$4 { signer?: Signer$4; referrer?: Referrer$4; utm?: UTMCodes$4; quote?: Quote$4; orderClass?: OrderClass$4; hooks?: OrderInteractionHooks$4; widget?: Widget$4; partnerFee?: PartnerFee$4; replacedOrder?: ReplacedOrder$4; bridging?: Bridging$4; } interface Referrer$4 { address: ReferrerAddress$4; } interface UTMCodes$4 { utmSource?: UTMSource$4; utmMedium?: UTMMedium$4; utmCampaign?: UTMCampaign$4; utmContent?: UTMContent$4; utmTerm?: UTMKeywordTerm$4; } interface Quote$4 { slippageBips: SlippageBips$4; smartSlippage?: SmartSlippage$4; } interface OrderClass$4 { orderClass: OrderClass1$4; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$4 { version?: Version1$4; pre?: PreHooks$4; post?: PostHooks$4; } interface CoWHook$4 { target: HookTarget$4; callData: HookCallData$4; gasLimit: HookGasLimit$4; dappId?: IdOfTheDAppWhichHasBuiltTheHook$4; } interface Widget$4 { appCode: AppCode1$4; environment?: Environment1$4; } interface ReplacedOrder$4 { uid: ReplacedOrderUID$4; } interface Bridging$4 { destinationChainId: BridgingDestinationChainId$4; destinationTokenAddress: BridgingDestinationTokenAddress$4; } declare namespace v1_5_0 { export type { AppCode$4 as AppCode, AppCode1$4 as AppCode1, AppDataRootSchema$4 as AppDataRootSchema, Bridging$4 as Bridging, BridgingDestinationChainId$4 as BridgingDestinationChainId, BridgingDestinationTokenAddress$4 as BridgingDestinationTokenAddress, CoWHook$4 as CoWHook, Environment$4 as Environment, Environment1$4 as Environment1, HookCallData$4 as HookCallData, HookGasLimit$4 as HookGasLimit, HookTarget$4 as HookTarget, IdOfTheDAppWhichHasBuiltTheHook$4 as IdOfTheDAppWhichHasBuiltTheHook, MaxVolumeBasisPointBPS$4 as MaxVolumeBasisPointBPS, Metadata$4 as Metadata, OrderClass$4 as OrderClass, OrderClass1$4 as OrderClass1, OrderInteractionHooks$4 as OrderInteractionHooks, PartnerAccount$4 as PartnerAccount, PartnerFee$4 as PartnerFee, PostHooks$4 as PostHooks, PreHooks$4 as PreHooks, PriceImprovementBasisPointBPS$4 as PriceImprovementBasisPointBPS, Quote$4 as Quote, Referrer$4 as Referrer, ReferrerAddress$4 as ReferrerAddress, ReplacedOrder$4 as ReplacedOrder, ReplacedOrderUID$4 as ReplacedOrderUID, Signer$4 as Signer, SlippageBips$4 as SlippageBips, SmartSlippage$4 as SmartSlippage, SurplusBasisPointBPS$4 as SurplusBasisPointBPS, UTMCampaign$4 as UTMCampaign, UTMCodes$4 as UTMCodes, UTMContent$4 as UTMContent, UTMKeywordTerm$4 as UTMKeywordTerm, UTMMedium$4 as UTMMedium, UTMSource$4 as UTMSource, Version$4 as Version, Version1$4 as Version1, VolumeBasisPointBPS$4 as VolumeBasisPointBPS, Widget$4 as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$3 = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$3 = string; /** * Environment from which the order came from. */ type Environment$3 = string; /** * 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. */ type Signer$3 = string; type ReferrerAddress$3 = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$3 = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$3 = string; /** * Track the performance of a specific campaign */ type UTMCampaign$3 = string; /** * Track which link was clicked */ type UTMContent$3 = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$3 = string; /** * 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) */ type SlippageBips$3 = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$3 = boolean; /** * Indicator of the order class. */ type OrderClass1$3 = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$3 = string; /** * The contract to call for the hook */ type HookTarget$3 = string; /** * The calldata to use when calling the hook */ type HookCallData$3 = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$3 = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$3 = string; /** * CoW Hooks to call before an order executes */ type PreHooks$3 = CoWHook$3[]; /** * CoW Hooks to call after an order executes */ type PostHooks$3 = CoWHook$3[]; /** * The code identifying the UI powering the widget */ type AppCode1$3 = string; /** * Environment from which the order came from. */ type Environment1$3 = string; type PartnerFee$3 = ({ volumeBps: VolumeBasisPointBPS$3; recipient: PartnerAccount$3; } | { surplusBps: SurplusBasisPointBPS$3; maxVolumeBps: MaxVolumeBasisPointBPS$3; recipient: PartnerAccount$3; } | { priceImprovementBps: PriceImprovementBasisPointBPS$3; maxVolumeBps: MaxVolumeBasisPointBPS$3; recipient: PartnerAccount$3; })[] | ({ volumeBps: VolumeBasisPointBPS$3; recipient: PartnerAccount$3; } | { surplusBps: SurplusBasisPointBPS$3; maxVolumeBps: MaxVolumeBasisPointBPS$3; recipient: PartnerAccount$3; } | { priceImprovementBps: PriceImprovementBasisPointBPS$3; maxVolumeBps: MaxVolumeBasisPointBPS$3; recipient: PartnerAccount$3; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS$3 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$3 = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$3 = number; /** * 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 MaxVolumeBasisPointBPS$3 = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$3 = number; /** * The replaced order UID. */ type ReplacedOrderUID$3 = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId$3 = string; /** * 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 BridgingDestinationTokenAddress$3 = string; /** * The Ethereum address of the flashloan lender */ type LenderAddress = string; /** * The Ethereum address of the flashloan borrower */ type BorrowerAddress = string; /** * The Ethereum address of the token being borrowed */ type TokenAddress$3 = string; /** * The amount of tokens to be flash loaned (in token units, as uint256) */ type LoanAmount$3 = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$3 { version: Version$3; appCode?: AppCode$3; environment?: Environment$3; metadata: Metadata$3; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$3 { signer?: Signer$3; referrer?: Referrer$3; utm?: UTMCodes$3; quote?: Quote$3; orderClass?: OrderClass$3; hooks?: OrderInteractionHooks$3; widget?: Widget$3; partnerFee?: PartnerFee$3; replacedOrder?: ReplacedOrder$3; bridging?: Bridging$3; flashloan?: Flashloan$3; } interface Referrer$3 { address: ReferrerAddress$3; } interface UTMCodes$3 { utmSource?: UTMSource$3; utmMedium?: UTMMedium$3; utmCampaign?: UTMCampaign$3; utmContent?: UTMContent$3; utmTerm?: UTMKeywordTerm$3; } interface Quote$3 { slippageBips: SlippageBips$3; smartSlippage?: SmartSlippage$3; } interface OrderClass$3 { orderClass: OrderClass1$3; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$3 { version?: Version1$3; pre?: PreHooks$3; post?: PostHooks$3; } interface CoWHook$3 { target: HookTarget$3; callData: HookCallData$3; gasLimit: HookGasLimit$3; dappId?: IdOfTheDAppWhichHasBuiltTheHook$3; } interface Widget$3 { appCode: AppCode1$3; environment?: Environment1$3; } interface ReplacedOrder$3 { uid: ReplacedOrderUID$3; } interface Bridging$3 { destinationChainId: BridgingDestinationChainId$3; destinationTokenAddress: BridgingDestinationTokenAddress$3; } /** * Information about flashloan parameters for the order */ interface Flashloan$3 { lender: LenderAddress; borrower: BorrowerAddress; token: TokenAddress$3; amount: LoanAmount$3; } type v1_6_0_BorrowerAddress = BorrowerAddress; type v1_6_0_LenderAddress = LenderAddress; declare namespace v1_6_0 { export type { AppCode$3 as AppCode, AppCode1$3 as AppCode1, AppDataRootSchema$3 as AppDataRootSchema, v1_6_0_BorrowerAddress as BorrowerAddress, Bridging$3 as Bridging, BridgingDestinationChainId$3 as BridgingDestinationChainId, BridgingDestinationTokenAddress$3 as BridgingDestinationTokenAddress, CoWHook$3 as CoWHook, Environment$3 as Environment, Environment1$3 as Environment1, Flashloan$3 as Flashloan, HookCallData$3 as HookCallData, HookGasLimit$3 as HookGasLimit, HookTarget$3 as HookTarget, IdOfTheDAppWhichHasBuiltTheHook$3 as IdOfTheDAppWhichHasBuiltTheHook, v1_6_0_LenderAddress as LenderAddress, LoanAmount$3 as LoanAmount, MaxVolumeBasisPointBPS$3 as MaxVolumeBasisPointBPS, Metadata$3 as Metadata, OrderClass$3 as OrderClass, OrderClass1$3 as OrderClass1, OrderInteractionHooks$3 as OrderInteractionHooks, PartnerAccount$3 as PartnerAccount, PartnerFee$3 as PartnerFee, PostHooks$3 as PostHooks, PreHooks$3 as PreHooks, PriceImprovementBasisPointBPS$3 as PriceImprovementBasisPointBPS, Quote$3 as Quote, Referrer$3 as Referrer, ReferrerAddress$3 as ReferrerAddress, ReplacedOrder$3 as ReplacedOrder, ReplacedOrderUID$3 as ReplacedOrderUID, Signer$3 as Signer, SlippageBips$3 as SlippageBips, SmartSlippage$3 as SmartSlippage, SurplusBasisPointBPS$3 as SurplusBasisPointBPS, TokenAddress$3 as TokenAddress, UTMCampaign$3 as UTMCampaign, UTMCodes$3 as UTMCodes, UTMContent$3 as UTMContent, UTMKeywordTerm$3 as UTMKeywordTerm, UTMMedium$3 as UTMMedium, UTMSource$3 as UTMSource, Version$3 as Version, Version1$3 as Version1, VolumeBasisPointBPS$3 as VolumeBasisPointBPS, Widget$3 as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$2 = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$2 = string; /** * Environment from which the order came from. */ type Environment$2 = string; /** * 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. */ type Signer$2 = string; type ReferrerAddress$2 = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$2 = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$2 = string; /** * Track the performance of a specific campaign */ type UTMCampaign$2 = string; /** * Track which link was clicked */ type UTMContent$2 = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$2 = string; /** * 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) */ type SlippageBips$2 = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$2 = boolean; /** * Indicator of the order class. */ type OrderClass1$2 = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$2 = string; /** * The contract to call for the hook */ type HookTarget$2 = string; /** * The calldata to use when calling the hook */ type HookCallData$2 = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$2 = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$2 = string; /** * CoW Hooks to call before an order executes */ type PreHooks$2 = CoWHook$2[]; /** * CoW Hooks to call after an order executes */ type PostHooks$2 = CoWHook$2[]; /** * The code identifying the UI powering the widget */ type AppCode1$2 = string; /** * Environment from which the order came from. */ type Environment1$2 = string; type PartnerFee$2 = ({ volumeBps: VolumeBasisPointBPS$2; recipient: PartnerAccount$2; } | { surplusBps: SurplusBasisPointBPS$2; maxVolumeBps: MaxVolumeBasisPointBPS$2; recipient: PartnerAccount$2; } | { priceImprovementBps: PriceImprovementBasisPointBPS$2; maxVolumeBps: MaxVolumeBasisPointBPS$2; recipient: PartnerAccount$2; })[] | ({ volumeBps: VolumeBasisPointBPS$2; recipient: PartnerAccount$2; } | { surplusBps: SurplusBasisPointBPS$2; maxVolumeBps: MaxVolumeBasisPointBPS$2; recipient: PartnerAccount$2; } | { priceImprovementBps: PriceImprovementBasisPointBPS$2; maxVolumeBps: MaxVolumeBasisPointBPS$2; recipient: PartnerAccount$2; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS$2 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$2 = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$2 = number; /** * 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 MaxVolumeBasisPointBPS$2 = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$2 = number; /** * The replaced order UID. */ type ReplacedOrderUID$2 = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId$2 = string; /** * 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 BridgingDestinationTokenAddress$2 = string; /** * The amount of tokens to be flash loaned (in token units, as uint256) */ type LoanAmount$2 = string; /** * The Ethereum address of the flashloan liquidity provider */ type LiquidityProviderAddress$2 = string; /** * The Ethereum address of the protocol adapter */ type ProtocolAdapterAddress$2 = string; /** * The Ethereum address of the flashloan receiver */ type ReceiverAddress$2 = string; /** * The Ethereum address of the token being borrowed */ type TokenAddress$2 = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$2 { version: Version$2; appCode?: AppCode$2; environment?: Environment$2; metadata: Metadata$2; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$2 { signer?: Signer$2; referrer?: Referrer$2; utm?: UTMCodes$2; quote?: Quote$2; orderClass?: OrderClass$2; hooks?: OrderInteractionHooks$2; widget?: Widget$2; partnerFee?: PartnerFee$2; replacedOrder?: ReplacedOrder$2; bridging?: Bridging$2; flashloan?: Flashloan$2; } interface Referrer$2 { address: ReferrerAddress$2; } interface UTMCodes$2 { utmSource?: UTMSource$2; utmMedium?: UTMMedium$2; utmCampaign?: UTMCampaign$2; utmContent?: UTMContent$2; utmTerm?: UTMKeywordTerm$2; } interface Quote$2 { slippageBips: SlippageBips$2; smartSlippage?: SmartSlippage$2; } interface OrderClass$2 { orderClass: OrderClass1$2; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$2 { version?: Version1$2; pre?: PreHooks$2; post?: PostHooks$2; } interface CoWHook$2 { target: HookTarget$2; callData: HookCallData$2; gasLimit: HookGasLimit$2; dappId?: IdOfTheDAppWhichHasBuiltTheHook$2; } interface Widget$2 { appCode: AppCode1$2; environment?: Environment1$2; } interface ReplacedOrder$2 { uid: ReplacedOrderUID$2; } interface Bridging$2 { destinationChainId: BridgingDestinationChainId$2; destinationTokenAddress: BridgingDestinationTokenAddress$2; } /** * Information about flashloan parameters for the order */ interface Flashloan$2 { amount: LoanAmount$2; liquidityProvider: LiquidityProviderAddress$2; protocolAdapter: ProtocolAdapterAddress$2; receiver: ReceiverAddress$2; token: TokenAddress$2; } declare namespace v1_7_0 { export type { AppCode$2 as AppCode, AppCode1$2 as AppCode1, AppDataRootSchema$2 as AppDataRootSchema, Bridging$2 as Bridging, BridgingDestinationChainId$2 as BridgingDestinationChainId, BridgingDestinationTokenAddress$2 as BridgingDestinationTokenAddress, CoWHook$2 as CoWHook, Environment$2 as Environment, Environment1$2 as Environment1, Flashloan$2 as Flashloan, HookCallData$2 as HookCallData, HookGasLimit$2 as HookGasLimit, HookTarget$2 as HookTarget, IdOfTheDAppWhichHasBuiltTheHook$2 as IdOfTheDAppWhichHasBuiltTheHook, LiquidityProviderAddress$2 as LiquidityProviderAddress, LoanAmount$2 as LoanAmount, MaxVolumeBasisPointBPS$2 as MaxVolumeBasisPointBPS, Metadata$2 as Metadata, OrderClass$2 as OrderClass, OrderClass1$2 as OrderClass1, OrderInteractionHooks$2 as OrderInteractionHooks, PartnerAccount$2 as PartnerAccount, PartnerFee$2 as PartnerFee, PostHooks$2 as PostHooks, PreHooks$2 as PreHooks, PriceImprovementBasisPointBPS$2 as PriceImprovementBasisPointBPS, ProtocolAdapterAddress$2 as ProtocolAdapterAddress, Quote$2 as Quote, ReceiverAddress$2 as ReceiverAddress, Referrer$2 as Referrer, ReferrerAddress$2 as ReferrerAddress, ReplacedOrder$2 as ReplacedOrder, ReplacedOrderUID$2 as ReplacedOrderUID, Signer$2 as Signer, SlippageBips$2 as SlippageBips, SmartSlippage$2 as SmartSlippage, SurplusBasisPointBPS$2 as SurplusBasisPointBPS, TokenAddress$2 as TokenAddress, UTMCampaign$2 as UTMCampaign, UTMCodes$2 as UTMCodes, UTMContent$2 as UTMContent, UTMKeywordTerm$2 as UTMKeywordTerm, UTMMedium$2 as UTMMedium, UTMSource$2 as UTMSource, Version$2 as Version, Version1$2 as Version1, VolumeBasisPointBPS$2 as VolumeBasisPointBPS, Widget$2 as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version$1 = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode$1 = string; /** * Environment from which the order came from. */ type Environment$1 = string; /** * 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. */ type Signer$1 = string; type ReferrerAddress$1 = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource$1 = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium$1 = string; /** * Track the performance of a specific campaign */ type UTMCampaign$1 = string; /** * Track which link was clicked */ type UTMContent$1 = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm$1 = string; /** * 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) */ type SlippageBips$1 = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage$1 = boolean; /** * Indicator of the order class. */ type OrderClass1$1 = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1$1 = string; /** * The contract to call for the hook */ type HookTarget$1 = string; /** * The calldata to use when calling the hook */ type HookCallData$1 = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit$1 = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook$1 = string; /** * CoW Hooks to call before an order executes */ type PreHooks$1 = CoWHook$1[]; /** * CoW Hooks to call after an order executes */ type PostHooks$1 = CoWHook$1[]; /** * The code identifying the UI powering the widget */ type AppCode1$1 = string; /** * Environment from which the order came from. */ type Environment1$1 = string; type PartnerFee$1 = ({ volumeBps: VolumeBasisPointBPS$1; recipient: PartnerAccount$1; } | { surplusBps: SurplusBasisPointBPS$1; maxVolumeBps: MaxVolumeBasisPointBPS$1; recipient: PartnerAccount$1; } | { priceImprovementBps: PriceImprovementBasisPointBPS$1; maxVolumeBps: MaxVolumeBasisPointBPS$1; recipient: PartnerAccount$1; })[] | ({ volumeBps: VolumeBasisPointBPS$1; recipient: PartnerAccount$1; } | { surplusBps: SurplusBasisPointBPS$1; maxVolumeBps: MaxVolumeBasisPointBPS$1; recipient: PartnerAccount$1; } | { priceImprovementBps: PriceImprovementBasisPointBPS$1; maxVolumeBps: MaxVolumeBasisPointBPS$1; recipient: PartnerAccount$1; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS$1 = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount$1 = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS$1 = number; /** * 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 MaxVolumeBasisPointBPS$1 = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS$1 = number; /** * The replaced order UID. */ type ReplacedOrderUID$1 = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId$1 = string; /** * 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 BridgingDestinationTokenAddress$1 = string; /** * The amount of tokens to be flash loaned (in token units, as uint256) */ type LoanAmount$1 = string; /** * The Ethereum address of the flashloan liquidity provider */ type LiquidityProviderAddress$1 = string; /** * The Ethereum address of the protocol adapter */ type ProtocolAdapterAddress$1 = string; /** * The Ethereum address of the flashloan receiver */ type ReceiverAddress$1 = string; /** * The Ethereum address of the token being borrowed */ type TokenAddress$1 = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema$1 { version: Version$1; appCode?: AppCode$1; environment?: Environment$1; metadata: Metadata$1; } /** * Each metadata will specify one aspect of the order. */ interface Metadata$1 { signer?: Signer$1; referrer?: Referrer$1; utm?: UTMCodes$1; quote?: Quote$1; orderClass?: OrderClass$1; hooks?: OrderInteractionHooks$1; widget?: Widget$1; partnerFee?: PartnerFee$1; replacedOrder?: ReplacedOrder$1; bridging?: Bridging$1; flashloan?: Flashloan$1; } interface Referrer$1 { address: ReferrerAddress$1; } interface UTMCodes$1 { utmSource?: UTMSource$1; utmMedium?: UTMMedium$1; utmCampaign?: UTMCampaign$1; utmContent?: UTMContent$1; utmTerm?: UTMKeywordTerm$1; } interface Quote$1 { slippageBips: SlippageBips$1; smartSlippage?: SmartSlippage$1; } interface OrderClass$1 { orderClass: OrderClass1$1; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks$1 { version?: Version1$1; pre?: PreHooks$1; post?: PostHooks$1; } interface CoWHook$1 { target: HookTarget$1; callData: HookCallData$1; gasLimit: HookGasLimit$1; dappId?: IdOfTheDAppWhichHasBuiltTheHook$1; } interface Widget$1 { appCode: AppCode1$1; environment?: Environment1$1; } interface ReplacedOrder$1 { uid: ReplacedOrderUID$1; } interface Bridging$1 { destinationChainId: BridgingDestinationChainId$1; destinationTokenAddress: BridgingDestinationTokenAddress$1; } /** * Information about flashloan parameters for the order */ interface Flashloan$1 { amount: LoanAmount$1; liquidityProvider: LiquidityProviderAddress$1; protocolAdapter: ProtocolAdapterAddress$1; receiver: ReceiverAddress$1; token: TokenAddress$1; } declare namespace v1_8_0 { export type { AppCode$1 as AppCode, AppCode1$1 as AppCode1, AppDataRootSchema$1 as AppDataRootSchema, Bridging$1 as Bridging, BridgingDestinationChainId$1 as BridgingDestinationChainId, BridgingDestinationTokenAddress$1 as BridgingDestinationTokenAddress, CoWHook$1 as CoWHook, Environment$1 as Environment, Environment1$1 as Environment1, Flashloan$1 as Flashloan, HookCallData$1 as HookCallData, HookGasLimit$1 as HookGasLimit, HookTarget$1 as HookTarget, IdOfTheDAppWhichHasBuiltTheHook$1 as IdOfTheDAppWhichHasBuiltTheHook, LiquidityProviderAddress$1 as LiquidityProviderAddress, LoanAmount$1 as LoanAmount, MaxVolumeBasisPointBPS$1 as MaxVolumeBasisPointBPS, Metadata$1 as Metadata, OrderClass$1 as OrderClass, OrderClass1$1 as OrderClass1, OrderInteractionHooks$1 as OrderInteractionHooks, PartnerAccount$1 as PartnerAccount, PartnerFee$1 as PartnerFee, PostHooks$1 as PostHooks, PreHooks$1 as PreHooks, PriceImprovementBasisPointBPS$1 as PriceImprovementBasisPointBPS, ProtocolAdapterAddress$1 as ProtocolAdapterAddress, Quote$1 as Quote, ReceiverAddress$1 as ReceiverAddress, Referrer$1 as Referrer, ReferrerAddress$1 as ReferrerAddress, ReplacedOrder$1 as ReplacedOrder, ReplacedOrderUID$1 as ReplacedOrderUID, Signer$1 as Signer, SlippageBips$1 as SlippageBips, SmartSlippage$1 as SmartSlippage, SurplusBasisPointBPS$1 as SurplusBasisPointBPS, TokenAddress$1 as TokenAddress, UTMCampaign$1 as UTMCampaign, UTMCodes$1 as UTMCodes, UTMContent$1 as UTMContent, UTMKeywordTerm$1 as UTMKeywordTerm, UTMMedium$1 as UTMMedium, UTMSource$1 as UTMSource, Version$1 as Version, Version1$1 as Version1, VolumeBasisPointBPS$1 as VolumeBasisPointBPS, Widget$1 as Widget }; } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Semantic versioning of document. */ type Version = string; /** * The code identifying the CLI, UI, service generating the order. */ type AppCode = string; /** * Environment from which the order came from. */ type Environment = string; /** * 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. */ type Signer = string; type ReferrerAddress = string; /** * Tracks in which medium the traffic originated from (twitter, facebook, etc.) */ type UTMSource = string; /** * Tracks in which medium the traffic originated from (mail, CPC, social, etc.) */ type UTMMedium = string; /** * Track the performance of a specific campaign */ type UTMCampaign = string; /** * Track which link was clicked */ type UTMContent = string; /** * Track which keyword term a website visitor came from */ type UTMKeywordTerm = string; /** * 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) */ type SlippageBips = number; /** * Whether the given slippageBips used is originated from a Smart slippage suggestion */ type SmartSlippage = boolean; /** * Indicator of the order class. */ type OrderClass1 = "market" | "limit" | "liquidity" | "twap"; /** * Semantic versioning of document. */ type Version1 = string; /** * The contract to call for the hook */ type HookTarget = string; /** * The calldata to use when calling the hook */ type HookCallData = string; /** * The gas limit (in gas units) for the hook */ type HookGasLimit = string; /** * 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. */ type IdOfTheDAppWhichHasBuiltTheHook = string; /** * CoW Hooks to call before an order executes */ type PreHooks = CoWHook[]; /** * CoW Hooks to call after an order executes */ type PostHooks = CoWHook[]; /** * The code identifying the UI powering the widget */ type AppCode1 = string; /** * Environment from which the order came from. */ type Environment1 = string; type PartnerFee = ({ volumeBps: VolumeBasisPointBPS; recipient: PartnerAccount; } | { surplusBps: SurplusBasisPointBPS; maxVolumeBps: MaxVolumeBasisPointBPS; recipient: PartnerAccount; } | { priceImprovementBps: PriceImprovementBasisPointBPS; maxVolumeBps: MaxVolumeBasisPointBPS; recipient: PartnerAccount; })[] | ({ volumeBps: VolumeBasisPointBPS; recipient: PartnerAccount; } | { surplusBps: SurplusBasisPointBPS; maxVolumeBps: MaxVolumeBasisPointBPS; recipient: PartnerAccount; } | { priceImprovementBps: PriceImprovementBasisPointBPS; maxVolumeBps: MaxVolumeBasisPointBPS; recipient: PartnerAccount; }); /** * The fee in basis points (BPS) to be paid to the partner based on volume. Capped at protocol level to 100 BPS (1%) */ type VolumeBasisPointBPS = number; /** * The Ethereum address of the partner to receive the fee. */ type PartnerAccount = string; /** * The fee in basis points (BPS) to be paid to the partner based on surplus */ type SurplusBasisPointBPS = number; /** * 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 MaxVolumeBasisPointBPS = number; /** * The fee in basis points (BPS) to be paid to the partner based on price improvement */ type PriceImprovementBasisPointBPS = number; /** * The replaced order UID. */ type ReplacedOrderUID = string; /** * The id links order with a bridging provider which processes it */ type IdOfBridgingProvider = string; /** * Id of a blockchain where funds will be received */ type BridgingDestinationChainId = string; /** * 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 BridgingDestinationTokenAddress = string; /** * The amount of tokens to be flash loaned (in token units, as uint256) */ type LoanAmount = string; /** * The Ethereum address of the flashloan liquidity provider */ type LiquidityProviderAddress = string; /** * The Ethereum address of the protocol adapter */ type ProtocolAdapterAddress = string; /** * The Ethereum address of the flashloan receiver */ type ReceiverAddress = string; /** * The Ethereum address of the token being borrowed */ type TokenAddress = string; /** * Metadata JSON document for adding information to orders. */ interface AppDataRootSchema { version: Version; appCode?: AppCode; environment?: Environment; metadata: Metadata; } /** * Each metadata will specify one aspect of the order. */ interface Metadata { signer?: Signer; referrer?: Referrer; utm?: UTMCodes; quote?: Quote; orderClass?: OrderClass; hooks?: OrderInteractionHooks; widget?: Widget; partnerFee?: PartnerFee; replacedOrder?: ReplacedOrder; bridging?: Bridging; flashloan?: Flashloan; } interface Referrer { address: ReferrerAddress; } interface UTMCodes { utmSource?: UTMSource; utmMedium?: UTMMedium; utmCampaign?: UTMCampaign; utmContent?: UTMContent; utmTerm?: UTMKeywordTerm; } interface Quote { slippageBips: SlippageBips; smartSlippage?: SmartSlippage; } interface OrderClass { orderClass: OrderClass1; } /** * Optional Pre and Post order interaction hooks attached to a single order */ interface OrderInteractionHooks { version?: Version1; pre?: PreHooks; post?: PostHooks; } interface CoWHook { target: HookTarget; callData: HookCallData; gasLimit: HookGasLimit; dappId?: IdOfTheDAppWhichHasBuiltTheHook; } interface Widget { appCode: AppCode1; environment?: Environment1; } interface ReplacedOrder { uid: ReplacedOrderUID; } interface Bridging { providerId: IdOfBridgingProvider; destinationChainId: BridgingDestinationChainId; destinationTokenAddress: BridgingDestinationTokenAddress; } /** * Information about flashloan parameters for the order */ interface Flashloan { amount: LoanAmount; liquidityProvider: LiquidityProviderAddress; protocolAdapter: ProtocolAdapterAddress; receiver: ReceiverAddress; token: TokenAddress; } type v1_9_0_AppCode = AppCode; type v1_9_0_AppCode1 = AppCode1; type v1_9_0_AppDataRootSchema = AppDataRootSchema; type v1_9_0_Bridging = Bridging; type v1_9_0_BridgingDestinationChainId = BridgingDestinationChainId; type v1_9_0_BridgingDestinationTokenAddress = BridgingDestinationTokenAddress; type v1_9_0_CoWHook = CoWHook; type v1_9_0_Environment = Environment; type v1_9_0_Environment1 = Environment1; type v1_9_0_Flashloan = Flashloan; type v1_9_0_HookCallData = HookCallData; type v1_9_0_HookGasLimit = HookGasLimit; type v1_9_0_HookTarget = HookTarget; type v1_9_0_IdOfBridgingProvider = IdOfBridgingProvider; type v1_9_0_IdOfTheDAppWhichHasBuiltTheHook = IdOfTheDAppWhichHasBuiltTheHook; type v1_9_0_LiquidityProviderAddress = LiquidityProviderAddress; type v1_9_0_LoanAmount = LoanAmount; type v1_9_0_MaxVolumeBasisPointBPS = MaxVolumeBasisPointBPS; type v1_9_0_Metadata = Metadata; type v1_9_0_OrderClass = OrderClass; type v1_9_0_OrderClass1 = OrderClass1; type v1_9_0_OrderInteractionHooks = OrderInteractionHooks; type v1_9_0_PartnerAccount = PartnerAccount; type v1_9_0_PartnerFee = PartnerFee; type v1_9_0_PostHooks = PostHooks; type v1_9_0_PreHooks = PreHooks; type v1_9_0_PriceImprovementBasisPointBPS = PriceImprovementBasisPointBPS; type v1_9_0_ProtocolAdapterAddress = ProtocolAdapterAddress; type v1_9_0_Quote = Quote; type v1_9_0_ReceiverAddress = ReceiverAddress; type v1_9_0_Referrer = Referrer; type v1_9_0_ReferrerAddress = ReferrerAddress; type v1_9_0_ReplacedOrder = ReplacedOrder; type v1_9_0_ReplacedOrderUID = ReplacedOrderUID; type v1_9_0_Signer = Signer; type v1_9_0_SlippageBips = SlippageBips; type v1_9_0_SmartSlippage = SmartSlippage; type v1_9_0_SurplusBasisPointBPS = SurplusBasisPointBPS; type v1_9_0_TokenAddress = TokenAddress; type v1_9_0_UTMCampaign = UTMCampaign; type v1_9_0_UTMCodes = UTMCodes; type v1_9_0_UTMContent = UTMContent; type v1_9_0_UTMKeywordTerm = UTMKeywordTerm; type v1_9_0_UTMMedium = UTMMedium; type v1_9_0_UTMSource = UTMSource; type v1_9_0_Version = Version; type v1_9_0_Version1 = Version1; type v1_9_0_VolumeBasisPointBPS = VolumeBasisPointBPS; type v1_9_0_Widget = Widget; declare namespace v1_9_0 { export type { v1_9_0_AppCode as AppCode, v1_9_0_AppCode1 as AppCode1, v1_9_0_AppDataRootSchema as AppDataRootSchema, v1_9_0_Bridging as Bridging, v1_9_0_BridgingDestinationChainId as BridgingDestinationChainId, v1_9_0_BridgingDestinationTokenAddress as BridgingDestinationTokenAddress, v1_9_0_CoWHook as CoWHook, v1_9_0_Environment as Environment, v1_9_0_Environment1 as Environment1, v1_9_0_Flashloan as Flashloan, v1_9_0_HookCallData as HookCallData, v1_9_0_HookGasLimit as HookGasLimit, v1_9_0_HookTarget as HookTarget, v1_9_0_IdOfBridgingProvider as IdOfBridgingProvider, v1_9_0_IdOfTheDAppWhichHasBuiltTheHook as IdOfTheDAppWhichHasBuiltTheHook, v1_9_0_LiquidityProviderAddress as LiquidityProviderAddress, v1_9_0_LoanAmount as LoanAmount, v1_9_0_MaxVolumeBasisPointBPS as MaxVolumeBasisPointBPS, v1_9_0_Metadata as Metadata, v1_9_0_OrderClass as OrderClass, v1_9_0_OrderClass1 as OrderClass1, v1_9_0_OrderInteractionHooks as OrderInteractionHooks, v1_9_0_PartnerAccount as PartnerAccount, v1_9_0_PartnerFee as PartnerFee, v1_9_0_PostHooks as PostHooks, v1_9_0_PreHooks as PreHooks, v1_9_0_PriceImprovementBasisPointBPS as PriceImprovementBasisPointBPS, v1_9_0_ProtocolAdapterAddress as ProtocolAdapterAddress, v1_9_0_Quote as Quote, v1_9_0_ReceiverAddress as ReceiverAddress, v1_9_0_Referrer as Referrer, v1_9_0_ReferrerAddress as ReferrerAddress, v1_9_0_ReplacedOrder as ReplacedOrder, v1_9_0_ReplacedOrderUID as ReplacedOrderUID, v1_9_0_Signer as Signer, v1_9_0_SlippageBips as SlippageBips, v1_9_0_SmartSlippage as SmartSlippage, v1_9_0_SurplusBasisPointBPS as SurplusBasisPointBPS, v1_9_0_TokenAddress as TokenAddress, v1_9_0_UTMCampaign as UTMCampaign, v1_9_0_UTMCodes as UTMCodes, v1_9_0_UTMContent as UTMContent, v1_9_0_UTMKeywordTerm as UTMKeywordTerm, v1_9_0_UTMMedium as UTMMedium, v1_9_0_UTMSource as UTMSource, v1_9_0_Version as Version, v1_9_0_Version1 as Version1, v1_9_0_VolumeBasisPointBPS as VolumeBasisPointBPS, v1_9_0_Widget as Widget }; } declare const LATEST_APP_DATA_VERSION = "1.15.0"; declare const LATEST_QUOTE_METADATA_VERSION = "1.1.0"; declare const LATEST_REFERRER_METADATA_VERSION = "1.0.0"; declare const LATEST_ORDER_CLASS_METADATA_VERSION = "0.3.0"; declare const LATEST_UTM_METADATA_VERSION = "0.3.0"; declare const LATEST_HOOKS_METADATA_VERSION = "0.2.0"; declare const LATEST_SIGNER_METADATA_VERSION = "0.1.0"; declare const LATEST_WIDGET_METADATA_VERSION = "0.1.0"; declare const LATEST_PARTNER_FEE_METADATA_VERSION = "1.1.0"; declare const LATEST_REPLACED_ORDER_METADATA_VERSION = "0.1.0"; declare const LATEST_WRAPPERS_METADATA_VERSION = "0.2.0"; declare const LATEST_USER_CONSENTS_METADATA_VERSION = "0.1.0"; type LatestAppDataDocVersion = AppDataRootSchema$8; type AnyAppDataDocVersion = AppDataRootSchema$8 | AppDataRootSchema$9 | AppDataRootSchema$a | AppDataRootSchema$b | AppDataRootSchema$c | AppDataRootSchema$d | AppDataRootSchema | AppDataRootSchema$1 | AppDataRootSchema$2 | AppDataRootSchema$3 | AppDataRootSchema$4 | AppDataRootSchema$5 | AppDataRootSchema$6 | AppDataRootSchema$7 | AppDataRootSchema$e | AppDataRootSchema$f | AppDataRootSchema$o | AppDataRootSchema$p | AppDataRootSchema$g | AppDataRootSchema$h | AppDataRootSchema$i | AppDataRootSchema$j | AppDataRootSchema$k | AppDataRootSchema$l | AppDataRootSchema$m | AppDataRootSchema$n | AppDataRootSchema$q; type AppDataParams = Partial>; type AppDataInfo = { /** * IPFS's content identifier. * * App-data content can be uploaded to IPFS. If its uploaded, this CID will be the content identifier. * This is a way to be able to connect the appDataHex (app-data hex part of the order struct) to its content using a decentralized system. * * See https://docs.ipfs.io/concepts/content-addressing/#identifier-formats */ cid: string; /** * Full appData content. * * It will be the exact string that if hashed using keccak-256 you would get the returned appDataHex (app-data hex part of the order struct). * * It's a JSON that can be parsed to create the document following the schemas defined in https://github.com/cowprotocol/app-data * It contains all the meta-data related to an order. */ appDataContent: string; /** * appData hex for CoW Orders. Its value is the multihash part of the IPFS CID, therefore it points to a IPFS document. * Because its just the multihash, it doesn't have any infomation regarding the encoding and hashing algorithm. These parts are implicit. * * Currently, the implicit encoding is base16 and the implicit hashing algorithm is keccak256. * See https://github.com/cowprotocol/app-data/blob/app-data-v1/src/api/appDataToCid.ts#L102 * * Previous versions used a different encoding and hashing algorithm (base58btc, dag-pb, sha2-256) * */ appDataHex: string; }; type ValidationResult = { success: boolean; errors?: string; }; /** * Creates an appData document using the latest specification of the format * * Without params creates a default minimum appData doc * Optionally creates metadata docs * * Example of result: * { * "appCode": "CoW Swap", * "environment": "local", * "metadata": { * "quote": { * "slippageBips": 50 * }, * "orderClass": { * "orderClass": "market" * } * }, * "version": "1.2.0" * } */ declare function generateAppDataDoc(params?: AppDataParams): Promise; /** * Calculate the app-data information (cid, appDataHex, appDataContent). * * - appDataContent is the exact string with the pre-image that gets hashed using keccak to get the appDataHex * - appDataHex is the hex used for the bytes32 struct field appData in the CoW order * - cid is the appDataHex re-encoded as a CIDv1 (raw codec, keccak-256), derived locally */ declare function getAppDataInfo(appData: AnyAppDataDocVersion): Promise; /** * Calculate the app-data information (cid, appDataHex, appDataContent). * * - appDataContent is the exact string with the pre-image that gets hashed using keccak to get the appDataHex * - appDataHex is the hex used for the bytes32 struct field appData in the CoW order * - cid is the appDataHex re-encoded as a CIDv1 (raw codec, keccak-256), derived locally */ declare function getAppDataInfo(fullAppData: string): Promise; /** * Wrapper around @cowprotocol/sdk-app-data getAppDataSchema * * Returns the appData schema for given version, if any * Throws CowError when version doesn't exist */ declare function getAppDataSchema(version: string): Promise; declare function validateAppDataDoc(appDataDoc: AnyAppDataDocVersion): Promise; /** * AppDataSdk provides a convenient interface for interacting with CoW Protocol's * app-data functionality. It supports both direct method calls and object-oriented usage. */ declare class AppDataSdk { /** * Creates a new MetadataApi instance * * @param adapter Provider adapter implementation */ constructor(adapter?: AbstractProviderAdapter); getAppDataSchema: typeof getAppDataSchema; generateAppDataDoc: typeof generateAppDataDoc; validateAppDataDoc: typeof validateAppDataDoc; getAppDataInfo: typeof getAppDataInfo; appDataHexToCid: typeof appDataHexToCid; cidToAppDataHex: typeof cidToAppDataHex; } /** * @deprecated use AppDataSdk instead * The class exists for backward compatibility only and should be deleted in the future */ declare class MetadataApi extends AppDataSdk { } declare function stringifyDeterministic(obj: object): Promise; export { type AnyAppDataDocVersion, type AppDataInfo, type AppDataParams, AppDataSdk, LATEST_APP_DATA_VERSION, LATEST_HOOKS_METADATA_VERSION, LATEST_ORDER_CLASS_METADATA_VERSION, LATEST_PARTNER_FEE_METADATA_VERSION, LATEST_QUOTE_METADATA_VERSION, LATEST_REFERRER_METADATA_VERSION, LATEST_REPLACED_ORDER_METADATA_VERSION, LATEST_SIGNER_METADATA_VERSION, LATEST_USER_CONSENTS_METADATA_VERSION, LATEST_UTM_METADATA_VERSION, LATEST_WIDGET_METADATA_VERSION, LATEST_WRAPPERS_METADATA_VERSION, type LatestAppDataDocVersion, MetadataApi, type ValidationResult, v1_15_0 as cowAppDataLatestScheme, stringifyDeterministic, v0_10_0, v0_11_0, v0_1_0, v0_2_0, v0_3_0, v0_4_0, v0_5_0, v0_6_0, v0_7_0, v0_8_0, v0_9_0, v1_0_0, v1_10_0, v1_11_0, v1_12_0, v1_13_0, v1_14_0, v1_15_0, v1_1_0, v1_2_0, v1_3_0, v1_4_0, v1_5_0, v1_6_0, v1_7_0, v1_8_0, v1_9_0 };