@0xsquid/squid-types 0.1.90 → 0.1.92
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/quote/index.d.ts +2 -2
- package/dist/routes/index.d.ts +76 -3
- package/dist/routes/index.js +10 -1
- package/dist/routes/index.js.map +1 -1
- package/package.json +1 -1
package/dist/quote/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionStage, BridgeDetails, CustomCallDetails, SwapDetails, PathAction, WrapDetails } from "../index";
|
|
1
|
+
import { ActionStage, BridgeDetails, CustomCallDetails, SwapDetails, PathAction, WrapDetails, FeeDetails } from "../index";
|
|
2
2
|
export interface Quote {
|
|
3
3
|
actions: QuoteAction[];
|
|
4
4
|
fromAmount: string;
|
|
@@ -19,5 +19,5 @@ export interface QuoteAction extends Omit<PathAction, "data"> {
|
|
|
19
19
|
exchangeRate: string;
|
|
20
20
|
priceImpact: string;
|
|
21
21
|
stage?: ActionStage;
|
|
22
|
-
data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails;
|
|
22
|
+
data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails | FeeDetails;
|
|
23
23
|
}
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Dex, DexName } from "../dexes";
|
|
|
3
3
|
import { FeeCost, GasCost } from "../fees";
|
|
4
4
|
import { QuoteAction } from "../quote";
|
|
5
5
|
import { ChainCall, SquidData } from "../squid";
|
|
6
|
-
import { Token } from "../tokens";
|
|
6
|
+
import { Token, Volatility } from "../tokens";
|
|
7
7
|
import { WrapDirection, WrapperType } from "../wrappers";
|
|
8
8
|
import { BridgeType } from "../bridges";
|
|
9
9
|
export interface RouteResponse {
|
|
@@ -81,14 +81,15 @@ export interface RouteAction extends QuoteAction {
|
|
|
81
81
|
description?: string;
|
|
82
82
|
logoURI?: string;
|
|
83
83
|
estimatedDuration?: number;
|
|
84
|
-
data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails;
|
|
84
|
+
data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails | FeeDetails;
|
|
85
85
|
}
|
|
86
86
|
export declare enum ActionType {
|
|
87
87
|
SWAP = "swap",
|
|
88
88
|
WRAP = "wrap",
|
|
89
89
|
BRIDGE = "bridge",
|
|
90
90
|
IBC_TRANSFER = "ibc-transfer",
|
|
91
|
-
CUSTOM = "custom"
|
|
91
|
+
CUSTOM = "custom",
|
|
92
|
+
FEE = "fee"
|
|
92
93
|
}
|
|
93
94
|
export interface WrapDetails {
|
|
94
95
|
target: string;
|
|
@@ -143,6 +144,78 @@ export interface CustomCallDetails {
|
|
|
143
144
|
provider?: string;
|
|
144
145
|
calls: ChainCall[];
|
|
145
146
|
}
|
|
147
|
+
export interface Integrator {
|
|
148
|
+
id: string;
|
|
149
|
+
enabled: boolean;
|
|
150
|
+
}
|
|
151
|
+
export declare enum FEES_ENUM {
|
|
152
|
+
PLATFORM = "PLATFORM",
|
|
153
|
+
INTEGRATOR = "INTEGRATOR",
|
|
154
|
+
CHAIN = "CHAIN",
|
|
155
|
+
TOKEN = "TOKEN",
|
|
156
|
+
TIER = "TIER"
|
|
157
|
+
}
|
|
158
|
+
export interface PlatformFee {
|
|
159
|
+
type: FEES_ENUM.PLATFORM;
|
|
160
|
+
flat: number;
|
|
161
|
+
percentage: number;
|
|
162
|
+
enabled: boolean;
|
|
163
|
+
address: string;
|
|
164
|
+
}
|
|
165
|
+
export interface IntegratorFee {
|
|
166
|
+
type: FEES_ENUM.INTEGRATOR;
|
|
167
|
+
flat: number;
|
|
168
|
+
percentage: number;
|
|
169
|
+
flat2?: number;
|
|
170
|
+
percentage2?: number;
|
|
171
|
+
squidFlat: number;
|
|
172
|
+
squidPercentage: number;
|
|
173
|
+
enabled: boolean;
|
|
174
|
+
waivePlatformFee: boolean;
|
|
175
|
+
address: string;
|
|
176
|
+
address2?: string;
|
|
177
|
+
integrator?: Integrator;
|
|
178
|
+
}
|
|
179
|
+
export interface ChainFee {
|
|
180
|
+
type: FEES_ENUM.CHAIN;
|
|
181
|
+
flat: number;
|
|
182
|
+
percentage: number;
|
|
183
|
+
enabled: boolean;
|
|
184
|
+
waivePlatformFee: boolean;
|
|
185
|
+
chain?: ChainData;
|
|
186
|
+
}
|
|
187
|
+
export interface TokenFee {
|
|
188
|
+
type: FEES_ENUM.TOKEN;
|
|
189
|
+
flat: number;
|
|
190
|
+
percentage: number;
|
|
191
|
+
enabled: boolean;
|
|
192
|
+
waivePlatformFee: boolean;
|
|
193
|
+
token?: Token;
|
|
194
|
+
}
|
|
195
|
+
export interface TierFee {
|
|
196
|
+
type: FEES_ENUM.TIER;
|
|
197
|
+
tier: Volatility;
|
|
198
|
+
flat: number;
|
|
199
|
+
percentage: number;
|
|
200
|
+
enabled: boolean;
|
|
201
|
+
waivePlatformFee: boolean;
|
|
202
|
+
}
|
|
203
|
+
export interface FeeDetails {
|
|
204
|
+
calls?: ChainCall[];
|
|
205
|
+
platformFee: PlatformFee;
|
|
206
|
+
integratorFee: IntegratorFee;
|
|
207
|
+
chainFee: ChainFee;
|
|
208
|
+
tokenFee: TokenFee;
|
|
209
|
+
tierFee: TierFee;
|
|
210
|
+
totalFeeAmount: bigint;
|
|
211
|
+
platformFeeAmount: bigint;
|
|
212
|
+
integratorFeeAmount: bigint;
|
|
213
|
+
integratorFee2Amount: bigint;
|
|
214
|
+
squidFeeAmount: bigint;
|
|
215
|
+
chainFeeAmount: bigint;
|
|
216
|
+
tokenFeeAmount: bigint;
|
|
217
|
+
tierFeeAmount: bigint;
|
|
218
|
+
}
|
|
146
219
|
export interface Hook {
|
|
147
220
|
chainType: ChainType;
|
|
148
221
|
fundAmount: string;
|
package/dist/routes/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActionStage = exports.ActionType = void 0;
|
|
3
|
+
exports.ActionStage = exports.FEES_ENUM = exports.ActionType = void 0;
|
|
4
4
|
var ActionType;
|
|
5
5
|
(function (ActionType) {
|
|
6
6
|
ActionType["SWAP"] = "swap";
|
|
@@ -8,7 +8,16 @@ var ActionType;
|
|
|
8
8
|
ActionType["BRIDGE"] = "bridge";
|
|
9
9
|
ActionType["IBC_TRANSFER"] = "ibc-transfer";
|
|
10
10
|
ActionType["CUSTOM"] = "custom";
|
|
11
|
+
ActionType["FEE"] = "fee";
|
|
11
12
|
})(ActionType || (exports.ActionType = ActionType = {}));
|
|
13
|
+
var FEES_ENUM;
|
|
14
|
+
(function (FEES_ENUM) {
|
|
15
|
+
FEES_ENUM["PLATFORM"] = "PLATFORM";
|
|
16
|
+
FEES_ENUM["INTEGRATOR"] = "INTEGRATOR";
|
|
17
|
+
FEES_ENUM["CHAIN"] = "CHAIN";
|
|
18
|
+
FEES_ENUM["TOKEN"] = "TOKEN";
|
|
19
|
+
FEES_ENUM["TIER"] = "TIER";
|
|
20
|
+
})(FEES_ENUM || (exports.FEES_ENUM = FEES_ENUM = {}));
|
|
12
21
|
var ActionStage;
|
|
13
22
|
(function (ActionStage) {
|
|
14
23
|
ActionStage[ActionStage["EVM_SOURCE"] = 0] = "EVM_SOURCE";
|
package/dist/routes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;;AA6FA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;;AA6FA,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,2BAAa,CAAA;IACb,+BAAiB,CAAA;IACjB,2CAA6B,CAAA;IAC7B,+BAAiB,CAAA;IACjB,yBAAW,CAAA;AACb,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAiED,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,sCAAyB,CAAA;IACzB,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,0BAAa,CAAA;AACf,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB;AAoFD,IAAY,WASX;AATD,WAAY,WAAW;IACrB,yDAAU,CAAA;IACV,mEAAe,CAAA;IACf,+DAAa,CAAA;IACb,qDAAQ,CAAA;IACR,+DAAa,CAAA;IACb,yEAAkB,CAAA;IAClB,qEAAgB,CAAA;IAChB,2DAAW,CAAA;AACb,CAAC,EATW,WAAW,2BAAX,WAAW,QAStB"}
|