@0xsquid/squid-types 0.1.26 → 0.1.28
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/bridges/index.d.ts +5 -0
- package/dist/bridges/index.js +9 -0
- package/dist/bridges/index.js.map +1 -0
- package/dist/chains/index.d.ts +9 -3
- package/dist/chains/index.js +8 -1
- package/dist/chains/index.js.map +1 -1
- package/dist/fees/index.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/path/index.d.ts +61 -0
- package/dist/path/index.js +3 -0
- package/dist/path/index.js.map +1 -0
- package/dist/quote/index.d.ts +8 -9
- package/dist/routes/index.d.ts +77 -101
- package/dist/routes/index.js.map +1 -1
- package/dist/squid/index.d.ts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BridgeType = void 0;
|
|
4
|
+
var BridgeType;
|
|
5
|
+
(function (BridgeType) {
|
|
6
|
+
BridgeType["AXELAR_GMP"] = "gmp";
|
|
7
|
+
BridgeType["AXELAR_ITS"] = "its";
|
|
8
|
+
})(BridgeType = exports.BridgeType || (exports.BridgeType = {}));
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bridges/index.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,gCAAkB,CAAA;IAClB,gCAAkB,CAAA;AACpB,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
|
package/dist/chains/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BridgeConfig } from "bridges";
|
|
1
2
|
export declare enum ChainType {
|
|
2
3
|
EVM = "evm",
|
|
3
4
|
COSMOS = "cosmos"
|
|
@@ -29,9 +30,8 @@ export type BaseChain = {
|
|
|
29
30
|
squidMulticall?: string;
|
|
30
31
|
squidFeeCollector?: string;
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
forecallable?: string;
|
|
33
|
+
bridges: {
|
|
34
|
+
[key: string]: BridgeConfig;
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
export type EvmChain = BaseChain & {
|
|
@@ -123,6 +123,7 @@ export declare enum ChainName {
|
|
|
123
123
|
JUNO = "juno",
|
|
124
124
|
KI = "ki",
|
|
125
125
|
KUJIRA = "kujira",
|
|
126
|
+
NOBLE = "noble",
|
|
126
127
|
OSMOSIS = "osmosis",
|
|
127
128
|
OSMOSIS5 = "osmosis-5",
|
|
128
129
|
REGEN = "regen",
|
|
@@ -166,6 +167,7 @@ export declare enum NetworkIdentifier {
|
|
|
166
167
|
JUNO = "Juno",
|
|
167
168
|
KI = "Ki",
|
|
168
169
|
KUJIRA = "Kujira",
|
|
170
|
+
NOBLE = "Noble",
|
|
169
171
|
OSMOSIS = "Osmosis",
|
|
170
172
|
REGEN = "Regen",
|
|
171
173
|
SEI = "Sei",
|
|
@@ -203,3 +205,7 @@ export type IbcData = {
|
|
|
203
205
|
chain_2: ChainIBCInfo;
|
|
204
206
|
channels: Channel[];
|
|
205
207
|
};
|
|
208
|
+
export declare enum CosmosChainFeatures {
|
|
209
|
+
PACKET_FORWARD_MIDDLEWARE = "packet-forward-middleware",
|
|
210
|
+
COSMWASM = "cosmwasm"
|
|
211
|
+
}
|
package/dist/chains/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NetworkIdentifier = exports.ChainName = exports.ChainType = void 0;
|
|
3
|
+
exports.CosmosChainFeatures = exports.NetworkIdentifier = exports.ChainName = exports.ChainType = void 0;
|
|
4
4
|
var ChainType;
|
|
5
5
|
(function (ChainType) {
|
|
6
6
|
ChainType["EVM"] = "evm";
|
|
@@ -44,6 +44,7 @@ var ChainName;
|
|
|
44
44
|
ChainName["JUNO"] = "juno";
|
|
45
45
|
ChainName["KI"] = "ki";
|
|
46
46
|
ChainName["KUJIRA"] = "kujira";
|
|
47
|
+
ChainName["NOBLE"] = "noble";
|
|
47
48
|
ChainName["OSMOSIS"] = "osmosis";
|
|
48
49
|
ChainName["OSMOSIS5"] = "osmosis-5";
|
|
49
50
|
ChainName["REGEN"] = "regen";
|
|
@@ -90,6 +91,7 @@ var NetworkIdentifier;
|
|
|
90
91
|
NetworkIdentifier["JUNO"] = "Juno";
|
|
91
92
|
NetworkIdentifier["KI"] = "Ki";
|
|
92
93
|
NetworkIdentifier["KUJIRA"] = "Kujira";
|
|
94
|
+
NetworkIdentifier["NOBLE"] = "Noble";
|
|
93
95
|
NetworkIdentifier["OSMOSIS"] = "Osmosis";
|
|
94
96
|
NetworkIdentifier["REGEN"] = "Regen";
|
|
95
97
|
NetworkIdentifier["SEI"] = "Sei";
|
|
@@ -100,4 +102,9 @@ var NetworkIdentifier;
|
|
|
100
102
|
NetworkIdentifier["TERRA2"] = "Terra-2";
|
|
101
103
|
NetworkIdentifier["UMEE"] = "Umee";
|
|
102
104
|
})(NetworkIdentifier = exports.NetworkIdentifier || (exports.NetworkIdentifier = {}));
|
|
105
|
+
var CosmosChainFeatures;
|
|
106
|
+
(function (CosmosChainFeatures) {
|
|
107
|
+
CosmosChainFeatures["PACKET_FORWARD_MIDDLEWARE"] = "packet-forward-middleware";
|
|
108
|
+
CosmosChainFeatures["COSMWASM"] = "cosmwasm";
|
|
109
|
+
})(CosmosChainFeatures = exports.CosmosChainFeatures || (exports.CosmosChainFeatures = {}));
|
|
103
110
|
//# sourceMappingURL=index.js.map
|
package/dist/chains/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/chains/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/chains/index.ts"],"names":[],"mappings":";;;AAEA,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,8BAAiB,CAAA;AACnB,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AA8FD,IAAY,SAiDX;AAjDD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,mCAAsB,CAAA;IACtB,8BAAiB,CAAA;IACjB,oCAAuB,CAAA;IACvB,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,0BAAa,CAAA;IACb,sCAAyB,CAAA;IACzB,kCAAqB,CAAA;IACrB,qCAAwB,CAAA;IACxB,8BAAiB,CAAA;IACjB,kCAAqB,CAAA;IACrB,qCAAwB,CAAA;IACxB,0BAAa,CAAA;IACb,8BAAiB,CAAA;IACjB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;IACrB,4CAA+B,CAAA;IAC/B,gCAAmB,CAAA;IACnB,4BAAe,CAAA;IAEf,SAAS;IACT,8BAAiB,CAAA;IACjB,wCAA2B,CAAA;IAC3B,0BAAa,CAAA;IACb,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,iCAAoB,CAAA;IACpB,kCAAqB,CAAA;IACrB,+BAAkB,CAAA;IAClB,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,oCAAuB,CAAA;IACvB,0BAAa,CAAA;IACb,sBAAS,CAAA;IACT,8BAAiB,CAAA;IACjB,4BAAe,CAAA;IACf,gCAAmB,CAAA;IACnB,mCAAsB,CAAA;IACtB,4BAAe,CAAA;IACf,wBAAW,CAAA;IACX,8BAAiB,CAAA;IACjB,uCAA0B,CAAA;IAC1B,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;IACjB,+BAAkB,CAAA;IAClB,0BAAa,CAAA;AACf,CAAC,EAjDW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAiDpB;AAED,IAAY,iBA6CX;AA7CD,WAAY,iBAAiB;IAC3B,MAAM;IACN,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;IACvB,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,kCAAa,CAAA;IACb,wCAAmB,CAAA;IACnB,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;IACnB,oCAAe,CAAA;IAEf,SAAS;IACT,sCAAiB,CAAA;IACjB,gDAA2B,CAAA;IAC3B,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,4CAAuB,CAAA;IACvB,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;IACjB,yCAAoB,CAAA;IACpB,0CAAqB,CAAA;IACrB,uCAAkB,CAAA;IAClB,oCAAe,CAAA;IACf,oCAAe,CAAA;IACf,4CAAuB,CAAA;IACvB,kCAAa,CAAA;IACb,8BAAS,CAAA;IACT,sCAAiB,CAAA;IACjB,oCAAe,CAAA;IACf,wCAAmB,CAAA;IACnB,oCAAe,CAAA;IACf,gCAAW,CAAA;IACX,sCAAiB,CAAA;IACjB,+CAA0B,CAAA;IAC1B,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,uCAAkB,CAAA;IAClB,kCAAa,CAAA;AACf,CAAC,EA7CW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA6C5B;AAgCD,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,8EAAuD,CAAA;IACvD,4CAAqB,CAAA;AACvB,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B"}
|
package/dist/fees/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./chains";
|
|
2
|
+
export * from "./bridges";
|
|
2
3
|
export * from "./dexes";
|
|
3
4
|
export * from "./errors";
|
|
4
5
|
export * from "./tokens";
|
|
@@ -8,3 +9,4 @@ export * from "./routes";
|
|
|
8
9
|
export * from "./squid";
|
|
9
10
|
export * from "./status";
|
|
10
11
|
export * from "./wrappers";
|
|
12
|
+
export * from "./path";
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./chains"), exports);
|
|
18
|
+
__exportStar(require("./bridges"), exports);
|
|
18
19
|
__exportStar(require("./dexes"), exports);
|
|
19
20
|
__exportStar(require("./errors"), exports);
|
|
20
21
|
__exportStar(require("./tokens"), exports);
|
|
@@ -24,4 +25,5 @@ __exportStar(require("./routes"), exports);
|
|
|
24
25
|
__exportStar(require("./squid"), exports);
|
|
25
26
|
__exportStar(require("./status"), exports);
|
|
26
27
|
__exportStar(require("./wrappers"), exports);
|
|
28
|
+
__exportStar(require("./path"), exports);
|
|
27
29
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,6CAA2B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Dex, DexName } from "../dexes";
|
|
2
|
+
import { ChainData, ChainType } from "../chains";
|
|
3
|
+
import { ActionType } from "../routes";
|
|
4
|
+
import { Token } from "../tokens";
|
|
5
|
+
import { WrapperType } from "wrappers";
|
|
6
|
+
export interface PathInternal {
|
|
7
|
+
fromChain: string;
|
|
8
|
+
fromToken: string;
|
|
9
|
+
toChain: string;
|
|
10
|
+
toToken: string;
|
|
11
|
+
actions: PathActionInternal[];
|
|
12
|
+
}
|
|
13
|
+
export interface Path {
|
|
14
|
+
fromChain: ChainData;
|
|
15
|
+
fromToken: Token;
|
|
16
|
+
toChain: ChainData;
|
|
17
|
+
toToken: Token;
|
|
18
|
+
actions: PathAction[];
|
|
19
|
+
}
|
|
20
|
+
export interface PathActionInternal {
|
|
21
|
+
type: ActionType;
|
|
22
|
+
chainType: ChainType;
|
|
23
|
+
fromChainId: string;
|
|
24
|
+
toChainId: string;
|
|
25
|
+
fromToken: string;
|
|
26
|
+
toToken: string;
|
|
27
|
+
data: Record<string, any>;
|
|
28
|
+
}
|
|
29
|
+
export interface ActionBaseData {
|
|
30
|
+
dex: DexName | Dex;
|
|
31
|
+
chainId: string;
|
|
32
|
+
slippage: number;
|
|
33
|
+
path: string[];
|
|
34
|
+
custom: Record<string, any>;
|
|
35
|
+
poolFees: number[][];
|
|
36
|
+
pools: string[];
|
|
37
|
+
poolId: string;
|
|
38
|
+
isStable: boolean[];
|
|
39
|
+
exchangeId?: string;
|
|
40
|
+
exchangeProvider?: string;
|
|
41
|
+
address: string;
|
|
42
|
+
wrapper: string;
|
|
43
|
+
type: WrapperType;
|
|
44
|
+
coinAddresses: string[];
|
|
45
|
+
}
|
|
46
|
+
export interface PathAction {
|
|
47
|
+
type: ActionType;
|
|
48
|
+
chainType: ChainType;
|
|
49
|
+
fromChain: ChainData;
|
|
50
|
+
toChain: ChainData;
|
|
51
|
+
fromToken: Token;
|
|
52
|
+
toToken: Token;
|
|
53
|
+
data: ActionBaseData;
|
|
54
|
+
}
|
|
55
|
+
export interface PathParams {
|
|
56
|
+
fromChainId: string;
|
|
57
|
+
toChainId: string;
|
|
58
|
+
fromToken: Pick<Token, "type" | "chainId" | "name" | "symbol" | "decimals" | "address">;
|
|
59
|
+
toToken: Pick<Token, "type" | "chainId" | "name" | "symbol" | "decimals" | "address">;
|
|
60
|
+
maxResults?: number;
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/path/index.ts"],"names":[],"mappings":""}
|
package/dist/quote/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionStage,
|
|
1
|
+
import { ActionStage, BridgeDetails, CustomCallDetails, SwapDetails, PathAction, WrapDetails } from "../index";
|
|
2
2
|
export interface Quote {
|
|
3
3
|
actions: QuoteAction[];
|
|
4
4
|
fromAmount: string;
|
|
@@ -12,13 +12,12 @@ export interface Quote {
|
|
|
12
12
|
toAmountUsd?: string;
|
|
13
13
|
aggregateSlippage?: number;
|
|
14
14
|
}
|
|
15
|
-
export interface QuoteAction {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
toToken: Token;
|
|
15
|
+
export interface QuoteAction extends Omit<PathAction, "data"> {
|
|
16
|
+
fromAmount: string;
|
|
17
|
+
toAmount: string;
|
|
18
|
+
toAmountMin: string;
|
|
19
|
+
exchangeRate: string;
|
|
20
|
+
priceImpact: string;
|
|
22
21
|
stage?: ActionStage;
|
|
23
|
-
|
|
22
|
+
data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails;
|
|
24
23
|
}
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
import { ChainData, ChainType } from "chains";
|
|
2
|
-
import { Dex, DexName } from "dexes";
|
|
3
|
-
import { FeeCost, GasCost } from "fees";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
EVM_SOURCE = 0,
|
|
16
|
-
EVM_DESTINATION = 1,
|
|
17
|
-
EVM_TRANSIENT = 2,
|
|
18
|
-
EVM_ONLY = 3,
|
|
19
|
-
COSMOS_SOURCE = 4,
|
|
20
|
-
COSMOS_DESTINATION = 5,
|
|
21
|
-
COSMOS_TRANSIENT = 6,
|
|
22
|
-
COSMOS_ONLY = 7
|
|
1
|
+
import { ChainData, ChainType } from "../chains";
|
|
2
|
+
import { Dex, DexName } from "../dexes";
|
|
3
|
+
import { FeeCost, GasCost } from "../fees";
|
|
4
|
+
import { QuoteAction } from "../quote";
|
|
5
|
+
import { ChainCall, EvmContractCall, SlippageMode, SquidData } from "../squid";
|
|
6
|
+
import { Token } from "../tokens";
|
|
7
|
+
import { WrapDirection, WrapperType } from "../wrappers";
|
|
8
|
+
import { BridgeType } from "../bridges";
|
|
9
|
+
export interface RouteResponse {
|
|
10
|
+
route: {
|
|
11
|
+
estimate: Estimate;
|
|
12
|
+
transactionRequest: SquidData;
|
|
13
|
+
params: RouteRequest;
|
|
14
|
+
};
|
|
23
15
|
}
|
|
24
16
|
export interface RouteRequest {
|
|
25
17
|
fromChain: string;
|
|
@@ -40,39 +32,6 @@ export interface RouteRequest {
|
|
|
40
32
|
prefer?: DexName[];
|
|
41
33
|
receiveGasOnDestination?: boolean;
|
|
42
34
|
}
|
|
43
|
-
export interface Route {
|
|
44
|
-
actions: RouteAction[];
|
|
45
|
-
fromToken: Token;
|
|
46
|
-
toToken: Token;
|
|
47
|
-
fromAmount: string;
|
|
48
|
-
toAmount: string;
|
|
49
|
-
toAmountMin: string;
|
|
50
|
-
sendAmount: string;
|
|
51
|
-
exchangeRate: string;
|
|
52
|
-
aggregatePriceImpact: string;
|
|
53
|
-
estimatedRouteDuration: number;
|
|
54
|
-
fromAmountUSD?: string;
|
|
55
|
-
toAmountUSD?: string;
|
|
56
|
-
isBoostSupported: boolean;
|
|
57
|
-
gasCosts: GasCost[];
|
|
58
|
-
feeCosts: FeeCost[];
|
|
59
|
-
}
|
|
60
|
-
export interface StageContext {
|
|
61
|
-
stage: ActionStage;
|
|
62
|
-
isSourceNative: boolean;
|
|
63
|
-
isDestinationNative: boolean;
|
|
64
|
-
isEvm: boolean;
|
|
65
|
-
isCosmos: boolean;
|
|
66
|
-
toAddress: string;
|
|
67
|
-
receiver: string;
|
|
68
|
-
isFirstAction?: boolean;
|
|
69
|
-
isLastAction?: boolean;
|
|
70
|
-
hasDestinationCalls?: boolean;
|
|
71
|
-
hasSourceCalls?: boolean;
|
|
72
|
-
multicall?: string;
|
|
73
|
-
preHook: boolean;
|
|
74
|
-
postHook: boolean;
|
|
75
|
-
}
|
|
76
35
|
export interface RouteRequestPopulated {
|
|
77
36
|
fromChain: ChainData;
|
|
78
37
|
toChain: ChainData;
|
|
@@ -92,83 +51,100 @@ export interface RouteRequestPopulated {
|
|
|
92
51
|
prefer?: DexName[];
|
|
93
52
|
receiveGasOnDestination?: boolean;
|
|
94
53
|
}
|
|
95
|
-
export interface RouteResponse {
|
|
96
|
-
route: {
|
|
97
|
-
estimate: Estimate;
|
|
98
|
-
transactionRequest: SquidData;
|
|
99
|
-
params: RouteRequest;
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
54
|
export interface Estimate extends Route {
|
|
103
|
-
actions:
|
|
55
|
+
actions: RouteAction[];
|
|
104
56
|
}
|
|
105
|
-
export interface
|
|
106
|
-
|
|
107
|
-
chainType: ChainType;
|
|
108
|
-
fromChainId: string;
|
|
109
|
-
toChainId: string;
|
|
57
|
+
export interface Route {
|
|
58
|
+
actions: RouteAction[];
|
|
110
59
|
fromToken: Token;
|
|
111
60
|
toToken: Token;
|
|
61
|
+
fromAmount: string;
|
|
62
|
+
toAmount: string;
|
|
63
|
+
toAmountMin: string;
|
|
64
|
+
sendAmount: string;
|
|
65
|
+
exchangeRate: string;
|
|
66
|
+
aggregatePriceImpact: string;
|
|
67
|
+
estimatedRouteDuration: number;
|
|
68
|
+
fromAmountUSD?: string;
|
|
69
|
+
toAmountUSD?: string;
|
|
70
|
+
isBoostSupported: boolean;
|
|
71
|
+
gasCosts: GasCost[];
|
|
72
|
+
feeCosts: FeeCost[];
|
|
73
|
+
}
|
|
74
|
+
export interface RouteAction extends QuoteAction {
|
|
112
75
|
provider?: string;
|
|
113
76
|
description?: string;
|
|
114
|
-
|
|
115
|
-
details: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails | IbcTransferDetails;
|
|
77
|
+
data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails;
|
|
116
78
|
}
|
|
117
|
-
export
|
|
118
|
-
|
|
79
|
+
export declare enum ActionType {
|
|
80
|
+
SWAP = "swap",
|
|
81
|
+
WRAP = "wrap",
|
|
82
|
+
BRIDGE = "bridge",
|
|
83
|
+
IBC_TRANSFER = "ibc-transfer",
|
|
84
|
+
CUSTOM = "custom"
|
|
119
85
|
}
|
|
120
|
-
export interface
|
|
86
|
+
export interface WrapDetails {
|
|
121
87
|
target: string;
|
|
122
88
|
path: string[];
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
priceImpact: string;
|
|
129
|
-
isWrappedNative?: boolean;
|
|
130
|
-
dynamicSlippage?: number;
|
|
131
|
-
}
|
|
132
|
-
export interface WrapDetails extends SimpleWrapDetails {
|
|
89
|
+
type: WrapperType;
|
|
90
|
+
address: string;
|
|
91
|
+
wrapper: string;
|
|
92
|
+
coinAddresses: string[];
|
|
93
|
+
direction: WrapDirection;
|
|
133
94
|
calls: ChainCall[];
|
|
134
95
|
custom?: Record<string, any>;
|
|
135
96
|
}
|
|
136
|
-
export interface
|
|
97
|
+
export interface SwapDetails {
|
|
137
98
|
target: string;
|
|
138
99
|
path: string[];
|
|
139
|
-
wrapType: WrapperType;
|
|
140
|
-
direction: WrapDirection;
|
|
141
|
-
fromAmount: string;
|
|
142
|
-
toAmount: string;
|
|
143
|
-
exchangeRate: string;
|
|
144
|
-
priceImpact: string;
|
|
145
|
-
}
|
|
146
|
-
export interface SwapDetails extends BaseSwapDetails {
|
|
147
100
|
dex: Dex;
|
|
148
101
|
calls: ChainCall[];
|
|
102
|
+
pools: string[];
|
|
103
|
+
poolFees: string[];
|
|
104
|
+
coinAddresses: string[];
|
|
105
|
+
exchangeId?: string;
|
|
106
|
+
exchangeProvider?: string;
|
|
149
107
|
custom?: Record<string, any>;
|
|
150
|
-
pools?: string[];
|
|
151
|
-
}
|
|
152
|
-
export interface SimpleSwapDetails extends BaseSwapDetails {
|
|
153
|
-
dexName: DexName;
|
|
154
108
|
}
|
|
155
109
|
export interface BridgeDetails {
|
|
156
110
|
target: string;
|
|
157
111
|
provider: string;
|
|
112
|
+
type: BridgeType;
|
|
158
113
|
name: string;
|
|
159
|
-
sendAmount: string;
|
|
160
|
-
receiveAmount: string;
|
|
161
|
-
exchangeRate: string;
|
|
162
114
|
}
|
|
163
115
|
export interface CustomCallDetails {
|
|
164
116
|
name: string;
|
|
165
117
|
calls: EvmContractCall[];
|
|
166
118
|
}
|
|
167
|
-
export interface IbcTransferDetails {
|
|
168
|
-
}
|
|
169
119
|
export interface Hook {
|
|
170
120
|
chainType: ChainType;
|
|
171
121
|
fundAmount: string;
|
|
172
122
|
fundToken: string;
|
|
173
123
|
calls: ChainCall[];
|
|
174
124
|
}
|
|
125
|
+
export declare enum ActionStage {
|
|
126
|
+
EVM_SOURCE = 0,
|
|
127
|
+
EVM_DESTINATION = 1,
|
|
128
|
+
EVM_TRANSIENT = 2,
|
|
129
|
+
EVM_ONLY = 3,
|
|
130
|
+
COSMOS_SOURCE = 4,
|
|
131
|
+
COSMOS_DESTINATION = 5,
|
|
132
|
+
COSMOS_TRANSIENT = 6,
|
|
133
|
+
COSMOS_ONLY = 7
|
|
134
|
+
}
|
|
135
|
+
export interface StageContext {
|
|
136
|
+
stage: ActionStage;
|
|
137
|
+
isSourceNative: boolean;
|
|
138
|
+
isDestinationNative: boolean;
|
|
139
|
+
isEvm: boolean;
|
|
140
|
+
isCosmos: boolean;
|
|
141
|
+
toAddress: string;
|
|
142
|
+
receiver: string;
|
|
143
|
+
isFirstAction?: boolean;
|
|
144
|
+
isLastAction?: boolean;
|
|
145
|
+
hasDestinationCalls?: boolean;
|
|
146
|
+
hasSourceCalls?: boolean;
|
|
147
|
+
multicall?: string;
|
|
148
|
+
preHook: boolean;
|
|
149
|
+
postHook: boolean;
|
|
150
|
+
}
|
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":";;;AAqFA,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;AA8CD,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/squid/index.d.ts
CHANGED
package/dist/status/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BlockTag } from "@ethersproject/providers";
|
|
2
2
|
import { GMPError } from "@axelar-network/axelarjs-sdk";
|
|
3
|
-
import { ChainData } from "chains";
|
|
3
|
+
import { ChainData } from "../chains";
|
|
4
4
|
export type StatusRequest = {
|
|
5
5
|
transactionId: string;
|
|
6
6
|
routeType: string;
|