@0xsquid/squid-types 0.1.43 → 0.1.45

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.
Files changed (41) hide show
  1. package/README.md +3 -0
  2. package/dist/bridges/index.js +4 -8
  3. package/dist/chains/index.js +8 -12
  4. package/dist/dexes/index.js +4 -8
  5. package/dist/errors/index.js +1 -3
  6. package/dist/fees/index.js +4 -8
  7. package/dist/index.js +12 -29
  8. package/dist/path/index.js +1 -3
  9. package/dist/quote/index.js +1 -3
  10. package/dist/routes/index.js +4 -8
  11. package/dist/squid/index.js +6 -10
  12. package/dist/status/index.js +4 -8
  13. package/dist/tokens/index.js +2 -6
  14. package/dist/wrappers/index.js +4 -8
  15. package/package.json +26 -18
  16. package/dist/bridges/index.d.ts +0 -14
  17. package/dist/bridges/index.js.map +0 -1
  18. package/dist/chains/index.d.ts +0 -213
  19. package/dist/chains/index.js.map +0 -1
  20. package/dist/dexes/index.d.ts +0 -81
  21. package/dist/dexes/index.js.map +0 -1
  22. package/dist/errors/index.d.ts +0 -9
  23. package/dist/errors/index.js.map +0 -1
  24. package/dist/fees/index.d.ts +0 -26
  25. package/dist/fees/index.js.map +0 -1
  26. package/dist/index.d.ts +0 -12
  27. package/dist/index.js.map +0 -1
  28. package/dist/path/index.d.ts +0 -64
  29. package/dist/path/index.js.map +0 -1
  30. package/dist/quote/index.d.ts +0 -23
  31. package/dist/quote/index.js.map +0 -1
  32. package/dist/routes/index.d.ts +0 -161
  33. package/dist/routes/index.js.map +0 -1
  34. package/dist/squid/index.d.ts +0 -64
  35. package/dist/squid/index.js.map +0 -1
  36. package/dist/status/index.d.ts +0 -60
  37. package/dist/status/index.js.map +0 -1
  38. package/dist/tokens/index.d.ts +0 -39
  39. package/dist/tokens/index.js.map +0 -1
  40. package/dist/wrappers/index.d.ts +0 -20
  41. package/dist/wrappers/index.js.map +0 -1
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Squid Types
2
+
3
+ Squid types used on the graph, api and sdk
@@ -1,19 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BridgeProvider = exports.BridgeType = void 0;
4
- var BridgeType;
1
+ export var BridgeType;
5
2
  (function (BridgeType) {
6
3
  BridgeType["AXELAR_GMP"] = "gmp";
7
4
  BridgeType["AXELAR_ITS"] = "its";
8
5
  BridgeType["CCTP"] = "cctp";
9
6
  BridgeType["NOBLE_CCTP"] = "noble-cctp";
10
7
  BridgeType["IBC"] = "ibc";
11
- })(BridgeType || (exports.BridgeType = BridgeType = {}));
12
- var BridgeProvider;
8
+ })(BridgeType || (BridgeType = {}));
9
+ export var BridgeProvider;
13
10
  (function (BridgeProvider) {
14
11
  BridgeProvider["AXELAR"] = "axelar";
15
12
  BridgeProvider["CCTP"] = "cctp";
16
13
  BridgeProvider["NOBLE_CCTP"] = "noble-cctp";
17
14
  BridgeProvider["IBC"] = "ibc";
18
- })(BridgeProvider || (exports.BridgeProvider = BridgeProvider = {}));
19
- //# sourceMappingURL=index.js.map
15
+ })(BridgeProvider || (BridgeProvider = {}));
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CosmosChainFeatures = exports.NetworkIdentifier = exports.ChainName = exports.ChainType = void 0;
4
- var ChainType;
1
+ export var ChainType;
5
2
  (function (ChainType) {
6
3
  ChainType["EVM"] = "evm";
7
4
  ChainType["COSMOS"] = "cosmos";
8
- })(ChainType || (exports.ChainType = ChainType = {}));
9
- var ChainName;
5
+ })(ChainType || (ChainType = {}));
6
+ export var ChainName;
10
7
  (function (ChainName) {
11
8
  ChainName["ARBITRUM"] = "Arbitrum";
12
9
  ChainName["ARBITRUM2"] = "arbitrum";
@@ -56,8 +53,8 @@ var ChainName;
56
53
  ChainName["STRIDE"] = "stride";
57
54
  ChainName["TERRA2"] = "terra-2";
58
55
  ChainName["UMEE"] = "umee";
59
- })(ChainName || (exports.ChainName = ChainName = {}));
60
- var NetworkIdentifier;
56
+ })(ChainName || (ChainName = {}));
57
+ export var NetworkIdentifier;
61
58
  (function (NetworkIdentifier) {
62
59
  // EVM
63
60
  NetworkIdentifier["ETHEREUM"] = "Ethereum";
@@ -103,10 +100,9 @@ var NetworkIdentifier;
103
100
  NetworkIdentifier["STRIDE"] = "Stride";
104
101
  NetworkIdentifier["TERRA2"] = "Terra-2";
105
102
  NetworkIdentifier["UMEE"] = "Umee";
106
- })(NetworkIdentifier || (exports.NetworkIdentifier = NetworkIdentifier = {}));
107
- var CosmosChainFeatures;
103
+ })(NetworkIdentifier || (NetworkIdentifier = {}));
104
+ export var CosmosChainFeatures;
108
105
  (function (CosmosChainFeatures) {
109
106
  CosmosChainFeatures["PACKET_FORWARD_MIDDLEWARE"] = "packet-forward-middleware";
110
107
  CosmosChainFeatures["COSMWASM"] = "cosmwasm";
111
- })(CosmosChainFeatures || (exports.CosmosChainFeatures = CosmosChainFeatures = {}));
112
- //# sourceMappingURL=index.js.map
108
+ })(CosmosChainFeatures || (CosmosChainFeatures = {}));
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DexType = exports.DexName = void 0;
4
1
  // identifiers for dexes
5
- var DexName;
2
+ export var DexName;
6
3
  (function (DexName) {
7
4
  DexName["AGNI_V3"] = "Agni-v3";
8
5
  DexName["AERODROME"] = "Aerodrome";
@@ -60,9 +57,9 @@ var DexName;
60
57
  DexName["VELOCIMETER"] = "Velocimeter";
61
58
  DexName["ZYBERSWAP"] = "Zyberswap";
62
59
  DexName["ZYBERSWAP_V3"] = "Zyberswap-v3";
63
- })(DexName || (exports.DexName = DexName = {}));
60
+ })(DexName || (DexName = {}));
64
61
  // identifiers dex adapters
65
- var DexType;
62
+ export var DexType;
66
63
  (function (DexType) {
67
64
  // EVM
68
65
  DexType["ALGEBRA"] = "algebra";
@@ -85,5 +82,4 @@ var DexType;
85
82
  /*
86
83
  DUALITY = "Duality",
87
84
  */
88
- })(DexType || (exports.DexType = DexType = {}));
89
- //# sourceMappingURL=index.js.map
85
+ })(DexType || (DexType = {}));
@@ -1,3 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=index.js.map
1
+ export {};
@@ -1,14 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GasCostType = exports.FeeType = void 0;
4
- var FeeType;
1
+ export var FeeType;
5
2
  (function (FeeType) {
6
3
  FeeType["AXELAR_FEE"] = "Axelar Fee";
7
4
  FeeType["GAS_RECEIVER_FEE"] = "Gas Receiver Fee";
8
5
  FeeType["EXPRESS_FEE"] = "Express Fee";
9
- })(FeeType || (exports.FeeType = FeeType = {}));
10
- var GasCostType;
6
+ })(FeeType || (FeeType = {}));
7
+ export var GasCostType;
11
8
  (function (GasCostType) {
12
9
  GasCostType["EXECUTE_CALL"] = "executeCall";
13
- })(GasCostType || (exports.GasCostType = GasCostType = {}));
14
- //# sourceMappingURL=index.js.map
10
+ })(GasCostType || (GasCostType = {}));
package/dist/index.js CHANGED
@@ -1,29 +1,12 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./chains"), exports);
18
- __exportStar(require("./bridges"), exports);
19
- __exportStar(require("./dexes"), exports);
20
- __exportStar(require("./errors"), exports);
21
- __exportStar(require("./tokens"), exports);
22
- __exportStar(require("./fees"), exports);
23
- __exportStar(require("./quote"), exports);
24
- __exportStar(require("./routes"), exports);
25
- __exportStar(require("./squid"), exports);
26
- __exportStar(require("./status"), exports);
27
- __exportStar(require("./wrappers"), exports);
28
- __exportStar(require("./path"), exports);
29
- //# sourceMappingURL=index.js.map
1
+ export * from "./chains";
2
+ export * from "./bridges";
3
+ export * from "./dexes";
4
+ export * from "./errors";
5
+ export * from "./tokens";
6
+ export * from "./fees";
7
+ export * from "./quote";
8
+ export * from "./routes";
9
+ export * from "./squid";
10
+ export * from "./status";
11
+ export * from "./wrappers";
12
+ export * from "./path";
@@ -1,3 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=index.js.map
1
+ export {};
@@ -1,3 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=index.js.map
1
+ export {};
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActionStage = exports.ActionType = void 0;
4
- var ActionType;
1
+ export var ActionType;
5
2
  (function (ActionType) {
6
3
  ActionType["SWAP"] = "swap";
7
4
  ActionType["WRAP"] = "wrap";
8
5
  ActionType["BRIDGE"] = "bridge";
9
6
  ActionType["IBC_TRANSFER"] = "ibc-transfer";
10
7
  ActionType["CUSTOM"] = "custom";
11
- })(ActionType || (exports.ActionType = ActionType = {}));
12
- var ActionStage;
8
+ })(ActionType || (ActionType = {}));
9
+ export var ActionStage;
13
10
  (function (ActionStage) {
14
11
  ActionStage[ActionStage["EVM_SOURCE"] = 0] = "EVM_SOURCE";
15
12
  ActionStage[ActionStage["EVM_DESTINATION"] = 1] = "EVM_DESTINATION";
@@ -19,5 +16,4 @@ var ActionStage;
19
16
  ActionStage[ActionStage["COSMOS_DESTINATION"] = 5] = "COSMOS_DESTINATION";
20
17
  ActionStage[ActionStage["COSMOS_TRANSIENT"] = 6] = "COSMOS_TRANSIENT";
21
18
  ActionStage[ActionStage["COSMOS_ONLY"] = 7] = "COSMOS_ONLY";
22
- })(ActionStage || (exports.ActionStage = ActionStage = {}));
23
- //# sourceMappingURL=index.js.map
19
+ })(ActionStage || (ActionStage = {}));
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SlippageMode = exports.SquidCallType = exports.SquidRouteType = void 0;
4
- var SquidRouteType;
1
+ export var SquidRouteType;
5
2
  (function (SquidRouteType) {
6
3
  SquidRouteType["CALL_BRIDGE_CALL"] = "CALL_BRIDGE_CALL";
7
4
  SquidRouteType["CALL_BRIDGE"] = "CALL_BRIDGE";
@@ -9,18 +6,17 @@ var SquidRouteType;
9
6
  SquidRouteType["BRIDGE"] = "BRIDGE";
10
7
  SquidRouteType["EVM_ONLY"] = "EVM_ONLY";
11
8
  SquidRouteType["COSMOS_ONLY"] = "COSMOS_ONLY";
12
- })(SquidRouteType || (exports.SquidRouteType = SquidRouteType = {}));
13
- var SquidCallType;
9
+ })(SquidRouteType || (SquidRouteType = {}));
10
+ export var SquidCallType;
14
11
  (function (SquidCallType) {
15
12
  SquidCallType[SquidCallType["DEFAULT"] = 0] = "DEFAULT";
16
13
  SquidCallType[SquidCallType["FULL_TOKEN_BALANCE"] = 1] = "FULL_TOKEN_BALANCE";
17
14
  SquidCallType[SquidCallType["FULL_NATIVE_BALANCE"] = 2] = "FULL_NATIVE_BALANCE";
18
15
  SquidCallType[SquidCallType["COLLECT_TOKEN_BALANCE"] = 3] = "COLLECT_TOKEN_BALANCE";
19
- })(SquidCallType || (exports.SquidCallType = SquidCallType = {}));
20
- var SlippageMode;
16
+ })(SquidCallType || (SquidCallType = {}));
17
+ export var SlippageMode;
21
18
  (function (SlippageMode) {
22
19
  SlippageMode[SlippageMode["AGGRESSIVE"] = 0] = "AGGRESSIVE";
23
20
  SlippageMode[SlippageMode["NORMAL"] = 1] = "NORMAL";
24
21
  SlippageMode[SlippageMode["FLEXIBLE"] = 2] = "FLEXIBLE";
25
- })(SlippageMode || (exports.SlippageMode = SlippageMode = {}));
26
- //# sourceMappingURL=index.js.map
22
+ })(SlippageMode || (SlippageMode = {}));
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AxelarRouteAction = exports.SquidTransactionStatus = void 0;
4
- var SquidTransactionStatus;
1
+ export var SquidTransactionStatus;
5
2
  (function (SquidTransactionStatus) {
6
3
  SquidTransactionStatus["SUCCESS"] = "success";
7
4
  SquidTransactionStatus["NEEDS_GAS"] = "needs_gas";
@@ -9,8 +6,8 @@ var SquidTransactionStatus;
9
6
  SquidTransactionStatus["PARTIAL_SUCCESS"] = "partial_success";
10
7
  SquidTransactionStatus["NOT_FOUND"] = "not_found";
11
8
  SquidTransactionStatus["FAILED_DESTINATION"] = "failed_on_destination";
12
- })(SquidTransactionStatus || (exports.SquidTransactionStatus = SquidTransactionStatus = {}));
13
- var AxelarRouteAction;
9
+ })(SquidTransactionStatus || (SquidTransactionStatus = {}));
10
+ export var AxelarRouteAction;
14
11
  (function (AxelarRouteAction) {
15
12
  AxelarRouteAction["CALL"] = "call";
16
13
  AxelarRouteAction["EXECUTED"] = "executed";
@@ -20,5 +17,4 @@ var AxelarRouteAction;
20
17
  AxelarRouteAction["IBC_SEND"] = "ibc_send";
21
18
  AxelarRouteAction["GAS_PAID"] = "gas_paid";
22
19
  AxelarRouteAction["APPROVED"] = "approved";
23
- })(AxelarRouteAction || (exports.AxelarRouteAction = AxelarRouteAction = {}));
24
- //# sourceMappingURL=index.js.map
20
+ })(AxelarRouteAction || (AxelarRouteAction = {}));
@@ -1,11 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Volatility = void 0;
4
- var Volatility;
1
+ export var Volatility;
5
2
  (function (Volatility) {
6
3
  Volatility[Volatility["SUPER_STABLE"] = 0] = "SUPER_STABLE";
7
4
  Volatility[Volatility["STABLE"] = 1] = "STABLE";
8
5
  Volatility[Volatility["HIGH_CAP"] = 2] = "HIGH_CAP";
9
6
  Volatility[Volatility["VOLATILE"] = 3] = "VOLATILE";
10
- })(Volatility || (exports.Volatility = Volatility = {}));
11
- //# sourceMappingURL=index.js.map
7
+ })(Volatility || (Volatility = {}));
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WrapDirection = exports.WrapperType = void 0;
4
- var WrapperType;
1
+ export var WrapperType;
5
2
  (function (WrapperType) {
6
3
  WrapperType["WRAPPED_NATIVE"] = "WrappedNative";
7
4
  WrapperType["OVERNIGHT"] = "Overnight";
@@ -9,10 +6,9 @@ var WrapperType;
9
6
  WrapperType["WSTETH"] = "WstETH";
10
7
  WrapperType["WRAPPED_MAI"] = "WrappedMAI";
11
8
  WrapperType["WRAPPED_USDY"] = "WrappedUSDY";
12
- })(WrapperType || (exports.WrapperType = WrapperType = {}));
13
- var WrapDirection;
9
+ })(WrapperType || (WrapperType = {}));
10
+ export var WrapDirection;
14
11
  (function (WrapDirection) {
15
12
  WrapDirection["WRAP"] = "wrap";
16
13
  WrapDirection["UNWRAP"] = "unwrap";
17
- })(WrapDirection || (exports.WrapDirection = WrapDirection = {}));
18
- //# sourceMappingURL=index.js.map
14
+ })(WrapDirection || (WrapDirection = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsquid/squid-types",
3
- "version": "0.1.43",
3
+ "version": "0.1.45",
4
4
  "description": "JS and TS types relating to 0xsquid related projects.",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -11,11 +11,11 @@
11
11
  "dist"
12
12
  ],
13
13
  "scripts": {
14
- "format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
15
- "clean": "rimraf dist tsconfig.tsbuildinfo",
16
- "clean:all": "rimraf dist tsconfig.tsbuildinfo node_modules",
17
- "prepare": "yarn build",
18
14
  "build": "tsc",
15
+ "clean": "rimraf dist node_modules",
16
+ "lint": "eslint src/ --ext .js,.ts,.json",
17
+ "lint:fix": "yarn lint --fix",
18
+ "format": "prettier --ignore-path .gitignore --write --log-level error \"**/*.+(js|ts|json)\"",
19
19
  "release": "release-it",
20
20
  "release:pre": "release-it --preRelease=beta",
21
21
  "release:ci": "release-it --ci",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "git+https://github.com/0xsquid/squid-core.git"
26
+ "url": "git+https://github.com/0xsquid/squid-types.git"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"
@@ -37,15 +37,29 @@
37
37
  "author": "0xsquid",
38
38
  "license": "Apache-2.0",
39
39
  "directories": {
40
- "typescript": "^5.0.4"
40
+ "typescript": "^4.9.5"
41
+ },
42
+ "dependencies": {
43
+ "@axelar-network/axelarjs-sdk": "^0.13.6",
44
+ "@ethersproject/providers": "^5.7.2",
45
+ "typescript": "*"
41
46
  },
42
47
  "devDependencies": {
43
- "@typescript-eslint/eslint-plugin": "^5.59.8",
44
- "eslint": "^8.41.0",
45
- "eslint-config-prettier": "^8.8.0"
48
+ "@typescript-eslint/eslint-plugin": "^6.4.0",
49
+ "@typescript-eslint/parser": "^6.14.0",
50
+ "eslint": "^8.0.1",
51
+ "eslint-config-prettier": "^8.8.0",
52
+ "eslint-config-standard-with-typescript": "^42.0.0",
53
+ "eslint-plugin-import": "^2.25.2",
54
+ "eslint-plugin-json-format": "^2.0.1",
55
+ "eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
56
+ "eslint-plugin-promise": "^6.0.0",
57
+ "eslint-plugin-unused-imports": "^3.0.0",
58
+ "husky": "^8.0.3",
59
+ "prettier": "^3.1.1"
46
60
  },
47
61
  "peerDependencies": {
48
- "typescript": "^5.0.4"
62
+ "typescript": "^5.3.3"
49
63
  },
50
64
  "release-it": {
51
65
  "plugins": {
@@ -58,14 +72,8 @@
58
72
  "release": true,
59
73
  "tokenRef": "GITHUB_AUTH"
60
74
  },
61
- "git": {
62
- "tagName": "squid-types-v${version}",
63
- "pushRepo": "https://github.com/0xsquid/squid-core.git",
64
- "commitMessage": "chore: branch cut release for squid-types v${version}"
65
- },
66
75
  "npm": {
67
76
  "publish": false
68
77
  }
69
- },
70
- "dependencies": {}
78
+ }
71
79
  }
@@ -1,14 +0,0 @@
1
- export declare enum BridgeType {
2
- AXELAR_GMP = "gmp",
3
- AXELAR_ITS = "its",
4
- CCTP = "cctp",
5
- NOBLE_CCTP = "noble-cctp",
6
- IBC = "ibc"
7
- }
8
- export declare enum BridgeProvider {
9
- AXELAR = "axelar",
10
- CCTP = "cctp",
11
- NOBLE_CCTP = "noble-cctp",
12
- IBC = "ibc"
13
- }
14
- export type BridgeConfig = Record<string, string>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bridges/index.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,gCAAkB,CAAA;IAClB,gCAAkB,CAAA;IAClB,2BAAa,CAAA;IACb,uCAAyB,CAAA;IACzB,yBAAW,CAAA;AACb,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAED,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,2CAAyB,CAAA;IACzB,6BAAW,CAAA;AACb,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"}
@@ -1,213 +0,0 @@
1
- import { BridgeConfig } from "bridges";
2
- export declare enum ChainType {
3
- EVM = "evm",
4
- COSMOS = "cosmos"
5
- }
6
- export type BaseChain = {
7
- chainId: string;
8
- chainType: ChainType;
9
- axelarChainName: ChainName;
10
- networkIdentifier: NetworkIdentifier;
11
- networkName: string;
12
- rpc: string;
13
- internalRpc: string;
14
- chainIconURI: string;
15
- blockExplorerUrls: string[];
16
- enableBoostByDefault: boolean;
17
- estimatedRouteDuration: number;
18
- estimatedBoostRouteDuration: number;
19
- swapAmountForGas: string;
20
- sameChainSwapsSupported: boolean;
21
- nativeCurrency: {
22
- name: string;
23
- symbol: string;
24
- decimals: number;
25
- icon: string;
26
- };
27
- squidContracts: {
28
- defaultCrosschainToken: string;
29
- squidRouter?: string;
30
- squidMulticall?: string;
31
- squidFeeCollector?: string;
32
- };
33
- bridges: {
34
- [key: string]: BridgeConfig;
35
- };
36
- };
37
- export type EvmChain = BaseChain & {
38
- chainNativeContracts: {
39
- wrappedNativeToken: string;
40
- ensRegistry: string;
41
- multicall: string;
42
- usdcToken: string;
43
- };
44
- gas?: {
45
- lastBaseFeePerGas: string;
46
- maxFeePerGas: string;
47
- maxPriorityFeePerGas: string;
48
- gasPrice: string;
49
- };
50
- };
51
- export type CosmosChain = BaseChain & {
52
- rest: string;
53
- stakeCurrency: CosmosCurrency;
54
- walletUrl?: string;
55
- walletUrlForStaking?: string;
56
- bip44: BIP44;
57
- alternativeBIP44s?: BIP44[];
58
- bech32Config: Bech32Config;
59
- currencies: CosmosCurrency[];
60
- feeCurrencies: CosmosCurrency[];
61
- coinType?: number;
62
- features?: string[];
63
- gasPriceStep?: CosmosGasType;
64
- chainToAxelarChannelId: string;
65
- };
66
- export type CosmosCurrency = {
67
- coinDenom: string;
68
- coinMinimalDenom: string;
69
- coinDecimals: number;
70
- coingeckoId?: string;
71
- gasPriceStep?: CosmosGasType;
72
- };
73
- export type BIP44 = {
74
- coinType: number;
75
- };
76
- export type Bech32Config = {
77
- bech32PrefixAccAddr: string;
78
- bech32PrefixAccPub: string;
79
- bech32PrefixValAddr: string;
80
- bech32PrefixValPub: string;
81
- bech32PrefixConsAddr: string;
82
- bech32PrefixConsPub: string;
83
- };
84
- export type CosmosGasType = {
85
- low: number;
86
- average: number;
87
- high: number;
88
- };
89
- export type ChainData = EvmChain | CosmosChain;
90
- export declare enum ChainName {
91
- ARBITRUM = "Arbitrum",
92
- ARBITRUM2 = "arbitrum",//testnet
93
- AURORA = "aurora",
94
- AVALANCHE = "Avalanche",
95
- BASE = "base",
96
- BINANCE = "binance",
97
- CELO = "celo",
98
- CENTRIFUGE = "centrifuge",
99
- ETHEREUM = "Ethereum",
100
- ETHEREUM2 = "Ethereum-2",//testnet
101
- FANTOM = "Fantom",
102
- FILECOIN = "filecoin",
103
- FILECOIN2 = "filecoin-2",//testnet
104
- KAVA = "kava",
105
- MANTLE = "mantle",
106
- MOONBEAM = "Moonbeam",
107
- OPTIMISM = "optimism",
108
- POLYGON_ZKEVM = "polygon-zkevm",
109
- POLYGON = "Polygon",
110
- LINEA = "linea",
111
- SCROLL = "scroll",
112
- AGORIC = "agoric",
113
- ASSETMANTLE = "assetmantle",
114
- AURA = "aura",
115
- AXELARNET = "axelarnet",
116
- CARBON = "carbon",
117
- COMDEX = "comdex",
118
- COSMOS = "cosmoshub",
119
- CRESCENT = "crescent",
120
- EMONEY = "e-money",
121
- EVMOS = "evmos",
122
- FETCH = "fetch",
123
- INJECTIVE = "injective",
124
- JUNO = "juno",
125
- KI = "ki",
126
- KUJIRA = "kujira",
127
- NOBLE = "noble",
128
- OSMOSIS = "osmosis",
129
- OSMOSIS5 = "osmosis-5",//testnet
130
- REGEN = "regen",
131
- SEI = "sei",
132
- SECRET = "secret",//deprecated
133
- SECRETSNIP = "secret-snip",
134
- STARGAZE = "stargaze",
135
- STRIDE = "stride",
136
- TERRA2 = "terra-2",
137
- UMEE = "umee"
138
- }
139
- export declare enum NetworkIdentifier {
140
- ETHEREUM = "Ethereum",
141
- AVALANCHE = "Avalanche",
142
- ARBITRUM = "Arbitrum",
143
- AURORA = "Aurora",
144
- BASE = "Base",
145
- BINANCE = "Binance",
146
- CELO = "Celo",
147
- FANTOM = "Fantom",
148
- FILECOIN = "Filecoin",
149
- KAVA = "Kava",
150
- MANTLE = "Mantle",
151
- MOONBEAM = "Moonbeam",
152
- OPTIMISM = "Optimism",
153
- POLYGON = "Polygon",
154
- LINEA = "Linea",
155
- SCROLL = "Scroll",
156
- AGORIC = "agoric",
157
- ASSETMANTLE = "assetmantle",
158
- AURA = "Aura",
159
- AXELAR = "Axelar",
160
- AXELARNET = "Axelarnet",
161
- CARBON = "Carbon",
162
- COMDEX = "Comdex",
163
- COSMOS = "Cosmoshub",
164
- CRESCENT = "Crescent",
165
- EMONEY = "E-money",
166
- EVMOS = "Evmos",
167
- FETCH = "Fetch",
168
- INJECTIVE = "Injective",
169
- JUNO = "Juno",
170
- KI = "Ki",
171
- KUJIRA = "Kujira",
172
- NOBLE = "Noble",
173
- OSMOSIS = "Osmosis",
174
- REGEN = "Regen",
175
- SEI = "Sei",
176
- SECRET = "Secret",//deprecated
177
- SECRETSNIP = "Secret-snip",
178
- STARGAZE = "Stargaze",
179
- STRIDE = "Stride",
180
- TERRA2 = "Terra-2",
181
- UMEE = "Umee"
182
- }
183
- export type ChainIBCInfo = {
184
- chain_id: string;
185
- client_id: string;
186
- connection_id: string;
187
- };
188
- export type Channel = {
189
- chain_1: {
190
- channel_id: string;
191
- port_id: string;
192
- };
193
- chain_2: {
194
- channel_id: string;
195
- port_id: string;
196
- };
197
- ordering: string;
198
- version: string;
199
- tags: {
200
- status: string;
201
- preferred?: boolean;
202
- dex?: string;
203
- };
204
- };
205
- export type IbcData = {
206
- chain_1: ChainIBCInfo;
207
- chain_2: ChainIBCInfo;
208
- channels: Channel[];
209
- };
210
- export declare enum CosmosChainFeatures {
211
- PACKET_FORWARD_MIDDLEWARE = "packet-forward-middleware",
212
- COSMWASM = "cosmwasm"
213
- }
@@ -1 +0,0 @@
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,yBAAT,SAAS,QAGpB;AA8FD,IAAY,SAkDX;AAlDD,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;IACf,8BAAiB,CAAA;IAEjB,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,EAlDW,SAAS,yBAAT,SAAS,QAkDpB;AAED,IAAY,iBA8CX;AA9CD,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;IACf,sCAAiB,CAAA;IAEjB,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,EA9CW,iBAAiB,iCAAjB,iBAAiB,QA8C5B;AAgCD,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,8EAAuD,CAAA;IACvD,4CAAqB,CAAA;AACvB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B"}
@@ -1,81 +0,0 @@
1
- export interface Dex {
2
- name: DexName;
3
- chainId: string;
4
- type: DexType;
5
- properties: Record<string, any>;
6
- }
7
- export declare enum DexName {
8
- AGNI_V3 = "Agni-v3",
9
- AERODROME = "Aerodrome",
10
- APESWAP = "Apeswap",
11
- APESWAP_V3 = "Apeswap-v3",
12
- BALANCER_V2 = "Balancer-v2",
13
- BASESWAP = "Baseswap",
14
- BASESWAP_V3 = "Baseswap-v3",
15
- BEAMSWAP = "Beamswap",
16
- CAMELOT = "Camelot",
17
- CURVE_V2 = "Curve-v2",
18
- ELLIPSIS = "Ellipsis",
19
- EQUILIBRE = "Equilibre",
20
- EQUALIZER = "Equalizer",
21
- FUSIONX_V2 = "FusionX-v2",
22
- FUSIONX_V3 = "FusionX-v3",
23
- GMX = "GMX",
24
- HORIZON = "Horizon",
25
- HORIZON_V3 = "Horizon-v3",
26
- KYBERSWAP = "KyberSwap",
27
- KYBERSWAP_AGGREGATOR = "kyberswap-aggregator",
28
- KINETIX_V3 = "Kinetix-v3",
29
- MENTO_V2 = "Mento-v2",
30
- OPENOCEAN = "OpenOcean",
31
- OSMOSIS = "Osmosis",
32
- PANCAKESWAP = "Pancakeswap",
33
- PANCAKESWAP_V3 = "Pancakeswap-v3",
34
- PANCAKESWAP_STABLE = "Pancakeswap-stable",
35
- PANGOLIN = "Pangolin",
36
- PLATYPUS = "Platypus",
37
- QUICKSWAP = "Quickswap",
38
- QUICKSWAP_V3 = "Quickswap-v3",
39
- RAMSES = "Ramses",
40
- SPOOKYSWAP = "Spookyswap",
41
- STELLASWAP = "Stellaswap",
42
- STELLASWAP_V3 = "Stellaswap-v3",
43
- STELLASWAP_SADDLE = "Stellaswap-saddle",
44
- SUSHISWAP = "Sushiswap",
45
- SUSHISWAP_V3 = "Sushiswap-v3",
46
- SWAPBASED = "SwapBased",
47
- SYNTHSWAP_V2 = "SynthSwap-v2",
48
- SYNTHSWAP_V3 = "SynthSwap-v3",
49
- SKYDROME = "Skydrome",
50
- THENA = "Thena",
51
- THENA_V3 = "Thena-v3",
52
- TRADERJOE = "TraderJoe",
53
- TRIDENT = "Trident",
54
- UBESWAP = "Ubeswap",
55
- UBESWAP_V3 = "Ubeswap-v3",
56
- UNISWAP_V2 = "Uniswap-v2",
57
- UNISWAP_V3 = "Uniswap-v3",
58
- WOMBAT = "Wombat",
59
- VELODROME = "Velodrome",
60
- VELODROME_V2 = "Velodrome-v2",
61
- VELOCIMETER = "Velocimeter",
62
- ZYBERSWAP = "Zyberswap",
63
- ZYBERSWAP_V3 = "Zyberswap-v3"
64
- }
65
- export declare enum DexType {
66
- ALGEBRA = "algebra",
67
- BALANCER_V2 = "balancer-v2",
68
- CURVE = "curve",
69
- GMX = "gmx",
70
- KYBERSWAP_ELASTIC = "kyberswap-elastic",
71
- PLATYPUS = "platypus",
72
- PANCAKESWAP_STABLE = "pancakeswap-stable",
73
- SADDLE = "saddle",
74
- SOLIDLY = "solidly",
75
- TRIDENT = "trident",
76
- WOMBAT = "wombat",
77
- UNISWAP_V2 = "uniswap-v2",
78
- UNISWAP_V3 = "uniswap-v3",
79
- MENTO_V2 = "mento-v2",
80
- OSMOSIS = "osmosis"
81
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dexes/index.ts"],"names":[],"mappings":";;;AAOA,wBAAwB;AACxB,IAAY,OAyDX;AAzDD,WAAY,OAAO;IACjB,8BAAmB,CAAA;IACnB,kCAAuB,CAAA;IACvB,8BAAmB,CAAA;IACnB,oCAAyB,CAAA;IACzB,sCAA2B,CAAA;IAC3B,gCAAqB,CAAA;IACrB,sCAA2B,CAAA;IAC3B,gCAAqB,CAAA;IACrB,8BAAmB,CAAA;IACnB,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,oCAAyB,CAAA;IACzB,gCAAqB,CAAA;IACrB,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,4BAAiB,CAAA;IACjB,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,gCAAqB,CAAA;IACrB,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,sCAA2B,CAAA;IAC3B,kCAAuB,CAAA;IACvB,wCAA6B,CAAA;AAC/B,CAAC,EAzDW,OAAO,uBAAP,OAAO,QAyDlB;AAED,2BAA2B;AAC3B,IAAY,OAuBX;AAvBD,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,gCAAqB,CAAA;IACrB,SAAS;IACT,8BAAmB,CAAA;IAEnB,0DAA0D;IAC1D;;MAEE;AACJ,CAAC,EAvBW,OAAO,uBAAP,OAAO,QAuBlB"}
@@ -1,9 +0,0 @@
1
- export type SquidError = {
2
- errorType: string;
3
- message: string;
4
- reason: string;
5
- path?: string;
6
- };
7
- export type SquidErrorResponse = {
8
- errors: SquidError[];
9
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":""}
@@ -1,26 +0,0 @@
1
- import { Token } from "../tokens";
2
- export declare enum FeeType {
3
- AXELAR_FEE = "Axelar Fee",
4
- GAS_RECEIVER_FEE = "Gas Receiver Fee",
5
- EXPRESS_FEE = "Express Fee"
6
- }
7
- export declare enum GasCostType {
8
- EXECUTE_CALL = "executeCall"
9
- }
10
- export type FeeCost = {
11
- name: FeeType;
12
- description: string;
13
- percentage?: string;
14
- gasLimit?: string;
15
- gasMultiplier?: number;
16
- token: Token;
17
- amount: string;
18
- amountUsd: string;
19
- };
20
- export type GasCost = {
21
- type: GasCostType;
22
- token: Token;
23
- gasLimit: string;
24
- amount: string;
25
- amountUsd: string;
26
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fees/index.ts"],"names":[],"mappings":";;;AAEA,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,oCAAyB,CAAA;IACzB,gDAAqC,CAAA;IACrC,sCAA2B,CAAA;AAC7B,CAAC,EAJW,OAAO,uBAAP,OAAO,QAIlB;AAED,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,2CAA4B,CAAA;AAC9B,CAAC,EAFW,WAAW,2BAAX,WAAW,QAEtB"}
package/dist/index.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export * from "./chains";
2
- export * from "./bridges";
3
- export * from "./dexes";
4
- export * from "./errors";
5
- export * from "./tokens";
6
- export * from "./fees";
7
- export * from "./quote";
8
- export * from "./routes";
9
- export * from "./squid";
10
- export * from "./status";
11
- export * from "./wrappers";
12
- export * from "./path";
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
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"}
@@ -1,64 +0,0 @@
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
- import { BridgeType } from "bridges";
7
- export interface PathInternal {
8
- fromChain: string;
9
- fromToken: string;
10
- toChain: string;
11
- toToken: string;
12
- actions: PathActionInternal[];
13
- }
14
- export interface Path {
15
- fromChain: ChainData;
16
- fromToken: Token;
17
- toChain: ChainData;
18
- toToken: Token;
19
- actions: PathAction[];
20
- }
21
- export interface PathActionInternal {
22
- type: ActionType;
23
- chainType: ChainType;
24
- fromChainId: string;
25
- toChainId: string;
26
- fromToken: string;
27
- toToken: string;
28
- data: Record<string, any>;
29
- }
30
- export interface ActionBaseData {
31
- dex: DexName | Dex;
32
- chainId: string;
33
- slippage: number;
34
- path: string[];
35
- custom: Record<string, any>;
36
- type: WrapperType | BridgeType;
37
- poolFee: number;
38
- poolId: string;
39
- isStable: boolean;
40
- exchangeId?: string;
41
- exchangeProvider?: string;
42
- address: string;
43
- wrapper: string;
44
- coinAddresses: string[];
45
- name: string;
46
- provider: string;
47
- }
48
- export interface PathAction {
49
- type: ActionType;
50
- chainType: ChainType;
51
- fromChain: ChainData;
52
- toChain: ChainData;
53
- fromToken: Token;
54
- toToken: Token;
55
- data: ActionBaseData;
56
- }
57
- export interface PathParams {
58
- fromChainId: string;
59
- toChainId: string;
60
- fromToken: Pick<Token, "type" | "chainId" | "name" | "symbol" | "decimals" | "address">;
61
- toToken: Pick<Token, "type" | "chainId" | "name" | "symbol" | "decimals" | "address">;
62
- maxResults?: number;
63
- subgraphIds?: string[];
64
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/path/index.ts"],"names":[],"mappings":""}
@@ -1,23 +0,0 @@
1
- import { ActionStage, BridgeDetails, CustomCallDetails, SwapDetails, PathAction, WrapDetails } from "../index";
2
- export interface Quote {
3
- actions: QuoteAction[];
4
- fromAmount: string;
5
- toAmount: string;
6
- toAmountMin: string;
7
- sendAmount: string;
8
- exchangeRate: string;
9
- aggregatePriceImpact: string;
10
- estimatedRouteDuration: number;
11
- fromAmountUsd?: string;
12
- toAmountUsd?: string;
13
- aggregateSlippage?: number;
14
- }
15
- export interface QuoteAction extends Omit<PathAction, "data"> {
16
- fromAmount: string;
17
- toAmount: string;
18
- toAmountMin: string;
19
- exchangeRate: string;
20
- priceImpact: string;
21
- stage?: ActionStage;
22
- data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails;
23
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/quote/index.ts"],"names":[],"mappings":""}
@@ -1,161 +0,0 @@
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, 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
- };
15
- }
16
- export interface RouteRequest {
17
- fromChain: string;
18
- fromToken: string;
19
- fromAmount: string;
20
- fromAddress?: string;
21
- toChain: string;
22
- toToken: string;
23
- toAddress?: string;
24
- slippageConfig: {
25
- slippage?: number;
26
- autoMode: SlippageMode;
27
- };
28
- quoteOnly?: boolean;
29
- enableBoost?: boolean;
30
- preHook?: Hook;
31
- postHook?: Hook;
32
- prefer?: DexName[];
33
- receiveGasOnDestination?: boolean;
34
- }
35
- export interface RouteRequestPopulated {
36
- fromChain: ChainData;
37
- toChain: ChainData;
38
- fromToken: Token;
39
- toToken: Token;
40
- fromAmount: string;
41
- fromAddress?: string;
42
- toAddress?: string;
43
- slippageConfig: {
44
- slippage?: number;
45
- autoMode: SlippageMode;
46
- };
47
- quoteOnly?: boolean;
48
- enableBoost?: boolean;
49
- preHook?: Hook;
50
- postHook?: Hook;
51
- prefer?: DexName[];
52
- receiveGasOnDestination?: boolean;
53
- }
54
- export interface Estimate extends Omit<Route, "actions"> {
55
- actions: RouteActionResponse[];
56
- }
57
- export interface Route {
58
- actions: RouteAction[];
59
- fromToken: Token;
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 RouteActionResponse extends Omit<RouteAction, "fromChain" | "toChain" | "data"> {
75
- fromChain: string;
76
- toChain: string;
77
- data: _SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails;
78
- }
79
- export interface RouteAction extends QuoteAction {
80
- provider?: string;
81
- description?: string;
82
- hookUri?: string;
83
- data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails;
84
- }
85
- export declare enum ActionType {
86
- SWAP = "swap",
87
- WRAP = "wrap",
88
- BRIDGE = "bridge",
89
- IBC_TRANSFER = "ibc-transfer",
90
- CUSTOM = "custom"
91
- }
92
- export interface WrapDetails {
93
- target: string;
94
- path: string[];
95
- type: WrapperType;
96
- address: string;
97
- wrapper: string;
98
- coinAddresses: string[];
99
- direction: WrapDirection;
100
- calls: ChainCall[];
101
- custom?: Record<string, any>;
102
- }
103
- export interface _SwapDetails extends Omit<SwapDetails, "dex"> {
104
- dex: DexName;
105
- }
106
- export interface SwapDetails {
107
- target: string;
108
- path: string[];
109
- dex: Dex;
110
- calls: ChainCall[];
111
- poolId: string;
112
- poolFee: string;
113
- coinAddresses: string[];
114
- isStable?: boolean;
115
- exchangeId?: string;
116
- exchangeProvider?: string;
117
- custom?: Record<string, any>;
118
- }
119
- export interface BridgeDetails {
120
- target: string;
121
- provider: string;
122
- type: BridgeType;
123
- name: string;
124
- calls?: ChainCall[];
125
- }
126
- export interface CustomCallDetails {
127
- name: string;
128
- calls: ChainCall[];
129
- }
130
- export interface Hook {
131
- chainType: ChainType;
132
- fundAmount: string;
133
- fundToken: string;
134
- calls: ChainCall[];
135
- description: string;
136
- hookUri?: string;
137
- }
138
- export declare enum ActionStage {
139
- EVM_SOURCE = 0,
140
- EVM_DESTINATION = 1,
141
- EVM_TRANSIENT = 2,
142
- EVM_ONLY = 3,
143
- COSMOS_SOURCE = 4,
144
- COSMOS_DESTINATION = 5,
145
- COSMOS_TRANSIENT = 6,
146
- COSMOS_ONLY = 7
147
- }
148
- export interface StageContext {
149
- stage?: ActionStage;
150
- isSourceNative: boolean;
151
- isDestinationNative: boolean;
152
- receiver: string;
153
- fromAddress?: string;
154
- isFirstAction?: boolean;
155
- isLastAction?: boolean;
156
- hasDestinationCalls?: boolean;
157
- hasSourceCalls?: boolean;
158
- multicall?: string;
159
- preHook: boolean;
160
- postHook: boolean;
161
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":";;;AA4FA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,2BAAa,CAAA;IACb,+BAAiB,CAAA;IACjB,2CAA6B,CAAA;IAC7B,+BAAiB,CAAA;AACnB,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAsDD,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"}
@@ -1,64 +0,0 @@
1
- import { ChainType } from "../chains";
2
- export declare enum SquidRouteType {
3
- CALL_BRIDGE_CALL = "CALL_BRIDGE_CALL",
4
- CALL_BRIDGE = "CALL_BRIDGE",
5
- BRIDGE_CALL = "BRIDGE_CALL",
6
- BRIDGE = "BRIDGE",
7
- EVM_ONLY = "EVM_ONLY",
8
- COSMOS_ONLY = "COSMOS_ONLY"
9
- }
10
- export interface SquidData {
11
- routeType: SquidRouteType;
12
- target: string;
13
- data: string;
14
- value: string;
15
- gasLimit?: string;
16
- gasPrice?: string;
17
- maxFeePerGas?: string;
18
- maxPriorityFeePerGas?: string;
19
- }
20
- export type ChainCall = EvmContractCall | CosmosContractCall;
21
- export interface EvmContractCall {
22
- chainType: ChainType.EVM;
23
- callType: SquidCallType;
24
- target: string;
25
- value?: string;
26
- callData: string;
27
- payload?: {
28
- tokenAddress: string;
29
- inputPos: number;
30
- };
31
- estimatedGas: string;
32
- }
33
- export declare enum SquidCallType {
34
- DEFAULT = 0,
35
- FULL_TOKEN_BALANCE = 1,
36
- FULL_NATIVE_BALANCE = 2,
37
- COLLECT_TOKEN_BALANCE = 3
38
- }
39
- export type SquidCallData = {
40
- callType: SquidCallType;
41
- target: string;
42
- value: string;
43
- callData: string;
44
- payload: string;
45
- };
46
- export interface CosmosContractCall {
47
- chainType: ChainType.COSMOS;
48
- call: CosmosCctpCall;
49
- }
50
- export interface CosmosCctpCall {
51
- typeUrl: "/circle.cctp.v1.MsgDepositForBurn";
52
- value: {
53
- from: string;
54
- amount: string;
55
- destinationDomain: number;
56
- mintRecipient: string;
57
- burnToken: string;
58
- };
59
- }
60
- export declare enum SlippageMode {
61
- AGGRESSIVE = 0,
62
- NORMAL = 1,
63
- FLEXIBLE = 2
64
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/squid/index.ts"],"names":[],"mappings":";;;AAEA,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,uDAAqC,CAAA;IACrC,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAC3B,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;IACrB,6CAA2B,CAAA;AAC7B,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB;AA4BD,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,uDAAW,CAAA;IACX,6EAAsB,CAAA;IACtB,+EAAuB,CAAA;IACvB,mFAAyB,CAAA;AAC3B,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AA0BD,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,2DAAU,CAAA;IACV,mDAAM,CAAA;IACN,uDAAQ,CAAA;AACV,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
@@ -1,60 +0,0 @@
1
- import { BlockTag } from "@ethersproject/providers";
2
- import { GMPError } from "@axelar-network/axelarjs-sdk";
3
- import { ChainData } from "../chains";
4
- export type StatusRequest = {
5
- transactionId: string;
6
- routeType: string;
7
- destinationAddress?: string;
8
- toChain?: string;
9
- fromBlock?: BlockTag;
10
- toBlock?: BlockTag;
11
- };
12
- type TransactionStatus = {
13
- transactionId: string;
14
- blockNumber: string;
15
- callEventStatus: string;
16
- callEventLog: Array<any>;
17
- chainData?: ChainData;
18
- transactionUrl?: string;
19
- };
20
- export type ApiBasicResponse = {
21
- error?: string | TypeError[] | GMPError;
22
- errorType?: string;
23
- };
24
- export declare enum SquidTransactionStatus {
25
- SUCCESS = "success",
26
- NEEDS_GAS = "needs_gas",
27
- ONGOING = "ongoing",
28
- PARTIAL_SUCCESS = "partial_success",
29
- NOT_FOUND = "not_found",
30
- FAILED_DESTINATION = "failed_on_destination"
31
- }
32
- export type StatusResponse = ApiBasicResponse & {
33
- id: string;
34
- status: string;
35
- gasStatus: string;
36
- isGMPTransaction?: boolean;
37
- axelarTransactionUrl: string;
38
- fromChain?: TransactionStatus;
39
- toChain?: TransactionStatus;
40
- timeSpent?: Record<string, number> | {};
41
- squidTransactionStatus?: SquidTransactionStatus;
42
- routeStatus?: Array<any>;
43
- };
44
- export type RouteStatus = {
45
- chainId: string | number;
46
- txHash: string;
47
- status: string;
48
- action: AxelarRouteAction;
49
- };
50
- export declare enum AxelarRouteAction {
51
- CALL = "call",
52
- EXECUTED = "executed",
53
- IBC_TRANSFER = "ibc_transfer",
54
- SEND = "send",
55
- VOTE = "vote",
56
- IBC_SEND = "ibc_send",
57
- GAS_PAID = "gas_paid",
58
- APPROVED = "approved"
59
- }
60
- export {};
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/status/index.ts"],"names":[],"mappings":";;;AA4BA,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,iDAAuB,CAAA;IACvB,6CAAmB,CAAA;IACnB,6DAAmC,CAAA;IACnC,iDAAuB,CAAA;IACvB,sEAA4C,CAAA;AAC9C,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC;AAsBD,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,0CAAqB,CAAA;IACrB,kDAA6B,CAAA;IAC7B,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;AACvB,CAAC,EATW,iBAAiB,iCAAjB,iBAAiB,QAS5B"}
@@ -1,39 +0,0 @@
1
- import { ChainType } from "../index";
2
- export interface Token {
3
- type: ChainType;
4
- chainId: string;
5
- address: string;
6
- name: string;
7
- symbol: string;
8
- decimals: number;
9
- logoURI?: string;
10
- coingeckoId?: string;
11
- volatility: Volatility;
12
- redstoneId?: string;
13
- usdPrice?: number;
14
- axelarNetworkSymbol?: string;
15
- subGraphOnly?: boolean;
16
- subGraphIds?: string[];
17
- feeOnTransfer?: boolean;
18
- isLpToken?: boolean;
19
- disabled?: boolean;
20
- }
21
- export interface CosmosToken extends Token {
22
- denom: string;
23
- base_denom: string;
24
- base_type: string;
25
- dp_denom: string;
26
- origin_chain: string;
27
- decimal: number;
28
- description: string;
29
- image: string;
30
- }
31
- export interface EvmToken extends Token {
32
- address: string;
33
- }
34
- export declare enum Volatility {
35
- SUPER_STABLE = 0,
36
- STABLE = 1,
37
- HIGH_CAP = 2,
38
- VOLATILE = 3
39
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":";;;AAqCA,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2DAAY,CAAA;IACZ,+CAAM,CAAA;IACN,mDAAQ,CAAA;IACR,mDAAQ,CAAA;AACV,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB"}
@@ -1,20 +0,0 @@
1
- export declare enum WrapperType {
2
- WRAPPED_NATIVE = "WrappedNative",
3
- OVERNIGHT = "Overnight",
4
- DEUS = "Deus",
5
- WSTETH = "WstETH",
6
- WRAPPED_MAI = "WrappedMAI",
7
- WRAPPED_USDY = "WrappedUSDY"
8
- }
9
- export declare enum WrapDirection {
10
- WRAP = "wrap",
11
- UNWRAP = "unwrap"
12
- }
13
- export interface Wrapper {
14
- chainId: string;
15
- address: string;
16
- coinAddresses: string[];
17
- coinNames: string[];
18
- type: WrapperType;
19
- properties?: Record<string, any>;
20
- }
@@ -1 +0,0 @@
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,2BAAX,WAAW,QAOtB;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,kCAAiB,CAAA;AACnB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"}