@argent/x-shared 1.72.2 → 1.73.1
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/src/account/account.model.d.ts +54 -210
- package/dist/src/account/preferences.model.cjs +1 -1
- package/dist/src/account/preferences.model.d.ts +15 -27
- package/dist/src/account/preferences.model.js +3 -3
- package/dist/src/backend/schema.d.ts +8 -2
- package/dist/src/backend/sessionKeys/schema.d.ts +13 -97
- package/dist/src/bigdecimal/createUnitsSchema.d.ts +1 -1
- package/dist/src/chains/starknet/address.cjs +1 -1
- package/dist/src/chains/starknet/address.d.ts +15 -15
- package/dist/src/chains/starknet/address.js +4 -4
- package/dist/src/chains/starknet/addressDomain.d.ts +3 -3
- package/dist/src/chains/starknet/addressInput.d.ts +1 -1
- package/dist/src/chains/starknet/cairoVersionSchema.d.ts +1 -1
- package/dist/src/chains/starknet/getAddressFromArgentName.d.ts +7 -20
- package/dist/src/chains/starknet/services/deploymentData/deploymentData.schema.d.ts +8 -28
- package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.d.ts +1 -1
- package/dist/src/currencyFetchService/types.ts.d.ts +3 -37
- package/dist/src/features/defiDecomposition/schema.d.ts +676 -15769
- package/dist/src/features/paymaster/types.d.ts +31 -155
- package/dist/src/features/simulation/activity/schema.d.ts +1250 -14920
- package/dist/src/features/simulation/activity/utils/createNativeActivity.d.ts +26 -26
- package/dist/src/features/simulation/fees/schema.d.ts +83 -925
- package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/schema.d.ts +889 -26477
- package/dist/src/features/simulation/transactionReview/schema.js +2 -2
- package/dist/src/features/simulation/warning/schema.d.ts +1 -1
- package/dist/src/features/swap/models/order.model.d.ts +8 -38
- package/dist/src/features/swap/models/quote.model.d.ts +15 -61
- package/dist/src/features/swap/models/trade.model.cjs +1 -1
- package/dist/src/features/swap/models/trade.model.d.ts +17 -167
- package/dist/src/features/swap/models/trade.model.js +1 -1
- package/dist/src/http/HttpService.d.ts +1 -1
- package/dist/src/http/IHttpService.d.ts +1 -1
- package/dist/src/knownDapps/schema.d.ts +61 -221
- package/dist/src/nameResolution/ResolveNameService.d.ts +3 -3
- package/dist/src/nameResolution/schema.d.ts +16 -92
- package/dist/src/onchainRecovery/schema.cjs +1 -1
- package/dist/src/onchainRecovery/schema.d.ts +20 -122
- package/dist/src/onchainRecovery/schema.js +10 -10
- package/dist/src/signer/seedphrase.d.ts +1 -1
- package/dist/src/staking/schema.d.ts +234 -2395
- package/dist/src/tokens/service/implementation.d.ts +52 -351
- package/dist/src/tokens/service/types/backend.model.cjs +1 -1
- package/dist/src/tokens/service/types/backend.model.d.ts +634 -15292
- package/dist/src/tokens/service/types/backend.model.js +17 -17
- package/dist/src/tokens/service/types/defiPosition.model.cjs +1 -1
- package/dist/src/tokens/service/types/defiPosition.model.d.ts +363 -7834
- package/dist/src/tokens/service/types/defiPosition.model.js +2 -2
- package/dist/src/tokens/service/types/defiPositionType.model.d.ts +1 -1
- package/dist/src/tokens/service/types/unclaimedRewards.model.d.ts +14 -250
- package/dist/src/tokens/service/types/webToken.model.cjs +1 -1
- package/dist/src/tokens/service/types/webToken.model.d.ts +40 -345
- package/dist/src/tokens/service/types/webToken.model.js +25 -21
- package/dist/src/transactions/amount.d.ts +1 -1
- package/dist/src/transactions/errors.d.ts +2 -22
- package/dist/src/transactions/estimate/model.d.ts +12 -21
- package/dist/src/transactions/service/types.d.ts +1 -11
- package/dist/src/transactions/transactionExecuteTypes.d.ts +28 -105
- package/dist/src/transactions/transactionVersion.d.ts +1 -1
- package/dist/src/utils/bigNumber.d.ts +1 -1
- package/dist/src/utils/hex.d.ts +1 -1
- package/dist/src/utils/isContractDeployed.cjs +1 -1
- package/dist/src/utils/isContractDeployed.js +3 -3
- package/dist/src/utils/retryUntilInitialised.d.ts +1 -1
- package/dist/src/utils/schemas.cjs +1 -1
- package/dist/src/utils/schemas.d.ts +4 -4
- package/dist/src/utils/schemas.js +10 -10
- package/dist/src/utils/starknet/starknet.cjs +1 -1
- package/dist/src/utils/starknet/starknet.d.ts +39 -149
- package/dist/src/utils/starknet/starknet.js +5 -5
- package/dist/src/utils/starknet/starknetSchemas.d.ts +238 -1880
- package/package.json +2 -2
|
@@ -1,38 +1,22 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const webBaseTokenSchema: z.ZodObject<{
|
|
3
|
-
address: z.
|
|
3
|
+
address: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
|
|
4
4
|
networkId: z.ZodString;
|
|
5
|
-
},
|
|
6
|
-
address: `0x${string}`;
|
|
7
|
-
networkId: string;
|
|
8
|
-
}, {
|
|
9
|
-
address: string;
|
|
10
|
-
networkId: string;
|
|
11
|
-
}>;
|
|
5
|
+
}, z.core.$strip>;
|
|
12
6
|
export type WebBaseToken = z.infer<typeof webBaseTokenSchema>;
|
|
13
|
-
export declare const webBaseTokenWithBalanceSchema: z.ZodObject<
|
|
14
|
-
address: z.
|
|
15
|
-
networkId: z.ZodString
|
|
16
|
-
}, {
|
|
7
|
+
export declare const webBaseTokenWithBalanceSchema: z.ZodObject<{
|
|
8
|
+
address: z.ZodNonOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>>;
|
|
9
|
+
networkId: z.ZodNonOptional<z.ZodString>;
|
|
17
10
|
balance: z.ZodString;
|
|
18
|
-
}
|
|
19
|
-
address: `0x${string}`;
|
|
20
|
-
networkId: string;
|
|
21
|
-
balance: string;
|
|
22
|
-
}, {
|
|
23
|
-
address: string;
|
|
24
|
-
networkId: string;
|
|
25
|
-
balance: string;
|
|
26
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
27
12
|
export type WebBaseTokenWithBalance = z.infer<typeof webBaseTokenWithBalanceSchema>;
|
|
28
|
-
export declare const webTokenSchema: z.ZodObject<
|
|
29
|
-
address: z.
|
|
30
|
-
networkId: z.ZodString
|
|
31
|
-
}, {
|
|
13
|
+
export declare const webTokenSchema: z.ZodObject<{
|
|
14
|
+
address: z.ZodNonOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>>;
|
|
15
|
+
networkId: z.ZodNonOptional<z.ZodString>;
|
|
32
16
|
id: z.ZodOptional<z.ZodNumber>;
|
|
33
17
|
name: z.ZodOptional<z.ZodString>;
|
|
34
18
|
symbol: z.ZodOptional<z.ZodString>;
|
|
35
|
-
decimals: z.ZodOptional<z.
|
|
19
|
+
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
36
20
|
iconUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
37
21
|
pricingId: z.ZodOptional<z.ZodNumber>;
|
|
38
22
|
category: z.ZodOptional<z.ZodString>;
|
|
@@ -40,44 +24,15 @@ export declare const webTokenSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
40
24
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
41
25
|
tradable: z.ZodOptional<z.ZodBoolean>;
|
|
42
26
|
popular: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
-
}
|
|
44
|
-
address: `0x${string}`;
|
|
45
|
-
networkId: string;
|
|
46
|
-
symbol?: string | undefined;
|
|
47
|
-
name?: string | undefined;
|
|
48
|
-
decimals?: number | undefined;
|
|
49
|
-
dappId?: string | undefined;
|
|
50
|
-
brandColor?: string | undefined;
|
|
51
|
-
id?: number | undefined;
|
|
52
|
-
iconUrl?: string | undefined;
|
|
53
|
-
category?: string | undefined;
|
|
54
|
-
popular?: boolean | undefined;
|
|
55
|
-
tradable?: boolean | undefined;
|
|
56
|
-
pricingId?: number | undefined;
|
|
57
|
-
}, {
|
|
58
|
-
address: string;
|
|
59
|
-
networkId: string;
|
|
60
|
-
symbol?: string | undefined;
|
|
61
|
-
name?: string | undefined;
|
|
62
|
-
decimals?: number | undefined;
|
|
63
|
-
dappId?: string | undefined;
|
|
64
|
-
brandColor?: string | undefined;
|
|
65
|
-
id?: number | undefined;
|
|
66
|
-
iconUrl?: string | undefined;
|
|
67
|
-
category?: string | undefined;
|
|
68
|
-
popular?: boolean | undefined;
|
|
69
|
-
tradable?: boolean | undefined;
|
|
70
|
-
pricingId?: number | undefined;
|
|
71
|
-
}>;
|
|
27
|
+
}, z.core.$strip>;
|
|
72
28
|
export type WebToken = z.infer<typeof webTokenSchema>;
|
|
73
|
-
export declare const webTokenWithBalanceSchema: z.ZodObject<
|
|
74
|
-
address: z.
|
|
75
|
-
networkId: z.ZodString
|
|
76
|
-
}, {
|
|
29
|
+
export declare const webTokenWithBalanceSchema: z.ZodObject<{
|
|
30
|
+
address: z.ZodNonOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>>;
|
|
31
|
+
networkId: z.ZodNonOptional<z.ZodString>;
|
|
77
32
|
id: z.ZodOptional<z.ZodNumber>;
|
|
78
33
|
name: z.ZodOptional<z.ZodString>;
|
|
79
34
|
symbol: z.ZodOptional<z.ZodString>;
|
|
80
|
-
decimals: z.ZodOptional<z.
|
|
35
|
+
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
81
36
|
iconUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
82
37
|
pricingId: z.ZodOptional<z.ZodNumber>;
|
|
83
38
|
category: z.ZodOptional<z.ZodString>;
|
|
@@ -85,48 +40,16 @@ export declare const webTokenWithBalanceSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
85
40
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
86
41
|
tradable: z.ZodOptional<z.ZodBoolean>;
|
|
87
42
|
popular: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
-
}>, {
|
|
89
43
|
balance: z.ZodString;
|
|
90
|
-
}
|
|
91
|
-
address: `0x${string}`;
|
|
92
|
-
networkId: string;
|
|
93
|
-
balance: string;
|
|
94
|
-
symbol?: string | undefined;
|
|
95
|
-
name?: string | undefined;
|
|
96
|
-
decimals?: number | undefined;
|
|
97
|
-
dappId?: string | undefined;
|
|
98
|
-
brandColor?: string | undefined;
|
|
99
|
-
id?: number | undefined;
|
|
100
|
-
iconUrl?: string | undefined;
|
|
101
|
-
category?: string | undefined;
|
|
102
|
-
popular?: boolean | undefined;
|
|
103
|
-
tradable?: boolean | undefined;
|
|
104
|
-
pricingId?: number | undefined;
|
|
105
|
-
}, {
|
|
106
|
-
address: string;
|
|
107
|
-
networkId: string;
|
|
108
|
-
balance: string;
|
|
109
|
-
symbol?: string | undefined;
|
|
110
|
-
name?: string | undefined;
|
|
111
|
-
decimals?: number | undefined;
|
|
112
|
-
dappId?: string | undefined;
|
|
113
|
-
brandColor?: string | undefined;
|
|
114
|
-
id?: number | undefined;
|
|
115
|
-
iconUrl?: string | undefined;
|
|
116
|
-
category?: string | undefined;
|
|
117
|
-
popular?: boolean | undefined;
|
|
118
|
-
tradable?: boolean | undefined;
|
|
119
|
-
pricingId?: number | undefined;
|
|
120
|
-
}>;
|
|
44
|
+
}, z.core.$strip>;
|
|
121
45
|
export type WebTokenWithBalance = z.infer<typeof webTokenWithBalanceSchema>;
|
|
122
|
-
export declare const webTokenWithPriceSchema: z.ZodObject<
|
|
123
|
-
address: z.
|
|
124
|
-
networkId: z.ZodString
|
|
125
|
-
}, {
|
|
46
|
+
export declare const webTokenWithPriceSchema: z.ZodObject<{
|
|
47
|
+
address: z.ZodNonOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>>;
|
|
48
|
+
networkId: z.ZodNonOptional<z.ZodString>;
|
|
126
49
|
id: z.ZodOptional<z.ZodNumber>;
|
|
127
50
|
name: z.ZodOptional<z.ZodString>;
|
|
128
51
|
symbol: z.ZodOptional<z.ZodString>;
|
|
129
|
-
decimals: z.ZodOptional<z.
|
|
52
|
+
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
130
53
|
iconUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
131
54
|
pricingId: z.ZodOptional<z.ZodNumber>;
|
|
132
55
|
category: z.ZodOptional<z.ZodString>;
|
|
@@ -134,80 +57,25 @@ export declare const webTokenWithPriceSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
134
57
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
135
58
|
tradable: z.ZodOptional<z.ZodBoolean>;
|
|
136
59
|
popular: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
-
}>, {
|
|
138
60
|
currencyValue: z.ZodString;
|
|
139
61
|
currencySymbol: z.ZodOptional<z.ZodString>;
|
|
140
62
|
ccyDayChange: z.ZodOptional<z.ZodString>;
|
|
141
63
|
ethDayChange: z.ZodOptional<z.ZodString>;
|
|
142
64
|
unitCurrencyValue: z.ZodOptional<z.ZodString>;
|
|
143
|
-
}
|
|
144
|
-
address: `0x${string}`;
|
|
145
|
-
networkId: string;
|
|
146
|
-
currencyValue: string;
|
|
147
|
-
symbol?: string | undefined;
|
|
148
|
-
name?: string | undefined;
|
|
149
|
-
decimals?: number | undefined;
|
|
150
|
-
dappId?: string | undefined;
|
|
151
|
-
brandColor?: string | undefined;
|
|
152
|
-
id?: number | undefined;
|
|
153
|
-
iconUrl?: string | undefined;
|
|
154
|
-
category?: string | undefined;
|
|
155
|
-
unitCurrencyValue?: string | undefined;
|
|
156
|
-
popular?: boolean | undefined;
|
|
157
|
-
tradable?: boolean | undefined;
|
|
158
|
-
pricingId?: number | undefined;
|
|
159
|
-
ethDayChange?: string | undefined;
|
|
160
|
-
ccyDayChange?: string | undefined;
|
|
161
|
-
currencySymbol?: string | undefined;
|
|
162
|
-
}, {
|
|
163
|
-
address: string;
|
|
164
|
-
networkId: string;
|
|
165
|
-
currencyValue: string;
|
|
166
|
-
symbol?: string | undefined;
|
|
167
|
-
name?: string | undefined;
|
|
168
|
-
decimals?: number | undefined;
|
|
169
|
-
dappId?: string | undefined;
|
|
170
|
-
brandColor?: string | undefined;
|
|
171
|
-
id?: number | undefined;
|
|
172
|
-
iconUrl?: string | undefined;
|
|
173
|
-
category?: string | undefined;
|
|
174
|
-
unitCurrencyValue?: string | undefined;
|
|
175
|
-
popular?: boolean | undefined;
|
|
176
|
-
tradable?: boolean | undefined;
|
|
177
|
-
pricingId?: number | undefined;
|
|
178
|
-
ethDayChange?: string | undefined;
|
|
179
|
-
ccyDayChange?: string | undefined;
|
|
180
|
-
currencySymbol?: string | undefined;
|
|
181
|
-
}>;
|
|
65
|
+
}, z.core.$strip>;
|
|
182
66
|
export type WebTokenWithPrice = z.infer<typeof webTokenWithPriceSchema>;
|
|
183
|
-
export declare const webTokenWithBalanceAndPriceSchema: z.ZodObject<
|
|
184
|
-
address: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
185
|
-
networkId: z.ZodString;
|
|
186
|
-
}, {
|
|
187
|
-
id: z.ZodOptional<z.ZodNumber>;
|
|
188
|
-
name: z.ZodOptional<z.ZodString>;
|
|
189
|
-
symbol: z.ZodOptional<z.ZodString>;
|
|
190
|
-
decimals: z.ZodOptional<z.ZodNumber>;
|
|
191
|
-
iconUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
192
|
-
pricingId: z.ZodOptional<z.ZodNumber>;
|
|
193
|
-
category: z.ZodOptional<z.ZodString>;
|
|
194
|
-
dappId: z.ZodOptional<z.ZodString>;
|
|
195
|
-
brandColor: z.ZodOptional<z.ZodString>;
|
|
196
|
-
tradable: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
-
popular: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
-
}>, {
|
|
67
|
+
export declare const webTokenWithBalanceAndPriceSchema: z.ZodObject<{
|
|
199
68
|
currencyValue: z.ZodString;
|
|
200
69
|
currencySymbol: z.ZodOptional<z.ZodString>;
|
|
201
70
|
ccyDayChange: z.ZodOptional<z.ZodString>;
|
|
202
71
|
ethDayChange: z.ZodOptional<z.ZodString>;
|
|
203
72
|
unitCurrencyValue: z.ZodOptional<z.ZodString>;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
networkId: z.ZodString;
|
|
73
|
+
address: z.ZodNonOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>>;
|
|
74
|
+
networkId: z.ZodNonOptional<z.ZodString>;
|
|
207
75
|
id: z.ZodOptional<z.ZodNumber>;
|
|
208
76
|
name: z.ZodOptional<z.ZodString>;
|
|
209
77
|
symbol: z.ZodOptional<z.ZodString>;
|
|
210
|
-
decimals: z.ZodOptional<z.
|
|
78
|
+
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
211
79
|
iconUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
212
80
|
pricingId: z.ZodOptional<z.ZodNumber>;
|
|
213
81
|
category: z.ZodOptional<z.ZodString>;
|
|
@@ -216,76 +84,20 @@ export declare const webTokenWithBalanceAndPriceSchema: z.ZodObject<z.objectUtil
|
|
|
216
84
|
tradable: z.ZodOptional<z.ZodBoolean>;
|
|
217
85
|
popular: z.ZodOptional<z.ZodBoolean>;
|
|
218
86
|
balance: z.ZodString;
|
|
219
|
-
}
|
|
220
|
-
address: `0x${string}`;
|
|
221
|
-
networkId: string;
|
|
222
|
-
currencyValue: string;
|
|
223
|
-
balance: string;
|
|
224
|
-
symbol?: string | undefined;
|
|
225
|
-
name?: string | undefined;
|
|
226
|
-
decimals?: number | undefined;
|
|
227
|
-
dappId?: string | undefined;
|
|
228
|
-
brandColor?: string | undefined;
|
|
229
|
-
id?: number | undefined;
|
|
230
|
-
iconUrl?: string | undefined;
|
|
231
|
-
category?: string | undefined;
|
|
232
|
-
unitCurrencyValue?: string | undefined;
|
|
233
|
-
popular?: boolean | undefined;
|
|
234
|
-
tradable?: boolean | undefined;
|
|
235
|
-
pricingId?: number | undefined;
|
|
236
|
-
ethDayChange?: string | undefined;
|
|
237
|
-
ccyDayChange?: string | undefined;
|
|
238
|
-
currencySymbol?: string | undefined;
|
|
239
|
-
}, {
|
|
240
|
-
address: string;
|
|
241
|
-
networkId: string;
|
|
242
|
-
currencyValue: string;
|
|
243
|
-
balance: string;
|
|
244
|
-
symbol?: string | undefined;
|
|
245
|
-
name?: string | undefined;
|
|
246
|
-
decimals?: number | undefined;
|
|
247
|
-
dappId?: string | undefined;
|
|
248
|
-
brandColor?: string | undefined;
|
|
249
|
-
id?: number | undefined;
|
|
250
|
-
iconUrl?: string | undefined;
|
|
251
|
-
category?: string | undefined;
|
|
252
|
-
unitCurrencyValue?: string | undefined;
|
|
253
|
-
popular?: boolean | undefined;
|
|
254
|
-
tradable?: boolean | undefined;
|
|
255
|
-
pricingId?: number | undefined;
|
|
256
|
-
ethDayChange?: string | undefined;
|
|
257
|
-
ccyDayChange?: string | undefined;
|
|
258
|
-
currencySymbol?: string | undefined;
|
|
259
|
-
}>;
|
|
87
|
+
}, z.core.$strip>;
|
|
260
88
|
export type WebTokenWithBalanceAndPrice = z.infer<typeof webTokenWithBalanceAndPriceSchema>;
|
|
261
|
-
export declare const webTokensWithBalanceAndPriceSchema: z.ZodArray<z.ZodObject<
|
|
262
|
-
address: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
263
|
-
networkId: z.ZodString;
|
|
264
|
-
}, {
|
|
265
|
-
id: z.ZodOptional<z.ZodNumber>;
|
|
266
|
-
name: z.ZodOptional<z.ZodString>;
|
|
267
|
-
symbol: z.ZodOptional<z.ZodString>;
|
|
268
|
-
decimals: z.ZodOptional<z.ZodNumber>;
|
|
269
|
-
iconUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
270
|
-
pricingId: z.ZodOptional<z.ZodNumber>;
|
|
271
|
-
category: z.ZodOptional<z.ZodString>;
|
|
272
|
-
dappId: z.ZodOptional<z.ZodString>;
|
|
273
|
-
brandColor: z.ZodOptional<z.ZodString>;
|
|
274
|
-
tradable: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
-
popular: z.ZodOptional<z.ZodBoolean>;
|
|
276
|
-
}>, {
|
|
89
|
+
export declare const webTokensWithBalanceAndPriceSchema: z.ZodArray<z.ZodObject<{
|
|
277
90
|
currencyValue: z.ZodString;
|
|
278
91
|
currencySymbol: z.ZodOptional<z.ZodString>;
|
|
279
92
|
ccyDayChange: z.ZodOptional<z.ZodString>;
|
|
280
93
|
ethDayChange: z.ZodOptional<z.ZodString>;
|
|
281
94
|
unitCurrencyValue: z.ZodOptional<z.ZodString>;
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
networkId: z.ZodString;
|
|
95
|
+
address: z.ZodNonOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>>;
|
|
96
|
+
networkId: z.ZodNonOptional<z.ZodString>;
|
|
285
97
|
id: z.ZodOptional<z.ZodNumber>;
|
|
286
98
|
name: z.ZodOptional<z.ZodString>;
|
|
287
99
|
symbol: z.ZodOptional<z.ZodString>;
|
|
288
|
-
decimals: z.ZodOptional<z.
|
|
100
|
+
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
289
101
|
iconUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
290
102
|
pricingId: z.ZodOptional<z.ZodNumber>;
|
|
291
103
|
category: z.ZodOptional<z.ZodString>;
|
|
@@ -294,81 +106,22 @@ export declare const webTokensWithBalanceAndPriceSchema: z.ZodArray<z.ZodObject<
|
|
|
294
106
|
tradable: z.ZodOptional<z.ZodBoolean>;
|
|
295
107
|
popular: z.ZodOptional<z.ZodBoolean>;
|
|
296
108
|
balance: z.ZodString;
|
|
297
|
-
}
|
|
298
|
-
address: `0x${string}`;
|
|
299
|
-
networkId: string;
|
|
300
|
-
currencyValue: string;
|
|
301
|
-
balance: string;
|
|
302
|
-
symbol?: string | undefined;
|
|
303
|
-
name?: string | undefined;
|
|
304
|
-
decimals?: number | undefined;
|
|
305
|
-
dappId?: string | undefined;
|
|
306
|
-
brandColor?: string | undefined;
|
|
307
|
-
id?: number | undefined;
|
|
308
|
-
iconUrl?: string | undefined;
|
|
309
|
-
category?: string | undefined;
|
|
310
|
-
unitCurrencyValue?: string | undefined;
|
|
311
|
-
popular?: boolean | undefined;
|
|
312
|
-
tradable?: boolean | undefined;
|
|
313
|
-
pricingId?: number | undefined;
|
|
314
|
-
ethDayChange?: string | undefined;
|
|
315
|
-
ccyDayChange?: string | undefined;
|
|
316
|
-
currencySymbol?: string | undefined;
|
|
317
|
-
}, {
|
|
318
|
-
address: string;
|
|
319
|
-
networkId: string;
|
|
320
|
-
currencyValue: string;
|
|
321
|
-
balance: string;
|
|
322
|
-
symbol?: string | undefined;
|
|
323
|
-
name?: string | undefined;
|
|
324
|
-
decimals?: number | undefined;
|
|
325
|
-
dappId?: string | undefined;
|
|
326
|
-
brandColor?: string | undefined;
|
|
327
|
-
id?: number | undefined;
|
|
328
|
-
iconUrl?: string | undefined;
|
|
329
|
-
category?: string | undefined;
|
|
330
|
-
unitCurrencyValue?: string | undefined;
|
|
331
|
-
popular?: boolean | undefined;
|
|
332
|
-
tradable?: boolean | undefined;
|
|
333
|
-
pricingId?: number | undefined;
|
|
334
|
-
ethDayChange?: string | undefined;
|
|
335
|
-
ccyDayChange?: string | undefined;
|
|
336
|
-
currencySymbol?: string | undefined;
|
|
337
|
-
}>, "many">;
|
|
109
|
+
}, z.core.$strip>>;
|
|
338
110
|
export type WebTokensWithBalanceAndPrice = z.infer<typeof webTokensWithBalanceAndPriceSchema>;
|
|
339
|
-
export declare const webTokenPriceDetailsSchema: z.ZodObject<
|
|
340
|
-
address: z.
|
|
111
|
+
export declare const webTokenPriceDetailsSchema: z.ZodObject<{
|
|
112
|
+
address: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
|
|
341
113
|
networkId: z.ZodString;
|
|
342
|
-
}, {
|
|
343
114
|
pricingId: z.ZodNumber;
|
|
344
115
|
ethValue: z.ZodString;
|
|
345
116
|
ccyValue: z.ZodString;
|
|
346
117
|
ethDayChange: z.ZodString;
|
|
347
118
|
ccyDayChange: z.ZodString;
|
|
348
|
-
}
|
|
349
|
-
address: `0x${string}`;
|
|
350
|
-
networkId: string;
|
|
351
|
-
pricingId: number;
|
|
352
|
-
ethValue: string;
|
|
353
|
-
ccyValue: string;
|
|
354
|
-
ethDayChange: string;
|
|
355
|
-
ccyDayChange: string;
|
|
356
|
-
}, {
|
|
357
|
-
address: string;
|
|
358
|
-
networkId: string;
|
|
359
|
-
pricingId: number;
|
|
360
|
-
ethValue: string;
|
|
361
|
-
ccyValue: string;
|
|
362
|
-
ethDayChange: string;
|
|
363
|
-
ccyDayChange: string;
|
|
364
|
-
}>;
|
|
119
|
+
}, z.core.$strip>;
|
|
365
120
|
export type WebTokenPriceDetails = z.infer<typeof webTokenPriceDetailsSchema>;
|
|
366
|
-
export declare const webTokenInfoDetailsSchema: z.ZodObject<
|
|
367
|
-
address: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
121
|
+
export declare const webTokenInfoDetailsSchema: z.ZodObject<{
|
|
368
122
|
networkId: z.ZodString;
|
|
369
|
-
}, {
|
|
370
123
|
id: z.ZodNumber;
|
|
371
|
-
address: z.
|
|
124
|
+
address: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
|
|
372
125
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
373
126
|
name: z.ZodString;
|
|
374
127
|
symbol: z.ZodString;
|
|
@@ -379,7 +132,7 @@ export declare const webTokenInfoDetailsSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
379
132
|
refundable: z.ZodBoolean;
|
|
380
133
|
listed: z.ZodBoolean;
|
|
381
134
|
tradable: z.ZodBoolean;
|
|
382
|
-
category: z.ZodUnion<[z.ZodLiteral<"tokens">, z.ZodLiteral<"currencies">, z.ZodLiteral<"savings">]>;
|
|
135
|
+
category: z.ZodUnion<readonly [z.ZodLiteral<"tokens">, z.ZodLiteral<"currencies">, z.ZodLiteral<"savings">]>;
|
|
383
136
|
pricingId: z.ZodOptional<z.ZodNumber>;
|
|
384
137
|
dappId: z.ZodOptional<z.ZodString>;
|
|
385
138
|
marketData: z.ZodOptional<z.ZodObject<{
|
|
@@ -387,65 +140,7 @@ export declare const webTokenInfoDetailsSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
387
140
|
marketCap24hChange: z.ZodDefault<z.ZodNumber>;
|
|
388
141
|
dailyVolume: z.ZodDefault<z.ZodNumber>;
|
|
389
142
|
rank: z.ZodDefault<z.ZodNumber>;
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
dailyVolume: number;
|
|
394
|
-
rank: number;
|
|
395
|
-
}, {
|
|
396
|
-
marketCap?: number | undefined;
|
|
397
|
-
marketCap24hChange?: number | undefined;
|
|
398
|
-
dailyVolume?: number | undefined;
|
|
399
|
-
rank?: number | undefined;
|
|
400
|
-
}>>;
|
|
401
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
402
|
-
}>, "strip", z.ZodTypeAny, {
|
|
403
|
-
symbol: string;
|
|
404
|
-
address: `0x${string}`;
|
|
405
|
-
networkId: string;
|
|
406
|
-
name: string;
|
|
407
|
-
decimals: number;
|
|
408
|
-
id: number;
|
|
409
|
-
category: "tokens" | "currencies" | "savings";
|
|
410
|
-
sendable: boolean;
|
|
411
|
-
popular: boolean;
|
|
412
|
-
refundable: boolean;
|
|
413
|
-
listed: boolean;
|
|
414
|
-
tradable: boolean;
|
|
415
|
-
dappId?: string | undefined;
|
|
416
|
-
brandColor?: string | undefined;
|
|
417
|
-
iconUrl?: string | undefined;
|
|
418
|
-
pricingId?: number | undefined;
|
|
419
|
-
marketData?: {
|
|
420
|
-
marketCap: number;
|
|
421
|
-
marketCap24hChange: number;
|
|
422
|
-
dailyVolume: number;
|
|
423
|
-
rank: number;
|
|
424
|
-
} | undefined;
|
|
425
|
-
tags?: string[] | undefined;
|
|
426
|
-
}, {
|
|
427
|
-
symbol: string;
|
|
428
|
-
address: string;
|
|
429
|
-
networkId: string;
|
|
430
|
-
name: string;
|
|
431
|
-
decimals: number;
|
|
432
|
-
id: number;
|
|
433
|
-
category: "tokens" | "currencies" | "savings";
|
|
434
|
-
sendable: boolean;
|
|
435
|
-
popular: boolean;
|
|
436
|
-
refundable: boolean;
|
|
437
|
-
listed: boolean;
|
|
438
|
-
tradable: boolean;
|
|
439
|
-
dappId?: string | undefined;
|
|
440
|
-
brandColor?: string | undefined;
|
|
441
|
-
iconUrl?: string | undefined;
|
|
442
|
-
pricingId?: number | undefined;
|
|
443
|
-
marketData?: {
|
|
444
|
-
marketCap?: number | undefined;
|
|
445
|
-
marketCap24hChange?: number | undefined;
|
|
446
|
-
dailyVolume?: number | undefined;
|
|
447
|
-
rank?: number | undefined;
|
|
448
|
-
} | undefined;
|
|
449
|
-
tags?: string[] | undefined;
|
|
450
|
-
}>;
|
|
143
|
+
}, z.core.$strip>>;
|
|
144
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
+
}, z.core.$strip>;
|
|
451
146
|
export type WebTokenInfoDetails = z.infer<typeof webTokenInfoDetailsSchema>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { z as e } from "zod";
|
|
2
|
-
import { addressSchema as
|
|
3
|
-
import { apiPriceDetailsSchema as
|
|
2
|
+
import { addressSchema as r } from "../../../chains/starknet/address.js";
|
|
3
|
+
import { apiPriceDetailsSchema as t, apiTokenInfoSchema as i } from "./backend.model.js";
|
|
4
4
|
const n = e.object({
|
|
5
|
-
address:
|
|
6
|
-
networkId: e.string({
|
|
7
|
-
|
|
5
|
+
address: r,
|
|
6
|
+
networkId: e.string({
|
|
7
|
+
error: (o) => o.input === void 0 ? "Network is required" : void 0
|
|
8
|
+
})
|
|
9
|
+
}, {
|
|
10
|
+
error: (o) => o === void 0 ? "Network is required" : void 0
|
|
11
|
+
}), h = n.required().extend({
|
|
8
12
|
balance: e.string()
|
|
9
|
-
}),
|
|
13
|
+
}), a = n.required().extend({
|
|
10
14
|
id: e.number().optional(),
|
|
11
15
|
name: e.string().optional(),
|
|
12
16
|
symbol: e.string().optional(),
|
|
@@ -19,29 +23,29 @@ const n = e.object({
|
|
|
19
23
|
brandColor: e.string().optional(),
|
|
20
24
|
tradable: e.boolean().optional(),
|
|
21
25
|
popular: e.boolean().optional()
|
|
22
|
-
}),
|
|
26
|
+
}), c = a.extend({
|
|
23
27
|
balance: e.string()
|
|
24
|
-
}),
|
|
28
|
+
}), s = a.extend({
|
|
25
29
|
currencyValue: e.string(),
|
|
26
30
|
currencySymbol: e.string().optional(),
|
|
27
31
|
ccyDayChange: e.string().optional(),
|
|
28
32
|
ethDayChange: e.string().optional(),
|
|
29
33
|
unitCurrencyValue: e.string().optional()
|
|
30
|
-
}),
|
|
31
|
-
...
|
|
32
|
-
}),
|
|
33
|
-
...r.shape
|
|
34
|
-
}), g = n.extend({
|
|
34
|
+
}), l = s.extend({
|
|
35
|
+
...c.shape
|
|
36
|
+
}), b = e.array(l), g = n.extend({
|
|
35
37
|
...t.shape
|
|
38
|
+
}), u = n.extend({
|
|
39
|
+
...i.shape
|
|
36
40
|
});
|
|
37
41
|
export {
|
|
38
42
|
n as webBaseTokenSchema,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
h as webBaseTokenWithBalanceSchema,
|
|
44
|
+
u as webTokenInfoDetailsSchema,
|
|
45
|
+
g as webTokenPriceDetailsSchema,
|
|
46
|
+
a as webTokenSchema,
|
|
47
|
+
l as webTokenWithBalanceAndPriceSchema,
|
|
48
|
+
c as webTokenWithBalanceSchema,
|
|
49
|
+
s as webTokenWithPriceSchema,
|
|
50
|
+
b as webTokensWithBalanceAndPriceSchema
|
|
47
51
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BigNumberish } from 'starknet';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export declare const parseAmount: (amount: string, decimals?: BigNumberish) => import('..').BigDecimal;
|
|
4
|
-
export declare const inputAmountSchema: z.
|
|
4
|
+
export declare const inputAmountSchema: z.ZodString;
|
|
5
5
|
export declare const isValidInputAmount: (amount: string) => boolean;
|
|
@@ -4,26 +4,6 @@ export declare const trpcErrorSchema: z.ZodObject<{
|
|
|
4
4
|
code: z.ZodOptional<z.ZodString>;
|
|
5
5
|
name: z.ZodOptional<z.ZodString>;
|
|
6
6
|
message: z.ZodString;
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
code?: string | undefined;
|
|
10
|
-
name?: string | undefined;
|
|
11
|
-
}, {
|
|
12
|
-
message: string;
|
|
13
|
-
code?: string | undefined;
|
|
14
|
-
name?: string | undefined;
|
|
15
|
-
}>;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
data: {
|
|
18
|
-
message: string;
|
|
19
|
-
code?: string | undefined;
|
|
20
|
-
name?: string | undefined;
|
|
21
|
-
};
|
|
22
|
-
}, {
|
|
23
|
-
data: {
|
|
24
|
-
message: string;
|
|
25
|
-
code?: string | undefined;
|
|
26
|
-
name?: string | undefined;
|
|
27
|
-
};
|
|
28
|
-
}>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
}, z.core.$strip>;
|
|
29
9
|
export declare const getMessageFromTrpcError: (error: unknown) => string | undefined;
|
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
import { CairoVersion, Call, Calldata, TransactionType } from 'starknet';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export declare const transactionReviewTransactionsSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodDefault<z.ZodEnum<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
calls?: Call | Call[] | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
type?: "DECLARE" | "DEPLOY" | "DEPLOY_ACCOUNT" | "INVOKE" | undefined;
|
|
19
|
-
salt?: string | undefined;
|
|
20
|
-
signature?: string[] | undefined;
|
|
21
|
-
calldata?: string[] | undefined;
|
|
22
|
-
classHash?: string | undefined;
|
|
23
|
-
calls?: Call | Call[] | undefined;
|
|
24
|
-
}>;
|
|
4
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
5
|
+
DECLARE: "DECLARE";
|
|
6
|
+
DEPLOY: "DEPLOY";
|
|
7
|
+
DEPLOY_ACCOUNT: "DEPLOY_ACCOUNT";
|
|
8
|
+
INVOKE: "INVOKE";
|
|
9
|
+
}>>;
|
|
10
|
+
calls: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodType<Call, unknown, z.core.$ZodTypeInternals<Call, unknown>>>, z.ZodType<Call, unknown, z.core.$ZodTypeInternals<Call, unknown>>]>>;
|
|
11
|
+
calldata: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
+
classHash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
13
|
+
salt: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
14
|
+
signature: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
25
16
|
export type TransactionReviewTransactions = z.infer<typeof transactionReviewTransactionsSchema>;
|
|
26
17
|
export type FRI = "FRI" | "fri";
|
|
27
18
|
export interface ApiTransactionReviewV2RequestBody {
|
|
@@ -8,15 +8,5 @@ export declare const transactionReviewWarningSchema: z.ZodObject<{
|
|
|
8
8
|
severity: z.ZodOptional<z.ZodString>;
|
|
9
9
|
title: z.ZodString;
|
|
10
10
|
description: z.ZodOptional<z.ZodString>;
|
|
11
|
-
},
|
|
12
|
-
reason: string;
|
|
13
|
-
title: string;
|
|
14
|
-
description?: string | undefined;
|
|
15
|
-
severity?: string | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
reason: string;
|
|
18
|
-
title: string;
|
|
19
|
-
description?: string | undefined;
|
|
20
|
-
severity?: string | undefined;
|
|
21
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
22
12
|
export type ITransactionReviewWarning = z.infer<typeof transactionReviewWarningSchema>;
|