@proton/wrap-constants 0.2.37 → 0.2.39

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
- "version": "0.2.37",
8
+ "version": "0.2.39",
9
9
  "license": "MIT",
10
10
  "main": "dist/index.js",
11
11
  "typings": "dist/index.d.ts",
@@ -44,5 +44,5 @@
44
44
  "resolutions": {
45
45
  "typescript": "4.5"
46
46
  },
47
- "gitHead": "e864a7bd9fe9232b216768edfd070385fbc95070"
47
+ "gitHead": "dd021f05f12f09c3fde25b1fc5181019381541ca"
48
48
  }
@@ -24,6 +24,12 @@ export const getOhlcvParser = z.object({
24
24
  })
25
25
  export type GetOHLCV = z.infer<typeof getOhlcvParser>
26
26
 
27
+ export const getOhlcvResponseParser = z.object({
28
+ sync: z.number(),
29
+ data: z.array(ohlcvParser)
30
+ })
31
+ export type GetOHLCVResponse = z.infer<typeof getOhlcvResponseParser>
32
+
27
33
  export const orderHistoryParser = z.object({
28
34
  seq: z.number(),
29
35
  block_num: z.number(),
@@ -52,6 +58,13 @@ export const getOrderHistoryParser = z.object({
52
58
  })
53
59
  export type GetOrderHistory = z.infer<typeof getOrderHistoryParser>
54
60
 
61
+ export const getOrderHistoryResponseParser = z.object({
62
+ sync: z.number(),
63
+ count: z.number(),
64
+ data: z.array(orderHistoryParser)
65
+ })
66
+ export type GetOrderHistoryResponse = z.infer<typeof getOrderHistoryResponseParser>
67
+
55
68
  export const depthParser = z.object({
56
69
  level: z.number(),
57
70
  ask: z.number(),
@@ -67,6 +80,15 @@ export const getDepthParser = z.object({
67
80
  })
68
81
  export type GetDepth = z.infer<typeof getDepthParser>
69
82
 
83
+ export const getDepthResponseParser = z.object({
84
+ sync: z.number(),
85
+ data: z.object({
86
+ bids: z.array(depthParser),
87
+ asks: z.array(depthParser),
88
+ })
89
+ })
90
+ export type GetDepthResponse = z.infer<typeof getDepthResponseParser>
91
+
70
92
  export const dailyParser = z.object({
71
93
  market_id: z.number(),
72
94
  first: z.number(),
@@ -77,6 +99,12 @@ export const dailyParser = z.object({
77
99
  })
78
100
  export type Daily = z.infer<typeof dailyParser>
79
101
 
102
+ export const getDailyResponseParser = z.object({
103
+ sync: z.number(),
104
+ data: z.array(dailyParser)
105
+ })
106
+ export type GetDailyResponseParser = z.infer<typeof getDailyResponseParser>
107
+
80
108
  export const tradeParser = z.object({
81
109
  block_num: z.number(),
82
110
  block_time: z.string(),
@@ -105,6 +133,12 @@ export const getTradesParser = z.object({
105
133
  })
106
134
  export type GetTrades = z.infer<typeof getTradesParser>
107
135
 
136
+ export const getTradesResponseParser = z.object({
137
+ sync: z.number(),
138
+ data: z.array(tradeParser)
139
+ })
140
+ export type GetTradesResponseParser = z.infer<typeof getTradesResponseParser>
141
+
108
142
  export const syncParser = z.object({
109
143
  sourceid: z.number(),
110
144
  block_num: z.string(),
@@ -115,12 +149,12 @@ export const syncParser = z.object({
115
149
  })
116
150
  export type Sync = z.infer<typeof syncParser>
117
151
 
118
- export const latestSyncParser = z.object({
152
+ export const getSyncResponseParser = z.object({
119
153
  dbSecondsBehind: z.number(),
120
154
  chronicleSecondsBehind: z.number(),
121
155
  maxSecondsBehind: z.number()
122
156
  })
123
- export type LatestSync = z.infer<typeof latestSyncParser>
157
+ export type GetSyncResponse = z.infer<typeof getSyncResponseParser>
124
158
 
125
159
  export enum orderType { ORDERBOOK = 0, LIMIT = 1, STOPLOSS = 2, TAKEPROFIT = 3 }
126
160