@0xsquid/squid-types 0.1.16 → 0.1.17
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/dexes/index.d.ts +2 -0
- package/dist/dexes/index.js +2 -0
- package/dist/dexes/index.js.map +1 -1
- package/dist/fees/index.d.ts +3 -3
- package/dist/routes/index.d.ts +21 -2
- package/dist/routes/index.js.map +1 -1
- package/dist/wrappers/index.d.ts +5 -1
- package/dist/wrappers/index.js +6 -1
- package/dist/wrappers/index.js.map +1 -1
- package/package.json +1 -1
package/dist/dexes/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare enum DexName {
|
|
|
8
8
|
AGNI_V3 = "Agni-v3",
|
|
9
9
|
APESWAP = "Apeswap",
|
|
10
10
|
APESWAP_V3 = "Apeswap-v3",
|
|
11
|
+
BALANCER_V2 = "Balancer-v2",
|
|
11
12
|
BASESWAP = "Baseswap",
|
|
12
13
|
BEAMSWAP = "Beamswap",
|
|
13
14
|
CURVE_V2 = "Curve-v2",
|
|
@@ -55,6 +56,7 @@ export declare enum DexName {
|
|
|
55
56
|
}
|
|
56
57
|
export declare enum DexType {
|
|
57
58
|
ALGEBRA = "algebra",
|
|
59
|
+
BALANCER_V2 = "Balancer-v2",
|
|
58
60
|
CURVE = "curve",
|
|
59
61
|
GMX = "gmx",
|
|
60
62
|
KYBERSWAP_ELASTIC = "kyberswap-elastic",
|
package/dist/dexes/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var DexName;
|
|
|
7
7
|
DexName["AGNI_V3"] = "Agni-v3";
|
|
8
8
|
DexName["APESWAP"] = "Apeswap";
|
|
9
9
|
DexName["APESWAP_V3"] = "Apeswap-v3";
|
|
10
|
+
DexName["BALANCER_V2"] = "Balancer-v2";
|
|
10
11
|
DexName["BASESWAP"] = "Baseswap";
|
|
11
12
|
DexName["BEAMSWAP"] = "Beamswap";
|
|
12
13
|
DexName["CURVE_V2"] = "Curve-v2";
|
|
@@ -57,6 +58,7 @@ var DexType;
|
|
|
57
58
|
(function (DexType) {
|
|
58
59
|
// EVM
|
|
59
60
|
DexType["ALGEBRA"] = "algebra";
|
|
61
|
+
DexType["BALANCER_V2"] = "Balancer-v2";
|
|
60
62
|
DexType["CURVE"] = "curve";
|
|
61
63
|
DexType["GMX"] = "gmx";
|
|
62
64
|
DexType["KYBERSWAP_ELASTIC"] = "kyberswap-elastic";
|
package/dist/dexes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dexes/index.ts"],"names":[],"mappings":";;;AAOA,wBAAwB;AACxB,IAAY,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dexes/index.ts"],"names":[],"mappings":";;;AAOA,wBAAwB;AACxB,IAAY,OAiDX;AAjDD,WAAY,OAAO;IACjB,8BAAmB,CAAA;IACnB,8BAAmB,CAAA;IACnB,oCAAyB,CAAA;IACzB,sCAA2B,CAAA;IAC3B,gCAAqB,CAAA;IACrB,gCAAqB,CAAA;IACrB,gCAAqB,CAAA;IACrB,gCAAqB,CAAA;IACrB,kCAAuB,CAAA;IACvB,kCAAuB,CAAA;IACvB,oCAAyB,CAAA;IACzB,oCAAyB,CAAA;IACzB,sBAAW,CAAA;IACX,8BAAmB,CAAA;IACnB,oCAAyB,CAAA;IACzB,kCAAuB,CAAA;IACvB,wDAA6C,CAAA;IAC7C,kCAAuB,CAAA;IACvB,8BAAmB,CAAA;IACnB,sCAA2B,CAAA;IAC3B,4CAAiC,CAAA;IACjC,oDAAyC,CAAA;IACzC,gCAAqB,CAAA;IACrB,gCAAqB,CAAA;IACrB,kCAAuB,CAAA;IACvB,wCAA6B,CAAA;IAC7B,oCAAyB,CAAA;IACzB,oCAAyB,CAAA;IACzB,0CAA+B,CAAA;IAC/B,kDAAuC,CAAA;IACvC,kCAAuB,CAAA;IACvB,wCAA6B,CAAA;IAC7B,kCAAuB,CAAA;IACvB,wCAA6B,CAAA;IAC7B,wCAA6B,CAAA;IAC7B,0BAAe,CAAA;IACf,gCAAqB,CAAA;IACrB,kCAAuB,CAAA;IACvB,8BAAmB,CAAA;IACnB,8BAAmB,CAAA;IACnB,oCAAyB,CAAA;IACzB,oCAAyB,CAAA;IACzB,oCAAyB,CAAA;IACzB,4BAAiB,CAAA;IACjB,kCAAuB,CAAA;IACvB,wCAA6B,CAAA;IAC7B,kCAAuB,CAAA;IACvB,wCAA6B,CAAA;AAC/B,CAAC,EAjDW,OAAO,GAAP,eAAO,KAAP,eAAO,QAiDlB;AAED,2BAA2B;AAC3B,IAAY,OAsBX;AAtBD,WAAY,OAAO;IACjB,MAAM;IACN,8BAAmB,CAAA;IACnB,sCAA2B,CAAA;IAC3B,0BAAe,CAAA;IACf,sBAAW,CAAA;IACX,kDAAuC,CAAA;IACvC,gCAAqB,CAAA;IACrB,oDAAyC,CAAA;IACzC,4BAAiB,CAAA;IACjB,8BAAmB,CAAA;IACnB,8BAAmB,CAAA;IACnB,4BAAiB,CAAA;IACjB,oCAAyB,CAAA;IACzB,oCAAyB,CAAA;IACzB,SAAS;IACT,8BAAmB,CAAA;IAEnB,0DAA0D;IAC1D;;MAEE;AACJ,CAAC,EAtBW,OAAO,GAAP,eAAO,KAAP,eAAO,QAsBlB"}
|
package/dist/fees/index.d.ts
CHANGED
|
@@ -10,17 +10,17 @@ export declare enum GasCostType {
|
|
|
10
10
|
export type FeeCost = {
|
|
11
11
|
name: FeeType;
|
|
12
12
|
description: string;
|
|
13
|
-
percentage
|
|
13
|
+
percentage?: string;
|
|
14
14
|
gasLimit?: number;
|
|
15
15
|
gasMultiplier?: number;
|
|
16
16
|
token: Token;
|
|
17
17
|
amount: string;
|
|
18
|
-
|
|
18
|
+
amountUsd: string;
|
|
19
19
|
};
|
|
20
20
|
export type GasCost = {
|
|
21
21
|
type: GasCostType;
|
|
22
22
|
token: Token;
|
|
23
23
|
gasLimit: string;
|
|
24
24
|
amount: string;
|
|
25
|
-
|
|
25
|
+
amountUsd: string;
|
|
26
26
|
};
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Dex, DexName } from "dexes";
|
|
|
3
3
|
import { FeeCost, GasCost } from "fees";
|
|
4
4
|
import { ChainCall, EvmContractCall, SquidData } from "squid";
|
|
5
5
|
import { Token } from "tokens";
|
|
6
|
+
import { WrapDirection, WrapperType } from "wrappers";
|
|
6
7
|
export declare enum ActionType {
|
|
7
8
|
SWAP = "swap",
|
|
8
9
|
WRAP = "wrap",
|
|
@@ -100,11 +101,13 @@ export interface RouteAction {
|
|
|
100
101
|
chainType: ChainType;
|
|
101
102
|
fromChainId: string;
|
|
102
103
|
toChainId: string;
|
|
104
|
+
provider?: string;
|
|
105
|
+
description?: string;
|
|
103
106
|
stage?: ActionStage;
|
|
104
|
-
details: SwapDetails | BridgeDetails | CustomCallDetails | IbcTransferDetails;
|
|
107
|
+
details: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails | IbcTransferDetails;
|
|
105
108
|
}
|
|
106
109
|
export interface SimpleRouteAction extends RouteAction {
|
|
107
|
-
details: SimpleSwapDetails | BridgeDetails | CustomCallDetails | IbcTransferDetails;
|
|
110
|
+
details: SimpleSwapDetails | SimpleWrapDetails | BridgeDetails | CustomCallDetails | IbcTransferDetails;
|
|
108
111
|
}
|
|
109
112
|
export interface BaseSwapDetails {
|
|
110
113
|
target: string;
|
|
@@ -120,6 +123,22 @@ export interface BaseSwapDetails {
|
|
|
120
123
|
isWrappedNative?: boolean;
|
|
121
124
|
dynamicSlippage?: number;
|
|
122
125
|
}
|
|
126
|
+
export interface WrapDetails extends SimpleWrapDetails {
|
|
127
|
+
calls: ChainCall[];
|
|
128
|
+
custom?: Record<string, any>;
|
|
129
|
+
}
|
|
130
|
+
export interface SimpleWrapDetails {
|
|
131
|
+
target: string;
|
|
132
|
+
path: string[];
|
|
133
|
+
wrapType: WrapperType;
|
|
134
|
+
direction: WrapDirection;
|
|
135
|
+
fromToken: Token;
|
|
136
|
+
toToken: Token;
|
|
137
|
+
fromAmount: string;
|
|
138
|
+
toAmount: string;
|
|
139
|
+
exchangeRate: string;
|
|
140
|
+
priceImpact: string;
|
|
141
|
+
}
|
|
123
142
|
export interface SwapDetails extends BaseSwapDetails {
|
|
124
143
|
dex: Dex;
|
|
125
144
|
calls: ChainCall[];
|
package/dist/routes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;;AAOA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,2BAAa,CAAA;IACb,+BAAiB,CAAA;IACjB,2CAA6B,CAAA;IAC7B,+BAAiB,CAAA;AACnB,CAAC,EANW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAMrB;AAED,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,GAAX,mBAAW,KAAX,mBAAW,QAStB"}
|
package/dist/wrappers/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { Token } from "tokens";
|
|
1
|
+
import { Token } from "../tokens";
|
|
2
2
|
export declare enum WrapperType {
|
|
3
3
|
WRAPPED_NATIVE = "WrappedNative",
|
|
4
4
|
OVERNIGHT = "Overnight"
|
|
5
5
|
}
|
|
6
|
+
export declare enum WrapDirection {
|
|
7
|
+
WRAP = "wrap",
|
|
8
|
+
UNWRAP = "unwrap"
|
|
9
|
+
}
|
|
6
10
|
export interface Wrapper {
|
|
7
11
|
type: WrapperType;
|
|
8
12
|
chainId: string;
|
package/dist/wrappers/index.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WrapperType = void 0;
|
|
3
|
+
exports.WrapDirection = exports.WrapperType = void 0;
|
|
4
4
|
var WrapperType;
|
|
5
5
|
(function (WrapperType) {
|
|
6
6
|
WrapperType["WRAPPED_NATIVE"] = "WrappedNative";
|
|
7
7
|
WrapperType["OVERNIGHT"] = "Overnight";
|
|
8
8
|
})(WrapperType = exports.WrapperType || (exports.WrapperType = {}));
|
|
9
|
+
var WrapDirection;
|
|
10
|
+
(function (WrapDirection) {
|
|
11
|
+
WrapDirection["WRAP"] = "wrap";
|
|
12
|
+
WrapDirection["UNWRAP"] = "unwrap";
|
|
13
|
+
})(WrapDirection = exports.WrapDirection || (exports.WrapDirection = {}));
|
|
9
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wrappers/index.ts"],"names":[],"mappings":";;;AAEA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,+CAAgC,CAAA;IAChC,sCAAuB,CAAA;AACzB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wrappers/index.ts"],"names":[],"mappings":";;;AAEA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,+CAAgC,CAAA;IAChC,sCAAuB,CAAA;AACzB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,kCAAiB,CAAA;AACnB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
|