@cowprotocol/sdk-order-book 2.0.5 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -127,8 +127,8 @@ Partners can use the Partner API for authenticated, rate-limited access with hig
|
|
|
127
127
|
|
|
128
128
|
| Environment | Partner API Base URL |
|
|
129
129
|
|-------------|---------------------|
|
|
130
|
-
| Production | `https://partners.cow.
|
|
131
|
-
| Staging | `https://partners.barn.cow.
|
|
130
|
+
| Production | `https://partners.cow.finance` |
|
|
131
|
+
| Staging | `https://partners.barn.cow.finance` |
|
|
132
132
|
|
|
133
133
|
```typescript
|
|
134
134
|
const orderBookApi = new OrderBookApi({
|
package/dist/index.d.mts
CHANGED
|
@@ -1122,7 +1122,7 @@ interface QuoteAmountsAndCosts<T = bigint> {
|
|
|
1122
1122
|
|
|
1123
1123
|
/**
|
|
1124
1124
|
* An object containing *production* environment base URLs for each supported `chainId`.
|
|
1125
|
-
* @see {@link https://api.cow.
|
|
1125
|
+
* @see {@link https://api.cow.finance/docs/#/}
|
|
1126
1126
|
*/
|
|
1127
1127
|
declare const ORDER_BOOK_PROD_CONFIG: ApiBaseUrls;
|
|
1128
1128
|
/**
|
|
@@ -1132,13 +1132,13 @@ declare const ORDER_BOOK_STAGING_CONFIG: ApiBaseUrls;
|
|
|
1132
1132
|
/**
|
|
1133
1133
|
* An object containing *partner production* environment base URLs for each supported `chainId`.
|
|
1134
1134
|
* Used when apiKey is set; requests include X-API-Key header.
|
|
1135
|
-
* @see {@link https://partners.cow.
|
|
1135
|
+
* @see {@link https://partners.cow.finance}
|
|
1136
1136
|
*/
|
|
1137
1137
|
declare const ORDER_BOOK_PARTNER_PROD_CONFIG: ApiBaseUrls;
|
|
1138
1138
|
/**
|
|
1139
1139
|
* An object containing *partner staging* environment base URLs for each supported `chainId`.
|
|
1140
1140
|
* Used when apiKey is set and env is staging; requests include X-API-Key header.
|
|
1141
|
-
* @see {@link https://partners.barn.cow.
|
|
1141
|
+
* @see {@link https://partners.barn.cow.finance}
|
|
1142
1142
|
*/
|
|
1143
1143
|
declare const ORDER_BOOK_PARTNER_STAGING_CONFIG: ApiBaseUrls;
|
|
1144
1144
|
/**
|
|
@@ -1213,7 +1213,7 @@ type GetTradesRequest = {
|
|
|
1213
1213
|
* }
|
|
1214
1214
|
* ```
|
|
1215
1215
|
*
|
|
1216
|
-
* @see {@link Swagger documentation https://api.cow.
|
|
1216
|
+
* @see {@link Swagger documentation https://api.cow.finance/docs/#/}
|
|
1217
1217
|
* @see {@link OrderBook API https://github.com/cowprotocol/services}
|
|
1218
1218
|
*/
|
|
1219
1219
|
declare class OrderBookApi {
|
|
@@ -1228,7 +1228,7 @@ declare class OrderBookApi {
|
|
|
1228
1228
|
* Get the version of the API.
|
|
1229
1229
|
* @param contextOverride Optional context override for this request.
|
|
1230
1230
|
* @returns The version of the API.
|
|
1231
|
-
* @see {@link https://api.cow.
|
|
1231
|
+
* @see {@link https://api.cow.finance/docs/#/default/get_api_v1_version}
|
|
1232
1232
|
*/
|
|
1233
1233
|
getVersion(contextOverride?: PartialApiContext): Promise<string>;
|
|
1234
1234
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1122,7 +1122,7 @@ interface QuoteAmountsAndCosts<T = bigint> {
|
|
|
1122
1122
|
|
|
1123
1123
|
/**
|
|
1124
1124
|
* An object containing *production* environment base URLs for each supported `chainId`.
|
|
1125
|
-
* @see {@link https://api.cow.
|
|
1125
|
+
* @see {@link https://api.cow.finance/docs/#/}
|
|
1126
1126
|
*/
|
|
1127
1127
|
declare const ORDER_BOOK_PROD_CONFIG: ApiBaseUrls;
|
|
1128
1128
|
/**
|
|
@@ -1132,13 +1132,13 @@ declare const ORDER_BOOK_STAGING_CONFIG: ApiBaseUrls;
|
|
|
1132
1132
|
/**
|
|
1133
1133
|
* An object containing *partner production* environment base URLs for each supported `chainId`.
|
|
1134
1134
|
* Used when apiKey is set; requests include X-API-Key header.
|
|
1135
|
-
* @see {@link https://partners.cow.
|
|
1135
|
+
* @see {@link https://partners.cow.finance}
|
|
1136
1136
|
*/
|
|
1137
1137
|
declare const ORDER_BOOK_PARTNER_PROD_CONFIG: ApiBaseUrls;
|
|
1138
1138
|
/**
|
|
1139
1139
|
* An object containing *partner staging* environment base URLs for each supported `chainId`.
|
|
1140
1140
|
* Used when apiKey is set and env is staging; requests include X-API-Key header.
|
|
1141
|
-
* @see {@link https://partners.barn.cow.
|
|
1141
|
+
* @see {@link https://partners.barn.cow.finance}
|
|
1142
1142
|
*/
|
|
1143
1143
|
declare const ORDER_BOOK_PARTNER_STAGING_CONFIG: ApiBaseUrls;
|
|
1144
1144
|
/**
|
|
@@ -1213,7 +1213,7 @@ type GetTradesRequest = {
|
|
|
1213
1213
|
* }
|
|
1214
1214
|
* ```
|
|
1215
1215
|
*
|
|
1216
|
-
* @see {@link Swagger documentation https://api.cow.
|
|
1216
|
+
* @see {@link Swagger documentation https://api.cow.finance/docs/#/}
|
|
1217
1217
|
* @see {@link OrderBook API https://github.com/cowprotocol/services}
|
|
1218
1218
|
*/
|
|
1219
1219
|
declare class OrderBookApi {
|
|
@@ -1228,7 +1228,7 @@ declare class OrderBookApi {
|
|
|
1228
1228
|
* Get the version of the API.
|
|
1229
1229
|
* @param contextOverride Optional context override for this request.
|
|
1230
1230
|
* @returns The version of the API.
|
|
1231
|
-
* @see {@link https://api.cow.
|
|
1231
|
+
* @see {@link https://api.cow.finance/docs/#/default/get_api_v1_version}
|
|
1232
1232
|
*/
|
|
1233
1233
|
getVersion(contextOverride?: PartialApiContext): Promise<string>;
|
|
1234
1234
|
/**
|
package/dist/index.js
CHANGED
|
@@ -176,10 +176,10 @@ function transformEthFlowOrder(order) {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
// src/api.ts
|
|
179
|
-
var PROD_BASE_URL = "https://api.cow.
|
|
180
|
-
var STAGING_BASE_URL = "https://barn.api.cow.
|
|
181
|
-
var PARTNER_PROD_BASE_URL = "https://partners.cow.
|
|
182
|
-
var PARTNER_STAGING_BASE_URL = "https://partners.barn.cow.
|
|
179
|
+
var PROD_BASE_URL = "https://api.cow.finance";
|
|
180
|
+
var STAGING_BASE_URL = "https://barn.api.cow.finance";
|
|
181
|
+
var PARTNER_PROD_BASE_URL = "https://partners.cow.finance";
|
|
182
|
+
var PARTNER_STAGING_BASE_URL = "https://partners.barn.cow.finance";
|
|
183
183
|
var ORDER_BOOK_PROD_CONFIG = {
|
|
184
184
|
[import_sdk_config2.SupportedChainId.MAINNET]: `${PROD_BASE_URL}/mainnet`,
|
|
185
185
|
[import_sdk_config2.SupportedChainId.GNOSIS_CHAIN]: `${PROD_BASE_URL}/xdai`,
|
|
@@ -258,7 +258,7 @@ var OrderBookApi = class {
|
|
|
258
258
|
* Get the version of the API.
|
|
259
259
|
* @param contextOverride Optional context override for this request.
|
|
260
260
|
* @returns The version of the API.
|
|
261
|
-
* @see {@link https://api.cow.
|
|
261
|
+
* @see {@link https://api.cow.finance/docs/#/default/get_api_v1_version}
|
|
262
262
|
*/
|
|
263
263
|
getVersion(contextOverride = {}) {
|
|
264
264
|
return this.fetch({ path: "/api/v1/version", method: "GET" }, contextOverride);
|
package/dist/index.mjs
CHANGED
|
@@ -127,10 +127,10 @@ function transformEthFlowOrder(order) {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
// src/api.ts
|
|
130
|
-
var PROD_BASE_URL = "https://api.cow.
|
|
131
|
-
var STAGING_BASE_URL = "https://barn.api.cow.
|
|
132
|
-
var PARTNER_PROD_BASE_URL = "https://partners.cow.
|
|
133
|
-
var PARTNER_STAGING_BASE_URL = "https://partners.barn.cow.
|
|
130
|
+
var PROD_BASE_URL = "https://api.cow.finance";
|
|
131
|
+
var STAGING_BASE_URL = "https://barn.api.cow.finance";
|
|
132
|
+
var PARTNER_PROD_BASE_URL = "https://partners.cow.finance";
|
|
133
|
+
var PARTNER_STAGING_BASE_URL = "https://partners.barn.cow.finance";
|
|
134
134
|
var ORDER_BOOK_PROD_CONFIG = {
|
|
135
135
|
[SupportedChainId.MAINNET]: `${PROD_BASE_URL}/mainnet`,
|
|
136
136
|
[SupportedChainId.GNOSIS_CHAIN]: `${PROD_BASE_URL}/xdai`,
|
|
@@ -209,7 +209,7 @@ var OrderBookApi = class {
|
|
|
209
209
|
* Get the version of the API.
|
|
210
210
|
* @param contextOverride Optional context override for this request.
|
|
211
211
|
* @returns The version of the API.
|
|
212
|
-
* @see {@link https://api.cow.
|
|
212
|
+
* @see {@link https://api.cow.finance/docs/#/default/get_api_v1_version}
|
|
213
213
|
*/
|
|
214
214
|
getVersion(contextOverride = {}) {
|
|
215
215
|
return this.fetch({ path: "/api/v1/version", method: "GET" }, contextOverride);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cowprotocol/sdk-order-book",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "CowProtocol Order Book package",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"cross-fetch": "^3.2.0",
|
|
37
37
|
"exponential-backoff": "^3.1.2",
|
|
38
38
|
"limiter": "^3.0.0",
|
|
39
|
-
"@cowprotocol/sdk-
|
|
40
|
-
"@cowprotocol/sdk-
|
|
39
|
+
"@cowprotocol/sdk-config": "1.2.0",
|
|
40
|
+
"@cowprotocol/sdk-common": "0.10.1"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|