@proton/wrap-constants 0.2.192 → 0.3.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/package.json CHANGED
@@ -2,40 +2,54 @@
2
2
  "name": "@proton/wrap-constants",
3
3
  "author": "Metallicus",
4
4
  "module": "dist/index.mjs",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "import": {
9
+ "types": "./dist/index.d.mts",
10
+ "default": "./dist/index.mjs"
11
+ },
12
+ "require": {
13
+ "types": "./dist/index.d.cts",
14
+ "default": "./dist/index.cjs"
15
+ }
16
+ }
17
+ },
5
18
  "publishConfig": {
6
19
  "access": "public"
7
20
  },
8
- "version": "0.2.192",
21
+ "version": "0.3.0",
9
22
  "license": "MIT",
10
- "main": "dist/index.js",
11
- "typings": "dist/index.d.ts",
23
+ "main": "dist/index.cjs",
24
+ "typings": "dist/index.d.cts",
12
25
  "files": [
13
26
  "dist",
14
27
  "src"
15
28
  ],
16
29
  "engines": {
17
- "node": ">=10"
30
+ "node": ">=20"
18
31
  },
19
32
  "devDependencies": {
20
33
  "@bloks/numbers": "^27.0.0",
21
- "@size-limit/preset-small-lib": "^11.2.0",
34
+ "@eslint/js": "^10.0.1",
35
+ "@size-limit/preset-small-lib": "^14.3.0",
22
36
  "@types/lodash.clonedeep": "^4.5.6",
23
- "@typescript-eslint/eslint-plugin": "^8.36.0",
24
- "@typescript-eslint/parser": "^8.36.0",
25
- "eslint": "^9.30.1",
26
- "size-limit": "^11.2.0",
27
- "tsup": "^8.5.0",
28
- "typescript": "^4.8.4"
37
+ "eslint": "^10.11.0",
38
+ "size-limit": "^14.3.0",
39
+ "tsdown": "0.22.14",
40
+ "typescript": "~6.0.0",
41
+ "typescript-eslint": "^8.70.1"
29
42
  },
30
43
  "dependencies": {
31
44
  "bignumber.js": "^9.3.1",
32
45
  "lodash.clonedeep": "^4.5.0",
33
- "zod": "^3.19.1"
46
+ "zod": "^4.6.7"
34
47
  },
35
48
  "scripts": {
36
- "build": "tsup src/index.ts --format cjs,esm --dts",
37
- "dev": "tsup src/index.ts --watch",
49
+ "build": "tsdown src/index.ts --format cjs,esm --dts",
50
+ "dev": "tsdown src/index.ts --watch",
38
51
  "size": "size-limit",
39
- "analyze": "size-limit --why"
52
+ "analyze": "size-limit --why",
53
+ "lint": "eslint ."
40
54
  }
41
55
  }
package/src/coins.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Asset } from "@bloks/numbers";
1
+ import type { Asset } from "@bloks/numbers";
2
2
 
3
3
  export enum Chains {
4
4
  BitcoinMainnet = "Bitcoin",
@@ -598,8 +598,8 @@ export const initializeCoins = (
598
598
  ...(IS_MAINNET
599
599
  ? [
600
600
  {
601
- wallet: "EUROC",
602
- symbol: "EUROC-ERC20",
601
+ wallet: "EUROC-ERC20",
602
+ symbol: "EUROC",
603
603
  chain: Chains.EthereumMainnet,
604
604
  network: Networks.ERC20,
605
605
  precision: 6,
@@ -1,82 +1,105 @@
1
- import * as z from 'zod';
2
- import { accountParser, authorizationsParser } from './base'
1
+ import * as z from "zod";
2
+ import { accountParser, authorizationsParser } from "./base";
3
3
 
4
4
  const actionParser = z.object({
5
- account: z.string(),
6
- name: z.string(),
7
- authorization: z.array(
8
- z.object({
9
- actor: z.string(),
10
- permission: z.string(),
11
- })
12
- ),
13
- data: z.any(),
14
- hex_data: z.string().optional()
15
- })
5
+ account: z.string(),
6
+ name: z.string(),
7
+ authorization: z.array(
8
+ z.object({
9
+ actor: z.string(),
10
+ permission: z.string(),
11
+ }),
12
+ ),
13
+ data: z.any(),
14
+ hex_data: z.string().optional(),
15
+ });
16
16
 
17
- const transactionExtensionsParser = z.array(z.number().or(z.string())).optional()
17
+ const transactionExtensionsParser = z
18
+ .array(z.number().or(z.string()))
19
+ .optional();
18
20
 
19
21
  const rawTransactionParser = z.object({
20
- expiration : z.string(),
21
- ref_block_num : z.number(),
22
- ref_block_prefix : z.number(),
23
- max_net_usage_words : z.number(),
24
- max_cpu_usage_ms : z.number(),
25
- delay_sec : z.number(),
26
- context_free_actions : z.array(actionParser),
27
- transaction_extensions: z.array(transactionExtensionsParser)
28
- })
22
+ expiration: z.string(),
23
+ ref_block_num: z.number(),
24
+ ref_block_prefix: z.number(),
25
+ max_net_usage_words: z.number(),
26
+ max_cpu_usage_ms: z.number(),
27
+ delay_sec: z.number(),
28
+ context_free_actions: z.array(actionParser),
29
+ transaction_extensions: z.array(transactionExtensionsParser),
30
+ });
29
31
 
30
- export const baseActionParser = <T extends z.ZodRawShape>(contract: string, action: string, data: T) => z.object({
31
- account: contract === '*' ? accountParser : z.literal(contract),
32
+ export const baseActionParser = <T extends z.ZodRawShape>(
33
+ contract: string,
34
+ action: string,
35
+ data: T,
36
+ ) =>
37
+ z.object({
38
+ account: contract === "*" ? accountParser : z.literal(contract),
32
39
  name: z.literal(action),
33
40
  data: z.object(data),
34
- authorization: authorizationsParser
35
- })
41
+ authorization: authorizationsParser,
42
+ });
36
43
 
37
- export const baseActionSerializedParser = <T extends z.ZodRawShape>(contract: string, action: string, data: T) => z.object({
38
- account: contract === '*' ? accountParser : z.literal(contract),
44
+ export const baseActionSerializedParser = <T extends z.ZodRawShape>(
45
+ contract: string,
46
+ action: string,
47
+ data: T,
48
+ ) =>
49
+ z.object({
50
+ account: contract === "*" ? accountParser : z.literal(contract),
39
51
  name: z.literal(action),
40
52
  data: z.string().or(z.object(data)),
41
- authorization: authorizationsParser
42
- })
53
+ authorization: authorizationsParser,
54
+ });
43
55
 
44
- export const webauthActionParser = <T extends z.ZodRawShape>(contract: string, action: string, data: T) => z.object({
45
- account: z.literal('webauthn'),
46
- name: z.literal('exec'),
56
+ export const webauthActionParser = <T extends z.ZodRawShape>(
57
+ contract: string,
58
+ action: string,
59
+ data: T,
60
+ ) =>
61
+ z.object({
62
+ account: z.literal("webauthn"),
63
+ name: z.literal("exec"),
47
64
  data: z.object({
48
- account: accountParser,
49
- key: z.object({
50
- key: z.array(z.string().or(z.object({
51
- modulus: z.string(),
52
- exponent: z.string()
53
- }))),
54
- user_presence: z.number(),
55
- rpid: z.string()
56
- }),
57
- nonce: z.number(),
58
- permissions: authorizationsParser,
59
- signature: z.object({
60
- auth_data: z.string(),
61
- client_json: z.string(),
62
- signature: z.string()
63
- }),
64
- trx: rawTransactionParser.merge(
65
+ account: accountParser,
66
+ key: z.object({
67
+ key: z.array(
68
+ z.string().or(
65
69
  z.object({
66
- actions: z.array(
67
- baseActionSerializedParser(contract, action, data)
68
- ).length(1)
69
- })
70
- )
70
+ modulus: z.string(),
71
+ exponent: z.string(),
72
+ }),
73
+ ),
74
+ ),
75
+ user_presence: z.number(),
76
+ rpid: z.string(),
77
+ }),
78
+ nonce: z.number(),
79
+ permissions: authorizationsParser,
80
+ signature: z.object({
81
+ auth_data: z.string(),
82
+ client_json: z.string(),
83
+ signature: z.string(),
84
+ }),
85
+ trx: rawTransactionParser.extend({
86
+ actions: z
87
+ .array(baseActionSerializedParser(contract, action, data))
88
+ .length(1),
89
+ }),
71
90
  }),
72
- authorization: authorizationsParser
73
- })
91
+ authorization: authorizationsParser,
92
+ });
74
93
 
75
- export const singleActionTransactionParser = <T extends z.ZodRawShape>(contract: string, action: string, data: T) => {
76
- const baseAction = baseActionParser(contract, action, data)
77
- const webauthAction = webauthActionParser(contract, action, data)
94
+ export const singleActionTransactionParser = <T extends z.ZodRawShape>(
95
+ contract: string,
96
+ action: string,
97
+ data: T,
98
+ ) => {
99
+ const baseAction = baseActionParser(contract, action, data);
100
+ const webauthAction = webauthActionParser(contract, action, data);
78
101
 
79
- return rawTransactionParser.merge(z.object({
80
- actions: z.array(baseAction.or(webauthAction)).length(1)
81
- }))
82
- }
102
+ return rawTransactionParser.extend({
103
+ actions: z.array(baseAction.or(webauthAction)).length(1),
104
+ });
105
+ };
@@ -1,27 +1,27 @@
1
- import * as z from 'zod';
2
- import { accountParser } from './base'
3
- import { generateAuthParser } from './auth'
1
+ import * as z from "zod";
2
+ import { accountParser } from "./base";
3
+ import { generateAuthParser } from "./auth";
4
4
 
5
5
  export const addressParser = z.object({
6
- index : z.number(),
7
- account : accountParser,
8
- chain : z.string(),
9
- address : z.string(),
10
- address_hash: z.string(),
11
- })
12
- export type Address = z.infer<typeof addressParser>
6
+ index: z.number(),
7
+ account: accountParser,
8
+ chain: z.string(),
9
+ address: z.string(),
10
+ address_hash: z.string(),
11
+ });
12
+ export type Address = z.infer<typeof addressParser>;
13
13
 
14
- export const generateAddressBodyParser = z.object({
15
- coin: z.string(),
16
- wallet: z.string(),
17
- }).merge(generateAuthParser)
18
- export type GenerateAddressBody = z.infer<typeof generateAddressBodyParser>
14
+ export const generateAddressBodyParser = generateAuthParser.extend({
15
+ coin: z.string(),
16
+ wallet: z.string(),
17
+ });
18
+ export type GenerateAddressBody = z.infer<typeof generateAddressBodyParser>;
19
19
 
20
20
  export const generateAddressResponse = z.object({
21
- id : z.string(), // "2448834505708930950",
22
- address: z.string(), // "0x617C03C1E2Bf81C062A4CEfbE312c070E1d86d18",
23
- coin : z.string(), // "ETH",
24
- wallet : z.string(), // "ETH",
25
- memo : z.string().optional()
26
- })
27
- export type GenerateAddressResponse = z.infer<typeof generateAddressResponse>
21
+ id: z.string(), // "2448834505708930950",
22
+ address: z.string(), // "0x617C03C1E2Bf81C062A4CEfbE312c070E1d86d18",
23
+ coin: z.string(), // "ETH",
24
+ wallet: z.string(), // "ETH",
25
+ memo: z.string().optional(),
26
+ });
27
+ export type GenerateAddressResponse = z.infer<typeof generateAddressResponse>;
@@ -1,7 +1,7 @@
1
1
  import * as z from "zod";
2
2
  import { baseActionParser, singleActionTransactionParser } from "./actions";
3
3
  import { authorizationParser } from "./base";
4
- import { WRAP_CONTRACT, WRAP_AUTH_ACTION } from "../constants";
4
+ import { WRAP_AUTH_ACTION, WRAP_CONTRACT } from "../constants";
5
5
 
6
6
  export const createAbstractAuthParser = (
7
7
  contract: string,
@@ -19,7 +19,7 @@ const generateAuthData = {
19
19
  time: z.string(),
20
20
  protonAccount: z.string(),
21
21
  };
22
- const generateAuthActionsBaseParser = baseActionParser(
22
+ export const generateAuthActionsBaseParser = baseActionParser(
23
23
  WRAP_CONTRACT,
24
24
  WRAP_AUTH_ACTION,
25
25
  generateAuthData
@@ -7,7 +7,7 @@ export enum Type {
7
7
 
8
8
  export const depositBodyParser = z.object({
9
9
  id: z.string(), // "0x000010203121388fac991"
10
- type: z.nativeEnum(Type), // "receive" or "send"
10
+ type: z.enum(Type), // "receive" or "send"
11
11
  hash: z.string(), // "0x000010203121388fac991"
12
12
  coin: z.string(), // "ETH" or "XPR"
13
13
  wallet: z.string(), // "ETH-SEPOLIA" or "XPR-MAINNET"
@@ -21,17 +21,11 @@ export const metalTransactionParser = z.object({
21
21
  value: z.number(), // 10000000000000000
22
22
  valueString: z.string(), // "10000000000000000"
23
23
  address: z.string(), // "0x0000"
24
- type: z.nativeEnum(Type), // "receive" or "send"
24
+ type: z.enum(Type), // "receive" or "send"
25
25
  state: z.string(), // "confirmed"
26
26
  confirmations: z.number(), // 1
27
27
  hash: z.string(), // "b4781422be95fee8fbbf720e3e0fa9705ae834474ef25f5724cdd0f5d23211ed"
28
- blockHash: z
29
- .string()
30
- .optional()
31
- .nullable(), // "000000000000000000089b270eb99f75107d6a9cde37ec944cb80a2998df7b43"
32
- blockHeight: z
33
- .number()
34
- .optional()
35
- .nullable(), // 643159
28
+ blockHash: z.string().optional().nullable(), // "000000000000000000089b270eb99f75107d6a9cde37ec944cb80a2998df7b43"
29
+ blockHeight: z.number().optional().nullable(), // 643159
36
30
  });
37
31
  export type MetalTransaction = z.infer<typeof metalTransactionParser>;
@@ -1,15 +1,19 @@
1
1
  import * as z from "zod";
2
2
  import { accountRamDeltaParser, authorizationParser } from "./base";
3
3
 
4
- const booleanParamSchema = z.boolean().or(z.enum(["true", "false"]).transform((value) => value === "true"))
4
+ const booleanParamSchema = z
5
+ .boolean()
6
+ .or(z.enum(["true", "false"]).transform((value) => value === "true"));
5
7
 
6
8
  const createLimit = (base: number, max: number) =>
7
9
  z.coerce
8
- .number()
10
+ .number<number>()
9
11
  .default(base)
10
- .refine((n) => +n > 0 && +n <= max, `Limit must be between 0 and ${max}`);
12
+ .refine((n) => +n > 0 && +n <= max, {
13
+ error: `Limit must be between 0 and ${max}`,
14
+ });
11
15
 
12
- const createOffset = (base: number) => z.coerce.number().default(base);
16
+ const createOffset = (base: number) => z.coerce.number<number>().default(base);
13
17
 
14
18
  const ordinalOrderIdsParser = z
15
19
  .array(z.string())
@@ -21,10 +25,12 @@ const ordinalOrderIdsParser = z
21
25
  });
22
26
 
23
27
  const marketIdsParser = z
24
- .array(z.coerce.number())
25
- .or(z.coerce.number())
28
+ .array(z.coerce.number<number>())
29
+ .or(z.coerce.number<number>())
26
30
  .transform((mids) => (Array.isArray(mids) ? mids : [mids]))
27
- .refine((mids) => mids.length > 0, "Must provide atleast one market ID")
31
+ .refine((mids) => mids.length > 0, {
32
+ error: "Must provide atleast one market ID",
33
+ });
28
34
 
29
35
  const contractFiltersParser = z
30
36
  .array(z.string())
@@ -35,7 +41,7 @@ const contractFiltersParser = z
35
41
  return Array.isArray(oids) ? oids : [oids];
36
42
  });
37
43
 
38
- export const sortDirectionEnum = z.enum(["asc", "desc"])
44
+ export const sortDirectionEnum = z.enum(["asc", "desc"]);
39
45
  export type SortDirection = z.input<typeof sortDirectionEnum>;
40
46
 
41
47
  /**
@@ -110,7 +116,7 @@ export const orderLogParser = z.object({
110
116
  status: z.string(),
111
117
  quantity_change: z.string(),
112
118
  trx_id: z.string(),
113
- })
119
+ });
114
120
  export type OrderLog = z.infer<typeof orderLogParser>;
115
121
 
116
122
  export const orderHistoryParser = z.object({
@@ -209,11 +215,13 @@ export const postSubmitOrderResponseParser = z.object({
209
215
  ordinal_order_id: z.string(),
210
216
  order_id: z.string(),
211
217
  status: z.string(),
212
- })
218
+ }),
213
219
  ),
214
220
  }),
215
221
  });
216
- export type PostSubmitOrderResponse = z.infer<typeof postSubmitOrderResponseParser>;
222
+ export type PostSubmitOrderResponse = z.infer<
223
+ typeof postSubmitOrderResponseParser
224
+ >;
217
225
 
218
226
  /**
219
227
  * Serialize Order
@@ -225,8 +233,8 @@ export const postSerializeOrderParser = z.object({
225
233
  account: z.string(),
226
234
  name: z.string(),
227
235
  authorization: z.array(authorizationParser),
228
- data: z.record(z.any()),
229
- })
236
+ data: z.record(z.string(), z.any()),
237
+ }),
230
238
  ),
231
239
  }),
232
240
  });
@@ -256,7 +264,7 @@ export type Depth = z.infer<typeof depthParser>;
256
264
 
257
265
  export const getDepthParser = z.object({
258
266
  symbol: z.string(),
259
- step: z.coerce.number(),
267
+ step: z.coerce.number<number>(),
260
268
  limit: createLimit(100, 250),
261
269
  });
262
270
  export type GetDepth = z.input<typeof getDepthParser>;
@@ -496,9 +504,7 @@ export const getReferralsResponseParser = z.object({
496
504
  sync: z.number(),
497
505
  data: z.array(refferalParser),
498
506
  });
499
- export type GetReferralsResponse = z.infer<
500
- typeof getReferralsResponseParser
501
- >;
507
+ export type GetReferralsResponse = z.infer<typeof getReferralsResponseParser>;
502
508
 
503
509
  /**
504
510
  * Leaderboard
@@ -513,7 +519,7 @@ export const getLeaderboardParser = z.object({
513
519
  market_ids: marketIdsParser,
514
520
  from: z.string(),
515
521
  to: z.string(),
516
- exclude_zero_fee: booleanParamSchema.default('true'),
522
+ exclude_zero_fee: booleanParamSchema.prefault("true"),
517
523
  });
518
524
  export type GetLeaderboard = z.input<typeof getLeaderboardParser>;
519
525
  export type GetLeaderboardParsed = z.output<typeof getLeaderboardParser>;
@@ -556,7 +562,7 @@ export const receiptParser = z.object({
556
562
  global_sequence: z.string(),
557
563
  recv_sequence: z.string(),
558
564
  auth_sequence: z.array(
559
- z.object({ account: z.string(), sequence: z.string() })
565
+ z.object({ account: z.string(), sequence: z.string() }),
560
566
  ),
561
567
  code_sequence: z.string(),
562
568
  abi_sequence: z.string(),
@@ -606,7 +612,7 @@ export const historyTransactionParser = z.object({
606
612
  block_timestamp: z.string(),
607
613
  trace: traceParser,
608
614
  }),
609
- irreversible: z.boolean()
615
+ irreversible: z.boolean(),
610
616
  });
611
617
  export type HistoryTransaction = z.infer<typeof historyTransactionParser>;
612
618
 
@@ -637,14 +643,14 @@ export type DbHistoryTransaction = z.infer<typeof dbHistoryTransactionParser>;
637
643
  * History Actions
638
644
  */
639
645
  export const getHistoryActionsParser = z.object({
640
- account: z.string().min(1, { message: 'account is required' }),
646
+ account: z.string().min(1, { error: "account is required" }),
641
647
  contract_filters: contractFiltersParser,
642
648
  account_seq_from: z.string().optional(),
643
649
  account_seq_to: z.string().optional(),
644
650
  date_from: z.string().optional(),
645
651
  date_to: z.string().optional(),
646
652
  direction: sortDirectionEnum.optional(),
647
- limit: createLimit(100, 250)
653
+ limit: createLimit(100, 250),
648
654
  });
649
655
  export type GetHistoryActions = z.input<typeof getHistoryActionsParser>;
650
656
  export type GetHistoryActionsParsed = z.output<typeof getHistoryActionsParser>;
@@ -656,16 +662,18 @@ export const historyActionParser = z.object({
656
662
  account_action_seq: z.number(),
657
663
  global_action_seq: z.number(),
658
664
  action_trace: actionTraceParser,
659
- irreversible: z.boolean()
665
+ irreversible: z.boolean(),
660
666
  });
661
667
  export type HistoryAction = z.infer<typeof historyActionParser>;
662
668
 
663
669
  export const getHistoryActionsResponseParser = z.object({
664
670
  sync: z.number(),
665
671
  last_irreversible_block_num: z.number(),
666
- data: z.array(historyActionParser)
672
+ data: z.array(historyActionParser),
667
673
  });
668
- export type GetHistoryActionsResponse = z.infer<typeof getHistoryActionsResponseParser>;
674
+ export type GetHistoryActionsResponse = z.infer<
675
+ typeof getHistoryActionsResponseParser
676
+ >;
669
677
 
670
678
  /**
671
679
  * History transfers
@@ -683,10 +691,12 @@ export const getHistoryTransfersParser = z.object({
683
691
  global_seq_from: z.string().optional(),
684
692
  global_seq_to: z.string().optional(),
685
693
  direction: sortDirectionEnum.optional(),
686
- limit: createLimit(100, 250)
694
+ limit: createLimit(100, 250),
687
695
  });
688
696
  export type GetHistoryTransfers = z.input<typeof getHistoryTransfersParser>;
689
- export type GetHistoryTransfersParsed = z.output<typeof getHistoryTransfersParser>;
697
+ export type GetHistoryTransfersParsed = z.output<
698
+ typeof getHistoryTransfersParser
699
+ >;
690
700
 
691
701
  export const historyTransferParser = z.object({
692
702
  block_num: z.number(),
@@ -695,16 +705,18 @@ export const historyTransferParser = z.object({
695
705
  account_action_seq: z.number(),
696
706
  global_action_seq: z.number(),
697
707
  action_trace: actionTraceParser,
698
- irreversible: z.boolean()
708
+ irreversible: z.boolean(),
699
709
  });
700
710
  export type HistoryTransfer = z.infer<typeof historyTransferParser>;
701
711
 
702
712
  export const getHistoryTransfersResponseParser = z.object({
703
713
  sync: z.number(),
704
714
  last_irreversible_block_num: z.number(),
705
- data: z.array(historyTransferParser)
715
+ data: z.array(historyTransferParser),
706
716
  });
707
- export type GetHistoryTransfersResponse = z.infer<typeof getHistoryTransfersResponseParser>;
717
+ export type GetHistoryTransfersResponse = z.infer<
718
+ typeof getHistoryTransfersResponseParser
719
+ >;
708
720
 
709
721
  /**
710
722
  * Open orders Balances
@@ -716,13 +728,17 @@ export const marketOpenOrdersBalanceParser = z.object({
716
728
  ask_token_quantity: z.number(),
717
729
  ask_token: z.string(),
718
730
  });
719
- export type MarketOpenOrdersBalance = z.infer<typeof marketOpenOrdersBalanceParser>;
731
+ export type MarketOpenOrdersBalance = z.infer<
732
+ typeof marketOpenOrdersBalanceParser
733
+ >;
720
734
  export const getOpenOrdersBalancesResponseParser = z.object({
721
735
  sync: z.number(),
722
- data: z.array(marketOpenOrdersBalanceParser)
736
+ data: z.array(marketOpenOrdersBalanceParser),
723
737
  });
724
738
 
725
- export type GetOpenOrdersBalancesResponse = z.infer<typeof getOpenOrdersBalancesResponseParser>;
739
+ export type GetOpenOrdersBalancesResponse = z.infer<
740
+ typeof getOpenOrdersBalancesResponseParser
741
+ >;
726
742
 
727
743
  /**
728
744
  * Basic Types
@@ -1,9 +1,8 @@
1
- import * as z from 'zod';
2
- import { generateAuthParser } from "./auth"
1
+ import * as z from "zod";
2
+ import { generateAuthParser } from "./auth";
3
3
 
4
- export const loginAccountParamsV3Parser = z.object({
5
- email: z.string().optional(),
6
- verificationCode: z.string().optional(),
7
- }).merge(generateAuthParser)
8
-
9
- export type LoginAccountParamsV3 = z.infer<typeof loginAccountParamsV3Parser>
4
+ export const loginAccountParamsV3Parser = generateAuthParser.extend({
5
+ email: z.string().optional(),
6
+ verificationCode: z.string().optional(),
7
+ });
8
+ export type LoginAccountParamsV3 = z.infer<typeof loginAccountParamsV3Parser>;
@@ -1,4 +1,4 @@
1
- import { ExtendedAsset } from "@bloks/numbers";
1
+ import type { ExtendedAsset } from "@bloks/numbers";
2
2
  import { Coin } from "../coins";
3
3
  import { INode } from "../graph";
4
4