@pear-protocol/types 2.0.0 → 2.2.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.
Files changed (68) hide show
  1. package/dist/auth/api-keys.d.ts +1 -0
  2. package/dist/auth/api-keys.js +2 -1
  3. package/dist/auth/entities.d.ts +1 -0
  4. package/dist/auth/entities.js +2 -1
  5. package/dist/auth/response.d.ts +2 -0
  6. package/dist/bundle.d.ts +1 -0
  7. package/dist/bundle.js +1 -0
  8. package/dist/connector/index.d.ts +2 -0
  9. package/dist/connector/index.js +2 -1
  10. package/dist/execution/entities.d.ts +26 -0
  11. package/dist/execution/queries.d.ts +1 -0
  12. package/dist/execution/responses.d.ts +16 -0
  13. package/dist/fee/entities.d.ts +2 -0
  14. package/dist/fee/entities.js +2 -1
  15. package/dist/fee/queries.d.ts +1 -0
  16. package/dist/fill/entities.d.ts +1 -0
  17. package/dist/fill/queries.d.ts +1 -0
  18. package/dist/fill/responses.d.ts +2 -0
  19. package/dist/funding/queries.d.ts +1 -0
  20. package/dist/instrument/entities.d.ts +1 -0
  21. package/dist/instrument/queries.d.ts +1 -0
  22. package/dist/instrument/responses.d.ts +1 -0
  23. package/dist/ladder/entities.d.ts +16 -0
  24. package/dist/ladder/queries.d.ts +1 -0
  25. package/dist/ladder/responses.d.ts +48 -0
  26. package/dist/margin/index.d.ts +2 -0
  27. package/dist/margin/index.js +2 -0
  28. package/dist/margin/payloads.d.ts +7 -0
  29. package/dist/margin/payloads.js +20 -0
  30. package/dist/margin/response.d.ts +5 -0
  31. package/dist/margin/response.js +11 -0
  32. package/dist/market/entities.d.ts +2 -0
  33. package/dist/market/payloads.d.ts +1 -0
  34. package/dist/market/queries.d.ts +2 -0
  35. package/dist/market/responses.d.ts +2 -0
  36. package/dist/notification/entities.d.ts +24 -0
  37. package/dist/notification/responses.d.ts +12 -0
  38. package/dist/order/entities.d.ts +2 -0
  39. package/dist/position/entities.d.ts +3 -0
  40. package/dist/position/queries.d.ts +1 -0
  41. package/dist/position/responses.d.ts +5 -0
  42. package/dist/price/queries.d.ts +1 -0
  43. package/dist/schedule/entities.d.ts +10 -0
  44. package/dist/schedule/queries.d.ts +1 -0
  45. package/dist/schedule/responses.d.ts +8 -0
  46. package/dist/statistics/entities.d.ts +1 -0
  47. package/dist/statistics/queries.d.ts +5 -1
  48. package/dist/statistics/responses.d.ts +1 -0
  49. package/dist/sync/payloads.d.ts +13 -0
  50. package/dist/tca/responses.d.ts +10 -0
  51. package/dist/trade/entities.d.ts +3 -0
  52. package/dist/trade/responses.d.ts +42 -0
  53. package/dist/trade-accounts/entities.d.ts +5 -0
  54. package/dist/trade-accounts/entities.js +4 -0
  55. package/dist/trade-accounts/payloads.d.ts +33 -0
  56. package/dist/trade-accounts/payloads.js +20 -3
  57. package/dist/trade-accounts/response.d.ts +143 -0
  58. package/dist/trade-accounts/response.js +19 -2
  59. package/dist/trigger/entities/conditions.d.ts +4 -0
  60. package/dist/trigger/entities/index.d.ts +47 -0
  61. package/dist/trigger/payloads/conditions.d.ts +1 -0
  62. package/dist/trigger/payloads/index.d.ts +6 -0
  63. package/dist/trigger/queries.d.ts +1 -0
  64. package/dist/trigger/responses.d.ts +30 -0
  65. package/dist/users/entities.d.ts +1 -0
  66. package/dist/users/entities.js +2 -1
  67. package/dist/users/response.d.ts +1 -0
  68. package/package.json +1 -1
@@ -8,6 +8,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
8
8
  bybit: "bybit";
9
9
  okx: "okx";
10
10
  lighter: "lighter";
11
+ lighter_rhc: "lighter_rhc";
11
12
  }>;
12
13
  status: z.ZodEnum<{
13
14
  CANCELLED: "CANCELLED";
@@ -27,6 +28,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
27
28
  bybit: "bybit";
28
29
  okx: "okx";
29
30
  lighter: "lighter";
31
+ lighter_rhc: "lighter_rhc";
30
32
  }>;
31
33
  status: z.ZodEnum<{
32
34
  PENDING: "PENDING";
@@ -88,6 +90,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
88
90
  bybit: "bybit";
89
91
  okx: "okx";
90
92
  lighter: "lighter";
93
+ lighter_rhc: "lighter_rhc";
91
94
  }>;
92
95
  status: z.ZodEnum<{
93
96
  CANCELLED: "CANCELLED";
@@ -107,6 +110,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
107
110
  bybit: "bybit";
108
111
  okx: "okx";
109
112
  lighter: "lighter";
113
+ lighter_rhc: "lighter_rhc";
110
114
  }>;
111
115
  status: z.ZodEnum<{
112
116
  PENDING: "PENDING";
@@ -172,6 +176,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
172
176
  bybit: "bybit";
173
177
  okx: "okx";
174
178
  lighter: "lighter";
179
+ lighter_rhc: "lighter_rhc";
175
180
  }>;
176
181
  status: z.ZodEnum<{
177
182
  CANCELLED: "CANCELLED";
@@ -191,6 +196,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
191
196
  bybit: "bybit";
192
197
  okx: "okx";
193
198
  lighter: "lighter";
199
+ lighter_rhc: "lighter_rhc";
194
200
  }>;
195
201
  status: z.ZodEnum<{
196
202
  PENDING: "PENDING";
@@ -229,6 +235,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
229
235
  bybit: "bybit";
230
236
  okx: "okx";
231
237
  lighter: "lighter";
238
+ lighter_rhc: "lighter_rhc";
232
239
  }>;
233
240
  status: z.ZodEnum<{
234
241
  CANCELLED: "CANCELLED";
@@ -248,6 +255,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
248
255
  bybit: "bybit";
249
256
  okx: "okx";
250
257
  lighter: "lighter";
258
+ lighter_rhc: "lighter_rhc";
251
259
  }>;
252
260
  status: z.ZodEnum<{
253
261
  PENDING: "PENDING";
@@ -290,6 +298,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
290
298
  bybit: "bybit";
291
299
  okx: "okx";
292
300
  lighter: "lighter";
301
+ lighter_rhc: "lighter_rhc";
293
302
  }>;
294
303
  status: z.ZodEnum<{
295
304
  CANCELLED: "CANCELLED";
@@ -309,6 +318,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
309
318
  bybit: "bybit";
310
319
  okx: "okx";
311
320
  lighter: "lighter";
321
+ lighter_rhc: "lighter_rhc";
312
322
  }>;
313
323
  status: z.ZodEnum<{
314
324
  PENDING: "PENDING";
@@ -370,6 +380,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
370
380
  bybit: "bybit";
371
381
  okx: "okx";
372
382
  lighter: "lighter";
383
+ lighter_rhc: "lighter_rhc";
373
384
  }>;
374
385
  status: z.ZodEnum<{
375
386
  CANCELLED: "CANCELLED";
@@ -389,6 +400,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
389
400
  bybit: "bybit";
390
401
  okx: "okx";
391
402
  lighter: "lighter";
403
+ lighter_rhc: "lighter_rhc";
392
404
  }>;
393
405
  status: z.ZodEnum<{
394
406
  PENDING: "PENDING";
@@ -454,6 +466,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
454
466
  bybit: "bybit";
455
467
  okx: "okx";
456
468
  lighter: "lighter";
469
+ lighter_rhc: "lighter_rhc";
457
470
  }>;
458
471
  status: z.ZodEnum<{
459
472
  CANCELLED: "CANCELLED";
@@ -473,6 +486,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
473
486
  bybit: "bybit";
474
487
  okx: "okx";
475
488
  lighter: "lighter";
489
+ lighter_rhc: "lighter_rhc";
476
490
  }>;
477
491
  status: z.ZodEnum<{
478
492
  PENDING: "PENDING";
@@ -511,6 +525,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
511
525
  bybit: "bybit";
512
526
  okx: "okx";
513
527
  lighter: "lighter";
528
+ lighter_rhc: "lighter_rhc";
514
529
  }>;
515
530
  status: z.ZodEnum<{
516
531
  CANCELLED: "CANCELLED";
@@ -530,6 +545,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
530
545
  bybit: "bybit";
531
546
  okx: "okx";
532
547
  lighter: "lighter";
548
+ lighter_rhc: "lighter_rhc";
533
549
  }>;
534
550
  status: z.ZodEnum<{
535
551
  PENDING: "PENDING";
@@ -572,6 +588,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
572
588
  bybit: "bybit";
573
589
  okx: "okx";
574
590
  lighter: "lighter";
591
+ lighter_rhc: "lighter_rhc";
575
592
  }>;
576
593
  status: z.ZodEnum<{
577
594
  CANCELLED: "CANCELLED";
@@ -591,6 +608,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
591
608
  bybit: "bybit";
592
609
  okx: "okx";
593
610
  lighter: "lighter";
611
+ lighter_rhc: "lighter_rhc";
594
612
  }>;
595
613
  status: z.ZodEnum<{
596
614
  PENDING: "PENDING";
@@ -652,6 +670,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
652
670
  bybit: "bybit";
653
671
  okx: "okx";
654
672
  lighter: "lighter";
673
+ lighter_rhc: "lighter_rhc";
655
674
  }>;
656
675
  status: z.ZodEnum<{
657
676
  CANCELLED: "CANCELLED";
@@ -671,6 +690,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
671
690
  bybit: "bybit";
672
691
  okx: "okx";
673
692
  lighter: "lighter";
693
+ lighter_rhc: "lighter_rhc";
674
694
  }>;
675
695
  status: z.ZodEnum<{
676
696
  PENDING: "PENDING";
@@ -736,6 +756,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
736
756
  bybit: "bybit";
737
757
  okx: "okx";
738
758
  lighter: "lighter";
759
+ lighter_rhc: "lighter_rhc";
739
760
  }>;
740
761
  status: z.ZodEnum<{
741
762
  CANCELLED: "CANCELLED";
@@ -755,6 +776,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
755
776
  bybit: "bybit";
756
777
  okx: "okx";
757
778
  lighter: "lighter";
779
+ lighter_rhc: "lighter_rhc";
758
780
  }>;
759
781
  status: z.ZodEnum<{
760
782
  PENDING: "PENDING";
@@ -793,6 +815,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
793
815
  bybit: "bybit";
794
816
  okx: "okx";
795
817
  lighter: "lighter";
818
+ lighter_rhc: "lighter_rhc";
796
819
  }>;
797
820
  status: z.ZodEnum<{
798
821
  CANCELLED: "CANCELLED";
@@ -812,6 +835,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
812
835
  bybit: "bybit";
813
836
  okx: "okx";
814
837
  lighter: "lighter";
838
+ lighter_rhc: "lighter_rhc";
815
839
  }>;
816
840
  status: z.ZodEnum<{
817
841
  PENDING: "PENDING";
@@ -854,6 +878,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
854
878
  bybit: "bybit";
855
879
  okx: "okx";
856
880
  lighter: "lighter";
881
+ lighter_rhc: "lighter_rhc";
857
882
  }>;
858
883
  status: z.ZodEnum<{
859
884
  CANCELLED: "CANCELLED";
@@ -873,6 +898,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
873
898
  bybit: "bybit";
874
899
  okx: "okx";
875
900
  lighter: "lighter";
901
+ lighter_rhc: "lighter_rhc";
876
902
  }>;
877
903
  status: z.ZodEnum<{
878
904
  PENDING: "PENDING";
@@ -934,6 +960,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
934
960
  bybit: "bybit";
935
961
  okx: "okx";
936
962
  lighter: "lighter";
963
+ lighter_rhc: "lighter_rhc";
937
964
  }>;
938
965
  status: z.ZodEnum<{
939
966
  CANCELLED: "CANCELLED";
@@ -953,6 +980,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
953
980
  bybit: "bybit";
954
981
  okx: "okx";
955
982
  lighter: "lighter";
983
+ lighter_rhc: "lighter_rhc";
956
984
  }>;
957
985
  status: z.ZodEnum<{
958
986
  PENDING: "PENDING";
@@ -1018,6 +1046,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
1018
1046
  bybit: "bybit";
1019
1047
  okx: "okx";
1020
1048
  lighter: "lighter";
1049
+ lighter_rhc: "lighter_rhc";
1021
1050
  }>;
1022
1051
  status: z.ZodEnum<{
1023
1052
  CANCELLED: "CANCELLED";
@@ -1037,6 +1066,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
1037
1066
  bybit: "bybit";
1038
1067
  okx: "okx";
1039
1068
  lighter: "lighter";
1069
+ lighter_rhc: "lighter_rhc";
1040
1070
  }>;
1041
1071
  status: z.ZodEnum<{
1042
1072
  PENDING: "PENDING";
@@ -1075,6 +1105,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
1075
1105
  bybit: "bybit";
1076
1106
  okx: "okx";
1077
1107
  lighter: "lighter";
1108
+ lighter_rhc: "lighter_rhc";
1078
1109
  }>;
1079
1110
  status: z.ZodEnum<{
1080
1111
  CANCELLED: "CANCELLED";
@@ -1094,6 +1125,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
1094
1125
  bybit: "bybit";
1095
1126
  okx: "okx";
1096
1127
  lighter: "lighter";
1128
+ lighter_rhc: "lighter_rhc";
1097
1129
  }>;
1098
1130
  status: z.ZodEnum<{
1099
1131
  PENDING: "PENDING";
@@ -1136,6 +1168,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
1136
1168
  bybit: "bybit";
1137
1169
  okx: "okx";
1138
1170
  lighter: "lighter";
1171
+ lighter_rhc: "lighter_rhc";
1139
1172
  }>;
1140
1173
  status: z.ZodEnum<{
1141
1174
  CANCELLED: "CANCELLED";
@@ -1155,6 +1188,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
1155
1188
  bybit: "bybit";
1156
1189
  okx: "okx";
1157
1190
  lighter: "lighter";
1191
+ lighter_rhc: "lighter_rhc";
1158
1192
  }>;
1159
1193
  status: z.ZodEnum<{
1160
1194
  PENDING: "PENDING";
@@ -1216,6 +1250,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
1216
1250
  bybit: "bybit";
1217
1251
  okx: "okx";
1218
1252
  lighter: "lighter";
1253
+ lighter_rhc: "lighter_rhc";
1219
1254
  }>;
1220
1255
  status: z.ZodEnum<{
1221
1256
  CANCELLED: "CANCELLED";
@@ -1235,6 +1270,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
1235
1270
  bybit: "bybit";
1236
1271
  okx: "okx";
1237
1272
  lighter: "lighter";
1273
+ lighter_rhc: "lighter_rhc";
1238
1274
  }>;
1239
1275
  status: z.ZodEnum<{
1240
1276
  PENDING: "PENDING";
@@ -1300,6 +1336,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
1300
1336
  bybit: "bybit";
1301
1337
  okx: "okx";
1302
1338
  lighter: "lighter";
1339
+ lighter_rhc: "lighter_rhc";
1303
1340
  }>;
1304
1341
  status: z.ZodEnum<{
1305
1342
  CANCELLED: "CANCELLED";
@@ -1319,6 +1356,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
1319
1356
  bybit: "bybit";
1320
1357
  okx: "okx";
1321
1358
  lighter: "lighter";
1359
+ lighter_rhc: "lighter_rhc";
1322
1360
  }>;
1323
1361
  status: z.ZodEnum<{
1324
1362
  PENDING: "PENDING";
@@ -1357,6 +1395,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
1357
1395
  bybit: "bybit";
1358
1396
  okx: "okx";
1359
1397
  lighter: "lighter";
1398
+ lighter_rhc: "lighter_rhc";
1360
1399
  }>;
1361
1400
  status: z.ZodEnum<{
1362
1401
  CANCELLED: "CANCELLED";
@@ -1376,6 +1415,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
1376
1415
  bybit: "bybit";
1377
1416
  okx: "okx";
1378
1417
  lighter: "lighter";
1418
+ lighter_rhc: "lighter_rhc";
1379
1419
  }>;
1380
1420
  status: z.ZodEnum<{
1381
1421
  PENDING: "PENDING";
@@ -1424,6 +1464,7 @@ export declare const TradeListResponse: z.ZodObject<{
1424
1464
  bybit: "bybit";
1425
1465
  okx: "okx";
1426
1466
  lighter: "lighter";
1467
+ lighter_rhc: "lighter_rhc";
1427
1468
  }>;
1428
1469
  at: z.ZodISODateTime;
1429
1470
  netCashflow: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
@@ -1437,6 +1478,7 @@ export declare const TradeListResponse: z.ZodObject<{
1437
1478
  bybit: "bybit";
1438
1479
  okx: "okx";
1439
1480
  lighter: "lighter";
1481
+ lighter_rhc: "lighter_rhc";
1440
1482
  }>;
1441
1483
  side: z.ZodEnum<{
1442
1484
  BUY: "BUY";
@@ -19,6 +19,11 @@ export declare const TradeAccount: z.ZodObject<{
19
19
  bybit: "bybit";
20
20
  okx: "okx";
21
21
  lighter: "lighter";
22
+ lighter_rhc: "lighter_rhc";
23
+ }>;
24
+ kind: z.ZodEnum<{
25
+ vault: "vault";
26
+ eoa: "eoa";
22
27
  }>;
23
28
  exchangeIdentifier: z.ZodString;
24
29
  metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -17,6 +17,10 @@ const TradeAccount = z.object({
17
17
  id: z.uuid().describe("Trade account UUID"),
18
18
  alias: z.string().describe("User-defined trade account alias"),
19
19
  connector: Connector.describe("Exchange connector type"),
20
+ kind: z.enum([
21
+ "eoa",
22
+ "vault"
23
+ ]).describe("Whether the account trades an EOA or a Pear vault"),
20
24
  exchangeIdentifier: z.string().describe("User identifier on the exchange"),
21
25
  metadata: ConnectorMetadata.describe("Connector-specific metadata"),
22
26
  createdAt: z.string().describe("Creation timestamp (ISO 8601)"),
@@ -108,7 +108,28 @@ export declare const CreateTradeAccount: z.ZodDiscriminatedUnion<[z.ZodObject<{
108
108
  metadata: z.ZodObject<{
109
109
  l1_address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
110
110
  }, z.core.$strip>;
111
+ }, z.core.$strip>, z.ZodObject<{
112
+ alias: z.ZodString;
113
+ exchangeIdentifier: z.ZodString;
114
+ credentials: z.ZodObject<{
115
+ api_private_key: z.ZodString;
116
+ api_key_index: z.ZodNumber;
117
+ }, z.core.$strip>;
118
+ metadata: z.ZodObject<{
119
+ l1_address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
120
+ }, z.core.$strip>;
121
+ connector: z.ZodLiteral<"lighter_rhc">;
111
122
  }, z.core.$strip>], "connector">;
123
+ /**
124
+ * Payload to create a Pear-vault-backed Hyperliquid trade account. The backend
125
+ * generates and approves the API wallet itself (via pear-vault-service), so
126
+ * the payload carries no credentials.
127
+ */
128
+ export declare const CreateVaultTradeAccount: z.ZodObject<{
129
+ vaultAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
130
+ alias: z.ZodString;
131
+ idempotencyKey: z.ZodOptional<z.ZodString>;
132
+ }, z.core.$strip>;
112
133
  /**
113
134
  * Payload to update a trade account
114
135
  */
@@ -164,6 +185,16 @@ export declare const UpdateTradeAccount: z.ZodDiscriminatedUnion<[z.ZodObject<{
164
185
  metadata: z.ZodOptional<z.ZodObject<{
165
186
  l1_address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
166
187
  }, z.core.$strip>>;
188
+ }, z.core.$strip>, z.ZodObject<{
189
+ alias: z.ZodOptional<z.ZodString>;
190
+ credentials: z.ZodOptional<z.ZodObject<{
191
+ api_private_key: z.ZodString;
192
+ api_key_index: z.ZodNumber;
193
+ }, z.core.$strip>>;
194
+ metadata: z.ZodOptional<z.ZodObject<{
195
+ l1_address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
196
+ }, z.core.$strip>>;
197
+ connector: z.ZodLiteral<"lighter_rhc">;
167
198
  }, z.core.$strip>], "connector">;
168
199
  export type CreateHyperliquidCredentials = z.infer<typeof CreateHyperliquidCredentials>;
169
200
  export type CreateHyperliquidMetadata = z.infer<typeof CreateHyperliquidMetadata>;
@@ -174,6 +205,8 @@ export type CreateLighterCredentials = z.infer<typeof CreateLighterCredentials>;
174
205
  export type CreateLighterMetadata = z.infer<typeof CreateLighterMetadata>;
175
206
  export type CreateTradeAccountInput = z.input<typeof CreateTradeAccount>;
176
207
  export type CreateTradeAccount = z.output<typeof CreateTradeAccount>;
208
+ export type CreateVaultTradeAccountInput = z.input<typeof CreateVaultTradeAccount>;
209
+ export type CreateVaultTradeAccount = z.output<typeof CreateVaultTradeAccount>;
177
210
  export type UpdateTradeAccountInput = z.input<typeof UpdateTradeAccount>;
178
211
  export type UpdateTradeAccount = z.output<typeof UpdateTradeAccount>;
179
212
  export {};
@@ -67,6 +67,9 @@ const CreateLighterAccount = z.object({
67
67
  credentials: CreateLighterCredentials,
68
68
  metadata: CreateLighterMetadata
69
69
  });
70
+ const CreateLighterRhcAccount = CreateLighterAccount.extend({
71
+ connector: z.literal("lighter_rhc")
72
+ });
70
73
  const UpdateHyperliquidAccount = z.object({
71
74
  connector: z.literal("hyperliquid"),
72
75
  alias: AccountAlias.optional(),
@@ -97,19 +100,33 @@ const UpdateLighterAccount = z.object({
97
100
  credentials: CreateLighterCredentials.optional(),
98
101
  metadata: CreateLighterMetadata.optional()
99
102
  });
103
+ const UpdateLighterRhcAccount = UpdateLighterAccount.extend({
104
+ connector: z.literal("lighter_rhc")
105
+ });
100
106
  const CreateTradeAccount = z.discriminatedUnion("connector", [
101
107
  CreateHyperliquidAccount,
102
108
  CreateBinanceAccount,
103
109
  CreateBybitAccount,
104
110
  CreateOkxAccount,
105
- CreateLighterAccount
111
+ CreateLighterAccount,
112
+ CreateLighterRhcAccount
106
113
  ]);
114
+ const CreateVaultTradeAccount = z.object({
115
+ vaultAddress: EthereumAddress,
116
+ alias: AccountAlias,
117
+ /**
118
+ * Optional caller-supplied key. Reusing it attaches a transport retry to the first attempt;
119
+ * omitting it starts a new create attempt.
120
+ */
121
+ idempotencyKey: z.string().min(1).max(128).optional()
122
+ });
107
123
  const UpdateTradeAccount = z.discriminatedUnion("connector", [
108
124
  UpdateHyperliquidAccount,
109
125
  UpdateBinanceAccount,
110
126
  UpdateBybitAccount,
111
127
  UpdateOkxAccount,
112
- UpdateLighterAccount
128
+ UpdateLighterAccount,
129
+ UpdateLighterRhcAccount
113
130
  ]);
114
131
 
115
- export { CreateTradeAccount, UpdateTradeAccount };
132
+ export { CreateTradeAccount, CreateVaultTradeAccount, UpdateTradeAccount };
@@ -9,6 +9,11 @@ export declare const TradeAccountResponse: z.ZodObject<{
9
9
  bybit: "bybit";
10
10
  okx: "okx";
11
11
  lighter: "lighter";
12
+ lighter_rhc: "lighter_rhc";
13
+ }>;
14
+ kind: z.ZodEnum<{
15
+ vault: "vault";
16
+ eoa: "eoa";
12
17
  }>;
13
18
  exchangeIdentifier: z.ZodString;
14
19
  metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -34,6 +39,11 @@ export declare const TradeAccountListResponse: z.ZodObject<{
34
39
  bybit: "bybit";
35
40
  okx: "okx";
36
41
  lighter: "lighter";
42
+ lighter_rhc: "lighter_rhc";
43
+ }>;
44
+ kind: z.ZodEnum<{
45
+ vault: "vault";
46
+ eoa: "eoa";
37
47
  }>;
38
48
  exchangeIdentifier: z.ZodString;
39
49
  metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -49,6 +59,81 @@ export declare const TradeAccountListResponse: z.ZodObject<{
49
59
  }, z.core.$strip>>;
50
60
  }, z.core.$strip>;
51
61
  export type TradeAccountListResponse = z.infer<typeof TradeAccountListResponse>;
62
+ /**
63
+ * Whether a vault already has a pear-pro trade account (UI: create vs trade). The account is owned by
64
+ * the vault's own synthetic user, so it never shows up in the caller's own list — this is where an
65
+ * authorized owner/trader gets it in order to trade as the vault (via the `pear-vault-address` header).
66
+ */
67
+ export declare const VaultTradeAccountStatus: z.ZodDiscriminatedUnion<[z.ZodObject<{
68
+ exists: z.ZodLiteral<false>;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ exists: z.ZodLiteral<true>;
71
+ tradeAccountId: z.ZodString;
72
+ account: z.ZodObject<{
73
+ id: z.ZodUUID;
74
+ alias: z.ZodString;
75
+ connector: z.ZodEnum<{
76
+ hyperliquid: "hyperliquid";
77
+ binance: "binance";
78
+ bybit: "bybit";
79
+ okx: "okx";
80
+ lighter: "lighter";
81
+ lighter_rhc: "lighter_rhc";
82
+ }>;
83
+ kind: z.ZodEnum<{
84
+ vault: "vault";
85
+ eoa: "eoa";
86
+ }>;
87
+ exchangeIdentifier: z.ZodString;
88
+ metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
89
+ agentWalletAddress: z.ZodString;
90
+ isSubaccount: z.ZodBoolean;
91
+ mainAccountAddress: z.ZodString;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ l1_address: z.ZodString;
94
+ }, z.core.$strip>]>>;
95
+ createdAt: z.ZodString;
96
+ updatedAt: z.ZodString;
97
+ deletedAt: z.ZodOptional<z.ZodString>;
98
+ }, z.core.$strip>;
99
+ }, z.core.$strip>], "exists">;
100
+ export type VaultTradeAccountStatus = z.infer<typeof VaultTradeAccountStatus>;
101
+ export declare const VaultTradeAccountStatusResponse: z.ZodObject<{
102
+ status: z.ZodDiscriminatedUnion<[z.ZodObject<{
103
+ exists: z.ZodLiteral<false>;
104
+ }, z.core.$strip>, z.ZodObject<{
105
+ exists: z.ZodLiteral<true>;
106
+ tradeAccountId: z.ZodString;
107
+ account: z.ZodObject<{
108
+ id: z.ZodUUID;
109
+ alias: z.ZodString;
110
+ connector: z.ZodEnum<{
111
+ hyperliquid: "hyperliquid";
112
+ binance: "binance";
113
+ bybit: "bybit";
114
+ okx: "okx";
115
+ lighter: "lighter";
116
+ lighter_rhc: "lighter_rhc";
117
+ }>;
118
+ kind: z.ZodEnum<{
119
+ vault: "vault";
120
+ eoa: "eoa";
121
+ }>;
122
+ exchangeIdentifier: z.ZodString;
123
+ metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
124
+ agentWalletAddress: z.ZodString;
125
+ isSubaccount: z.ZodBoolean;
126
+ mainAccountAddress: z.ZodString;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ l1_address: z.ZodString;
129
+ }, z.core.$strip>]>>;
130
+ createdAt: z.ZodString;
131
+ updatedAt: z.ZodString;
132
+ deletedAt: z.ZodOptional<z.ZodString>;
133
+ }, z.core.$strip>;
134
+ }, z.core.$strip>], "exists">;
135
+ }, z.core.$strip>;
136
+ export type VaultTradeAccountStatusResponse = z.infer<typeof VaultTradeAccountStatusResponse>;
52
137
  export declare const ExchangeCredentialsResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
53
138
  connector: z.ZodLiteral<"hyperliquid">;
54
139
  account: z.ZodObject<{
@@ -60,6 +145,11 @@ export declare const ExchangeCredentialsResponse: z.ZodDiscriminatedUnion<[z.Zod
60
145
  bybit: "bybit";
61
146
  okx: "okx";
62
147
  lighter: "lighter";
148
+ lighter_rhc: "lighter_rhc";
149
+ }>;
150
+ kind: z.ZodEnum<{
151
+ vault: "vault";
152
+ eoa: "eoa";
63
153
  }>;
64
154
  exchangeIdentifier: z.ZodString;
65
155
  metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -87,6 +177,11 @@ export declare const ExchangeCredentialsResponse: z.ZodDiscriminatedUnion<[z.Zod
87
177
  bybit: "bybit";
88
178
  okx: "okx";
89
179
  lighter: "lighter";
180
+ lighter_rhc: "lighter_rhc";
181
+ }>;
182
+ kind: z.ZodEnum<{
183
+ vault: "vault";
184
+ eoa: "eoa";
90
185
  }>;
91
186
  exchangeIdentifier: z.ZodString;
92
187
  metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -121,6 +216,11 @@ export declare const ExchangeCredentialsResponse: z.ZodDiscriminatedUnion<[z.Zod
121
216
  bybit: "bybit";
122
217
  okx: "okx";
123
218
  lighter: "lighter";
219
+ lighter_rhc: "lighter_rhc";
220
+ }>;
221
+ kind: z.ZodEnum<{
222
+ vault: "vault";
223
+ eoa: "eoa";
124
224
  }>;
125
225
  exchangeIdentifier: z.ZodString;
126
226
  metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -149,6 +249,11 @@ export declare const ExchangeCredentialsResponse: z.ZodDiscriminatedUnion<[z.Zod
149
249
  bybit: "bybit";
150
250
  okx: "okx";
151
251
  lighter: "lighter";
252
+ lighter_rhc: "lighter_rhc";
253
+ }>;
254
+ kind: z.ZodEnum<{
255
+ vault: "vault";
256
+ eoa: "eoa";
152
257
  }>;
153
258
  exchangeIdentifier: z.ZodString;
154
259
  metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -178,6 +283,43 @@ export declare const ExchangeCredentialsResponse: z.ZodDiscriminatedUnion<[z.Zod
178
283
  bybit: "bybit";
179
284
  okx: "okx";
180
285
  lighter: "lighter";
286
+ lighter_rhc: "lighter_rhc";
287
+ }>;
288
+ kind: z.ZodEnum<{
289
+ vault: "vault";
290
+ eoa: "eoa";
291
+ }>;
292
+ exchangeIdentifier: z.ZodString;
293
+ metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
294
+ agentWalletAddress: z.ZodString;
295
+ isSubaccount: z.ZodBoolean;
296
+ mainAccountAddress: z.ZodString;
297
+ }, z.core.$strip>, z.ZodObject<{
298
+ l1_address: z.ZodString;
299
+ }, z.core.$strip>]>>;
300
+ createdAt: z.ZodString;
301
+ updatedAt: z.ZodString;
302
+ deletedAt: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strip>;
304
+ credentials: z.ZodObject<{
305
+ api_private_key: z.ZodString;
306
+ api_key_index: z.ZodNumber;
307
+ }, z.core.$strip>;
308
+ }, z.core.$strip>, z.ZodObject<{
309
+ account: z.ZodObject<{
310
+ id: z.ZodUUID;
311
+ alias: z.ZodString;
312
+ connector: z.ZodEnum<{
313
+ hyperliquid: "hyperliquid";
314
+ binance: "binance";
315
+ bybit: "bybit";
316
+ okx: "okx";
317
+ lighter: "lighter";
318
+ lighter_rhc: "lighter_rhc";
319
+ }>;
320
+ kind: z.ZodEnum<{
321
+ vault: "vault";
322
+ eoa: "eoa";
181
323
  }>;
182
324
  exchangeIdentifier: z.ZodString;
183
325
  metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -195,5 +337,6 @@ export declare const ExchangeCredentialsResponse: z.ZodDiscriminatedUnion<[z.Zod
195
337
  api_private_key: z.ZodString;
196
338
  api_key_index: z.ZodNumber;
197
339
  }, z.core.$strip>;
340
+ connector: z.ZodLiteral<"lighter_rhc">;
198
341
  }, z.core.$strip>], "connector">;
199
342
  export type ExchangeCredentialsResponse = z.infer<typeof ExchangeCredentialsResponse>;
@@ -7,6 +7,19 @@ const TradeAccountResponse = z.object({
7
7
  const TradeAccountListResponse = z.object({
8
8
  accounts: z.array(TradeAccount)
9
9
  });
10
+ const VaultTradeAccountStatus = z.discriminatedUnion("exists", [
11
+ z.object({
12
+ exists: z.literal(false)
13
+ }),
14
+ z.object({
15
+ exists: z.literal(true),
16
+ tradeAccountId: z.string(),
17
+ account: TradeAccount
18
+ })
19
+ ]);
20
+ const VaultTradeAccountStatusResponse = z.object({
21
+ status: VaultTradeAccountStatus
22
+ });
10
23
  const HyperliquidCredentialsResponse = z.object({
11
24
  connector: z.literal("hyperliquid"),
12
25
  account: TradeAccount,
@@ -51,12 +64,16 @@ const LighterCredentialsResponse = z.object({
51
64
  api_key_index: z.number()
52
65
  })
53
66
  });
67
+ const LighterRhcCredentialsResponse = LighterCredentialsResponse.extend({
68
+ connector: z.literal("lighter_rhc")
69
+ });
54
70
  const ExchangeCredentialsResponse = z.discriminatedUnion("connector", [
55
71
  HyperliquidCredentialsResponse,
56
72
  BinanceCredentialsResponse,
57
73
  BybitCredentialsResponse,
58
74
  OkxCredentialsResponse,
59
- LighterCredentialsResponse
75
+ LighterCredentialsResponse,
76
+ LighterRhcCredentialsResponse
60
77
  ]);
61
78
 
62
- export { ExchangeCredentialsResponse, TradeAccountListResponse, TradeAccountResponse };
79
+ export { ExchangeCredentialsResponse, TradeAccountListResponse, TradeAccountResponse, VaultTradeAccountStatus, VaultTradeAccountStatusResponse };