Socket
Socket
Sign inDemoInstall

@cowprotocol/cow-sdk

Package Overview
Dependencies
Maintainers
5
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cowprotocol/cow-sdk - npm Package Compare versions

Comparing version 5.3.0 to 5.3.1-RC.0

dist/order-book/quoteAmountsAndCostsUtils.d.ts

32

dist/order-book/types.d.ts

@@ -8,1 +8,33 @@ import { Order } from './generated';

}
/**
* CoW Protocol quote has amounts (sell/buy) and costs (network fee), there is also partner fees.
* Besides that, CoW Protocol supports both sell and buy orders and the fees and costs are calculated differently.
*
* The order of adding fees and costs is as follows:
* 1. Network fee is always added to the sell amount
* 2. Partner fee is added to the surplus amount (sell amount for sell-orders, buy amount for buy-orders)
*
* For sell-orders the partner fee is subtracted from the buy amount after network costs.
* For buy-orders the partner fee is added on top of the sell amount after network costs.
*/
export interface QuoteAmountsAndCosts<Amounts = {
sellAmount: bigint;
buyAmount: bigint;
}> {
isSell: boolean;
quotePrice: number;
costs: {
networkFee: {
amountInSellCurrency: bigint;
amountInBuyCurrency: bigint;
};
partnerFee: {
amount: bigint;
bps: number;
};
};
beforeNetworkCosts: Amounts;
afterNetworkCosts: Amounts;
afterPartnerFees: Amounts;
afterSlippage: Amounts;
}

4

dist/package.json
{
"name": "@cowprotocol/cow-sdk",
"version": "5.3.0",
"version": "5.3.1-RC.0",
"license": "(MIT OR Apache-2.0)",

@@ -103,2 +103,2 @@ "files": [

]
}
}
{
"name": "@cowprotocol/cow-sdk",
"version": "5.3.0",
"version": "5.3.1-RC.0",
"license": "(MIT OR Apache-2.0)",

@@ -103,2 +103,2 @@ "files": [

]
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc