@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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
- "version": "0.2.1",
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": "^3.17.10"
42
+ "nestjs-zod": "^1.1.2"
43
43
  },
44
44
  "resolutions": {
45
45
  "typescript": "4.5"
46
46
  },
47
- "gitHead": "a00d331cd2b03c582049181340e3f2f32b930a9a"
47
+ "gitHead": "049ca79d554e78fbb0423d297e299313310bdd84"
48
48
  }
@@ -1,4 +1,4 @@
1
- import * as z from 'zod';
1
+ import { z } from 'nestjs-zod/z';
2
2
  import { accountParser, authorizationsParser } from './base'
3
3
 
4
4
  const actionParser = z.object({
@@ -1,4 +1,4 @@
1
- import * as z from 'zod';
1
+ import { z } from 'nestjs-zod/z';
2
2
  import { accountParser } from './base'
3
3
  import { generateAuthParser } from './auth'
4
4
 
@@ -1,4 +1,4 @@
1
- import * as z from 'zod';
1
+ import { z } from 'nestjs-zod/z';
2
2
  import { baseActionParser, singleActionTransactionParser } from './actions'
3
3
  import { authorizationParser } from './base'
4
4
  import { WRAP_CONTRACT, WRAP_AUTH_ACTION } from '../constants'
@@ -1,4 +1,4 @@
1
- import * as z from 'zod'
1
+ import { z } from 'nestjs-zod/z'
2
2
 
3
3
  export const accountParser = z.string().regex(/^[.1-5a-z]{0,12}[.1-5a-j]?$/)
4
4
 
@@ -1,4 +1,4 @@
1
- import * as z from 'zod'
1
+ import { z } from 'nestjs-zod/z'
2
2
 
3
3
  export interface CurrencyStat {
4
4
  supply : string;
@@ -1,4 +1,4 @@
1
- import * as z from 'zod'
1
+ import { z } from 'nestjs-zod/z'
2
2
 
3
3
  export enum Type {
4
4
  RECEIVE = 'receive',
@@ -1,5 +1,5 @@
1
1
  import { ExtendedAsset, ExtendedSymbol } from '@bloks/numbers';
2
- import * as z from 'zod';
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(),
@@ -1,4 +1,4 @@
1
- import * as z from 'zod'
1
+ import { z } from 'nestjs-zod/z'
2
2
 
3
3
  export const otcOrderResponseParser = z.object({
4
4
  success : z.boolean(),
@@ -1,4 +1,4 @@
1
- import * as z from 'zod'
1
+ import { z } from 'nestjs-zod/z'
2
2
  import { singleActionTransactionParser } from './actions'
3
3
  import { authorizationParser } from './base'
4
4
  import { WRAP_CONTRACT } from '../constants'
@@ -1,4 +1,4 @@
1
- import * as z from 'zod'
1
+ import { z } from 'nestjs-zod/z'
2
2
 
3
3
  export const withdrawHistoryMetalSwapParser = z.object({
4
4
  id : z.string(),
@@ -1,4 +1,4 @@
1
- import * as z from 'zod'
1
+ import { z } from 'nestjs-zod/z'
2
2
  import { ExtendedAssetParser } from './base'
3
3
 
4
4
  export enum Status {