@0xsquid/squid-types 0.1.29 → 0.1.31
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 +8 -1
- package/dist/bridges/index.js +9 -1
- package/dist/bridges/index.js.map +1 -1
- package/dist/path/index.d.ts +5 -1
- package/dist/routes/index.d.ts +10 -8
- package/dist/routes/index.js.map +1 -1
- package/dist/wrappers/index.d.ts +7 -5
- package/dist/wrappers/index.js +1 -0
- package/dist/wrappers/index.js.map +1 -1
- package/package.json +1 -1
package/dist/bridges/index.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
export declare enum BridgeType {
|
|
2
2
|
AXELAR_GMP = "gmp",
|
|
3
|
-
AXELAR_ITS = "its"
|
|
3
|
+
AXELAR_ITS = "its",
|
|
4
|
+
CCTP = "cctp",
|
|
5
|
+
NOBLE_CCTP = "noble-cctp"
|
|
6
|
+
}
|
|
7
|
+
export declare enum BridgeProvider {
|
|
8
|
+
AXELAR = "axelar",
|
|
9
|
+
CCTP = "cctp",
|
|
10
|
+
NOBLE_CCTP = "noble-cctp"
|
|
4
11
|
}
|
|
5
12
|
export type BridgeConfig = Record<string, string>;
|
package/dist/bridges/index.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BridgeType = void 0;
|
|
3
|
+
exports.BridgeProvider = exports.BridgeType = void 0;
|
|
4
4
|
var BridgeType;
|
|
5
5
|
(function (BridgeType) {
|
|
6
6
|
BridgeType["AXELAR_GMP"] = "gmp";
|
|
7
7
|
BridgeType["AXELAR_ITS"] = "its";
|
|
8
|
+
BridgeType["CCTP"] = "cctp";
|
|
9
|
+
BridgeType["NOBLE_CCTP"] = "noble-cctp";
|
|
8
10
|
})(BridgeType = exports.BridgeType || (exports.BridgeType = {}));
|
|
11
|
+
var BridgeProvider;
|
|
12
|
+
(function (BridgeProvider) {
|
|
13
|
+
BridgeProvider["AXELAR"] = "axelar";
|
|
14
|
+
BridgeProvider["CCTP"] = "cctp";
|
|
15
|
+
BridgeProvider["NOBLE_CCTP"] = "noble-cctp";
|
|
16
|
+
})(BridgeProvider = exports.BridgeProvider || (exports.BridgeProvider = {}));
|
|
9
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bridges/index.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bridges/index.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,gCAAkB,CAAA;IAClB,gCAAkB,CAAA;IAClB,2BAAa,CAAA;IACb,uCAAyB,CAAA;AAC3B,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,2CAAyB,CAAA;AAC3B,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB"}
|
package/dist/path/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ChainData, ChainType } from "../chains";
|
|
|
3
3
|
import { ActionType } from "../routes";
|
|
4
4
|
import { Token } from "../tokens";
|
|
5
5
|
import { WrapperType } from "wrappers";
|
|
6
|
+
import { BridgeType } from "bridges";
|
|
6
7
|
export interface PathInternal {
|
|
7
8
|
fromChain: string;
|
|
8
9
|
fromToken: string;
|
|
@@ -32,6 +33,7 @@ export interface ActionBaseData {
|
|
|
32
33
|
slippage: number;
|
|
33
34
|
path: string[];
|
|
34
35
|
custom: Record<string, any>;
|
|
36
|
+
type: WrapperType | BridgeType;
|
|
35
37
|
poolFees: number[][];
|
|
36
38
|
pools: string[];
|
|
37
39
|
poolId: string;
|
|
@@ -40,8 +42,9 @@ export interface ActionBaseData {
|
|
|
40
42
|
exchangeProvider?: string;
|
|
41
43
|
address: string;
|
|
42
44
|
wrapper: string;
|
|
43
|
-
type: WrapperType;
|
|
44
45
|
coinAddresses: string[];
|
|
46
|
+
name: string;
|
|
47
|
+
provider: string;
|
|
45
48
|
}
|
|
46
49
|
export interface PathAction {
|
|
47
50
|
type: ActionType;
|
|
@@ -58,4 +61,5 @@ export interface PathParams {
|
|
|
58
61
|
fromToken: Pick<Token, "type" | "chainId" | "name" | "symbol" | "decimals" | "address">;
|
|
59
62
|
toToken: Pick<Token, "type" | "chainId" | "name" | "symbol" | "decimals" | "address">;
|
|
60
63
|
maxResults?: number;
|
|
64
|
+
subgraphIds?: string[];
|
|
61
65
|
}
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ChainData, ChainType } from "../chains";
|
|
|
2
2
|
import { Dex, DexName } from "../dexes";
|
|
3
3
|
import { FeeCost, GasCost } from "../fees";
|
|
4
4
|
import { QuoteAction } from "../quote";
|
|
5
|
-
import { ChainCall,
|
|
5
|
+
import { ChainCall, SlippageMode, SquidData } from "../squid";
|
|
6
6
|
import { Token } from "../tokens";
|
|
7
7
|
import { WrapDirection, WrapperType } from "../wrappers";
|
|
8
8
|
import { BridgeType } from "../bridges";
|
|
@@ -51,8 +51,8 @@ export interface RouteRequestPopulated {
|
|
|
51
51
|
prefer?: DexName[];
|
|
52
52
|
receiveGasOnDestination?: boolean;
|
|
53
53
|
}
|
|
54
|
-
export interface Estimate extends Route {
|
|
55
|
-
actions:
|
|
54
|
+
export interface Estimate extends Omit<Route, "actions"> {
|
|
55
|
+
actions: RouteActionResponse[];
|
|
56
56
|
}
|
|
57
57
|
export interface Route {
|
|
58
58
|
actions: RouteAction[];
|
|
@@ -71,6 +71,10 @@ export interface Route {
|
|
|
71
71
|
gasCosts: GasCost[];
|
|
72
72
|
feeCosts: FeeCost[];
|
|
73
73
|
}
|
|
74
|
+
export interface RouteActionResponse extends Omit<QuoteAction, "fromChain" | "toChain"> {
|
|
75
|
+
fromChain: string;
|
|
76
|
+
toChain: string;
|
|
77
|
+
}
|
|
74
78
|
export interface RouteAction extends QuoteAction {
|
|
75
79
|
provider?: string;
|
|
76
80
|
description?: string;
|
|
@@ -111,10 +115,11 @@ export interface BridgeDetails {
|
|
|
111
115
|
provider: string;
|
|
112
116
|
type: BridgeType;
|
|
113
117
|
name: string;
|
|
118
|
+
calls?: ChainCall[];
|
|
114
119
|
}
|
|
115
120
|
export interface CustomCallDetails {
|
|
116
121
|
name: string;
|
|
117
|
-
calls:
|
|
122
|
+
calls: ChainCall[];
|
|
118
123
|
}
|
|
119
124
|
export interface Hook {
|
|
120
125
|
chainType: ChainType;
|
|
@@ -133,12 +138,9 @@ export declare enum ActionStage {
|
|
|
133
138
|
COSMOS_ONLY = 7
|
|
134
139
|
}
|
|
135
140
|
export interface StageContext {
|
|
136
|
-
stage
|
|
141
|
+
stage?: ActionStage;
|
|
137
142
|
isSourceNative: boolean;
|
|
138
143
|
isDestinationNative: boolean;
|
|
139
|
-
isEvm: boolean;
|
|
140
|
-
isCosmos: boolean;
|
|
141
|
-
toAddress: string;
|
|
142
144
|
receiver: string;
|
|
143
145
|
isFirstAction?: boolean;
|
|
144
146
|
isLastAction?: boolean;
|
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":";;;AA0FA,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;AA+CD,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,18 +1,20 @@
|
|
|
1
|
-
import { Token } from "../tokens";
|
|
2
1
|
export declare enum WrapperType {
|
|
3
2
|
WRAPPED_NATIVE = "WrappedNative",
|
|
4
3
|
OVERNIGHT = "Overnight",
|
|
5
4
|
DEUS = "Deus",
|
|
6
5
|
WSTETH = "WstETH",
|
|
7
|
-
WRAPPED_MAI = "WrappedMAI"
|
|
6
|
+
WRAPPED_MAI = "WrappedMAI",
|
|
7
|
+
WRAPPED_USDY = "WrappedUSDY"
|
|
8
8
|
}
|
|
9
9
|
export declare enum WrapDirection {
|
|
10
10
|
WRAP = "wrap",
|
|
11
11
|
UNWRAP = "unwrap"
|
|
12
12
|
}
|
|
13
13
|
export interface Wrapper {
|
|
14
|
-
type: WrapperType;
|
|
15
14
|
chainId: string;
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
address: string;
|
|
16
|
+
coinAddresses: string[];
|
|
17
|
+
coinNames: string[];
|
|
18
|
+
type: WrapperType;
|
|
19
|
+
properties?: Record<string, any>;
|
|
18
20
|
}
|
package/dist/wrappers/index.js
CHANGED
|
@@ -8,6 +8,7 @@ var WrapperType;
|
|
|
8
8
|
WrapperType["DEUS"] = "Deus";
|
|
9
9
|
WrapperType["WSTETH"] = "WstETH";
|
|
10
10
|
WrapperType["WRAPPED_MAI"] = "WrappedMAI";
|
|
11
|
+
WrapperType["WRAPPED_USDY"] = "WrappedUSDY";
|
|
11
12
|
})(WrapperType = exports.WrapperType || (exports.WrapperType = {}));
|
|
12
13
|
var WrapDirection;
|
|
13
14
|
(function (WrapDirection) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wrappers/index.ts"],"names":[],"mappings":";;;AAEA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wrappers/index.ts"],"names":[],"mappings":";;;AAEA,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,+CAAgC,CAAA;IAChC,sCAAuB,CAAA;IACvB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,yCAA0B,CAAA;IAC1B,2CAA4B,CAAA;AAC9B,CAAC,EAPW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAOtB;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,kCAAiB,CAAA;AACnB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
|