@cowprotocol/sdk-order-book 0.1.0-monorepo.2 → 0.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 +1 -4
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -18,8 +18,6 @@ yarn add @cowprotocol/sdk-order-book
|
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
|
-
### Individual package usage
|
|
22
|
-
|
|
23
21
|
```typescript
|
|
24
22
|
import { OrderBookApi, SupportedChainId, OrderQuoteRequest, OrderCreation } from '@cowprotocol/sdk-order-book'
|
|
25
23
|
import { setGlobalAdapter } from '@cowprotocol/sdk-common'
|
|
@@ -76,7 +74,7 @@ const trades = await orderBookApi.getTrades({
|
|
|
76
74
|
})
|
|
77
75
|
```
|
|
78
76
|
|
|
79
|
-
### Usage with
|
|
77
|
+
### Usage with CoW SDK
|
|
80
78
|
|
|
81
79
|
```typescript
|
|
82
80
|
import { CowSdk, SupportedChainId, OrderQuoteRequest } from '@cowprotocol/cow-sdk'
|
|
@@ -94,7 +92,6 @@ const sdk = new CowSdk({
|
|
|
94
92
|
adapter,
|
|
95
93
|
})
|
|
96
94
|
|
|
97
|
-
// Use Order Book through the umbrella SDK
|
|
98
95
|
const { quote } = await sdk.orderBook.getQuote(quoteRequest)
|
|
99
96
|
const orderId = await sdk.orderBook.sendOrder(signedOrder)
|
|
100
97
|
const order = await sdk.orderBook.getOrder(orderId)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cowprotocol/sdk-order-book",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "CowProtocol Order Book package",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -13,19 +13,7 @@
|
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
18
|
-
"prebuild": "pnpm swagger:codegen",
|
|
19
|
-
"lint": "eslint src/**/*.ts --quiet",
|
|
20
|
-
"test": "jest",
|
|
21
|
-
"test:coverage": "jest --coverage --json --outputFile=jest.results.json && npx coveralls < ./coverage/lcov.info",
|
|
22
|
-
"test:coverage:html": "jest --silent=false --coverage --coverageReporters html",
|
|
23
|
-
"swagger:codegen": "openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.291.0/crates/orderbook/openapi.yml --output src/generated --exportServices false --exportCore false",
|
|
24
|
-
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
25
|
-
"typecheck": "tsc --noEmit"
|
|
26
|
-
},
|
|
27
16
|
"devDependencies": {
|
|
28
|
-
"@cow-sdk/typescript-config": "workspace:*",
|
|
29
17
|
"@types/jest": "^29.4.0",
|
|
30
18
|
"@types/node": "^20.17.31",
|
|
31
19
|
"@types/semver-sort": "^0.0.1",
|
|
@@ -36,13 +24,25 @@
|
|
|
36
24
|
"ts-jest": "^29.0.0",
|
|
37
25
|
"tsup": "^7.2.0",
|
|
38
26
|
"tsx": "^4.19.4",
|
|
39
|
-
"typescript": "^5.2.2"
|
|
27
|
+
"typescript": "^5.2.2",
|
|
28
|
+
"@cow-sdk/typescript-config": "0.0.0-beta.0"
|
|
40
29
|
},
|
|
41
30
|
"dependencies": {
|
|
42
|
-
"@cowprotocol/sdk-config": "workspace:*",
|
|
43
|
-
"@cowprotocol/sdk-common": "workspace:*",
|
|
44
31
|
"cross-fetch": "^3.2.0",
|
|
45
32
|
"exponential-backoff": "^3.1.2",
|
|
46
|
-
"limiter": "^3.0.0"
|
|
33
|
+
"limiter": "^3.0.0",
|
|
34
|
+
"@cowprotocol/sdk-config": "0.1.0",
|
|
35
|
+
"@cowprotocol/sdk-common": "0.1.0"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
39
|
+
"prebuild": "pnpm swagger:codegen",
|
|
40
|
+
"lint": "eslint src/**/*.ts --quiet",
|
|
41
|
+
"test": "jest",
|
|
42
|
+
"test:coverage": "jest --coverage --json --outputFile=jest.results.json && npx coveralls < ./coverage/lcov.info",
|
|
43
|
+
"test:coverage:html": "jest --silent=false --coverage --coverageReporters html",
|
|
44
|
+
"swagger:codegen": "openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.291.0/crates/orderbook/openapi.yml --output src/generated --exportServices false --exportCore false",
|
|
45
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
46
|
+
"typecheck": "tsc --noEmit"
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
}
|