CowProviderConfig
Defined in: protocol-swap2-cow/src/provider.ts:97
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Properties
Section titled “Properties”appCode?
Section titled “appCode?”
optionalappCode?:string
Defined in: protocol-swap2-cow/src/provider.ts:106
appCode of the orders’ appData document (how CoW’s explorer names the app). Default “AnyWalletKit”.
baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
Defined in: protocol-swap2-cow/src/api.ts:64
Orderbook base URL (https). Default https://api.cow.fi.
Inherited from
Section titled “Inherited from”chains?
Section titled “chains?”
optionalchains?:Readonly<Record<number,CowDeployment>>
Defined in: protocol-swap2-cow/src/provider.ts:120
Chains CoW added after this release — see cowDeployments.
defaultSlippageBps?
Section titled “defaultSlippageBps?”
optionaldefaultSlippageBps?:number
Defined in: protocol-swap2-cow/src/provider.ts:114
Slippage when the caller names none (bps). Default 50.
enabled?
Section titled “enabled?”
optionalenabled?:boolean
Defined in: protocol-swap2-cow/src/provider.ts:102
Master switch. Default off: the module ships dark and an app turns it on (COW_ENABLED) chain by chain.
Cancelling an order placed earlier works while it is off.
enabledChains?
Section titled “enabledChains?”
optionalenabledChains?: readonlynumber[]
Defined in: protocol-swap2-cow/src/provider.ts:104
The chains offered, by EVM chain id. Default: every chain of the deployment table.
optionalnow?: () =>number
Defined in: protocol-swap2-cow/src/provider.ts:122
The clock, unix milliseconds (tests).
Returns
Section titled “Returns”number
permit?
Section titled “permit?”
optionalpermit?:boolean
Defined in: protocol-swap2-cow/src/provider.ts:118
Offer the EIP-2612 permit where the token has one. Default true; false always takes the approval transaction.
rpcUrls?
Section titled “rpcUrls?”
optionalrpcUrls?:Readonly<Record<number, readonlystring[]>>
Defined in: protocol-swap2-cow/src/provider.ts:112
JSON-RPC endpoints per EVM chain id, tried in order. Optional — without them the module still quotes, signs and tracks through the orderbook; with them it also offers the gasless permit, reads eth-flow orders from the contract (status and refunds while the orderbook is down) and checks a native payout’s receiver.
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Defined in: protocol-swap2-cow/src/api.ts:65
Inherited from
Section titled “Inherited from”validForSeconds?
Section titled “validForSeconds?”
optionalvalidForSeconds?:number
Defined in: protocol-swap2-cow/src/provider.ts:116
How long an order trades, seconds (120..1500). Default 1200 — 20 minutes.