@metamask-previews/bridge-controller 77.6.0-preview-68ba7f84e → 77.8.0-preview-5959fe813
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/CHANGELOG.md +42 -7
- package/dist/bridge-controller.cjs +13 -8
- package/dist/bridge-controller.cjs.map +1 -1
- package/dist/bridge-controller.d.cts +2 -1
- package/dist/bridge-controller.d.cts.map +1 -1
- package/dist/bridge-controller.d.mts +2 -1
- package/dist/bridge-controller.d.mts.map +1 -1
- package/dist/bridge-controller.mjs +10 -5
- package/dist/bridge-controller.mjs.map +1 -1
- package/dist/coercers/quote-response-v1-to-v2.cjs +137 -0
- package/dist/coercers/quote-response-v1-to-v2.cjs.map +1 -0
- package/dist/coercers/quote-response-v1-to-v2.d.cts +13 -0
- package/dist/coercers/quote-response-v1-to-v2.d.cts.map +1 -0
- package/dist/coercers/quote-response-v1-to-v2.d.mts +13 -0
- package/dist/coercers/quote-response-v1-to-v2.d.mts.map +1 -0
- package/dist/coercers/quote-response-v1-to-v2.mjs +132 -0
- package/dist/coercers/quote-response-v1-to-v2.mjs.map +1 -0
- package/dist/coercers/quote-response-v2-to-v1.cjs +173 -0
- package/dist/coercers/quote-response-v2-to-v1.cjs.map +1 -0
- package/dist/coercers/quote-response-v2-to-v1.d.cts +13 -0
- package/dist/coercers/quote-response-v2-to-v1.d.cts.map +1 -0
- package/dist/coercers/quote-response-v2-to-v1.d.mts +13 -0
- package/dist/coercers/quote-response-v2-to-v1.d.mts.map +1 -0
- package/dist/coercers/quote-response-v2-to-v1.mjs +169 -0
- package/dist/coercers/quote-response-v2-to-v1.mjs.map +1 -0
- package/dist/constants/bridge.cjs +2 -1
- package/dist/constants/bridge.cjs.map +1 -1
- package/dist/constants/bridge.d.cts +1 -0
- package/dist/constants/bridge.d.cts.map +1 -1
- package/dist/constants/bridge.d.mts +1 -0
- package/dist/constants/bridge.d.mts.map +1 -1
- package/dist/constants/bridge.mjs +1 -0
- package/dist/constants/bridge.mjs.map +1 -1
- package/dist/index.cjs +32 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +17 -5
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +12 -3
- package/dist/index.mjs.map +1 -1
- package/dist/selectors.cjs +52 -100
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +11198 -31552
- package/dist/selectors.d.cts.map +1 -1
- package/dist/selectors.d.mts +11198 -31552
- package/dist/selectors.d.mts.map +1 -1
- package/dist/selectors.mjs +52 -100
- package/dist/selectors.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +4 -87
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +4 -87
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/bridge.cjs +2 -6
- package/dist/utils/bridge.cjs.map +1 -1
- package/dist/utils/bridge.d.cts +2 -19
- package/dist/utils/bridge.d.cts.map +1 -1
- package/dist/utils/bridge.d.mts +2 -19
- package/dist/utils/bridge.d.mts.map +1 -1
- package/dist/utils/bridge.mjs +1 -4
- package/dist/utils/bridge.mjs.map +1 -1
- package/dist/utils/caip-formatters.cjs +0 -3
- package/dist/utils/caip-formatters.cjs.map +1 -1
- package/dist/utils/caip-formatters.d.cts.map +1 -1
- package/dist/utils/caip-formatters.d.mts.map +1 -1
- package/dist/utils/caip-formatters.mjs +0 -3
- package/dist/utils/caip-formatters.mjs.map +1 -1
- package/dist/utils/feature-flags.d.cts +2 -2
- package/dist/utils/feature-flags.d.mts +2 -2
- package/dist/utils/fetch.cjs +37 -40
- package/dist/utils/fetch.cjs.map +1 -1
- package/dist/utils/fetch.d.cts +10 -4
- package/dist/utils/fetch.d.cts.map +1 -1
- package/dist/utils/fetch.d.mts +10 -4
- package/dist/utils/fetch.d.mts.map +1 -1
- package/dist/utils/fetch.mjs +37 -40
- package/dist/utils/fetch.mjs.map +1 -1
- package/dist/utils/metrics/constants.cjs +1 -0
- package/dist/utils/metrics/constants.cjs.map +1 -1
- package/dist/utils/metrics/constants.d.cts +2 -1
- package/dist/utils/metrics/constants.d.cts.map +1 -1
- package/dist/utils/metrics/constants.d.mts +2 -1
- package/dist/utils/metrics/constants.d.mts.map +1 -1
- package/dist/utils/metrics/constants.mjs +1 -0
- package/dist/utils/metrics/constants.mjs.map +1 -1
- package/dist/utils/metrics/properties.cjs +6 -6
- package/dist/utils/metrics/properties.cjs.map +1 -1
- package/dist/utils/metrics/properties.d.cts +9 -5
- package/dist/utils/metrics/properties.d.cts.map +1 -1
- package/dist/utils/metrics/properties.d.mts +9 -5
- package/dist/utils/metrics/properties.d.mts.map +1 -1
- package/dist/utils/metrics/properties.mjs +6 -6
- package/dist/utils/metrics/properties.mjs.map +1 -1
- package/dist/utils/metrics/types.cjs.map +1 -1
- package/dist/utils/metrics/types.d.cts +1 -1
- package/dist/utils/metrics/types.d.cts.map +1 -1
- package/dist/utils/metrics/types.d.mts +1 -1
- package/dist/utils/metrics/types.d.mts.map +1 -1
- package/dist/utils/metrics/types.mjs.map +1 -1
- package/dist/utils/number-formatters.cjs +106 -0
- package/dist/utils/number-formatters.cjs.map +1 -0
- package/dist/utils/number-formatters.d.cts +34 -0
- package/dist/utils/number-formatters.d.cts.map +1 -0
- package/dist/utils/number-formatters.d.mts +34 -0
- package/dist/utils/number-formatters.d.mts.map +1 -0
- package/dist/utils/number-formatters.mjs +99 -0
- package/dist/utils/number-formatters.mjs.map +1 -0
- package/dist/utils/quote-fees.cjs +23 -22
- package/dist/utils/quote-fees.cjs.map +1 -1
- package/dist/utils/quote-fees.d.cts +4 -2
- package/dist/utils/quote-fees.d.cts.map +1 -1
- package/dist/utils/quote-fees.d.mts +4 -2
- package/dist/utils/quote-fees.d.mts.map +1 -1
- package/dist/utils/quote-fees.mjs +24 -23
- package/dist/utils/quote-fees.mjs.map +1 -1
- package/dist/utils/quote-metadata/calculators.cjs +340 -0
- package/dist/utils/quote-metadata/calculators.cjs.map +1 -0
- package/dist/utils/quote-metadata/calculators.d.cts +125 -0
- package/dist/utils/quote-metadata/calculators.d.cts.map +1 -0
- package/dist/utils/quote-metadata/calculators.d.mts +125 -0
- package/dist/utils/quote-metadata/calculators.d.mts.map +1 -0
- package/dist/utils/quote-metadata/calculators.mjs +323 -0
- package/dist/utils/quote-metadata/calculators.mjs.map +1 -0
- package/dist/utils/quote-metadata/merge.cjs +38 -0
- package/dist/utils/quote-metadata/merge.cjs.map +1 -0
- package/dist/utils/quote-metadata/merge.d.cts +12 -0
- package/dist/utils/quote-metadata/merge.d.cts.map +1 -0
- package/dist/utils/quote-metadata/merge.d.mts +12 -0
- package/dist/utils/quote-metadata/merge.d.mts.map +1 -0
- package/dist/utils/quote-metadata/merge.mjs +35 -0
- package/dist/utils/quote-metadata/merge.mjs.map +1 -0
- package/dist/utils/quote-metadata/to-normalized-amounts.cjs +38 -0
- package/dist/utils/quote-metadata/to-normalized-amounts.cjs.map +1 -0
- package/dist/utils/quote-metadata/to-normalized-amounts.d.cts +10 -0
- package/dist/utils/quote-metadata/to-normalized-amounts.d.cts.map +1 -0
- package/dist/utils/quote-metadata/to-normalized-amounts.d.mts +10 -0
- package/dist/utils/quote-metadata/to-normalized-amounts.d.mts.map +1 -0
- package/dist/utils/quote-metadata/to-normalized-amounts.mjs +34 -0
- package/dist/utils/quote-metadata/to-normalized-amounts.mjs.map +1 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v1.cjs +39 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v1.cjs.map +1 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v1.d.cts +13 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v1.d.cts.map +1 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v1.d.mts +13 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v1.d.mts.map +1 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v1.mjs +36 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v1.mjs.map +1 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v2.cjs +94 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v2.cjs.map +1 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v2.d.cts +12 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v2.d.cts.map +1 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v2.d.mts +12 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v2.d.mts.map +1 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v2.mjs +90 -0
- package/dist/utils/quote-metadata/to-quote-metadata-v2.mjs.map +1 -0
- package/dist/utils/quote-metadata/types.cjs +3 -0
- package/dist/utils/quote-metadata/types.cjs.map +1 -0
- package/dist/utils/quote-metadata/types.d.cts +87 -0
- package/dist/utils/quote-metadata/types.d.cts.map +1 -0
- package/dist/utils/quote-metadata/types.d.mts +87 -0
- package/dist/utils/quote-metadata/types.d.mts.map +1 -0
- package/dist/utils/quote-metadata/types.mjs +2 -0
- package/dist/utils/quote-metadata/types.mjs.map +1 -0
- package/dist/utils/slippage.d.cts +1 -1
- package/dist/utils/slippage.d.mts +1 -1
- package/dist/utils/sort-quotes.cjs +16 -0
- package/dist/utils/sort-quotes.cjs.map +1 -0
- package/dist/utils/sort-quotes.d.cts +4 -0
- package/dist/utils/sort-quotes.d.cts.map +1 -0
- package/dist/utils/sort-quotes.d.mts +4 -0
- package/dist/utils/sort-quotes.d.mts.map +1 -0
- package/dist/utils/sort-quotes.mjs +12 -0
- package/dist/utils/sort-quotes.mjs.map +1 -0
- package/dist/validators/amount-and-asset.cjs +27 -0
- package/dist/validators/amount-and-asset.cjs.map +1 -0
- package/dist/validators/amount-and-asset.d.cts +62 -0
- package/dist/validators/amount-and-asset.d.cts.map +1 -0
- package/dist/validators/amount-and-asset.d.mts +62 -0
- package/dist/validators/amount-and-asset.d.mts.map +1 -0
- package/dist/validators/amount-and-asset.mjs +24 -0
- package/dist/validators/amount-and-asset.mjs.map +1 -0
- package/dist/validators/batch-sell.d.cts +8 -8
- package/dist/validators/batch-sell.d.mts +8 -8
- package/dist/validators/bridge-asset.cjs +65 -1
- package/dist/validators/bridge-asset.cjs.map +1 -1
- package/dist/validators/bridge-asset.d.cts +99 -5
- package/dist/validators/bridge-asset.d.cts.map +1 -1
- package/dist/validators/bridge-asset.d.mts +99 -5
- package/dist/validators/bridge-asset.d.mts.map +1 -1
- package/dist/validators/bridge-asset.mjs +64 -1
- package/dist/validators/bridge-asset.mjs.map +1 -1
- package/dist/validators/feature-flags.d.cts +5 -5
- package/dist/validators/feature-flags.d.mts +5 -5
- package/dist/validators/intent.d.cts +3 -3
- package/dist/validators/intent.d.mts +3 -3
- package/dist/validators/quote-request.cjs +57 -0
- package/dist/validators/quote-request.cjs.map +1 -0
- package/dist/validators/quote-request.d.cts +4 -0
- package/dist/validators/quote-request.d.cts.map +1 -0
- package/dist/validators/quote-request.d.mts +4 -0
- package/dist/validators/quote-request.d.mts.map +1 -0
- package/dist/validators/quote-request.mjs +52 -0
- package/dist/validators/quote-request.mjs.map +1 -0
- package/dist/validators/quote-response-v1.d.cts +179 -176
- package/dist/validators/quote-response-v1.d.cts.map +1 -1
- package/dist/validators/quote-response-v1.d.mts +179 -176
- package/dist/validators/quote-response-v1.d.mts.map +1 -1
- package/dist/validators/quote-response.cjs +116 -0
- package/dist/validators/quote-response.cjs.map +1 -0
- package/dist/validators/quote-response.d.cts +1979 -0
- package/dist/validators/quote-response.d.cts.map +1 -0
- package/dist/validators/quote-response.d.mts +1979 -0
- package/dist/validators/quote-response.d.mts.map +1 -0
- package/dist/validators/quote-response.mjs +112 -0
- package/dist/validators/quote-response.mjs.map +1 -0
- package/dist/validators/quote.cjs +75 -2
- package/dist/validators/quote.cjs.map +1 -1
- package/dist/validators/quote.d.cts +407 -44
- package/dist/validators/quote.d.cts.map +1 -1
- package/dist/validators/quote.d.mts +407 -44
- package/dist/validators/quote.d.mts.map +1 -1
- package/dist/validators/quote.mjs +76 -3
- package/dist/validators/quote.mjs.map +1 -1
- package/dist/validators/step.cjs +7 -1
- package/dist/validators/step.cjs.map +1 -1
- package/dist/validators/step.d.cts +197 -26
- package/dist/validators/step.d.cts.map +1 -1
- package/dist/validators/step.d.mts +197 -26
- package/dist/validators/step.d.mts.map +1 -1
- package/dist/validators/step.mjs +7 -1
- package/dist/validators/step.mjs.map +1 -1
- package/dist/validators/token-feature.d.cts +2 -2
- package/dist/validators/token-feature.d.mts +2 -2
- package/dist/validators/trade.d.cts +2 -2
- package/dist/validators/trade.d.mts +2 -2
- package/package.json +8 -8
- package/dist/utils/quote.cjs +0 -368
- package/dist/utils/quote.cjs.map +0 -1
- package/dist/utils/quote.d.cts +0 -98
- package/dist/utils/quote.d.cts.map +0 -1
- package/dist/utils/quote.d.mts +0 -98
- package/dist/utils/quote.d.mts.map +0 -1
- package/dist/utils/quote.mjs +0 -347
- package/dist/utils/quote.mjs.map +0 -1
|
@@ -16,12 +16,12 @@ export declare const FeeDataSchema: import("@metamask/superstruct").Struct<{
|
|
|
16
16
|
asset: {
|
|
17
17
|
symbol: string;
|
|
18
18
|
chainId: number;
|
|
19
|
-
address: string;
|
|
20
|
-
assetId: `${string}:${string}/${string}:${string}`;
|
|
21
19
|
name: string;
|
|
20
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
22
21
|
decimals: number;
|
|
23
|
-
|
|
22
|
+
address: string;
|
|
24
23
|
iconUrl?: string | null | undefined;
|
|
24
|
+
icon?: string | null | undefined;
|
|
25
25
|
};
|
|
26
26
|
discountType?: string | null | undefined;
|
|
27
27
|
}, {
|
|
@@ -29,14 +29,16 @@ export declare const FeeDataSchema: import("@metamask/superstruct").Struct<{
|
|
|
29
29
|
asset: import("@metamask/superstruct").Struct<{
|
|
30
30
|
symbol: string;
|
|
31
31
|
chainId: number;
|
|
32
|
-
address: string;
|
|
33
|
-
assetId: `${string}:${string}/${string}:${string}`;
|
|
34
32
|
name: string;
|
|
33
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
35
34
|
decimals: number;
|
|
36
|
-
|
|
35
|
+
address: string;
|
|
37
36
|
iconUrl?: string | null | undefined;
|
|
37
|
+
icon?: string | null | undefined;
|
|
38
38
|
}, {
|
|
39
|
-
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
39
|
+
chainId: import("@metamask/superstruct").Struct<number, null>; /**
|
|
40
|
+
* The amount received, in atomic amount
|
|
41
|
+
*/
|
|
40
42
|
address: import("@metamask/superstruct").Struct<string, null>;
|
|
41
43
|
assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
|
|
42
44
|
symbol: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -76,42 +78,40 @@ export declare const QuoteSchema: import("@metamask/superstruct").Struct<{
|
|
|
76
78
|
} & {
|
|
77
79
|
srcChainId: number;
|
|
78
80
|
destChainId: number;
|
|
81
|
+
srcTokenAmount: string;
|
|
79
82
|
srcAsset: {
|
|
80
83
|
symbol: string;
|
|
81
84
|
chainId: number;
|
|
82
|
-
address: string;
|
|
83
|
-
assetId: `${string}:${string}/${string}:${string}`;
|
|
84
85
|
name: string;
|
|
86
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
85
87
|
decimals: number;
|
|
86
|
-
|
|
88
|
+
address: string;
|
|
87
89
|
iconUrl?: string | null | undefined;
|
|
90
|
+
icon?: string | null | undefined;
|
|
88
91
|
};
|
|
89
92
|
destAsset: {
|
|
90
93
|
symbol: string;
|
|
91
94
|
chainId: number;
|
|
92
|
-
address: string;
|
|
93
|
-
assetId: `${string}:${string}/${string}:${string}`;
|
|
94
95
|
name: string;
|
|
96
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
95
97
|
decimals: number;
|
|
96
|
-
|
|
98
|
+
address: string;
|
|
97
99
|
iconUrl?: string | null | undefined;
|
|
100
|
+
icon?: string | null | undefined;
|
|
98
101
|
};
|
|
99
102
|
requestId: string;
|
|
100
|
-
srcTokenAmount: string;
|
|
101
|
-
destTokenAmount: string;
|
|
102
|
-
minDestTokenAmount: string;
|
|
103
103
|
feeData: {
|
|
104
104
|
metabridge: {
|
|
105
105
|
amount: string;
|
|
106
106
|
asset: {
|
|
107
107
|
symbol: string;
|
|
108
108
|
chainId: number;
|
|
109
|
-
address: string;
|
|
110
|
-
assetId: `${string}:${string}/${string}:${string}`;
|
|
111
109
|
name: string;
|
|
110
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
112
111
|
decimals: number;
|
|
113
|
-
|
|
112
|
+
address: string;
|
|
114
113
|
iconUrl?: string | null | undefined;
|
|
114
|
+
icon?: string | null | undefined;
|
|
115
115
|
};
|
|
116
116
|
discountType?: string | null | undefined;
|
|
117
117
|
} & {
|
|
@@ -123,12 +123,12 @@ export declare const QuoteSchema: import("@metamask/superstruct").Struct<{
|
|
|
123
123
|
asset: {
|
|
124
124
|
symbol: string;
|
|
125
125
|
chainId: number;
|
|
126
|
-
address: string;
|
|
127
|
-
assetId: `${string}:${string}/${string}:${string}`;
|
|
128
126
|
name: string;
|
|
127
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
129
128
|
decimals: number;
|
|
130
|
-
|
|
129
|
+
address: string;
|
|
131
130
|
iconUrl?: string | null | undefined;
|
|
131
|
+
icon?: string | null | undefined;
|
|
132
132
|
};
|
|
133
133
|
discountType?: string | null | undefined;
|
|
134
134
|
} & {
|
|
@@ -136,64 +136,71 @@ export declare const QuoteSchema: import("@metamask/superstruct").Struct<{
|
|
|
136
136
|
maxPriorityFeePerGas: string;
|
|
137
137
|
}) | undefined;
|
|
138
138
|
};
|
|
139
|
-
bridgeId: string;
|
|
140
|
-
bridges: string[];
|
|
141
139
|
steps: {
|
|
142
|
-
action: import("./step.cjs").ActionTypes;
|
|
143
140
|
srcChainId: number;
|
|
141
|
+
action: import("./step.cjs").ActionTypes;
|
|
144
142
|
destChainId?: number | undefined;
|
|
145
143
|
srcAsset?: {
|
|
146
144
|
symbol: string;
|
|
147
145
|
chainId: number;
|
|
148
|
-
address: string;
|
|
149
|
-
assetId: `${string}:${string}/${string}:${string}`;
|
|
150
146
|
name: string;
|
|
147
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
151
148
|
decimals: number;
|
|
152
|
-
|
|
149
|
+
address: string;
|
|
153
150
|
iconUrl?: string | null | undefined;
|
|
151
|
+
icon?: string | null | undefined;
|
|
154
152
|
} | undefined;
|
|
155
153
|
destAsset?: {
|
|
156
154
|
symbol: string;
|
|
157
155
|
chainId: number;
|
|
158
|
-
address: string;
|
|
159
|
-
assetId: `${string}:${string}/${string}:${string}`;
|
|
160
156
|
name: string;
|
|
157
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
161
158
|
decimals: number;
|
|
162
|
-
|
|
159
|
+
address: string;
|
|
163
160
|
iconUrl?: string | null | undefined;
|
|
161
|
+
icon?: string | null | undefined;
|
|
164
162
|
} | undefined;
|
|
165
163
|
}[];
|
|
164
|
+
destTokenAmount: string;
|
|
165
|
+
minDestTokenAmount: string;
|
|
166
|
+
bridgeId: string;
|
|
167
|
+
bridges: string[];
|
|
168
|
+
walletAddress?: string | undefined;
|
|
169
|
+
destWalletAddress?: string | undefined;
|
|
170
|
+
slippage?: number | undefined;
|
|
166
171
|
refuel?: {
|
|
167
|
-
action: import("./step.cjs").ActionTypes;
|
|
168
172
|
srcChainId: number;
|
|
173
|
+
action: import("./step.cjs").ActionTypes;
|
|
169
174
|
destChainId?: number | undefined;
|
|
170
175
|
srcAsset?: {
|
|
171
176
|
symbol: string;
|
|
172
177
|
chainId: number;
|
|
173
|
-
address: string;
|
|
174
|
-
assetId: `${string}:${string}/${string}:${string}`;
|
|
175
178
|
name: string;
|
|
179
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
176
180
|
decimals: number;
|
|
177
|
-
|
|
181
|
+
address: string;
|
|
178
182
|
iconUrl?: string | null | undefined;
|
|
183
|
+
icon?: string | null | undefined;
|
|
179
184
|
} | undefined;
|
|
180
185
|
destAsset?: {
|
|
181
186
|
symbol: string;
|
|
182
187
|
chainId: number;
|
|
183
|
-
address: string;
|
|
184
|
-
assetId: `${string}:${string}/${string}:${string}`;
|
|
185
188
|
name: string;
|
|
189
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
186
190
|
decimals: number;
|
|
187
|
-
|
|
191
|
+
address: string;
|
|
188
192
|
iconUrl?: string | null | undefined;
|
|
193
|
+
icon?: string | null | undefined;
|
|
189
194
|
} | undefined;
|
|
190
195
|
} | undefined;
|
|
191
196
|
priceData?: {
|
|
197
|
+
priceImpact?: string | undefined;
|
|
192
198
|
totalFromAmountUsd?: string | undefined;
|
|
193
199
|
totalToAmountUsd?: string | undefined;
|
|
194
|
-
priceImpact?: string | undefined;
|
|
195
200
|
totalFeeAmountUsd?: string | undefined;
|
|
196
201
|
} | undefined;
|
|
202
|
+
aggregator?: string | undefined;
|
|
203
|
+
protocols?: string[] | undefined;
|
|
197
204
|
intent?: {
|
|
198
205
|
protocol: string;
|
|
199
206
|
order: {
|
|
@@ -205,10 +212,10 @@ export declare const QuoteSchema: import("@metamask/superstruct").Struct<{
|
|
|
205
212
|
feeAmount: string;
|
|
206
213
|
kind: "sell" | "buy";
|
|
207
214
|
partiallyFillable: boolean;
|
|
208
|
-
from?: `0x${string}` | undefined;
|
|
209
215
|
receiver?: `0x${string}` | undefined;
|
|
210
216
|
sellAmount?: string | undefined;
|
|
211
217
|
buyAmount?: string | undefined;
|
|
218
|
+
from?: `0x${string}` | undefined;
|
|
212
219
|
};
|
|
213
220
|
typedData: {
|
|
214
221
|
types: Record<string, {
|
|
@@ -221,10 +228,366 @@ export declare const QuoteSchema: import("@metamask/superstruct").Struct<{
|
|
|
221
228
|
};
|
|
222
229
|
settlementContract?: `0x${string}` | undefined;
|
|
223
230
|
} | undefined;
|
|
224
|
-
walletAddress?: string | undefined;
|
|
225
|
-
destWalletAddress?: string | undefined;
|
|
226
|
-
slippage?: number | undefined;
|
|
227
|
-
protocols?: string[] | undefined;
|
|
228
231
|
}, null>;
|
|
229
232
|
export type Quote = Infer<typeof QuoteSchema>;
|
|
233
|
+
export declare const QuoteSchemaV2: import("@metamask/superstruct").Struct<{
|
|
234
|
+
gasIncluded?: boolean | undefined;
|
|
235
|
+
gasIncluded7702?: boolean | undefined;
|
|
236
|
+
gasSponsored?: boolean | undefined;
|
|
237
|
+
} & {
|
|
238
|
+
src: {
|
|
239
|
+
amount: string;
|
|
240
|
+
asset: {
|
|
241
|
+
symbol: string;
|
|
242
|
+
name: string;
|
|
243
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
244
|
+
decimals: number;
|
|
245
|
+
} & {
|
|
246
|
+
isVerified?: boolean | undefined;
|
|
247
|
+
securityData?: {
|
|
248
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
249
|
+
metadata?: {
|
|
250
|
+
features: {
|
|
251
|
+
featureId: string;
|
|
252
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
253
|
+
description: string;
|
|
254
|
+
}[];
|
|
255
|
+
} | undefined;
|
|
256
|
+
} | undefined;
|
|
257
|
+
} & {
|
|
258
|
+
iconUrl?: string | null | undefined;
|
|
259
|
+
noFee?: {
|
|
260
|
+
isDestination?: boolean | null | undefined;
|
|
261
|
+
isSource?: boolean | null | undefined;
|
|
262
|
+
} | undefined;
|
|
263
|
+
};
|
|
264
|
+
normalizedAmount?: string | undefined;
|
|
265
|
+
usd?: string | null | undefined;
|
|
266
|
+
valueInCurrency?: string | null | undefined;
|
|
267
|
+
} & {
|
|
268
|
+
walletAddress?: string | undefined;
|
|
269
|
+
};
|
|
270
|
+
dest: {
|
|
271
|
+
amount: string;
|
|
272
|
+
asset: {
|
|
273
|
+
symbol: string;
|
|
274
|
+
name: string;
|
|
275
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
276
|
+
decimals: number;
|
|
277
|
+
} & {
|
|
278
|
+
isVerified?: boolean | undefined;
|
|
279
|
+
securityData?: {
|
|
280
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
281
|
+
metadata?: {
|
|
282
|
+
features: {
|
|
283
|
+
featureId: string;
|
|
284
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
285
|
+
description: string;
|
|
286
|
+
}[];
|
|
287
|
+
} | undefined;
|
|
288
|
+
} | undefined;
|
|
289
|
+
} & {
|
|
290
|
+
iconUrl?: string | null | undefined;
|
|
291
|
+
noFee?: {
|
|
292
|
+
isDestination?: boolean | null | undefined;
|
|
293
|
+
isSource?: boolean | null | undefined;
|
|
294
|
+
} | undefined;
|
|
295
|
+
};
|
|
296
|
+
normalizedAmount?: string | undefined;
|
|
297
|
+
usd?: string | null | undefined;
|
|
298
|
+
valueInCurrency?: string | null | undefined;
|
|
299
|
+
} & {
|
|
300
|
+
walletAddress?: string | undefined;
|
|
301
|
+
minAmount?: string | undefined;
|
|
302
|
+
minAmountUsd?: string | undefined;
|
|
303
|
+
minAmountValueInCurrency?: string | undefined;
|
|
304
|
+
minAmountNormalized?: string | undefined;
|
|
305
|
+
};
|
|
306
|
+
requestId: string;
|
|
307
|
+
feeData: {
|
|
308
|
+
metabridge: ({
|
|
309
|
+
amount: string;
|
|
310
|
+
asset: {
|
|
311
|
+
symbol: string;
|
|
312
|
+
name: string;
|
|
313
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
314
|
+
decimals: number;
|
|
315
|
+
} & {
|
|
316
|
+
isVerified?: boolean | undefined;
|
|
317
|
+
securityData?: {
|
|
318
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
319
|
+
metadata?: {
|
|
320
|
+
features: {
|
|
321
|
+
featureId: string;
|
|
322
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
323
|
+
description: string;
|
|
324
|
+
}[];
|
|
325
|
+
} | undefined;
|
|
326
|
+
} | undefined;
|
|
327
|
+
} & {
|
|
328
|
+
iconUrl?: string | null | undefined;
|
|
329
|
+
noFee?: {
|
|
330
|
+
isDestination?: boolean | null | undefined;
|
|
331
|
+
isSource?: boolean | null | undefined;
|
|
332
|
+
} | undefined;
|
|
333
|
+
};
|
|
334
|
+
normalizedAmount?: string | undefined;
|
|
335
|
+
usd?: string | null | undefined;
|
|
336
|
+
valueInCurrency?: string | null | undefined;
|
|
337
|
+
} & {
|
|
338
|
+
quoteBpsFee?: number | undefined;
|
|
339
|
+
baseBpsFee?: number | undefined;
|
|
340
|
+
discountType?: string | null | undefined;
|
|
341
|
+
})[];
|
|
342
|
+
refuel?: {
|
|
343
|
+
amount: string;
|
|
344
|
+
asset: {
|
|
345
|
+
symbol: string;
|
|
346
|
+
name: string;
|
|
347
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
348
|
+
decimals: number;
|
|
349
|
+
} & {
|
|
350
|
+
isVerified?: boolean | undefined;
|
|
351
|
+
securityData?: {
|
|
352
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
353
|
+
metadata?: {
|
|
354
|
+
features: {
|
|
355
|
+
featureId: string;
|
|
356
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
357
|
+
description: string;
|
|
358
|
+
}[];
|
|
359
|
+
} | undefined;
|
|
360
|
+
} | undefined;
|
|
361
|
+
} & {
|
|
362
|
+
iconUrl?: string | null | undefined;
|
|
363
|
+
noFee?: {
|
|
364
|
+
isDestination?: boolean | null | undefined;
|
|
365
|
+
isSource?: boolean | null | undefined;
|
|
366
|
+
} | undefined;
|
|
367
|
+
};
|
|
368
|
+
normalizedAmount?: string | undefined;
|
|
369
|
+
usd?: string | null | undefined;
|
|
370
|
+
valueInCurrency?: string | null | undefined;
|
|
371
|
+
}[] | undefined;
|
|
372
|
+
txFee?: ({
|
|
373
|
+
amount: string;
|
|
374
|
+
asset: {
|
|
375
|
+
symbol: string;
|
|
376
|
+
name: string;
|
|
377
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
378
|
+
decimals: number;
|
|
379
|
+
} & {
|
|
380
|
+
isVerified?: boolean | undefined;
|
|
381
|
+
securityData?: {
|
|
382
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
383
|
+
metadata?: {
|
|
384
|
+
features: {
|
|
385
|
+
featureId: string;
|
|
386
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
387
|
+
description: string;
|
|
388
|
+
}[];
|
|
389
|
+
} | undefined;
|
|
390
|
+
} | undefined;
|
|
391
|
+
} & {
|
|
392
|
+
iconUrl?: string | null | undefined;
|
|
393
|
+
noFee?: {
|
|
394
|
+
isDestination?: boolean | null | undefined;
|
|
395
|
+
isSource?: boolean | null | undefined;
|
|
396
|
+
} | undefined;
|
|
397
|
+
};
|
|
398
|
+
normalizedAmount?: string | undefined;
|
|
399
|
+
usd?: string | null | undefined;
|
|
400
|
+
valueInCurrency?: string | null | undefined;
|
|
401
|
+
} & {
|
|
402
|
+
maxFeePerGas: string;
|
|
403
|
+
maxPriorityFeePerGas: string;
|
|
404
|
+
})[] | undefined;
|
|
405
|
+
network?: {
|
|
406
|
+
amount: string;
|
|
407
|
+
asset: {
|
|
408
|
+
symbol: string;
|
|
409
|
+
name: string;
|
|
410
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
411
|
+
decimals: number;
|
|
412
|
+
} & {
|
|
413
|
+
isVerified?: boolean | undefined;
|
|
414
|
+
securityData?: {
|
|
415
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
416
|
+
metadata?: {
|
|
417
|
+
features: {
|
|
418
|
+
featureId: string;
|
|
419
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
420
|
+
description: string;
|
|
421
|
+
}[];
|
|
422
|
+
} | undefined;
|
|
423
|
+
} | undefined;
|
|
424
|
+
} & {
|
|
425
|
+
iconUrl?: string | null | undefined;
|
|
426
|
+
noFee?: {
|
|
427
|
+
isDestination?: boolean | null | undefined;
|
|
428
|
+
isSource?: boolean | null | undefined;
|
|
429
|
+
} | undefined;
|
|
430
|
+
};
|
|
431
|
+
normalizedAmount?: string | undefined;
|
|
432
|
+
usd?: string | null | undefined;
|
|
433
|
+
valueInCurrency?: string | null | undefined;
|
|
434
|
+
}[] | undefined;
|
|
435
|
+
relayer?: {
|
|
436
|
+
amount: string;
|
|
437
|
+
asset: {
|
|
438
|
+
symbol: string;
|
|
439
|
+
name: string;
|
|
440
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
441
|
+
decimals: number;
|
|
442
|
+
} & {
|
|
443
|
+
isVerified?: boolean | undefined;
|
|
444
|
+
securityData?: {
|
|
445
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
446
|
+
metadata?: {
|
|
447
|
+
features: {
|
|
448
|
+
featureId: string;
|
|
449
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
450
|
+
description: string;
|
|
451
|
+
}[];
|
|
452
|
+
} | undefined;
|
|
453
|
+
} | undefined;
|
|
454
|
+
} & {
|
|
455
|
+
iconUrl?: string | null | undefined;
|
|
456
|
+
noFee?: {
|
|
457
|
+
isDestination?: boolean | null | undefined;
|
|
458
|
+
isSource?: boolean | null | undefined;
|
|
459
|
+
} | undefined;
|
|
460
|
+
};
|
|
461
|
+
normalizedAmount?: string | undefined;
|
|
462
|
+
usd?: string | null | undefined;
|
|
463
|
+
valueInCurrency?: string | null | undefined;
|
|
464
|
+
}[] | undefined;
|
|
465
|
+
};
|
|
466
|
+
aggregator: string;
|
|
467
|
+
protocols: string[];
|
|
468
|
+
slippage?: number | undefined;
|
|
469
|
+
refuel?: {
|
|
470
|
+
srcChainId: number;
|
|
471
|
+
action: import("./step.cjs").ActionTypes;
|
|
472
|
+
destChainId?: number | undefined;
|
|
473
|
+
srcAsset?: {
|
|
474
|
+
symbol: string;
|
|
475
|
+
chainId: number;
|
|
476
|
+
name: string;
|
|
477
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
478
|
+
decimals: number;
|
|
479
|
+
address: string;
|
|
480
|
+
iconUrl?: string | null | undefined;
|
|
481
|
+
icon?: string | null | undefined;
|
|
482
|
+
} | undefined;
|
|
483
|
+
destAsset?: {
|
|
484
|
+
symbol: string;
|
|
485
|
+
chainId: number;
|
|
486
|
+
name: string;
|
|
487
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
488
|
+
decimals: number;
|
|
489
|
+
address: string;
|
|
490
|
+
iconUrl?: string | null | undefined;
|
|
491
|
+
icon?: string | null | undefined;
|
|
492
|
+
} | undefined;
|
|
493
|
+
} | undefined;
|
|
494
|
+
priceData?: {
|
|
495
|
+
swapRate?: string | undefined;
|
|
496
|
+
priceImpact?: {
|
|
497
|
+
amount?: string | null | undefined;
|
|
498
|
+
usd?: string | null | undefined;
|
|
499
|
+
valueInCurrency?: string | undefined;
|
|
500
|
+
} | undefined;
|
|
501
|
+
cost?: {
|
|
502
|
+
usd?: string | null | undefined;
|
|
503
|
+
valueInCurrency?: string | null | undefined;
|
|
504
|
+
} | undefined;
|
|
505
|
+
adjustedReturn?: {
|
|
506
|
+
usd?: string | null | undefined;
|
|
507
|
+
valueInCurrency?: string | null | undefined;
|
|
508
|
+
} | undefined;
|
|
509
|
+
} | undefined;
|
|
510
|
+
steps?: {
|
|
511
|
+
action: import("./step.cjs").ActionTypes;
|
|
512
|
+
src: {
|
|
513
|
+
asset: {
|
|
514
|
+
symbol: string;
|
|
515
|
+
name: string;
|
|
516
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
517
|
+
decimals: number;
|
|
518
|
+
} & {
|
|
519
|
+
isVerified?: boolean | undefined;
|
|
520
|
+
securityData?: {
|
|
521
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
522
|
+
metadata?: {
|
|
523
|
+
features: {
|
|
524
|
+
featureId: string;
|
|
525
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
526
|
+
description: string;
|
|
527
|
+
}[];
|
|
528
|
+
} | undefined;
|
|
529
|
+
} | undefined;
|
|
530
|
+
} & {
|
|
531
|
+
iconUrl?: string | null | undefined;
|
|
532
|
+
noFee?: {
|
|
533
|
+
isDestination?: boolean | null | undefined;
|
|
534
|
+
isSource?: boolean | null | undefined;
|
|
535
|
+
} | undefined;
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
dest: {
|
|
539
|
+
asset: {
|
|
540
|
+
symbol: string;
|
|
541
|
+
name: string;
|
|
542
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
543
|
+
decimals: number;
|
|
544
|
+
} & {
|
|
545
|
+
isVerified?: boolean | undefined;
|
|
546
|
+
securityData?: {
|
|
547
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
548
|
+
metadata?: {
|
|
549
|
+
features: {
|
|
550
|
+
featureId: string;
|
|
551
|
+
type: import("./bridge-asset.cjs").BridgeAssetSecurityDataType;
|
|
552
|
+
description: string;
|
|
553
|
+
}[];
|
|
554
|
+
} | undefined;
|
|
555
|
+
} | undefined;
|
|
556
|
+
} & {
|
|
557
|
+
iconUrl?: string | null | undefined;
|
|
558
|
+
noFee?: {
|
|
559
|
+
isDestination?: boolean | null | undefined;
|
|
560
|
+
isSource?: boolean | null | undefined;
|
|
561
|
+
} | undefined;
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
}[] | undefined;
|
|
565
|
+
intent?: {
|
|
566
|
+
protocol: string;
|
|
567
|
+
order: {
|
|
568
|
+
sellToken: `0x${string}`;
|
|
569
|
+
buyToken: `0x${string}`;
|
|
570
|
+
validTo: string | number;
|
|
571
|
+
appData: string;
|
|
572
|
+
appDataHash: `0x${string}`;
|
|
573
|
+
feeAmount: string;
|
|
574
|
+
kind: "sell" | "buy";
|
|
575
|
+
partiallyFillable: boolean;
|
|
576
|
+
receiver?: `0x${string}` | undefined;
|
|
577
|
+
sellAmount?: string | undefined;
|
|
578
|
+
buyAmount?: string | undefined;
|
|
579
|
+
from?: `0x${string}` | undefined;
|
|
580
|
+
};
|
|
581
|
+
typedData: {
|
|
582
|
+
types: Record<string, {
|
|
583
|
+
name: string;
|
|
584
|
+
type: string;
|
|
585
|
+
}[]>;
|
|
586
|
+
primaryType: string;
|
|
587
|
+
domain: Record<string, any>;
|
|
588
|
+
message: Record<string, any>;
|
|
589
|
+
};
|
|
590
|
+
settlementContract?: `0x${string}` | undefined;
|
|
591
|
+
} | undefined;
|
|
592
|
+
}, null>;
|
|
230
593
|
//# sourceMappingURL=quote.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.d.cts","sourceRoot":"","sources":["../../src/validators/quote.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;
|
|
1
|
+
{"version":3,"file":"quote.d.cts","sourceRoot":"","sources":["../../src/validators/quote.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAYnD,oBAAY,OAAO;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IAEjB,MAAM,UAAU;IAChB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,YAAY;IACtB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;uEAoCtB;;WAEG;;;;;;;;;;EAlCL,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;EAG/B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;IAElC;;OAEG;;IAEH;;OAEG;;EAEH,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA0DtB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAE9C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAgFxB,CAAC"}
|