@0xsquid/squid-types 0.1.46 → 0.1.48

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 +16 -9
  2. package/dist/bridges/index.d.ts +15 -0
  3. package/dist/bridges/index.js +9 -4
  4. package/dist/bridges/index.js.map +1 -0
  5. package/dist/chains/index.d.ts +216 -0
  6. package/dist/chains/index.js +16 -9
  7. package/dist/chains/index.js.map +1 -0
  8. package/dist/dexes/index.d.ts +81 -0
  9. package/dist/dexes/index.js +8 -4
  10. package/dist/dexes/index.js.map +1 -0
  11. package/dist/errors/index.d.ts +9 -0
  12. package/dist/errors/index.js +3 -1
  13. package/dist/errors/index.js.map +1 -0
  14. package/dist/fees/index.d.ts +26 -0
  15. package/dist/fees/index.js +8 -4
  16. package/dist/fees/index.js.map +1 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.js +29 -12
  19. package/dist/index.js.map +1 -0
  20. package/dist/path/index.d.ts +68 -0
  21. package/dist/path/index.js +3 -1
  22. package/dist/path/index.js.map +1 -0
  23. package/dist/quote/index.d.ts +23 -0
  24. package/dist/quote/index.js +3 -1
  25. package/dist/quote/index.js.map +1 -0
  26. package/dist/routes/index.d.ts +171 -0
  27. package/dist/routes/index.js +8 -4
  28. package/dist/routes/index.js.map +1 -0
  29. package/dist/squid/index.d.ts +141 -0
  30. package/dist/squid/index.js +18 -6
  31. package/dist/squid/index.js.map +1 -0
  32. package/dist/status/index.d.ts +60 -0
  33. package/dist/status/index.js +8 -4
  34. package/dist/status/index.js.map +1 -0
  35. package/dist/tokens/index.d.ts +39 -0
  36. package/dist/tokens/index.js +6 -2
  37. package/dist/tokens/index.js.map +1 -0
  38. package/dist/wrappers/index.d.ts +20 -0
  39. package/dist/wrappers/index.js +8 -4
  40. package/dist/wrappers/index.js.map +1 -0
  41. package/package.json +1 -1
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Squid Types
2
2
 
3
- Squid types used on the graph, api and sdk.
3
+ Squid types used on the data feed, pathfinder api and sdk.
4
4
 
5
5
  ### LINTER & PRETTIER
6
6
 
7
- This project has installed prettier and linter rules, with husky we ensure pre-commit and pre-push validation.
7
+ This project has [Prettier](https://prettier.io/docs/en/) and [ESLint](https://eslint.org/docs/latest/) linter rules installed. With [Husky](https://typicode.github.io/husky/) we ensure pre-commit and pre-push validation.
8
8
 
9
9
  ```bash
10
10
  yarn lint
@@ -18,9 +18,11 @@ yarn lint:fix
18
18
  yarn format
19
19
  ```
20
20
 
21
- ### VSCODE
21
+ ### VSCODE SETUP
22
22
 
23
- Create `.vscode/setting.json` for auto-saving linter and prettier format
23
+ Create a file `.vscode/settings.json` for auto-saving linter and prettier formatting.
24
+
25
+ Add the following:
24
26
 
25
27
  ```json
26
28
  {
@@ -34,12 +36,17 @@ Create `.vscode/setting.json` for auto-saving linter and prettier format
34
36
  }
35
37
  ```
36
38
 
37
- # RELEASE
39
+ ### RELEASE
40
+
41
+ NPM package publishing is automated with github actions. Follow these steps:
42
+
43
+ #### 1. Create a PR to the `develop` branch
38
44
 
39
- NPM package publish is automated with github actions, follow these steps:
45
+ - Update `version` inside `package.json`
46
+ - Review, approve and merge.
40
47
 
41
- 1 - Create a PR to `develop` branch updating `package.json` version. (review, approve and merge)
48
+ #### 2. Create a PR from `develop` to `main`
42
49
 
43
- 2 - Create a PR from `develop` to `main`. (review, approve and merge)
50
+ - Review, approve and merge
44
51
 
45
- Once the PR to `main` is merged, this commit on this branch gonna trigger automatically the release to NPM, please make sure you update correctly the version.
52
+ *As the PR from (2.) is merged, the commit to `main` will automatically trigger a release to NPM, please make sure you correctly update the version.*
@@ -0,0 +1,15 @@
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
+ PFM = "pfm"
14
+ }
15
+ export type BridgeConfig = Record<string, string>;
@@ -1,15 +1,20 @@
1
- export var BridgeType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BridgeProvider = exports.BridgeType = void 0;
4
+ var BridgeType;
2
5
  (function (BridgeType) {
3
6
  BridgeType["AXELAR_GMP"] = "gmp";
4
7
  BridgeType["AXELAR_ITS"] = "its";
5
8
  BridgeType["CCTP"] = "cctp";
6
9
  BridgeType["NOBLE_CCTP"] = "noble-cctp";
7
10
  BridgeType["IBC"] = "ibc";
8
- })(BridgeType || (BridgeType = {}));
9
- export var BridgeProvider;
11
+ })(BridgeType || (exports.BridgeType = BridgeType = {}));
12
+ var BridgeProvider;
10
13
  (function (BridgeProvider) {
11
14
  BridgeProvider["AXELAR"] = "axelar";
12
15
  BridgeProvider["CCTP"] = "cctp";
13
16
  BridgeProvider["NOBLE_CCTP"] = "noble-cctp";
14
17
  BridgeProvider["IBC"] = "ibc";
15
- })(BridgeProvider || (BridgeProvider = {}));
18
+ BridgeProvider["PFM"] = "pfm";
19
+ })(BridgeProvider || (exports.BridgeProvider = BridgeProvider = {}));
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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,cAMX;AAND,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,2CAAyB,CAAA;IACzB,6BAAW,CAAA;IACX,6BAAW,CAAA;AACb,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB"}
@@ -0,0 +1,216 @@
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
+ OSMOSIS7 = "osmosis-7",//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
+ DYDX = "dydx"
139
+ }
140
+ export declare enum NetworkIdentifier {
141
+ ETHEREUM = "Ethereum",
142
+ AVALANCHE = "Avalanche",
143
+ ARBITRUM = "Arbitrum",
144
+ AURORA = "Aurora",
145
+ BASE = "Base",
146
+ BINANCE = "Binance",
147
+ CELO = "Celo",
148
+ FANTOM = "Fantom",
149
+ FILECOIN = "Filecoin",
150
+ KAVA = "Kava",
151
+ MANTLE = "Mantle",
152
+ MOONBEAM = "Moonbeam",
153
+ OPTIMISM = "Optimism",
154
+ POLYGON = "Polygon",
155
+ LINEA = "Linea",
156
+ SCROLL = "Scroll",
157
+ AGORIC = "agoric",
158
+ ASSETMANTLE = "assetmantle",
159
+ AURA = "Aura",
160
+ AXELAR = "Axelar",
161
+ AXELARNET = "Axelarnet",
162
+ CARBON = "Carbon",
163
+ COMDEX = "Comdex",
164
+ COSMOS = "Cosmoshub",
165
+ CRESCENT = "Crescent",
166
+ EMONEY = "E-money",
167
+ EVMOS = "Evmos",
168
+ FETCH = "Fetch",
169
+ INJECTIVE = "Injective",
170
+ JUNO = "Juno",
171
+ KI = "Ki",
172
+ KUJIRA = "Kujira",
173
+ NOBLE = "Noble",
174
+ OSMOSIS = "Osmosis",
175
+ REGEN = "Regen",
176
+ SEI = "Sei",
177
+ SECRET = "Secret",//deprecated
178
+ SECRETSNIP = "Secret-snip",
179
+ STARGAZE = "Stargaze",
180
+ STRIDE = "Stride",
181
+ TERRA2 = "Terra-2",
182
+ UMEE = "Umee",
183
+ DYDX = "Dydx"
184
+ }
185
+ export type ChainIBCInfo = {
186
+ chain_id: string;
187
+ client_id: string;
188
+ connection_id: string;
189
+ };
190
+ export type Channel = {
191
+ chain_1: {
192
+ channel_id: string;
193
+ port_id: string;
194
+ };
195
+ chain_2: {
196
+ channel_id: string;
197
+ port_id: string;
198
+ };
199
+ ordering: string;
200
+ version: string;
201
+ tags: {
202
+ status: string;
203
+ preferred?: boolean;
204
+ dex?: string;
205
+ };
206
+ };
207
+ export type IbcData = {
208
+ chain_1: ChainIBCInfo;
209
+ chain_2: ChainIBCInfo;
210
+ channels: Channel[];
211
+ };
212
+ export declare enum CosmosChainFeatures {
213
+ PACKET_FORWARD_MIDDLEWARE = "packet-forward-middleware",
214
+ LEGACY_IBC = "legacy-ibc",
215
+ COSMWASM = "cosmwasm"
216
+ }
@@ -1,9 +1,12 @@
1
- export var ChainType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CosmosChainFeatures = exports.NetworkIdentifier = exports.ChainName = exports.ChainType = void 0;
4
+ var ChainType;
2
5
  (function (ChainType) {
3
6
  ChainType["EVM"] = "evm";
4
7
  ChainType["COSMOS"] = "cosmos";
5
- })(ChainType || (ChainType = {}));
6
- export var ChainName;
8
+ })(ChainType || (exports.ChainType = ChainType = {}));
9
+ var ChainName;
7
10
  (function (ChainName) {
8
11
  ChainName["ARBITRUM"] = "Arbitrum";
9
12
  ChainName["ARBITRUM2"] = "arbitrum";
@@ -44,7 +47,7 @@ export var ChainName;
44
47
  ChainName["KUJIRA"] = "kujira";
45
48
  ChainName["NOBLE"] = "noble";
46
49
  ChainName["OSMOSIS"] = "osmosis";
47
- ChainName["OSMOSIS5"] = "osmosis-5";
50
+ ChainName["OSMOSIS7"] = "osmosis-7";
48
51
  ChainName["REGEN"] = "regen";
49
52
  ChainName["SEI"] = "sei";
50
53
  ChainName["SECRET"] = "secret";
@@ -53,8 +56,9 @@ export var ChainName;
53
56
  ChainName["STRIDE"] = "stride";
54
57
  ChainName["TERRA2"] = "terra-2";
55
58
  ChainName["UMEE"] = "umee";
56
- })(ChainName || (ChainName = {}));
57
- export var NetworkIdentifier;
59
+ ChainName["DYDX"] = "dydx";
60
+ })(ChainName || (exports.ChainName = ChainName = {}));
61
+ var NetworkIdentifier;
58
62
  (function (NetworkIdentifier) {
59
63
  // EVM
60
64
  NetworkIdentifier["ETHEREUM"] = "Ethereum";
@@ -100,9 +104,12 @@ export var NetworkIdentifier;
100
104
  NetworkIdentifier["STRIDE"] = "Stride";
101
105
  NetworkIdentifier["TERRA2"] = "Terra-2";
102
106
  NetworkIdentifier["UMEE"] = "Umee";
103
- })(NetworkIdentifier || (NetworkIdentifier = {}));
104
- export var CosmosChainFeatures;
107
+ NetworkIdentifier["DYDX"] = "Dydx";
108
+ })(NetworkIdentifier || (exports.NetworkIdentifier = NetworkIdentifier = {}));
109
+ var CosmosChainFeatures;
105
110
  (function (CosmosChainFeatures) {
106
111
  CosmosChainFeatures["PACKET_FORWARD_MIDDLEWARE"] = "packet-forward-middleware";
112
+ CosmosChainFeatures["LEGACY_IBC"] = "legacy-ibc";
107
113
  CosmosChainFeatures["COSMWASM"] = "cosmwasm";
108
- })(CosmosChainFeatures || (CosmosChainFeatures = {}));
114
+ })(CosmosChainFeatures || (exports.CosmosChainFeatures = CosmosChainFeatures = {}));
115
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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,SAmDX;AAnDD,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,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jB,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;IACb,kCAAa,CAAA;AACf,CAAC,EA/CW,iBAAiB,iCAAjB,iBAAiB,QA+C5B;AAgCD,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,8EAAuD,CAAA;IACvD,gDAAyB,CAAA;IACzB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B"}
@@ -0,0 +1,81 @@
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,5 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DexType = exports.DexName = void 0;
1
4
  // identifiers for dexes
2
- export var DexName;
5
+ var DexName;
3
6
  (function (DexName) {
4
7
  DexName["AGNI_V3"] = "Agni-v3";
5
8
  DexName["AERODROME"] = "Aerodrome";
@@ -57,9 +60,9 @@ export var DexName;
57
60
  DexName["VELOCIMETER"] = "Velocimeter";
58
61
  DexName["ZYBERSWAP"] = "Zyberswap";
59
62
  DexName["ZYBERSWAP_V3"] = "Zyberswap-v3";
60
- })(DexName || (DexName = {}));
63
+ })(DexName || (exports.DexName = DexName = {}));
61
64
  // identifiers dex adapters
62
- export var DexType;
65
+ var DexType;
63
66
  (function (DexType) {
64
67
  // EVM
65
68
  DexType["ALGEBRA"] = "algebra";
@@ -82,4 +85,5 @@ export var DexType;
82
85
  /*
83
86
  DUALITY = "Duality",
84
87
  */
85
- })(DexType || (DexType = {}));
88
+ })(DexType || (exports.DexType = DexType = {}));
89
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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,C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AAiB,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"}
@@ -0,0 +1,9 @@
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 +1,3 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
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,10 +1,14 @@
1
- export var FeeType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GasCostType = exports.FeeType = void 0;
4
+ var FeeType;
2
5
  (function (FeeType) {
3
6
  FeeType["AXELAR_FEE"] = "Axelar Fee";
4
7
  FeeType["GAS_RECEIVER_FEE"] = "Gas Receiver Fee";
5
8
  FeeType["EXPRESS_FEE"] = "Express Fee";
6
- })(FeeType || (FeeType = {}));
7
- export var GasCostType;
9
+ })(FeeType || (exports.FeeType = FeeType = {}));
10
+ var GasCostType;
8
11
  (function (GasCostType) {
9
12
  GasCostType["EXECUTE_CALL"] = "executeCall";
10
- })(GasCostType || (GasCostType = {}));
13
+ })(GasCostType || (exports.GasCostType = GasCostType = {}));
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,12 @@
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 CHANGED
@@ -1,12 +1,29 @@
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
+ "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
@@ -0,0 +1 @@
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"}