@mobula_labs/types 0.1.5 → 0.1.7

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 (37) hide show
  1. package/dist/cjs/index.cjs +3490 -3168
  2. package/dist/cjs/index.cjs.map +29 -25
  3. package/dist/esm/index.js +3488 -3166
  4. package/dist/esm/index.js.map +29 -25
  5. package/dist/index.d.ts +8 -2
  6. package/dist/misc/ApiKeysQueries.d.ts +1 -1
  7. package/dist/utils/schemas/BaseMessage.d.ts +6 -0
  8. package/dist/utils/schemas/PlatformMetadataOutput.d.ts +19 -0
  9. package/dist/utils/schemas/TokenMetadataMinimal.d.ts +25 -0
  10. package/dist/utils/schemas/WalletDeployerSchema.d.ts +333 -0
  11. package/dist/utils/schemas/WalletMetadataOutput.d.ts +19 -0
  12. package/dist/v1/market/FundingRateSchema.d.ts +33 -0
  13. package/dist/v1/market/MarketHistoryPairSchema.d.ts +3 -3
  14. package/dist/v1/market/MarketTradesPairSchema.d.ts +35 -2
  15. package/dist/v1/search/SearchSchema.d.ts +19 -2
  16. package/dist/v1/wallet/DeployerSchema.d.ts +157 -0
  17. package/dist/v1/wallet/WalletLabelSchema.d.ts +4 -4
  18. package/dist/v1/wallet/WalletTradesSchema.d.ts +86 -0
  19. package/dist/v2/swap/SwapQuotingBatchOutput.d.ts +48 -48
  20. package/dist/v2/swap/SwapQuotingOutput.d.ts +32 -32
  21. package/dist/v2/token/TokenAthSchema.d.ts +233 -0
  22. package/dist/v2/token/TokenPositionsSchema.d.ts +277 -42
  23. package/dist/v2/token/TokenTradesSchema.d.ts +1465 -11697
  24. package/dist/v2/wallet/WalleAnalysisQuerySchema.d.ts +134 -0
  25. package/dist/v2/wallet/WalletActivityV2Schema.d.ts +275 -3
  26. package/dist/v2/wallet/WalletAnalysisQuerySchema.d.ts +1658 -0
  27. package/dist/v2/wallet/WalletDefiPositionsSchema.d.ts +1 -0
  28. package/dist/v2/wallet/WalletDeployerSchema.d.ts +157 -0
  29. package/dist/v2/wallet/WalletFundingQuerySchema.d.ts +57 -0
  30. package/dist/v2/wallet/WalletPositionsSchema.d.ts +449 -6
  31. package/dist/wss/BalancePayloadSchema.d.ts +1 -0
  32. package/dist/wss/OhlcvPayloadSchema.d.ts +2 -2
  33. package/dist/wss/PairsPayloadSchema.d.ts +2 -2
  34. package/dist/wss/PositionPayloadSchema.d.ts +19 -0
  35. package/package.json +2 -2
  36. package/dist/v2/explorer/BlockDataQuerySchema.d.ts +0 -33
  37. package/dist/v2/explorer/ContractVerifyQuerySchema.ts +0 -27
@@ -51,12 +51,58 @@ export declare const TokenPositionOutput: z.ZodObject<{
51
51
  firstTradeAt: z.ZodNullable<z.ZodDate>;
52
52
  lastTradeAt: z.ZodNullable<z.ZodDate>;
53
53
  labels: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
54
+ walletMetadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
55
+ entityName: z.ZodNullable<z.ZodString>;
56
+ entityLogo: z.ZodNullable<z.ZodString>;
57
+ entityLabels: z.ZodArray<z.ZodString, "many">;
58
+ }, "strip", z.ZodTypeAny, {
59
+ entityName: string | null;
60
+ entityLogo: string | null;
61
+ entityLabels: string[];
62
+ }, {
63
+ entityName: string | null;
64
+ entityLogo: string | null;
65
+ entityLabels: string[];
66
+ }>>>;
67
+ platform: z.ZodOptional<z.ZodNullable<z.ZodObject<{
68
+ id: z.ZodString;
69
+ name: z.ZodString;
70
+ logo: z.ZodNullable<z.ZodString>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ name: string;
73
+ id: string;
74
+ logo: string | null;
75
+ }, {
76
+ name: string;
77
+ id: string;
78
+ logo: string | null;
79
+ }>>>;
54
80
  fundingInfo: z.ZodObject<{
55
81
  from: z.ZodNullable<z.ZodString>;
56
82
  date: z.ZodNullable<z.ZodDate>;
57
83
  chainId: z.ZodNullable<z.ZodString>;
58
84
  txHash: z.ZodNullable<z.ZodString>;
59
85
  amount: z.ZodNullable<z.ZodString>;
86
+ formattedAmount: z.ZodNullable<z.ZodNumber>;
87
+ currency: z.ZodNullable<z.ZodObject<{
88
+ name: z.ZodString;
89
+ symbol: z.ZodString;
90
+ logo: z.ZodNullable<z.ZodString>;
91
+ decimals: z.ZodNumber;
92
+ address: z.ZodString;
93
+ }, "strip", z.ZodTypeAny, {
94
+ symbol: string;
95
+ name: string;
96
+ address: string;
97
+ decimals: number;
98
+ logo: string | null;
99
+ }, {
100
+ symbol: string;
101
+ name: string;
102
+ address: string;
103
+ decimals: number;
104
+ logo: string | null;
105
+ }>>;
60
106
  fromWalletLogo: z.ZodNullable<z.ZodString>;
61
107
  fromWalletTag: z.ZodNullable<z.ZodString>;
62
108
  }, "strip", z.ZodTypeAny, {
@@ -65,6 +111,14 @@ export declare const TokenPositionOutput: z.ZodObject<{
65
111
  amount: string | null;
66
112
  from: string | null;
67
113
  txHash: string | null;
114
+ formattedAmount: number | null;
115
+ currency: {
116
+ symbol: string;
117
+ name: string;
118
+ address: string;
119
+ decimals: number;
120
+ logo: string | null;
121
+ } | null;
68
122
  fromWalletLogo: string | null;
69
123
  fromWalletTag: string | null;
70
124
  }, {
@@ -73,6 +127,14 @@ export declare const TokenPositionOutput: z.ZodObject<{
73
127
  amount: string | null;
74
128
  from: string | null;
75
129
  txHash: string | null;
130
+ formattedAmount: number | null;
131
+ currency: {
132
+ symbol: string;
133
+ name: string;
134
+ address: string;
135
+ decimals: number;
136
+ logo: string | null;
137
+ } | null;
76
138
  fromWalletLogo: string | null;
77
139
  fromWalletTag: string | null;
78
140
  }>;
@@ -80,6 +142,24 @@ export declare const TokenPositionOutput: z.ZodObject<{
80
142
  realizedPnlUSD: string;
81
143
  unrealizedPnlUSD: string;
82
144
  chainId: string;
145
+ fundingInfo: {
146
+ date: Date | null;
147
+ chainId: string | null;
148
+ amount: string | null;
149
+ from: string | null;
150
+ txHash: string | null;
151
+ formattedAmount: number | null;
152
+ currency: {
153
+ symbol: string;
154
+ name: string;
155
+ address: string;
156
+ decimals: number;
157
+ logo: string | null;
158
+ } | null;
159
+ fromWalletLogo: string | null;
160
+ fromWalletTag: string | null;
161
+ };
162
+ labels: string[] | null;
83
163
  buys: number;
84
164
  sells: number;
85
165
  volumeBuyToken: string;
@@ -89,7 +169,6 @@ export declare const TokenPositionOutput: z.ZodObject<{
89
169
  totalPnlUSD: string;
90
170
  tokenAddress: string;
91
171
  walletAddress: string;
92
- labels: string[] | null;
93
172
  tokenAmount: string;
94
173
  tokenAmountRaw: string;
95
174
  tokenAmountUSD: string;
@@ -101,19 +180,37 @@ export declare const TokenPositionOutput: z.ZodObject<{
101
180
  lastActivityAt: Date | null;
102
181
  firstTradeAt: Date | null;
103
182
  lastTradeAt: Date | null;
183
+ platform?: {
184
+ name: string;
185
+ id: string;
186
+ logo: string | null;
187
+ } | null | undefined;
188
+ walletMetadata?: {
189
+ entityName: string | null;
190
+ entityLogo: string | null;
191
+ entityLabels: string[];
192
+ } | null | undefined;
193
+ }, {
194
+ realizedPnlUSD: string;
195
+ unrealizedPnlUSD: string;
196
+ chainId: string;
104
197
  fundingInfo: {
105
198
  date: Date | null;
106
199
  chainId: string | null;
107
200
  amount: string | null;
108
201
  from: string | null;
109
202
  txHash: string | null;
203
+ formattedAmount: number | null;
204
+ currency: {
205
+ symbol: string;
206
+ name: string;
207
+ address: string;
208
+ decimals: number;
209
+ logo: string | null;
210
+ } | null;
110
211
  fromWalletLogo: string | null;
111
212
  fromWalletTag: string | null;
112
213
  };
113
- }, {
114
- realizedPnlUSD: string;
115
- unrealizedPnlUSD: string;
116
- chainId: string;
117
214
  buys: number;
118
215
  sells: number;
119
216
  volumeBuyToken: string;
@@ -134,16 +231,17 @@ export declare const TokenPositionOutput: z.ZodObject<{
134
231
  lastActivityAt: Date | null;
135
232
  firstTradeAt: Date | null;
136
233
  lastTradeAt: Date | null;
137
- fundingInfo: {
138
- date: Date | null;
139
- chainId: string | null;
140
- amount: string | null;
141
- from: string | null;
142
- txHash: string | null;
143
- fromWalletLogo: string | null;
144
- fromWalletTag: string | null;
145
- };
234
+ platform?: {
235
+ name: string;
236
+ id: string;
237
+ logo: string | null;
238
+ } | null | undefined;
146
239
  labels?: string[] | null | undefined;
240
+ walletMetadata?: {
241
+ entityName: string | null;
242
+ entityLogo: string | null;
243
+ entityLabels: string[];
244
+ } | null | undefined;
147
245
  }>;
148
246
  export declare const TokenPositionsResponseSchema: z.ZodObject<{
149
247
  data: z.ZodArray<z.ZodObject<{
@@ -171,12 +269,58 @@ export declare const TokenPositionsResponseSchema: z.ZodObject<{
171
269
  firstTradeAt: z.ZodNullable<z.ZodDate>;
172
270
  lastTradeAt: z.ZodNullable<z.ZodDate>;
173
271
  labels: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
272
+ walletMetadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
273
+ entityName: z.ZodNullable<z.ZodString>;
274
+ entityLogo: z.ZodNullable<z.ZodString>;
275
+ entityLabels: z.ZodArray<z.ZodString, "many">;
276
+ }, "strip", z.ZodTypeAny, {
277
+ entityName: string | null;
278
+ entityLogo: string | null;
279
+ entityLabels: string[];
280
+ }, {
281
+ entityName: string | null;
282
+ entityLogo: string | null;
283
+ entityLabels: string[];
284
+ }>>>;
285
+ platform: z.ZodOptional<z.ZodNullable<z.ZodObject<{
286
+ id: z.ZodString;
287
+ name: z.ZodString;
288
+ logo: z.ZodNullable<z.ZodString>;
289
+ }, "strip", z.ZodTypeAny, {
290
+ name: string;
291
+ id: string;
292
+ logo: string | null;
293
+ }, {
294
+ name: string;
295
+ id: string;
296
+ logo: string | null;
297
+ }>>>;
174
298
  fundingInfo: z.ZodObject<{
175
299
  from: z.ZodNullable<z.ZodString>;
176
300
  date: z.ZodNullable<z.ZodDate>;
177
301
  chainId: z.ZodNullable<z.ZodString>;
178
302
  txHash: z.ZodNullable<z.ZodString>;
179
303
  amount: z.ZodNullable<z.ZodString>;
304
+ formattedAmount: z.ZodNullable<z.ZodNumber>;
305
+ currency: z.ZodNullable<z.ZodObject<{
306
+ name: z.ZodString;
307
+ symbol: z.ZodString;
308
+ logo: z.ZodNullable<z.ZodString>;
309
+ decimals: z.ZodNumber;
310
+ address: z.ZodString;
311
+ }, "strip", z.ZodTypeAny, {
312
+ symbol: string;
313
+ name: string;
314
+ address: string;
315
+ decimals: number;
316
+ logo: string | null;
317
+ }, {
318
+ symbol: string;
319
+ name: string;
320
+ address: string;
321
+ decimals: number;
322
+ logo: string | null;
323
+ }>>;
180
324
  fromWalletLogo: z.ZodNullable<z.ZodString>;
181
325
  fromWalletTag: z.ZodNullable<z.ZodString>;
182
326
  }, "strip", z.ZodTypeAny, {
@@ -185,6 +329,14 @@ export declare const TokenPositionsResponseSchema: z.ZodObject<{
185
329
  amount: string | null;
186
330
  from: string | null;
187
331
  txHash: string | null;
332
+ formattedAmount: number | null;
333
+ currency: {
334
+ symbol: string;
335
+ name: string;
336
+ address: string;
337
+ decimals: number;
338
+ logo: string | null;
339
+ } | null;
188
340
  fromWalletLogo: string | null;
189
341
  fromWalletTag: string | null;
190
342
  }, {
@@ -193,6 +345,14 @@ export declare const TokenPositionsResponseSchema: z.ZodObject<{
193
345
  amount: string | null;
194
346
  from: string | null;
195
347
  txHash: string | null;
348
+ formattedAmount: number | null;
349
+ currency: {
350
+ symbol: string;
351
+ name: string;
352
+ address: string;
353
+ decimals: number;
354
+ logo: string | null;
355
+ } | null;
196
356
  fromWalletLogo: string | null;
197
357
  fromWalletTag: string | null;
198
358
  }>;
@@ -200,6 +360,24 @@ export declare const TokenPositionsResponseSchema: z.ZodObject<{
200
360
  realizedPnlUSD: string;
201
361
  unrealizedPnlUSD: string;
202
362
  chainId: string;
363
+ fundingInfo: {
364
+ date: Date | null;
365
+ chainId: string | null;
366
+ amount: string | null;
367
+ from: string | null;
368
+ txHash: string | null;
369
+ formattedAmount: number | null;
370
+ currency: {
371
+ symbol: string;
372
+ name: string;
373
+ address: string;
374
+ decimals: number;
375
+ logo: string | null;
376
+ } | null;
377
+ fromWalletLogo: string | null;
378
+ fromWalletTag: string | null;
379
+ };
380
+ labels: string[] | null;
203
381
  buys: number;
204
382
  sells: number;
205
383
  volumeBuyToken: string;
@@ -209,7 +387,6 @@ export declare const TokenPositionsResponseSchema: z.ZodObject<{
209
387
  totalPnlUSD: string;
210
388
  tokenAddress: string;
211
389
  walletAddress: string;
212
- labels: string[] | null;
213
390
  tokenAmount: string;
214
391
  tokenAmountRaw: string;
215
392
  tokenAmountUSD: string;
@@ -221,19 +398,37 @@ export declare const TokenPositionsResponseSchema: z.ZodObject<{
221
398
  lastActivityAt: Date | null;
222
399
  firstTradeAt: Date | null;
223
400
  lastTradeAt: Date | null;
401
+ platform?: {
402
+ name: string;
403
+ id: string;
404
+ logo: string | null;
405
+ } | null | undefined;
406
+ walletMetadata?: {
407
+ entityName: string | null;
408
+ entityLogo: string | null;
409
+ entityLabels: string[];
410
+ } | null | undefined;
411
+ }, {
412
+ realizedPnlUSD: string;
413
+ unrealizedPnlUSD: string;
414
+ chainId: string;
224
415
  fundingInfo: {
225
416
  date: Date | null;
226
417
  chainId: string | null;
227
418
  amount: string | null;
228
419
  from: string | null;
229
420
  txHash: string | null;
421
+ formattedAmount: number | null;
422
+ currency: {
423
+ symbol: string;
424
+ name: string;
425
+ address: string;
426
+ decimals: number;
427
+ logo: string | null;
428
+ } | null;
230
429
  fromWalletLogo: string | null;
231
430
  fromWalletTag: string | null;
232
431
  };
233
- }, {
234
- realizedPnlUSD: string;
235
- unrealizedPnlUSD: string;
236
- chainId: string;
237
432
  buys: number;
238
433
  sells: number;
239
434
  volumeBuyToken: string;
@@ -254,22 +449,42 @@ export declare const TokenPositionsResponseSchema: z.ZodObject<{
254
449
  lastActivityAt: Date | null;
255
450
  firstTradeAt: Date | null;
256
451
  lastTradeAt: Date | null;
452
+ platform?: {
453
+ name: string;
454
+ id: string;
455
+ logo: string | null;
456
+ } | null | undefined;
457
+ labels?: string[] | null | undefined;
458
+ walletMetadata?: {
459
+ entityName: string | null;
460
+ entityLogo: string | null;
461
+ entityLabels: string[];
462
+ } | null | undefined;
463
+ }>, "many">;
464
+ totalCount: z.ZodNumber;
465
+ }, "strip", z.ZodTypeAny, {
466
+ data: {
467
+ realizedPnlUSD: string;
468
+ unrealizedPnlUSD: string;
469
+ chainId: string;
257
470
  fundingInfo: {
258
471
  date: Date | null;
259
472
  chainId: string | null;
260
473
  amount: string | null;
261
474
  from: string | null;
262
475
  txHash: string | null;
476
+ formattedAmount: number | null;
477
+ currency: {
478
+ symbol: string;
479
+ name: string;
480
+ address: string;
481
+ decimals: number;
482
+ logo: string | null;
483
+ } | null;
263
484
  fromWalletLogo: string | null;
264
485
  fromWalletTag: string | null;
265
486
  };
266
- labels?: string[] | null | undefined;
267
- }>, "many">;
268
- }, "strip", z.ZodTypeAny, {
269
- data: {
270
- realizedPnlUSD: string;
271
- unrealizedPnlUSD: string;
272
- chainId: string;
487
+ labels: string[] | null;
273
488
  buys: number;
274
489
  sells: number;
275
490
  volumeBuyToken: string;
@@ -279,7 +494,6 @@ export declare const TokenPositionsResponseSchema: z.ZodObject<{
279
494
  totalPnlUSD: string;
280
495
  tokenAddress: string;
281
496
  walletAddress: string;
282
- labels: string[] | null;
283
497
  tokenAmount: string;
284
498
  tokenAmountRaw: string;
285
499
  tokenAmountUSD: string;
@@ -291,21 +505,40 @@ export declare const TokenPositionsResponseSchema: z.ZodObject<{
291
505
  lastActivityAt: Date | null;
292
506
  firstTradeAt: Date | null;
293
507
  lastTradeAt: Date | null;
508
+ platform?: {
509
+ name: string;
510
+ id: string;
511
+ logo: string | null;
512
+ } | null | undefined;
513
+ walletMetadata?: {
514
+ entityName: string | null;
515
+ entityLogo: string | null;
516
+ entityLabels: string[];
517
+ } | null | undefined;
518
+ }[];
519
+ totalCount: number;
520
+ }, {
521
+ data: {
522
+ realizedPnlUSD: string;
523
+ unrealizedPnlUSD: string;
524
+ chainId: string;
294
525
  fundingInfo: {
295
526
  date: Date | null;
296
527
  chainId: string | null;
297
528
  amount: string | null;
298
529
  from: string | null;
299
530
  txHash: string | null;
531
+ formattedAmount: number | null;
532
+ currency: {
533
+ symbol: string;
534
+ name: string;
535
+ address: string;
536
+ decimals: number;
537
+ logo: string | null;
538
+ } | null;
300
539
  fromWalletLogo: string | null;
301
540
  fromWalletTag: string | null;
302
541
  };
303
- }[];
304
- }, {
305
- data: {
306
- realizedPnlUSD: string;
307
- unrealizedPnlUSD: string;
308
- chainId: string;
309
542
  buys: number;
310
543
  sells: number;
311
544
  volumeBuyToken: string;
@@ -326,17 +559,19 @@ export declare const TokenPositionsResponseSchema: z.ZodObject<{
326
559
  lastActivityAt: Date | null;
327
560
  firstTradeAt: Date | null;
328
561
  lastTradeAt: Date | null;
329
- fundingInfo: {
330
- date: Date | null;
331
- chainId: string | null;
332
- amount: string | null;
333
- from: string | null;
334
- txHash: string | null;
335
- fromWalletLogo: string | null;
336
- fromWalletTag: string | null;
337
- };
562
+ platform?: {
563
+ name: string;
564
+ id: string;
565
+ logo: string | null;
566
+ } | null | undefined;
338
567
  labels?: string[] | null | undefined;
568
+ walletMetadata?: {
569
+ entityName: string | null;
570
+ entityLogo: string | null;
571
+ entityLabels: string[];
572
+ } | null | undefined;
339
573
  }[];
574
+ totalCount: number;
340
575
  }>;
341
576
  export type TokenPositionsResponse = z.infer<typeof TokenPositionsResponseSchema>;
342
577
  export type TokenPositionsOutputResponse = z.infer<typeof TokenPositionOutput>;