@mobula_labs/types 0.1.2 → 0.1.4
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/dist/cjs/index.cjs +1508 -1333
- package/dist/cjs/index.cjs.map +15 -13
- package/dist/esm/index.js +1507 -1333
- package/dist/esm/index.js.map +15 -13
- package/dist/index.d.ts +2 -0
- package/dist/v1/market/FundingRateSchema.d.ts +28 -0
- package/dist/v1/market/MarketMultiPricesSchema.d.ts +20 -0
- package/dist/v1/wallet/WalletPortfolioSchema.d.ts +41 -1
- package/dist/v1/webhook/WebhookSchema.d.ts +295 -0
- package/dist/v2/swap/SwapQuotingBatchOutput.d.ts +276 -0
- package/dist/v2/swap/SwapQuotingInstructionsOutput.d.ts +78 -0
- package/dist/v2/swap/SwapQuotingOutput.d.ts +234 -0
- package/dist/v2/token/TokenPositionsSchema.d.ts +40 -0
- package/dist/v2/token/TokenPriceSchema.d.ts +190 -0
- package/dist/v2/token/TokenTradesSchema.d.ts +21 -0
- package/dist/v2/wallet/WalletPerpsPositionsSchema.d.ts +17 -17
- package/dist/v2/wallet/WalletTokenBalancesSchema.d.ts +10 -0
- package/dist/wss/stream/StreamPayloadSchema.d.ts +2 -2
- package/package.json +4 -3
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const TokenPriceParamsSchema: z.ZodObject<{
|
|
3
|
+
blockchain: z.ZodOptional<z.ZodString>;
|
|
4
|
+
address: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
address?: string | undefined;
|
|
7
|
+
blockchain?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
address?: string | undefined;
|
|
10
|
+
blockchain?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const TokenPriceBatchParamsSchema: z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
13
|
+
blockchain: z.ZodOptional<z.ZodString>;
|
|
14
|
+
address: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
address?: string | undefined;
|
|
17
|
+
blockchain?: string | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
address?: string | undefined;
|
|
20
|
+
blockchain?: string | undefined;
|
|
21
|
+
}>, "many">, z.ZodObject<{
|
|
22
|
+
items: z.ZodArray<z.ZodObject<{
|
|
23
|
+
blockchain: z.ZodOptional<z.ZodString>;
|
|
24
|
+
address: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
address?: string | undefined;
|
|
27
|
+
blockchain?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
address?: string | undefined;
|
|
30
|
+
blockchain?: string | undefined;
|
|
31
|
+
}>, "many">;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
items: {
|
|
34
|
+
address?: string | undefined;
|
|
35
|
+
blockchain?: string | undefined;
|
|
36
|
+
}[];
|
|
37
|
+
}, {
|
|
38
|
+
items: {
|
|
39
|
+
address?: string | undefined;
|
|
40
|
+
blockchain?: string | undefined;
|
|
41
|
+
}[];
|
|
42
|
+
}>]>;
|
|
43
|
+
export type TokenPriceParams = z.input<typeof TokenPriceParamsSchema>;
|
|
44
|
+
export type TokenPriceBatchParams = z.input<typeof TokenPriceBatchParamsSchema>;
|
|
45
|
+
declare const TokenPriceItemResponseSchema: z.ZodObject<{
|
|
46
|
+
name: z.ZodNullable<z.ZodString>;
|
|
47
|
+
symbol: z.ZodNullable<z.ZodString>;
|
|
48
|
+
logo: z.ZodNullable<z.ZodString>;
|
|
49
|
+
priceUSD: z.ZodNullable<z.ZodNumber>;
|
|
50
|
+
marketCapUSD: z.ZodNullable<z.ZodNumber>;
|
|
51
|
+
marketCapDilutedUSD: z.ZodNullable<z.ZodNumber>;
|
|
52
|
+
liquidityUSD: z.ZodNullable<z.ZodNumber>;
|
|
53
|
+
liquidityMaxUSD: z.ZodNullable<z.ZodNumber>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
symbol: string | null;
|
|
56
|
+
name: string | null;
|
|
57
|
+
priceUSD: number | null;
|
|
58
|
+
marketCapUSD: number | null;
|
|
59
|
+
marketCapDilutedUSD: number | null;
|
|
60
|
+
logo: string | null;
|
|
61
|
+
liquidityUSD: number | null;
|
|
62
|
+
liquidityMaxUSD: number | null;
|
|
63
|
+
}, {
|
|
64
|
+
symbol: string | null;
|
|
65
|
+
name: string | null;
|
|
66
|
+
priceUSD: number | null;
|
|
67
|
+
marketCapUSD: number | null;
|
|
68
|
+
marketCapDilutedUSD: number | null;
|
|
69
|
+
logo: string | null;
|
|
70
|
+
liquidityUSD: number | null;
|
|
71
|
+
liquidityMaxUSD: number | null;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const TokenPriceResponseSchema: z.ZodObject<{
|
|
74
|
+
data: z.ZodObject<{
|
|
75
|
+
name: z.ZodNullable<z.ZodString>;
|
|
76
|
+
symbol: z.ZodNullable<z.ZodString>;
|
|
77
|
+
logo: z.ZodNullable<z.ZodString>;
|
|
78
|
+
priceUSD: z.ZodNullable<z.ZodNumber>;
|
|
79
|
+
marketCapUSD: z.ZodNullable<z.ZodNumber>;
|
|
80
|
+
marketCapDilutedUSD: z.ZodNullable<z.ZodNumber>;
|
|
81
|
+
liquidityUSD: z.ZodNullable<z.ZodNumber>;
|
|
82
|
+
liquidityMaxUSD: z.ZodNullable<z.ZodNumber>;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
symbol: string | null;
|
|
85
|
+
name: string | null;
|
|
86
|
+
priceUSD: number | null;
|
|
87
|
+
marketCapUSD: number | null;
|
|
88
|
+
marketCapDilutedUSD: number | null;
|
|
89
|
+
logo: string | null;
|
|
90
|
+
liquidityUSD: number | null;
|
|
91
|
+
liquidityMaxUSD: number | null;
|
|
92
|
+
}, {
|
|
93
|
+
symbol: string | null;
|
|
94
|
+
name: string | null;
|
|
95
|
+
priceUSD: number | null;
|
|
96
|
+
marketCapUSD: number | null;
|
|
97
|
+
marketCapDilutedUSD: number | null;
|
|
98
|
+
logo: string | null;
|
|
99
|
+
liquidityUSD: number | null;
|
|
100
|
+
liquidityMaxUSD: number | null;
|
|
101
|
+
}>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
data: {
|
|
104
|
+
symbol: string | null;
|
|
105
|
+
name: string | null;
|
|
106
|
+
priceUSD: number | null;
|
|
107
|
+
marketCapUSD: number | null;
|
|
108
|
+
marketCapDilutedUSD: number | null;
|
|
109
|
+
logo: string | null;
|
|
110
|
+
liquidityUSD: number | null;
|
|
111
|
+
liquidityMaxUSD: number | null;
|
|
112
|
+
};
|
|
113
|
+
}, {
|
|
114
|
+
data: {
|
|
115
|
+
symbol: string | null;
|
|
116
|
+
name: string | null;
|
|
117
|
+
priceUSD: number | null;
|
|
118
|
+
marketCapUSD: number | null;
|
|
119
|
+
marketCapDilutedUSD: number | null;
|
|
120
|
+
logo: string | null;
|
|
121
|
+
liquidityUSD: number | null;
|
|
122
|
+
liquidityMaxUSD: number | null;
|
|
123
|
+
};
|
|
124
|
+
}>;
|
|
125
|
+
export declare const TokenPriceBatchResponseSchema: z.ZodObject<{
|
|
126
|
+
payload: z.ZodArray<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
|
|
127
|
+
name: z.ZodNullable<z.ZodString>;
|
|
128
|
+
symbol: z.ZodNullable<z.ZodString>;
|
|
129
|
+
logo: z.ZodNullable<z.ZodString>;
|
|
130
|
+
priceUSD: z.ZodNullable<z.ZodNumber>;
|
|
131
|
+
marketCapUSD: z.ZodNullable<z.ZodNumber>;
|
|
132
|
+
marketCapDilutedUSD: z.ZodNullable<z.ZodNumber>;
|
|
133
|
+
liquidityUSD: z.ZodNullable<z.ZodNumber>;
|
|
134
|
+
liquidityMaxUSD: z.ZodNullable<z.ZodNumber>;
|
|
135
|
+
}, "strip", z.ZodTypeAny, {
|
|
136
|
+
symbol: string | null;
|
|
137
|
+
name: string | null;
|
|
138
|
+
priceUSD: number | null;
|
|
139
|
+
marketCapUSD: number | null;
|
|
140
|
+
marketCapDilutedUSD: number | null;
|
|
141
|
+
logo: string | null;
|
|
142
|
+
liquidityUSD: number | null;
|
|
143
|
+
liquidityMaxUSD: number | null;
|
|
144
|
+
}, {
|
|
145
|
+
symbol: string | null;
|
|
146
|
+
name: string | null;
|
|
147
|
+
priceUSD: number | null;
|
|
148
|
+
marketCapUSD: number | null;
|
|
149
|
+
marketCapDilutedUSD: number | null;
|
|
150
|
+
logo: string | null;
|
|
151
|
+
liquidityUSD: number | null;
|
|
152
|
+
liquidityMaxUSD: number | null;
|
|
153
|
+
}>, z.ZodObject<{
|
|
154
|
+
error: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
error?: string | undefined;
|
|
157
|
+
}, {
|
|
158
|
+
error?: string | undefined;
|
|
159
|
+
}>]>>, "many">;
|
|
160
|
+
}, "strip", z.ZodTypeAny, {
|
|
161
|
+
payload: ({
|
|
162
|
+
symbol: string | null;
|
|
163
|
+
name: string | null;
|
|
164
|
+
priceUSD: number | null;
|
|
165
|
+
marketCapUSD: number | null;
|
|
166
|
+
marketCapDilutedUSD: number | null;
|
|
167
|
+
logo: string | null;
|
|
168
|
+
liquidityUSD: number | null;
|
|
169
|
+
liquidityMaxUSD: number | null;
|
|
170
|
+
} | {
|
|
171
|
+
error?: string | undefined;
|
|
172
|
+
} | null)[];
|
|
173
|
+
}, {
|
|
174
|
+
payload: ({
|
|
175
|
+
symbol: string | null;
|
|
176
|
+
name: string | null;
|
|
177
|
+
priceUSD: number | null;
|
|
178
|
+
marketCapUSD: number | null;
|
|
179
|
+
marketCapDilutedUSD: number | null;
|
|
180
|
+
logo: string | null;
|
|
181
|
+
liquidityUSD: number | null;
|
|
182
|
+
liquidityMaxUSD: number | null;
|
|
183
|
+
} | {
|
|
184
|
+
error?: string | undefined;
|
|
185
|
+
} | null)[];
|
|
186
|
+
}>;
|
|
187
|
+
export type TokenPriceResponse = z.infer<typeof TokenPriceResponseSchema>;
|
|
188
|
+
export type TokenPriceBatchResponse = z.infer<typeof TokenPriceBatchResponseSchema>;
|
|
189
|
+
export type TokenPriceItem = z.infer<typeof TokenPriceItemResponseSchema>;
|
|
190
|
+
export {};
|
|
@@ -68,6 +68,7 @@ export declare const TokenTradeOutput: z.ZodObject<{
|
|
|
68
68
|
blockchain: z.ZodString;
|
|
69
69
|
transactionHash: z.ZodString;
|
|
70
70
|
marketAddress: z.ZodString;
|
|
71
|
+
marketAddresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
71
72
|
baseTokenPriceUSD: z.ZodNumber;
|
|
72
73
|
quoteTokenPriceUSD: z.ZodNumber;
|
|
73
74
|
labels: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -2502,6 +2503,7 @@ export declare const TokenTradeOutput: z.ZodObject<{
|
|
|
2502
2503
|
preBalanceQuoteToken?: string | null | undefined;
|
|
2503
2504
|
postBalanceBaseToken?: string | null | undefined;
|
|
2504
2505
|
postBalanceQuoteToken?: string | null | undefined;
|
|
2506
|
+
marketAddresses?: string[] | undefined;
|
|
2505
2507
|
}, {
|
|
2506
2508
|
type: string;
|
|
2507
2509
|
date: number;
|
|
@@ -3099,6 +3101,7 @@ export declare const TokenTradeOutput: z.ZodObject<{
|
|
|
3099
3101
|
preBalanceQuoteToken?: string | null | undefined;
|
|
3100
3102
|
postBalanceBaseToken?: string | null | undefined;
|
|
3101
3103
|
postBalanceQuoteToken?: string | null | undefined;
|
|
3104
|
+
marketAddresses?: string[] | undefined;
|
|
3102
3105
|
}>;
|
|
3103
3106
|
export declare const TokenTradeResponseSchema: z.ZodObject<{
|
|
3104
3107
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -3121,6 +3124,7 @@ export declare const TokenTradeResponseSchema: z.ZodObject<{
|
|
|
3121
3124
|
blockchain: z.ZodString;
|
|
3122
3125
|
transactionHash: z.ZodString;
|
|
3123
3126
|
marketAddress: z.ZodString;
|
|
3127
|
+
marketAddresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3124
3128
|
baseTokenPriceUSD: z.ZodNumber;
|
|
3125
3129
|
quoteTokenPriceUSD: z.ZodNumber;
|
|
3126
3130
|
labels: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -5555,6 +5559,7 @@ export declare const TokenTradeResponseSchema: z.ZodObject<{
|
|
|
5555
5559
|
preBalanceQuoteToken?: string | null | undefined;
|
|
5556
5560
|
postBalanceBaseToken?: string | null | undefined;
|
|
5557
5561
|
postBalanceQuoteToken?: string | null | undefined;
|
|
5562
|
+
marketAddresses?: string[] | undefined;
|
|
5558
5563
|
}, {
|
|
5559
5564
|
type: string;
|
|
5560
5565
|
date: number;
|
|
@@ -6152,6 +6157,7 @@ export declare const TokenTradeResponseSchema: z.ZodObject<{
|
|
|
6152
6157
|
preBalanceQuoteToken?: string | null | undefined;
|
|
6153
6158
|
postBalanceBaseToken?: string | null | undefined;
|
|
6154
6159
|
postBalanceQuoteToken?: string | null | undefined;
|
|
6160
|
+
marketAddresses?: string[] | undefined;
|
|
6155
6161
|
}>, "many">;
|
|
6156
6162
|
}, "strip", z.ZodTypeAny, {
|
|
6157
6163
|
data: {
|
|
@@ -6751,6 +6757,7 @@ export declare const TokenTradeResponseSchema: z.ZodObject<{
|
|
|
6751
6757
|
preBalanceQuoteToken?: string | null | undefined;
|
|
6752
6758
|
postBalanceBaseToken?: string | null | undefined;
|
|
6753
6759
|
postBalanceQuoteToken?: string | null | undefined;
|
|
6760
|
+
marketAddresses?: string[] | undefined;
|
|
6754
6761
|
}[];
|
|
6755
6762
|
}, {
|
|
6756
6763
|
data: {
|
|
@@ -7350,6 +7357,7 @@ export declare const TokenTradeResponseSchema: z.ZodObject<{
|
|
|
7350
7357
|
preBalanceQuoteToken?: string | null | undefined;
|
|
7351
7358
|
postBalanceBaseToken?: string | null | undefined;
|
|
7352
7359
|
postBalanceQuoteToken?: string | null | undefined;
|
|
7360
|
+
marketAddresses?: string[] | undefined;
|
|
7353
7361
|
}[];
|
|
7354
7362
|
}>;
|
|
7355
7363
|
export type TokenTradesResponse = z.infer<typeof TokenTradeResponseSchema>;
|
|
@@ -7374,6 +7382,7 @@ export declare const SingleTokenTradeResponseSchema: z.ZodObject<{
|
|
|
7374
7382
|
blockchain: z.ZodString;
|
|
7375
7383
|
transactionHash: z.ZodString;
|
|
7376
7384
|
marketAddress: z.ZodString;
|
|
7385
|
+
marketAddresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7377
7386
|
baseTokenPriceUSD: z.ZodNumber;
|
|
7378
7387
|
quoteTokenPriceUSD: z.ZodNumber;
|
|
7379
7388
|
labels: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -9808,6 +9817,7 @@ export declare const SingleTokenTradeResponseSchema: z.ZodObject<{
|
|
|
9808
9817
|
preBalanceQuoteToken?: string | null | undefined;
|
|
9809
9818
|
postBalanceBaseToken?: string | null | undefined;
|
|
9810
9819
|
postBalanceQuoteToken?: string | null | undefined;
|
|
9820
|
+
marketAddresses?: string[] | undefined;
|
|
9811
9821
|
}, {
|
|
9812
9822
|
type: string;
|
|
9813
9823
|
date: number;
|
|
@@ -10405,6 +10415,7 @@ export declare const SingleTokenTradeResponseSchema: z.ZodObject<{
|
|
|
10405
10415
|
preBalanceQuoteToken?: string | null | undefined;
|
|
10406
10416
|
postBalanceBaseToken?: string | null | undefined;
|
|
10407
10417
|
postBalanceQuoteToken?: string | null | undefined;
|
|
10418
|
+
marketAddresses?: string[] | undefined;
|
|
10408
10419
|
}>;
|
|
10409
10420
|
}, "strip", z.ZodTypeAny, {
|
|
10410
10421
|
data: {
|
|
@@ -11004,6 +11015,7 @@ export declare const SingleTokenTradeResponseSchema: z.ZodObject<{
|
|
|
11004
11015
|
preBalanceQuoteToken?: string | null | undefined;
|
|
11005
11016
|
postBalanceBaseToken?: string | null | undefined;
|
|
11006
11017
|
postBalanceQuoteToken?: string | null | undefined;
|
|
11018
|
+
marketAddresses?: string[] | undefined;
|
|
11007
11019
|
};
|
|
11008
11020
|
}, {
|
|
11009
11021
|
data: {
|
|
@@ -11603,6 +11615,7 @@ export declare const SingleTokenTradeResponseSchema: z.ZodObject<{
|
|
|
11603
11615
|
preBalanceQuoteToken?: string | null | undefined;
|
|
11604
11616
|
postBalanceBaseToken?: string | null | undefined;
|
|
11605
11617
|
postBalanceQuoteToken?: string | null | undefined;
|
|
11618
|
+
marketAddresses?: string[] | undefined;
|
|
11606
11619
|
};
|
|
11607
11620
|
}>;
|
|
11608
11621
|
export type SingleTokenTradeResponse = z.infer<typeof SingleTokenTradeResponseSchema>;
|
|
@@ -11821,6 +11834,7 @@ export declare const TokenTradeOutputOpenAPI: z.ZodObject<{
|
|
|
11821
11834
|
blockchain: z.ZodString;
|
|
11822
11835
|
transactionHash: z.ZodString;
|
|
11823
11836
|
marketAddress: z.ZodString;
|
|
11837
|
+
marketAddresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
11824
11838
|
baseTokenPriceUSD: z.ZodNumber;
|
|
11825
11839
|
quoteTokenPriceUSD: z.ZodNumber;
|
|
11826
11840
|
labels: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -14251,6 +14265,7 @@ export declare const TokenTradeOutputOpenAPI: z.ZodObject<{
|
|
|
14251
14265
|
gasFeesUSD?: number | null | undefined;
|
|
14252
14266
|
platformFeesUSD?: number | null | undefined;
|
|
14253
14267
|
mevFeesUSD?: number | null | undefined;
|
|
14268
|
+
marketAddresses?: string[] | undefined;
|
|
14254
14269
|
}, {
|
|
14255
14270
|
type: string;
|
|
14256
14271
|
date: number;
|
|
@@ -14844,6 +14859,7 @@ export declare const TokenTradeOutputOpenAPI: z.ZodObject<{
|
|
|
14844
14859
|
platformFeesUSD?: number | null | undefined;
|
|
14845
14860
|
mevFeesUSD?: number | null | undefined;
|
|
14846
14861
|
labels?: string[] | null | undefined;
|
|
14862
|
+
marketAddresses?: string[] | undefined;
|
|
14847
14863
|
}>;
|
|
14848
14864
|
export declare const SingleTokenTradeResponseSchemaOpenAPI: z.ZodObject<{
|
|
14849
14865
|
data: z.ZodObject<{
|
|
@@ -14862,6 +14878,7 @@ export declare const SingleTokenTradeResponseSchemaOpenAPI: z.ZodObject<{
|
|
|
14862
14878
|
blockchain: z.ZodString;
|
|
14863
14879
|
transactionHash: z.ZodString;
|
|
14864
14880
|
marketAddress: z.ZodString;
|
|
14881
|
+
marketAddresses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14865
14882
|
baseTokenPriceUSD: z.ZodNumber;
|
|
14866
14883
|
quoteTokenPriceUSD: z.ZodNumber;
|
|
14867
14884
|
labels: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -17292,6 +17309,7 @@ export declare const SingleTokenTradeResponseSchemaOpenAPI: z.ZodObject<{
|
|
|
17292
17309
|
gasFeesUSD?: number | null | undefined;
|
|
17293
17310
|
platformFeesUSD?: number | null | undefined;
|
|
17294
17311
|
mevFeesUSD?: number | null | undefined;
|
|
17312
|
+
marketAddresses?: string[] | undefined;
|
|
17295
17313
|
}, {
|
|
17296
17314
|
type: string;
|
|
17297
17315
|
date: number;
|
|
@@ -17885,6 +17903,7 @@ export declare const SingleTokenTradeResponseSchemaOpenAPI: z.ZodObject<{
|
|
|
17885
17903
|
platformFeesUSD?: number | null | undefined;
|
|
17886
17904
|
mevFeesUSD?: number | null | undefined;
|
|
17887
17905
|
labels?: string[] | null | undefined;
|
|
17906
|
+
marketAddresses?: string[] | undefined;
|
|
17888
17907
|
}>;
|
|
17889
17908
|
}, "strip", z.ZodTypeAny, {
|
|
17890
17909
|
data: {
|
|
@@ -18480,6 +18499,7 @@ export declare const SingleTokenTradeResponseSchemaOpenAPI: z.ZodObject<{
|
|
|
18480
18499
|
gasFeesUSD?: number | null | undefined;
|
|
18481
18500
|
platformFeesUSD?: number | null | undefined;
|
|
18482
18501
|
mevFeesUSD?: number | null | undefined;
|
|
18502
|
+
marketAddresses?: string[] | undefined;
|
|
18483
18503
|
};
|
|
18484
18504
|
}, {
|
|
18485
18505
|
data: {
|
|
@@ -19075,5 +19095,6 @@ export declare const SingleTokenTradeResponseSchemaOpenAPI: z.ZodObject<{
|
|
|
19075
19095
|
platformFeesUSD?: number | null | undefined;
|
|
19076
19096
|
mevFeesUSD?: number | null | undefined;
|
|
19077
19097
|
labels?: string[] | null | undefined;
|
|
19098
|
+
marketAddresses?: string[] | undefined;
|
|
19078
19099
|
};
|
|
19079
19100
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const ExchangesIds: z.ZodEnum<["gains", "hyperliquid", "gte", "lighter"]>;
|
|
2
|
+
export declare const ExchangesIds: z.ZodEnum<["gains", "hyperliquid", "gte", "lighter", "drift"]>;
|
|
3
3
|
export declare const PerpsPositionSchema: z.ZodObject<{
|
|
4
4
|
id: z.ZodString;
|
|
5
5
|
entryPriceQuote: z.ZodNumber;
|
|
@@ -40,7 +40,7 @@ export declare const PerpsPositionSchema: z.ZodObject<{
|
|
|
40
40
|
size: bigint;
|
|
41
41
|
}>, "many">;
|
|
42
42
|
marketId: z.ZodString;
|
|
43
|
-
exchange: z.ZodEnum<["gains", "hyperliquid", "gte", "lighter"]>;
|
|
43
|
+
exchange: z.ZodEnum<["gains", "hyperliquid", "gte", "lighter", "drift"]>;
|
|
44
44
|
feesOpeningUSD: z.ZodNumber;
|
|
45
45
|
feesClosingUSD: z.ZodNumber;
|
|
46
46
|
feesFundingUSD: z.ZodNumber;
|
|
@@ -56,7 +56,7 @@ export declare const PerpsPositionSchema: z.ZodObject<{
|
|
|
56
56
|
unrealizedPnlUSD: number;
|
|
57
57
|
chainId: string;
|
|
58
58
|
id: string;
|
|
59
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
59
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
60
60
|
amountRaw: bigint;
|
|
61
61
|
amountUSD: number;
|
|
62
62
|
lastUpdate: Date;
|
|
@@ -89,7 +89,7 @@ export declare const PerpsPositionSchema: z.ZodObject<{
|
|
|
89
89
|
unrealizedPnlUSD: number;
|
|
90
90
|
chainId: string;
|
|
91
91
|
id: string;
|
|
92
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
92
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
93
93
|
amountRaw: bigint;
|
|
94
94
|
amountUSD: number;
|
|
95
95
|
lastUpdate: Date;
|
|
@@ -157,7 +157,7 @@ export declare const PerpsPositionNonExecutedSchema: z.ZodObject<{
|
|
|
157
157
|
size: bigint;
|
|
158
158
|
}>, "many">;
|
|
159
159
|
marketId: z.ZodString;
|
|
160
|
-
exchange: z.ZodEnum<["gains", "hyperliquid", "gte", "lighter"]>;
|
|
160
|
+
exchange: z.ZodEnum<["gains", "hyperliquid", "gte", "lighter", "drift"]>;
|
|
161
161
|
feesOpeningUSD: z.ZodNumber;
|
|
162
162
|
feesClosingUSD: z.ZodNumber;
|
|
163
163
|
feesFundingUSD: z.ZodNumber;
|
|
@@ -176,7 +176,7 @@ export declare const PerpsPositionNonExecutedSchema: z.ZodObject<{
|
|
|
176
176
|
unrealizedPnlUSD: number;
|
|
177
177
|
chainId: string;
|
|
178
178
|
id: string;
|
|
179
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
179
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
180
180
|
amountRaw: bigint;
|
|
181
181
|
amountUSD: number;
|
|
182
182
|
lastUpdate: Date;
|
|
@@ -210,7 +210,7 @@ export declare const PerpsPositionNonExecutedSchema: z.ZodObject<{
|
|
|
210
210
|
unrealizedPnlUSD: number;
|
|
211
211
|
chainId: string;
|
|
212
212
|
id: string;
|
|
213
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
213
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
214
214
|
amountRaw: bigint;
|
|
215
215
|
amountUSD: number;
|
|
216
216
|
lastUpdate: Date;
|
|
@@ -279,7 +279,7 @@ export declare const WalletPerpsPositionsResponseSchema: z.ZodObject<{
|
|
|
279
279
|
size: bigint;
|
|
280
280
|
}>, "many">;
|
|
281
281
|
marketId: z.ZodString;
|
|
282
|
-
exchange: z.ZodEnum<["gains", "hyperliquid", "gte", "lighter"]>;
|
|
282
|
+
exchange: z.ZodEnum<["gains", "hyperliquid", "gte", "lighter", "drift"]>;
|
|
283
283
|
feesOpeningUSD: z.ZodNumber;
|
|
284
284
|
feesClosingUSD: z.ZodNumber;
|
|
285
285
|
feesFundingUSD: z.ZodNumber;
|
|
@@ -295,7 +295,7 @@ export declare const WalletPerpsPositionsResponseSchema: z.ZodObject<{
|
|
|
295
295
|
unrealizedPnlUSD: number;
|
|
296
296
|
chainId: string;
|
|
297
297
|
id: string;
|
|
298
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
298
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
299
299
|
amountRaw: bigint;
|
|
300
300
|
amountUSD: number;
|
|
301
301
|
lastUpdate: Date;
|
|
@@ -328,7 +328,7 @@ export declare const WalletPerpsPositionsResponseSchema: z.ZodObject<{
|
|
|
328
328
|
unrealizedPnlUSD: number;
|
|
329
329
|
chainId: string;
|
|
330
330
|
id: string;
|
|
331
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
331
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
332
332
|
amountRaw: bigint;
|
|
333
333
|
amountUSD: number;
|
|
334
334
|
lastUpdate: Date;
|
|
@@ -363,7 +363,7 @@ export declare const WalletPerpsPositionsResponseSchema: z.ZodObject<{
|
|
|
363
363
|
unrealizedPnlUSD: number;
|
|
364
364
|
chainId: string;
|
|
365
365
|
id: string;
|
|
366
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
366
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
367
367
|
amountRaw: bigint;
|
|
368
368
|
amountUSD: number;
|
|
369
369
|
lastUpdate: Date;
|
|
@@ -398,7 +398,7 @@ export declare const WalletPerpsPositionsResponseSchema: z.ZodObject<{
|
|
|
398
398
|
unrealizedPnlUSD: number;
|
|
399
399
|
chainId: string;
|
|
400
400
|
id: string;
|
|
401
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
401
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
402
402
|
amountRaw: bigint;
|
|
403
403
|
amountUSD: number;
|
|
404
404
|
lastUpdate: Date;
|
|
@@ -467,7 +467,7 @@ export declare const WalletPerpsPositionsNonExecutedResponseSchema: z.ZodObject<
|
|
|
467
467
|
size: bigint;
|
|
468
468
|
}>, "many">;
|
|
469
469
|
marketId: z.ZodString;
|
|
470
|
-
exchange: z.ZodEnum<["gains", "hyperliquid", "gte", "lighter"]>;
|
|
470
|
+
exchange: z.ZodEnum<["gains", "hyperliquid", "gte", "lighter", "drift"]>;
|
|
471
471
|
feesOpeningUSD: z.ZodNumber;
|
|
472
472
|
feesClosingUSD: z.ZodNumber;
|
|
473
473
|
feesFundingUSD: z.ZodNumber;
|
|
@@ -486,7 +486,7 @@ export declare const WalletPerpsPositionsNonExecutedResponseSchema: z.ZodObject<
|
|
|
486
486
|
unrealizedPnlUSD: number;
|
|
487
487
|
chainId: string;
|
|
488
488
|
id: string;
|
|
489
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
489
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
490
490
|
amountRaw: bigint;
|
|
491
491
|
amountUSD: number;
|
|
492
492
|
lastUpdate: Date;
|
|
@@ -520,7 +520,7 @@ export declare const WalletPerpsPositionsNonExecutedResponseSchema: z.ZodObject<
|
|
|
520
520
|
unrealizedPnlUSD: number;
|
|
521
521
|
chainId: string;
|
|
522
522
|
id: string;
|
|
523
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
523
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
524
524
|
amountRaw: bigint;
|
|
525
525
|
amountUSD: number;
|
|
526
526
|
lastUpdate: Date;
|
|
@@ -556,7 +556,7 @@ export declare const WalletPerpsPositionsNonExecutedResponseSchema: z.ZodObject<
|
|
|
556
556
|
unrealizedPnlUSD: number;
|
|
557
557
|
chainId: string;
|
|
558
558
|
id: string;
|
|
559
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
559
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
560
560
|
amountRaw: bigint;
|
|
561
561
|
amountUSD: number;
|
|
562
562
|
lastUpdate: Date;
|
|
@@ -592,7 +592,7 @@ export declare const WalletPerpsPositionsNonExecutedResponseSchema: z.ZodObject<
|
|
|
592
592
|
unrealizedPnlUSD: number;
|
|
593
593
|
chainId: string;
|
|
594
594
|
id: string;
|
|
595
|
-
exchange: "gte" | "gains" | "hyperliquid" | "lighter";
|
|
595
|
+
exchange: "gte" | "gains" | "hyperliquid" | "lighter" | "drift";
|
|
596
596
|
amountRaw: bigint;
|
|
597
597
|
amountUSD: number;
|
|
598
598
|
lastUpdate: Date;
|
|
@@ -136,6 +136,8 @@ export declare const tokenHoldingSchema: z.ZodObject<{
|
|
|
136
136
|
}>;
|
|
137
137
|
balance: z.ZodNumber;
|
|
138
138
|
rawBalance: z.ZodString;
|
|
139
|
+
/** Rent lamports for Solana token accounts (returned when account is closed). Only present for Solana SPL tokens. */
|
|
140
|
+
lamports: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
139
141
|
}, "strip", z.ZodTypeAny, {
|
|
140
142
|
balance: number;
|
|
141
143
|
token: {
|
|
@@ -172,6 +174,7 @@ export declare const tokenHoldingSchema: z.ZodObject<{
|
|
|
172
174
|
x: string | null;
|
|
173
175
|
};
|
|
174
176
|
rawBalance: string;
|
|
177
|
+
lamports?: string | null | undefined;
|
|
175
178
|
}, {
|
|
176
179
|
balance: number;
|
|
177
180
|
token: {
|
|
@@ -208,6 +211,7 @@ export declare const tokenHoldingSchema: z.ZodObject<{
|
|
|
208
211
|
decimals?: number | undefined;
|
|
209
212
|
};
|
|
210
213
|
rawBalance: string;
|
|
214
|
+
lamports?: string | null | undefined;
|
|
211
215
|
}>;
|
|
212
216
|
export declare const WalletHoldingsResponseSchema: z.ZodObject<{
|
|
213
217
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -347,6 +351,8 @@ export declare const WalletHoldingsResponseSchema: z.ZodObject<{
|
|
|
347
351
|
}>;
|
|
348
352
|
balance: z.ZodNumber;
|
|
349
353
|
rawBalance: z.ZodString;
|
|
354
|
+
/** Rent lamports for Solana token accounts (returned when account is closed). Only present for Solana SPL tokens. */
|
|
355
|
+
lamports: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
350
356
|
}, "strip", z.ZodTypeAny, {
|
|
351
357
|
balance: number;
|
|
352
358
|
token: {
|
|
@@ -383,6 +389,7 @@ export declare const WalletHoldingsResponseSchema: z.ZodObject<{
|
|
|
383
389
|
x: string | null;
|
|
384
390
|
};
|
|
385
391
|
rawBalance: string;
|
|
392
|
+
lamports?: string | null | undefined;
|
|
386
393
|
}, {
|
|
387
394
|
balance: number;
|
|
388
395
|
token: {
|
|
@@ -419,6 +426,7 @@ export declare const WalletHoldingsResponseSchema: z.ZodObject<{
|
|
|
419
426
|
decimals?: number | undefined;
|
|
420
427
|
};
|
|
421
428
|
rawBalance: string;
|
|
429
|
+
lamports?: string | null | undefined;
|
|
422
430
|
}>, "many">;
|
|
423
431
|
}, "strip", z.ZodTypeAny, {
|
|
424
432
|
data: {
|
|
@@ -457,6 +465,7 @@ export declare const WalletHoldingsResponseSchema: z.ZodObject<{
|
|
|
457
465
|
x: string | null;
|
|
458
466
|
};
|
|
459
467
|
rawBalance: string;
|
|
468
|
+
lamports?: string | null | undefined;
|
|
460
469
|
}[];
|
|
461
470
|
}, {
|
|
462
471
|
data: {
|
|
@@ -495,6 +504,7 @@ export declare const WalletHoldingsResponseSchema: z.ZodObject<{
|
|
|
495
504
|
decimals?: number | undefined;
|
|
496
505
|
};
|
|
497
506
|
rawBalance: string;
|
|
507
|
+
lamports?: string | null | undefined;
|
|
498
508
|
}[];
|
|
499
509
|
}>;
|
|
500
510
|
export type TokenHolding = z.infer<typeof tokenHoldingSchema>;
|
|
@@ -68,16 +68,16 @@ export declare const UpdateStreamPayloadSchema: z.ZodObject<{
|
|
|
68
68
|
subscriptionId: string;
|
|
69
69
|
authorization: string;
|
|
70
70
|
filters?: import("../../utils/schemas/Filter.ts").Filter | undefined;
|
|
71
|
-
subscriptionTracking?: string | undefined;
|
|
72
71
|
chainIds?: string[] | undefined;
|
|
73
72
|
events?: string[] | undefined;
|
|
73
|
+
subscriptionTracking?: string | undefined;
|
|
74
74
|
}, {
|
|
75
75
|
subscriptionId: string;
|
|
76
76
|
authorization: string;
|
|
77
77
|
filters?: import("../../utils/schemas/Filter.ts").Filter | undefined;
|
|
78
78
|
mode?: "replace" | "merge" | undefined;
|
|
79
|
-
subscriptionTracking?: string | undefined;
|
|
80
79
|
chainIds?: string[] | undefined;
|
|
81
80
|
events?: string[] | undefined;
|
|
81
|
+
subscriptionTracking?: string | undefined;
|
|
82
82
|
}>;
|
|
83
83
|
export type UpdateStreamPayloadType = z.input<typeof UpdateStreamPayloadSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobula_labs/types",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Centralized TypeScript types and schemas for Mobula SDK and applications.",
|
|
5
5
|
"author": "Mobula",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,9 +44,10 @@
|
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "bun run build.ts",
|
|
46
46
|
"typecheck": "tsc --noEmit",
|
|
47
|
-
"prepublishOnly": "bun run build"
|
|
47
|
+
"prepublishOnly": "bun run build",
|
|
48
|
+
"publish:npm": "bun run publish-npm.ts"
|
|
48
49
|
},
|
|
49
|
-
"
|
|
50
|
+
"dependencies": {
|
|
50
51
|
"zod": "^3.0.0"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|