@argent/x-shared 1.72.1 → 1.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +910 -26498
- package/dist/src/features/simulation/transactionReview/schema.js +3 -3
- 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/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
|
@@ -76,7 +76,7 @@ const v = t.object({
|
|
|
76
76
|
date_of_addition: t.string().optional(),
|
|
77
77
|
contract_address: k.optional(),
|
|
78
78
|
reason: t.string().optional(),
|
|
79
|
-
value: t.
|
|
79
|
+
value: t.any().optional()
|
|
80
80
|
}), l = t.object({
|
|
81
81
|
reason: j,
|
|
82
82
|
details: D.optional(),
|
|
@@ -192,10 +192,10 @@ const v = t.object({
|
|
|
192
192
|
}), d = t.object({
|
|
193
193
|
reviewOfTransaction: c,
|
|
194
194
|
simulation: I,
|
|
195
|
-
simulationError: t.undefined()
|
|
195
|
+
simulationError: t.undefined().optional()
|
|
196
196
|
}), g = t.object({
|
|
197
197
|
reviewOfTransaction: c,
|
|
198
|
-
simulation: t.undefined(),
|
|
198
|
+
simulation: t.undefined().optional(),
|
|
199
199
|
simulationError: O
|
|
200
200
|
}), u = d.or(g), S = t.object({
|
|
201
201
|
subsidiseDeployment: t.boolean(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const severitySchema: z.ZodUnion<[z.ZodLiteral<"critical">, z.ZodLiteral<"high">, z.ZodLiteral<"caution">, z.ZodLiteral<"info">]>;
|
|
2
|
+
export declare const severitySchema: z.ZodUnion<readonly [z.ZodLiteral<"critical">, z.ZodLiteral<"high">, z.ZodLiteral<"caution">, z.ZodLiteral<"info">]>;
|
|
3
3
|
export declare const reasonsSchema: z.ZodString;
|
|
4
4
|
export type Reason = z.infer<typeof reasonsSchema>;
|
|
5
5
|
export type Severity = z.infer<typeof severitySchema>;
|
|
@@ -1,48 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const SwapOrderRequestSchema: z.ZodObject<{
|
|
3
3
|
chain: z.ZodLiteral<"starknet">;
|
|
4
|
-
sellToken: z.
|
|
5
|
-
buyToken: z.
|
|
4
|
+
sellToken: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
|
|
5
|
+
buyToken: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
|
|
6
6
|
sellAmount: z.ZodString;
|
|
7
7
|
buyAmount: z.ZodString;
|
|
8
|
-
accountAddress: z.
|
|
9
|
-
slippage: z.
|
|
8
|
+
accountAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
|
|
9
|
+
slippage: z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>;
|
|
10
10
|
data: z.ZodObject<{
|
|
11
11
|
quoteId: z.ZodString;
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
}, {
|
|
15
|
-
quoteId: string;
|
|
16
|
-
}>;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
chain: "starknet";
|
|
19
|
-
accountAddress: `0x${string}`;
|
|
20
|
-
data: {
|
|
21
|
-
quoteId: string;
|
|
22
|
-
};
|
|
23
|
-
sellToken: `0x${string}`;
|
|
24
|
-
buyToken: `0x${string}`;
|
|
25
|
-
sellAmount: string;
|
|
26
|
-
buyAmount: string;
|
|
27
|
-
slippage: string;
|
|
28
|
-
}, {
|
|
29
|
-
chain: "starknet";
|
|
30
|
-
accountAddress: string;
|
|
31
|
-
data: {
|
|
32
|
-
quoteId: string;
|
|
33
|
-
};
|
|
34
|
-
sellToken: string;
|
|
35
|
-
buyToken: string;
|
|
36
|
-
sellAmount: string;
|
|
37
|
-
buyAmount: string;
|
|
38
|
-
slippage: number;
|
|
39
|
-
}>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
}, z.core.$strip>;
|
|
40
14
|
export type SwapOrderRequest = z.infer<typeof SwapOrderRequestSchema>;
|
|
41
15
|
export declare const SwapOrderResponseSchema: z.ZodObject<{
|
|
42
|
-
calls: z.ZodArray<z.ZodType<import('starknet').Call, z.
|
|
43
|
-
},
|
|
44
|
-
calls: import('starknet').Call[];
|
|
45
|
-
}, {
|
|
46
|
-
calls: import('starknet').Call[];
|
|
47
|
-
}>;
|
|
16
|
+
calls: z.ZodArray<z.ZodType<import('starknet').Call, unknown, z.core.$ZodTypeInternals<import('starknet').Call, unknown>>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
48
18
|
export type SwapOrderResponse = z.infer<typeof SwapOrderResponseSchema>;
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const SwapDataSchema: z.ZodObject<{
|
|
3
3
|
quoteId: z.ZodString;
|
|
4
|
-
},
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export type SwapQuoteRoute = {
|
|
6
|
+
name: string;
|
|
7
|
+
percent: number;
|
|
8
|
+
sellToken: string;
|
|
9
|
+
buyToken: string;
|
|
10
|
+
routes: SwapQuoteRoute[];
|
|
11
|
+
};
|
|
12
|
+
export declare const SwapQuoteRouteSchema: z.ZodSchema<SwapQuoteRoute>;
|
|
11
13
|
export declare const SwapQuoteResponseSchema: z.ZodObject<{
|
|
12
|
-
sellToken: z.
|
|
14
|
+
sellToken: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
|
|
13
15
|
sellAmount: z.ZodString;
|
|
14
16
|
sellAmountInCurrency: z.ZodString;
|
|
15
|
-
buyToken: z.
|
|
17
|
+
buyToken: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
|
|
16
18
|
buyAmount: z.ZodString;
|
|
17
19
|
buyAmountInCurrency: z.ZodString;
|
|
18
20
|
expiresAt: z.ZodNumber;
|
|
19
21
|
expiresIn: z.ZodNumber;
|
|
20
22
|
dexCount: z.ZodNumber;
|
|
21
|
-
routes: z.ZodArray<z.ZodType<
|
|
23
|
+
routes: z.ZodArray<z.ZodType<SwapQuoteRoute, unknown, z.core.$ZodTypeInternals<SwapQuoteRoute, unknown>>>;
|
|
22
24
|
providerName: z.ZodString;
|
|
23
25
|
providerFee: z.ZodString;
|
|
24
26
|
providerFeeInCurrency: z.ZodString;
|
|
@@ -26,57 +28,9 @@ export declare const SwapQuoteResponseSchema: z.ZodObject<{
|
|
|
26
28
|
argentFee: z.ZodString;
|
|
27
29
|
argentFeeInCurrency: z.ZodString;
|
|
28
30
|
argentFeePercentage: z.ZodNumber;
|
|
29
|
-
feeToken: z.
|
|
31
|
+
feeToken: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
|
|
30
32
|
data: z.ZodObject<{
|
|
31
33
|
quoteId: z.ZodString;
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
}, {
|
|
35
|
-
quoteId: string;
|
|
36
|
-
}>;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
data: {
|
|
39
|
-
quoteId: string;
|
|
40
|
-
};
|
|
41
|
-
feeToken: `0x${string}`;
|
|
42
|
-
argentFee: string;
|
|
43
|
-
providerFee: string;
|
|
44
|
-
sellToken: `0x${string}`;
|
|
45
|
-
buyToken: `0x${string}`;
|
|
46
|
-
routes: any[];
|
|
47
|
-
sellAmount: string;
|
|
48
|
-
sellAmountInCurrency: string;
|
|
49
|
-
buyAmount: string;
|
|
50
|
-
buyAmountInCurrency: string;
|
|
51
|
-
expiresAt: number;
|
|
52
|
-
expiresIn: number;
|
|
53
|
-
dexCount: number;
|
|
54
|
-
providerName: string;
|
|
55
|
-
providerFeeInCurrency: string;
|
|
56
|
-
providerFeePercentage: number;
|
|
57
|
-
argentFeeInCurrency: string;
|
|
58
|
-
argentFeePercentage: number;
|
|
59
|
-
}, {
|
|
60
|
-
data: {
|
|
61
|
-
quoteId: string;
|
|
62
|
-
};
|
|
63
|
-
feeToken: string;
|
|
64
|
-
argentFee: string;
|
|
65
|
-
providerFee: string;
|
|
66
|
-
sellToken: string;
|
|
67
|
-
buyToken: string;
|
|
68
|
-
routes: any[];
|
|
69
|
-
sellAmount: string;
|
|
70
|
-
sellAmountInCurrency: string;
|
|
71
|
-
buyAmount: string;
|
|
72
|
-
buyAmountInCurrency: string;
|
|
73
|
-
expiresAt: number;
|
|
74
|
-
expiresIn: number;
|
|
75
|
-
dexCount: number;
|
|
76
|
-
providerName: string;
|
|
77
|
-
providerFeeInCurrency: string;
|
|
78
|
-
providerFeePercentage: number;
|
|
79
|
-
argentFeeInCurrency: string;
|
|
80
|
-
argentFeePercentage: number;
|
|
81
|
-
}>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
}, z.core.$strip>;
|
|
82
36
|
export type SwapQuoteResponse = z.infer<typeof SwapQuoteResponseSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),t=require("../../../tokens/service/types/webToken.model.cjs"),n=require("./quote.model.cjs");exports.TradeType=void 0;(function(r){r.EXACT_PAY="EXACT_PAY",r.EXACT_RECEIVE="EXACT_RECEIVE"})(exports.TradeType||(exports.TradeType={}));const a=e.z.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),t=require("../../../tokens/service/types/webToken.model.cjs"),n=require("./quote.model.cjs");exports.TradeType=void 0;(function(r){r.EXACT_PAY="EXACT_PAY",r.EXACT_RECEIVE="EXACT_RECEIVE"})(exports.TradeType||(exports.TradeType={}));const a=e.z.enum(exports.TradeType),o=e.z.object({payToken:t.webTokenSchema,receiveToken:t.webTokenSchema,tradeType:a.default(exports.TradeType.EXACT_PAY),payAmount:e.z.string(),receiveAmount:e.z.string(),payAmountInCurrency:e.z.string(),receiveAmountInCurrency:e.z.string(),totalFee:e.z.string(),totalFeeInCurrency:e.z.string().optional(),totalFeePercentage:e.z.number(),expiresAt:e.z.number(),expiresIn:e.z.number(),route:n.SwapQuoteRouteSchema,data:n.SwapDataSchema});exports.TradeSchema=o;exports.TradeTypeSchema=a;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { SwapQuoteRoute } from './quote.model';
|
|
2
3
|
export declare enum TradeType {
|
|
3
4
|
EXACT_PAY = "EXACT_PAY",
|
|
4
5
|
EXACT_RECEIVE = "EXACT_RECEIVE"
|
|
5
6
|
}
|
|
6
|
-
export declare const TradeTypeSchema: z.
|
|
7
|
+
export declare const TradeTypeSchema: z.ZodEnum<typeof TradeType>;
|
|
7
8
|
export declare const TradeSchema: z.ZodObject<{
|
|
8
|
-
payToken: z.ZodObject<
|
|
9
|
-
address: z.
|
|
10
|
-
networkId: z.ZodString
|
|
11
|
-
}, {
|
|
9
|
+
payToken: z.ZodObject<{
|
|
10
|
+
address: z.ZodNonOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>>;
|
|
11
|
+
networkId: z.ZodNonOptional<z.ZodString>;
|
|
12
12
|
id: z.ZodOptional<z.ZodNumber>;
|
|
13
13
|
name: z.ZodOptional<z.ZodString>;
|
|
14
14
|
symbol: z.ZodOptional<z.ZodString>;
|
|
15
|
-
decimals: z.ZodOptional<z.
|
|
15
|
+
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
16
16
|
iconUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
17
17
|
pricingId: z.ZodOptional<z.ZodNumber>;
|
|
18
18
|
category: z.ZodOptional<z.ZodString>;
|
|
@@ -20,43 +20,14 @@ export declare const TradeSchema: z.ZodObject<{
|
|
|
20
20
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
21
21
|
tradable: z.ZodOptional<z.ZodBoolean>;
|
|
22
22
|
popular: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
name?: string | undefined;
|
|
28
|
-
decimals?: number | undefined;
|
|
29
|
-
dappId?: string | undefined;
|
|
30
|
-
brandColor?: string | undefined;
|
|
31
|
-
id?: number | undefined;
|
|
32
|
-
iconUrl?: string | undefined;
|
|
33
|
-
category?: string | undefined;
|
|
34
|
-
popular?: boolean | undefined;
|
|
35
|
-
tradable?: boolean | undefined;
|
|
36
|
-
pricingId?: number | undefined;
|
|
37
|
-
}, {
|
|
38
|
-
address: string;
|
|
39
|
-
networkId: string;
|
|
40
|
-
symbol?: string | undefined;
|
|
41
|
-
name?: string | undefined;
|
|
42
|
-
decimals?: number | undefined;
|
|
43
|
-
dappId?: string | undefined;
|
|
44
|
-
brandColor?: string | undefined;
|
|
45
|
-
id?: number | undefined;
|
|
46
|
-
iconUrl?: string | undefined;
|
|
47
|
-
category?: string | undefined;
|
|
48
|
-
popular?: boolean | undefined;
|
|
49
|
-
tradable?: boolean | undefined;
|
|
50
|
-
pricingId?: number | undefined;
|
|
51
|
-
}>;
|
|
52
|
-
receiveToken: z.ZodObject<z.objectUtil.extendShape<{
|
|
53
|
-
address: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
54
|
-
networkId: z.ZodString;
|
|
55
|
-
}, {
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
receiveToken: z.ZodObject<{
|
|
25
|
+
address: z.ZodNonOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>>;
|
|
26
|
+
networkId: z.ZodNonOptional<z.ZodString>;
|
|
56
27
|
id: z.ZodOptional<z.ZodNumber>;
|
|
57
28
|
name: z.ZodOptional<z.ZodString>;
|
|
58
29
|
symbol: z.ZodOptional<z.ZodString>;
|
|
59
|
-
decimals: z.ZodOptional<z.
|
|
30
|
+
decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
60
31
|
iconUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
61
32
|
pricingId: z.ZodOptional<z.ZodNumber>;
|
|
62
33
|
category: z.ZodOptional<z.ZodString>;
|
|
@@ -64,36 +35,8 @@ export declare const TradeSchema: z.ZodObject<{
|
|
|
64
35
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
65
36
|
tradable: z.ZodOptional<z.ZodBoolean>;
|
|
66
37
|
popular: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
networkId: string;
|
|
70
|
-
symbol?: string | undefined;
|
|
71
|
-
name?: string | undefined;
|
|
72
|
-
decimals?: number | undefined;
|
|
73
|
-
dappId?: string | undefined;
|
|
74
|
-
brandColor?: string | undefined;
|
|
75
|
-
id?: number | undefined;
|
|
76
|
-
iconUrl?: string | undefined;
|
|
77
|
-
category?: string | undefined;
|
|
78
|
-
popular?: boolean | undefined;
|
|
79
|
-
tradable?: boolean | undefined;
|
|
80
|
-
pricingId?: number | undefined;
|
|
81
|
-
}, {
|
|
82
|
-
address: string;
|
|
83
|
-
networkId: string;
|
|
84
|
-
symbol?: string | undefined;
|
|
85
|
-
name?: string | undefined;
|
|
86
|
-
decimals?: number | undefined;
|
|
87
|
-
dappId?: string | undefined;
|
|
88
|
-
brandColor?: string | undefined;
|
|
89
|
-
id?: number | undefined;
|
|
90
|
-
iconUrl?: string | undefined;
|
|
91
|
-
category?: string | undefined;
|
|
92
|
-
popular?: boolean | undefined;
|
|
93
|
-
tradable?: boolean | undefined;
|
|
94
|
-
pricingId?: number | undefined;
|
|
95
|
-
}>;
|
|
96
|
-
tradeType: z.ZodDefault<z.ZodNativeEnum<typeof TradeType>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
tradeType: z.ZodDefault<z.ZodEnum<typeof TradeType>>;
|
|
97
40
|
payAmount: z.ZodString;
|
|
98
41
|
receiveAmount: z.ZodString;
|
|
99
42
|
payAmountInCurrency: z.ZodString;
|
|
@@ -103,104 +46,11 @@ export declare const TradeSchema: z.ZodObject<{
|
|
|
103
46
|
totalFeePercentage: z.ZodNumber;
|
|
104
47
|
expiresAt: z.ZodNumber;
|
|
105
48
|
expiresIn: z.ZodNumber;
|
|
106
|
-
route: z.ZodType<
|
|
49
|
+
route: z.ZodType<SwapQuoteRoute, unknown, z.core.$ZodTypeInternals<SwapQuoteRoute, unknown>>;
|
|
107
50
|
data: z.ZodObject<{
|
|
108
51
|
quoteId: z.ZodString;
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
}, {
|
|
112
|
-
quoteId: string;
|
|
113
|
-
}>;
|
|
114
|
-
}, "strip", z.ZodTypeAny, {
|
|
115
|
-
data: {
|
|
116
|
-
quoteId: string;
|
|
117
|
-
};
|
|
118
|
-
totalFee: string;
|
|
119
|
-
expiresAt: number;
|
|
120
|
-
expiresIn: number;
|
|
121
|
-
payToken: {
|
|
122
|
-
address: `0x${string}`;
|
|
123
|
-
networkId: string;
|
|
124
|
-
symbol?: string | undefined;
|
|
125
|
-
name?: string | undefined;
|
|
126
|
-
decimals?: number | undefined;
|
|
127
|
-
dappId?: string | undefined;
|
|
128
|
-
brandColor?: string | undefined;
|
|
129
|
-
id?: number | undefined;
|
|
130
|
-
iconUrl?: string | undefined;
|
|
131
|
-
category?: string | undefined;
|
|
132
|
-
popular?: boolean | undefined;
|
|
133
|
-
tradable?: boolean | undefined;
|
|
134
|
-
pricingId?: number | undefined;
|
|
135
|
-
};
|
|
136
|
-
receiveToken: {
|
|
137
|
-
address: `0x${string}`;
|
|
138
|
-
networkId: string;
|
|
139
|
-
symbol?: string | undefined;
|
|
140
|
-
name?: string | undefined;
|
|
141
|
-
decimals?: number | undefined;
|
|
142
|
-
dappId?: string | undefined;
|
|
143
|
-
brandColor?: string | undefined;
|
|
144
|
-
id?: number | undefined;
|
|
145
|
-
iconUrl?: string | undefined;
|
|
146
|
-
category?: string | undefined;
|
|
147
|
-
popular?: boolean | undefined;
|
|
148
|
-
tradable?: boolean | undefined;
|
|
149
|
-
pricingId?: number | undefined;
|
|
150
|
-
};
|
|
151
|
-
tradeType: TradeType;
|
|
152
|
-
payAmount: string;
|
|
153
|
-
receiveAmount: string;
|
|
154
|
-
payAmountInCurrency: string;
|
|
155
|
-
receiveAmountInCurrency: string;
|
|
156
|
-
totalFeePercentage: number;
|
|
157
|
-
totalFeeInCurrency?: string | undefined;
|
|
158
|
-
route?: any;
|
|
159
|
-
}, {
|
|
160
|
-
data: {
|
|
161
|
-
quoteId: string;
|
|
162
|
-
};
|
|
163
|
-
totalFee: string;
|
|
164
|
-
expiresAt: number;
|
|
165
|
-
expiresIn: number;
|
|
166
|
-
payToken: {
|
|
167
|
-
address: string;
|
|
168
|
-
networkId: string;
|
|
169
|
-
symbol?: string | undefined;
|
|
170
|
-
name?: string | undefined;
|
|
171
|
-
decimals?: number | undefined;
|
|
172
|
-
dappId?: string | undefined;
|
|
173
|
-
brandColor?: string | undefined;
|
|
174
|
-
id?: number | undefined;
|
|
175
|
-
iconUrl?: string | undefined;
|
|
176
|
-
category?: string | undefined;
|
|
177
|
-
popular?: boolean | undefined;
|
|
178
|
-
tradable?: boolean | undefined;
|
|
179
|
-
pricingId?: number | undefined;
|
|
180
|
-
};
|
|
181
|
-
receiveToken: {
|
|
182
|
-
address: string;
|
|
183
|
-
networkId: string;
|
|
184
|
-
symbol?: string | undefined;
|
|
185
|
-
name?: string | undefined;
|
|
186
|
-
decimals?: number | undefined;
|
|
187
|
-
dappId?: string | undefined;
|
|
188
|
-
brandColor?: string | undefined;
|
|
189
|
-
id?: number | undefined;
|
|
190
|
-
iconUrl?: string | undefined;
|
|
191
|
-
category?: string | undefined;
|
|
192
|
-
popular?: boolean | undefined;
|
|
193
|
-
tradable?: boolean | undefined;
|
|
194
|
-
pricingId?: number | undefined;
|
|
195
|
-
};
|
|
196
|
-
payAmount: string;
|
|
197
|
-
receiveAmount: string;
|
|
198
|
-
payAmountInCurrency: string;
|
|
199
|
-
receiveAmountInCurrency: string;
|
|
200
|
-
totalFeePercentage: number;
|
|
201
|
-
tradeType?: TradeType | undefined;
|
|
202
|
-
totalFeeInCurrency?: string | undefined;
|
|
203
|
-
route?: any;
|
|
204
|
-
}>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
}, z.core.$strip>;
|
|
205
54
|
export type Trade = z.infer<typeof TradeSchema>;
|
|
206
55
|
export type TradeAmounts = Pick<Trade, "payAmount" | "receiveAmount">;
|
|
56
|
+
export type { SwapQuoteRoute };
|
|
@@ -8,7 +8,7 @@ export declare class HTTPService implements IHttpService {
|
|
|
8
8
|
private responseType;
|
|
9
9
|
constructor(requestInit?: CanBeFn<RequestInit>, responseType?: ResponseType);
|
|
10
10
|
get<T>(url: string, requestInit?: RequestInit): Promise<T>;
|
|
11
|
-
post<T>(url: string, requestInit?: RequestInit, validationSchema?: ZodType): Promise<T>;
|
|
11
|
+
post<T>(url: string, requestInit?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
|
|
12
12
|
put<T>(url: string, requestInit?: RequestInit): Promise<T>;
|
|
13
13
|
delete(url: string, requestInit?: RequestInit): Promise<void>;
|
|
14
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ZodType } from 'zod';
|
|
2
2
|
export interface IHttpService {
|
|
3
3
|
get<T>(url: string, options?: RequestInit): Promise<T>;
|
|
4
|
-
post<T>(url: string, options?: RequestInit, validationSchema?: ZodType): Promise<T>;
|
|
4
|
+
post<T>(url: string, options?: RequestInit, validationSchema?: ZodType<T>): Promise<T>;
|
|
5
5
|
delete(url: string, options?: RequestInit): Promise<void>;
|
|
6
6
|
put<T>(url: string, options?: RequestInit): Promise<T>;
|
|
7
7
|
}
|