@proton/wrap-constants 0.2.1 → 0.2.5
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/dist/parsers/actions.d.ts +1 -1
- package/dist/parsers/address.d.ts +1 -1
- package/dist/parsers/auth.d.ts +1 -1
- package/dist/parsers/base.d.ts +1 -1
- package/dist/parsers/currency.d.ts +1 -1
- package/dist/parsers/deposit.d.ts +1 -1
- package/dist/parsers/dex.d.ts +6 -7
- package/dist/parsers/otc.d.ts +1 -1
- package/dist/parsers/withdraw.d.ts +1 -1
- package/dist/parsers/withdrawalHistory.d.ts +1 -1
- package/dist/parsers/wrap.d.ts +1 -1
- package/dist/wrap-constants.cjs.development.js +257 -206
- package/dist/wrap-constants.cjs.development.js.map +1 -1
- package/dist/wrap-constants.cjs.production.min.js +1 -1
- package/dist/wrap-constants.cjs.production.min.js.map +1 -1
- package/dist/wrap-constants.esm.js +253 -207
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/parsers/actions.ts +1 -1
- package/src/parsers/address.ts +1 -1
- package/src/parsers/auth.ts +1 -1
- package/src/parsers/base.ts +1 -1
- package/src/parsers/currency.ts +1 -1
- package/src/parsers/deposit.ts +1 -1
- package/src/parsers/dex.ts +6 -7
- package/src/parsers/otc.ts +1 -1
- package/src/parsers/withdraw.ts +1 -1
- package/src/parsers/withdrawalHistory.ts +1 -1
- package/src/parsers/wrap.ts +1 -1
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.2.
|
|
8
|
+
"version": "0.2.5",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"typings": "dist/index.d.ts",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"lodash.clonedeep": "^4.5.0",
|
|
42
|
-
"zod": "^
|
|
42
|
+
"nestjs-zod": "^1.1.2"
|
|
43
43
|
},
|
|
44
44
|
"resolutions": {
|
|
45
45
|
"typescript": "4.5"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "049ca79d554e78fbb0423d297e299313310bdd84"
|
|
48
48
|
}
|
package/src/parsers/actions.ts
CHANGED
package/src/parsers/address.ts
CHANGED
package/src/parsers/auth.ts
CHANGED
package/src/parsers/base.ts
CHANGED
package/src/parsers/currency.ts
CHANGED
package/src/parsers/deposit.ts
CHANGED
package/src/parsers/dex.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExtendedAsset, ExtendedSymbol } from '@bloks/numbers';
|
|
2
|
-
import
|
|
2
|
+
import { z } from 'nestjs-zod/z';
|
|
3
3
|
|
|
4
4
|
const numTransform = z.string().regex(/\d+/).transform(Number)
|
|
5
5
|
|
|
@@ -49,7 +49,7 @@ export const getOrderHistoryParser = z.object({
|
|
|
49
49
|
})
|
|
50
50
|
export type GetOrderHistory = z.infer<typeof getOrderHistoryParser>
|
|
51
51
|
|
|
52
|
-
const depthParser = z.object({
|
|
52
|
+
export const depthParser = z.object({
|
|
53
53
|
level: z.number(),
|
|
54
54
|
ask: z.number(),
|
|
55
55
|
bid: z.number(),
|
|
@@ -57,7 +57,7 @@ const depthParser = z.object({
|
|
|
57
57
|
})
|
|
58
58
|
export type Depth = z.infer<typeof depthParser>
|
|
59
59
|
|
|
60
|
-
const getDepthParser = z.object({
|
|
60
|
+
export const getDepthParser = z.object({
|
|
61
61
|
marketId: z.number(),
|
|
62
62
|
step: z.string(),
|
|
63
63
|
side: z.string(),
|
|
@@ -65,7 +65,7 @@ const getDepthParser = z.object({
|
|
|
65
65
|
})
|
|
66
66
|
export type GetDepth = z.infer<typeof getDepthParser>
|
|
67
67
|
|
|
68
|
-
const tradeParser = z.object({
|
|
68
|
+
export const tradeParser = z.object({
|
|
69
69
|
block_num: z.number(),
|
|
70
70
|
block_time: z.string(),
|
|
71
71
|
trade_id: z.number(),
|
|
@@ -84,15 +84,14 @@ const tradeParser = z.object({
|
|
|
84
84
|
})
|
|
85
85
|
export type Trade = z.infer<typeof tradeParser>
|
|
86
86
|
|
|
87
|
-
const getTradesParser = z.object({
|
|
87
|
+
export const getTradesParser = z.object({
|
|
88
88
|
marketId: z.number().or(numTransform),
|
|
89
89
|
offset: z.number().or(numTransform).default(0),
|
|
90
90
|
limit: z.number().or(numTransform).default(100).refine(n => n <= 250, 'Max limit is 250'),
|
|
91
91
|
})
|
|
92
|
-
|
|
93
92
|
export type GetTrades = z.infer<typeof getTradesParser>
|
|
94
93
|
|
|
95
|
-
const syncParser = z.object({
|
|
94
|
+
export const syncParser = z.object({
|
|
96
95
|
sourceid: z.number(),
|
|
97
96
|
block_num: z.string(),
|
|
98
97
|
block_time: z.string(),
|
package/src/parsers/otc.ts
CHANGED
package/src/parsers/withdraw.ts
CHANGED
package/src/parsers/wrap.ts
CHANGED