@lifi/types 9.0.0-alpha.0 → 9.0.0-alpha.2
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/api.d.ts +20 -2
- package/dist/base.d.ts +0 -22
- package/dist/bridges.d.ts +14 -2
- package/dist/bridges.js +0 -148
- package/dist/chains/EVMChain.d.ts +0 -1
- package/dist/chains/EVMChain.js +1 -4
- package/dist/chains/index.d.ts +0 -2
- package/dist/chains/index.js +0 -2
- package/dist/cjs/api.d.ts +20 -2
- package/dist/cjs/base.d.ts +0 -22
- package/dist/cjs/base.js +3 -3
- package/dist/cjs/bridges.d.ts +14 -2
- package/dist/cjs/bridges.js +2 -150
- package/dist/cjs/chains/Chain.js +1 -1
- package/dist/cjs/chains/EVMChain.d.ts +0 -1
- package/dist/cjs/chains/EVMChain.js +0 -6
- package/dist/cjs/chains/index.d.ts +0 -2
- package/dist/cjs/chains/index.js +0 -2
- package/dist/cjs/exchanges.d.ts +4 -14
- package/dist/cjs/exchanges.js +2 -1091
- package/dist/cjs/index.d.ts +3 -5
- package/dist/cjs/index.js +3 -5
- package/dist/cjs/step.d.ts +8 -6
- package/dist/exchanges.d.ts +4 -14
- package/dist/exchanges.js +0 -1088
- package/dist/index.d.ts +3 -5
- package/dist/index.js +3 -5
- package/dist/step.d.ts +8 -6
- package/package.json +2 -14
- package/dist/chains/chain.utils.d.ts +0 -4
- package/dist/chains/chain.utils.js +0 -21
- package/dist/chains/supported.chains.d.ts +0 -5
- package/dist/chains/supported.chains.js +0 -1166
- package/dist/cjs/chains/chain.utils.d.ts +0 -4
- package/dist/cjs/chains/chain.utils.js +0 -26
- package/dist/cjs/chains/supported.chains.d.ts +0 -5
- package/dist/cjs/chains/supported.chains.js +0 -1169
- package/dist/cjs/coins.d.ts +0 -9
- package/dist/cjs/coins.js +0 -1841
- package/dist/cjs/multicall.d.ts +0 -3
- package/dist/cjs/multicall.js +0 -79
- package/dist/coins.d.ts +0 -9
- package/dist/coins.js +0 -1834
- package/dist/multicall.d.ts +0 -3
- package/dist/multicall.js +0 -76
package/dist/api.d.ts
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
import { TransactionRequest } from '@ethersproject/providers';
|
|
2
1
|
import { BridgeDefinition, Chain, ChainId, ExchangeDefinition, LifiStep, Token } from '.';
|
|
3
2
|
import { ToolError } from './apiErrors';
|
|
3
|
+
export type TransactionRequest = {
|
|
4
|
+
to?: string;
|
|
5
|
+
from?: string;
|
|
6
|
+
nonce?: number;
|
|
7
|
+
gasLimit?: bigint;
|
|
8
|
+
gasPrice?: bigint;
|
|
9
|
+
data?: `0x${string}`;
|
|
10
|
+
value?: bigint;
|
|
11
|
+
chainId?: number;
|
|
12
|
+
type?: number;
|
|
13
|
+
accessList?: {
|
|
14
|
+
address: `0x${string}`;
|
|
15
|
+
storageKeys: `0x${string}`[];
|
|
16
|
+
}[];
|
|
17
|
+
maxPriorityFeePerGas?: bigint;
|
|
18
|
+
maxFeePerGas?: bigint;
|
|
19
|
+
customData?: Record<string, any>;
|
|
20
|
+
ccipReadEnabled?: boolean;
|
|
21
|
+
};
|
|
4
22
|
export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
|
|
5
23
|
export type Order = (typeof Orders)[number];
|
|
6
24
|
export interface RoutesRequest {
|
|
@@ -234,7 +252,7 @@ export type SubstatusDone = (typeof _SubstatusDone)[number];
|
|
|
234
252
|
declare const _SubstatusFailed: readonly ["NOT_PROCESSABLE_REFUND_NEEDED"];
|
|
235
253
|
export type SubstatusFailed = (typeof _SubstatusFailed)[number];
|
|
236
254
|
export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
|
|
237
|
-
export declare const isSubstatusPending: (substatus: Substatus) => substatus is "
|
|
255
|
+
export declare const isSubstatusPending: (substatus: Substatus) => substatus is "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "REFUND_IN_PROGRESS" | "UNKNOWN_ERROR";
|
|
238
256
|
export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
|
|
239
257
|
export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
|
|
240
258
|
export interface BaseStatusData {
|
package/dist/base.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { BridgeTool } from './bridges';
|
|
2
|
-
import { ExchangeTools } from './exchanges';
|
|
3
1
|
export declare enum CoinKey {
|
|
4
2
|
ETH = "ETH",
|
|
5
3
|
MATIC = "MATIC",
|
|
@@ -207,23 +205,3 @@ export interface Coin {
|
|
|
207
205
|
[ChainId: string]: StaticToken;
|
|
208
206
|
};
|
|
209
207
|
}
|
|
210
|
-
export interface ExchangeDefinition {
|
|
211
|
-
tool: ExchangeTools;
|
|
212
|
-
chains: number[];
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Should not be accessed via the types package anymore
|
|
216
|
-
* @deprecated
|
|
217
|
-
*/
|
|
218
|
-
export interface BridgeDefinition {
|
|
219
|
-
tool: BridgeTool;
|
|
220
|
-
fromChainId: number;
|
|
221
|
-
fromToken: BaseToken;
|
|
222
|
-
toChainId: number;
|
|
223
|
-
toToken: BaseToken;
|
|
224
|
-
maximumTransfer: string;
|
|
225
|
-
minimumTransfer: string;
|
|
226
|
-
swapFeeRate: string;
|
|
227
|
-
swapFeeMinimum: string;
|
|
228
|
-
swapFeeMaximum: string;
|
|
229
|
-
}
|
package/dist/bridges.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BaseToken } from './base';
|
|
1
2
|
/**
|
|
2
3
|
* @deprecated
|
|
3
4
|
* These values are now obtainable from the LI.FI API
|
|
@@ -28,7 +29,18 @@ export interface Bridge {
|
|
|
28
29
|
analyticsUrl?: string;
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
32
|
+
* Should not be accessed via the types package anymore
|
|
31
33
|
* @deprecated
|
|
32
|
-
* These values are now obtainable from the LI.FI API
|
|
33
34
|
*/
|
|
34
|
-
export
|
|
35
|
+
export interface BridgeDefinition {
|
|
36
|
+
tool: BridgeTool;
|
|
37
|
+
fromChainId: number;
|
|
38
|
+
fromToken: BaseToken;
|
|
39
|
+
toChainId: number;
|
|
40
|
+
toToken: BaseToken;
|
|
41
|
+
maximumTransfer: string;
|
|
42
|
+
minimumTransfer: string;
|
|
43
|
+
swapFeeRate: string;
|
|
44
|
+
swapFeeMinimum: string;
|
|
45
|
+
swapFeeMaximum: string;
|
|
46
|
+
}
|
package/dist/bridges.js
CHANGED
|
@@ -17,151 +17,3 @@ export var BridgeTool;
|
|
|
17
17
|
BridgeTool["portal"] = "portal";
|
|
18
18
|
BridgeTool["stargate"] = "stargate";
|
|
19
19
|
})(BridgeTool || (BridgeTool = {}));
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated
|
|
22
|
-
* These values are now obtainable from the LI.FI API
|
|
23
|
-
*/
|
|
24
|
-
export const supportedBridges = [
|
|
25
|
-
{
|
|
26
|
-
key: BridgeTool.connext,
|
|
27
|
-
name: 'Connext',
|
|
28
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/connext.png',
|
|
29
|
-
bridgeUrl: 'https://xpollinate.io/',
|
|
30
|
-
discordUrl: 'https://chat.connext.network/',
|
|
31
|
-
supportUrl: 'https://www.notion.so/connext/Connext-NXTP-Support-19a357ebabdd4e888cfcd138fe3e4644',
|
|
32
|
-
docsUrl: 'https://docs.connext.network/',
|
|
33
|
-
explorerUrl: 'https://connextscan.io/',
|
|
34
|
-
analyticsUrl: 'https://connextscan.io/',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
key: BridgeTool.hop,
|
|
38
|
-
name: 'Hop',
|
|
39
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/hop.png',
|
|
40
|
-
bridgeUrl: 'https://app.hop.exchange/',
|
|
41
|
-
discordUrl: 'https://discord.gg/PwCF88emV4',
|
|
42
|
-
supportUrl: 'https://help.hop.exchange/hc/en-us',
|
|
43
|
-
docsUrl: 'https://docs.hop.exchange/',
|
|
44
|
-
explorerUrl: 'https://explorer.hop.exchange/mainnet/',
|
|
45
|
-
analyticsUrl: 'https://explorer.hop.exchange/mainnet/',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
key: BridgeTool.multichain,
|
|
49
|
-
name: 'Multichain',
|
|
50
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/anyswap.png',
|
|
51
|
-
bridgeUrl: 'https://app.multichain.org/',
|
|
52
|
-
// discordUrl: '',
|
|
53
|
-
supportUrl: 'https://multichain.zendesk.com/hc/en-us',
|
|
54
|
-
docsUrl: 'https://docs.multichain.org/',
|
|
55
|
-
explorerUrl: 'https://anyswap.net/',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
key: BridgeTool.cbridge,
|
|
59
|
-
name: 'cBridge',
|
|
60
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/cbridge.png',
|
|
61
|
-
bridgeUrl: 'https://cbridge.celer.network/',
|
|
62
|
-
discordUrl: 'https://discord.com/invite/uGx4fjQ',
|
|
63
|
-
supportUrl: 'https://form.typeform.com/to/Q4LMjUaK',
|
|
64
|
-
docsUrl: 'https://cbridge-docs.celer.network/',
|
|
65
|
-
// explorerUrl: '',
|
|
66
|
-
analyticsUrl: 'https://cbridge-analytics.celer.network/',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
key: BridgeTool.hyphen,
|
|
70
|
-
name: 'Hyphen',
|
|
71
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/hyphen.png',
|
|
72
|
-
bridgeUrl: 'https://hyphen.biconomy.io/',
|
|
73
|
-
discordUrl: 'https://discord.com/invite/HKHxgyEExQ',
|
|
74
|
-
supportUrl: 'https://discord.com/invite/HKHxgyEExQ',
|
|
75
|
-
docsUrl: 'https://docs.biconomy.io/products/hyphen-instant-cross-chain-transfers',
|
|
76
|
-
// explorerUrl: '',
|
|
77
|
-
analyticsUrl: 'https://hyphen-info.biconomy.io/',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
key: BridgeTool.polygon,
|
|
81
|
-
name: 'Polygon Bridge (PoS)',
|
|
82
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/polygon.png',
|
|
83
|
-
bridgeUrl: 'https://wallet.polygon.technology/bridge',
|
|
84
|
-
// discordUrl: '',
|
|
85
|
-
supportUrl: 'https://forum.matic.network/',
|
|
86
|
-
docsUrl: 'https://docs.polygon.technology/docs/develop/ethereum-polygon/pos/getting-started',
|
|
87
|
-
// explorerUrl: '',
|
|
88
|
-
// analyticsUrl: '',
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
key: BridgeTool.arbitrum,
|
|
92
|
-
name: 'Arbitrum Bridge',
|
|
93
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/arbitrum.png',
|
|
94
|
-
bridgeUrl: 'https://bridge.arbitrum.io/',
|
|
95
|
-
discordUrl: 'https://discord.gg/ZpZuw7p',
|
|
96
|
-
supportUrl: 'https://discord.gg/ZpZuw7p',
|
|
97
|
-
docsUrl: 'https://developer.offchainlabs.com/docs/bridging_assets',
|
|
98
|
-
// explorerUrl: '',
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
key: BridgeTool.avalanche,
|
|
102
|
-
name: 'AVAX Bridge',
|
|
103
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/avalanche.png',
|
|
104
|
-
bridgeUrl: 'https://bridge.avax.network/',
|
|
105
|
-
discordUrl: 'https://chat.avalabs.org/',
|
|
106
|
-
supportUrl: 'https://docs.avax.network/learn/avalanche-bridge-faq/',
|
|
107
|
-
docsUrl: 'https://docs.avax.network/learn/avalanche-bridge-faq/',
|
|
108
|
-
// explorerUrl: '',
|
|
109
|
-
// analyticsUrl: '',
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
key: BridgeTool.optimism,
|
|
113
|
-
name: 'Optimism Gateway',
|
|
114
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/optimism.png',
|
|
115
|
-
bridgeUrl: 'https://gateway.optimism.io/',
|
|
116
|
-
discordUrl: 'https://discord.com/invite/jrnFEvq',
|
|
117
|
-
supportUrl: 'https://discord.com/invite/jrnFEvq',
|
|
118
|
-
docsUrl: 'https://community.optimism.io/docs/developers/bridge/basics/',
|
|
119
|
-
// explorerUrl: '',
|
|
120
|
-
// analyticsUrl: '',
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
key: BridgeTool.across,
|
|
124
|
-
name: 'Across',
|
|
125
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/acrossv2.png',
|
|
126
|
-
bridgeUrl: 'https://across.to/',
|
|
127
|
-
discordUrl: 'https://discord.gg/t4SZySkn',
|
|
128
|
-
supportUrl: 'https://discord.gg/t4SZySkn',
|
|
129
|
-
docsUrl: 'https://docs.across.to/',
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
key: BridgeTool.portal,
|
|
133
|
-
name: 'Wormhole Portal',
|
|
134
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/wormhole_portal.png',
|
|
135
|
-
bridgeUrl: 'https://portalbridge.com/',
|
|
136
|
-
discordUrl: 'https://discord.com/invite/wormholecrypto',
|
|
137
|
-
supportUrl: 'https://discord.com/invite/wormholecrypto',
|
|
138
|
-
docsUrl: 'https://docs.wormholenetwork.com/wormhole/',
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
key: BridgeTool.stargate,
|
|
142
|
-
name: 'Stargate',
|
|
143
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/5685c638772f533edad80fcb210b4bb89e30a50f/src/assets/icons/bridges/stargate.png',
|
|
144
|
-
bridgeUrl: 'https://stargate.finance/',
|
|
145
|
-
discordUrl: 'https://discord.com/invite/TyjeQ45',
|
|
146
|
-
supportUrl: 'https://discord.com/invite/TyjeQ45',
|
|
147
|
-
docsUrl: 'https://stargateprotocol.gitbook.io/stargate/',
|
|
148
|
-
},
|
|
149
|
-
// {
|
|
150
|
-
// key: BridgeTool.,
|
|
151
|
-
// name: '',
|
|
152
|
-
// logoURI:
|
|
153
|
-
// 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/.png',
|
|
154
|
-
// bridgeUrl: '',
|
|
155
|
-
// discordUrl: '',
|
|
156
|
-
// supportUrl: '',
|
|
157
|
-
// docsUrl: '',
|
|
158
|
-
// explorerUrl: '',
|
|
159
|
-
// analyticsUrl: '',
|
|
160
|
-
// },
|
|
161
|
-
// for cronos chain, we should confirm if these bridges are available to integrate
|
|
162
|
-
// https://bridge.evodefi.com/
|
|
163
|
-
// https://app.relaychain.com/#/
|
|
164
|
-
// for metis network, we should confirm these bridges as well
|
|
165
|
-
// https://bridge.metis.io/home
|
|
166
|
-
// https://apps.standard.tech/bridge
|
|
167
|
-
];
|
package/dist/chains/EVMChain.js
CHANGED
package/dist/chains/index.d.ts
CHANGED
package/dist/chains/index.js
CHANGED
package/dist/cjs/api.d.ts
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
import { TransactionRequest } from '@ethersproject/providers';
|
|
2
1
|
import { BridgeDefinition, Chain, ChainId, ExchangeDefinition, LifiStep, Token } from '.';
|
|
3
2
|
import { ToolError } from './apiErrors';
|
|
3
|
+
export type TransactionRequest = {
|
|
4
|
+
to?: string;
|
|
5
|
+
from?: string;
|
|
6
|
+
nonce?: number;
|
|
7
|
+
gasLimit?: bigint;
|
|
8
|
+
gasPrice?: bigint;
|
|
9
|
+
data?: `0x${string}`;
|
|
10
|
+
value?: bigint;
|
|
11
|
+
chainId?: number;
|
|
12
|
+
type?: number;
|
|
13
|
+
accessList?: {
|
|
14
|
+
address: `0x${string}`;
|
|
15
|
+
storageKeys: `0x${string}`[];
|
|
16
|
+
}[];
|
|
17
|
+
maxPriorityFeePerGas?: bigint;
|
|
18
|
+
maxFeePerGas?: bigint;
|
|
19
|
+
customData?: Record<string, any>;
|
|
20
|
+
ccipReadEnabled?: boolean;
|
|
21
|
+
};
|
|
4
22
|
export declare const Orders: readonly ["RECOMMENDED", "FASTEST", "CHEAPEST", "SAFEST"];
|
|
5
23
|
export type Order = (typeof Orders)[number];
|
|
6
24
|
export interface RoutesRequest {
|
|
@@ -234,7 +252,7 @@ export type SubstatusDone = (typeof _SubstatusDone)[number];
|
|
|
234
252
|
declare const _SubstatusFailed: readonly ["NOT_PROCESSABLE_REFUND_NEEDED"];
|
|
235
253
|
export type SubstatusFailed = (typeof _SubstatusFailed)[number];
|
|
236
254
|
export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
|
|
237
|
-
export declare const isSubstatusPending: (substatus: Substatus) => substatus is "
|
|
255
|
+
export declare const isSubstatusPending: (substatus: Substatus) => substatus is "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "REFUND_IN_PROGRESS" | "UNKNOWN_ERROR";
|
|
238
256
|
export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
|
|
239
257
|
export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
|
|
240
258
|
export interface BaseStatusData {
|
package/dist/cjs/base.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { BridgeTool } from './bridges';
|
|
2
|
-
import { ExchangeTools } from './exchanges';
|
|
3
1
|
export declare enum CoinKey {
|
|
4
2
|
ETH = "ETH",
|
|
5
3
|
MATIC = "MATIC",
|
|
@@ -207,23 +205,3 @@ export interface Coin {
|
|
|
207
205
|
[ChainId: string]: StaticToken;
|
|
208
206
|
};
|
|
209
207
|
}
|
|
210
|
-
export interface ExchangeDefinition {
|
|
211
|
-
tool: ExchangeTools;
|
|
212
|
-
chains: number[];
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Should not be accessed via the types package anymore
|
|
216
|
-
* @deprecated
|
|
217
|
-
*/
|
|
218
|
-
export interface BridgeDefinition {
|
|
219
|
-
tool: BridgeTool;
|
|
220
|
-
fromChainId: number;
|
|
221
|
-
fromToken: BaseToken;
|
|
222
|
-
toChainId: number;
|
|
223
|
-
toToken: BaseToken;
|
|
224
|
-
maximumTransfer: string;
|
|
225
|
-
minimumTransfer: string;
|
|
226
|
-
swapFeeRate: string;
|
|
227
|
-
swapFeeMinimum: string;
|
|
228
|
-
swapFeeMaximum: string;
|
|
229
|
-
}
|
package/dist/cjs/base.js
CHANGED
|
@@ -63,7 +63,7 @@ var CoinKey;
|
|
|
63
63
|
CoinKey["MCB"] = "MCB";
|
|
64
64
|
CoinKey["CELR"] = "CELR";
|
|
65
65
|
CoinKey["IF"] = "IF";
|
|
66
|
-
})(CoinKey
|
|
66
|
+
})(CoinKey || (exports.CoinKey = CoinKey = {}));
|
|
67
67
|
var ChainKey;
|
|
68
68
|
(function (ChainKey) {
|
|
69
69
|
ChainKey["ETH"] = "eth";
|
|
@@ -126,7 +126,7 @@ var ChainKey;
|
|
|
126
126
|
ChainKey["MORT"] = "mort";
|
|
127
127
|
ChainKey["FTMT"] = "ftmt";
|
|
128
128
|
ChainKey["LNAT"] = "lnat";
|
|
129
|
-
})(ChainKey
|
|
129
|
+
})(ChainKey || (exports.ChainKey = ChainKey = {}));
|
|
130
130
|
var ChainId;
|
|
131
131
|
(function (ChainId) {
|
|
132
132
|
ChainId[ChainId["ETH"] = 1] = "ETH";
|
|
@@ -189,4 +189,4 @@ var ChainId;
|
|
|
189
189
|
ChainId[ChainId["MORT"] = 1287] = "MORT";
|
|
190
190
|
ChainId[ChainId["FTMT"] = 4002] = "FTMT";
|
|
191
191
|
ChainId[ChainId["LNAT"] = 59140] = "LNAT";
|
|
192
|
-
})(ChainId
|
|
192
|
+
})(ChainId || (exports.ChainId = ChainId = {}));
|
package/dist/cjs/bridges.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BaseToken } from './base';
|
|
1
2
|
/**
|
|
2
3
|
* @deprecated
|
|
3
4
|
* These values are now obtainable from the LI.FI API
|
|
@@ -28,7 +29,18 @@ export interface Bridge {
|
|
|
28
29
|
analyticsUrl?: string;
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
32
|
+
* Should not be accessed via the types package anymore
|
|
31
33
|
* @deprecated
|
|
32
|
-
* These values are now obtainable from the LI.FI API
|
|
33
34
|
*/
|
|
34
|
-
export
|
|
35
|
+
export interface BridgeDefinition {
|
|
36
|
+
tool: BridgeTool;
|
|
37
|
+
fromChainId: number;
|
|
38
|
+
fromToken: BaseToken;
|
|
39
|
+
toChainId: number;
|
|
40
|
+
toToken: BaseToken;
|
|
41
|
+
maximumTransfer: string;
|
|
42
|
+
minimumTransfer: string;
|
|
43
|
+
swapFeeRate: string;
|
|
44
|
+
swapFeeMinimum: string;
|
|
45
|
+
swapFeeMaximum: string;
|
|
46
|
+
}
|
package/dist/cjs/bridges.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.BridgeTool = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated
|
|
6
6
|
* These values are now obtainable from the LI.FI API
|
|
@@ -19,152 +19,4 @@ var BridgeTool;
|
|
|
19
19
|
BridgeTool["across"] = "across";
|
|
20
20
|
BridgeTool["portal"] = "portal";
|
|
21
21
|
BridgeTool["stargate"] = "stargate";
|
|
22
|
-
})(BridgeTool
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated
|
|
25
|
-
* These values are now obtainable from the LI.FI API
|
|
26
|
-
*/
|
|
27
|
-
exports.supportedBridges = [
|
|
28
|
-
{
|
|
29
|
-
key: BridgeTool.connext,
|
|
30
|
-
name: 'Connext',
|
|
31
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/connext.png',
|
|
32
|
-
bridgeUrl: 'https://xpollinate.io/',
|
|
33
|
-
discordUrl: 'https://chat.connext.network/',
|
|
34
|
-
supportUrl: 'https://www.notion.so/connext/Connext-NXTP-Support-19a357ebabdd4e888cfcd138fe3e4644',
|
|
35
|
-
docsUrl: 'https://docs.connext.network/',
|
|
36
|
-
explorerUrl: 'https://connextscan.io/',
|
|
37
|
-
analyticsUrl: 'https://connextscan.io/',
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
key: BridgeTool.hop,
|
|
41
|
-
name: 'Hop',
|
|
42
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/hop.png',
|
|
43
|
-
bridgeUrl: 'https://app.hop.exchange/',
|
|
44
|
-
discordUrl: 'https://discord.gg/PwCF88emV4',
|
|
45
|
-
supportUrl: 'https://help.hop.exchange/hc/en-us',
|
|
46
|
-
docsUrl: 'https://docs.hop.exchange/',
|
|
47
|
-
explorerUrl: 'https://explorer.hop.exchange/mainnet/',
|
|
48
|
-
analyticsUrl: 'https://explorer.hop.exchange/mainnet/',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
key: BridgeTool.multichain,
|
|
52
|
-
name: 'Multichain',
|
|
53
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/anyswap.png',
|
|
54
|
-
bridgeUrl: 'https://app.multichain.org/',
|
|
55
|
-
// discordUrl: '',
|
|
56
|
-
supportUrl: 'https://multichain.zendesk.com/hc/en-us',
|
|
57
|
-
docsUrl: 'https://docs.multichain.org/',
|
|
58
|
-
explorerUrl: 'https://anyswap.net/',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
key: BridgeTool.cbridge,
|
|
62
|
-
name: 'cBridge',
|
|
63
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/cbridge.png',
|
|
64
|
-
bridgeUrl: 'https://cbridge.celer.network/',
|
|
65
|
-
discordUrl: 'https://discord.com/invite/uGx4fjQ',
|
|
66
|
-
supportUrl: 'https://form.typeform.com/to/Q4LMjUaK',
|
|
67
|
-
docsUrl: 'https://cbridge-docs.celer.network/',
|
|
68
|
-
// explorerUrl: '',
|
|
69
|
-
analyticsUrl: 'https://cbridge-analytics.celer.network/',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
key: BridgeTool.hyphen,
|
|
73
|
-
name: 'Hyphen',
|
|
74
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/hyphen.png',
|
|
75
|
-
bridgeUrl: 'https://hyphen.biconomy.io/',
|
|
76
|
-
discordUrl: 'https://discord.com/invite/HKHxgyEExQ',
|
|
77
|
-
supportUrl: 'https://discord.com/invite/HKHxgyEExQ',
|
|
78
|
-
docsUrl: 'https://docs.biconomy.io/products/hyphen-instant-cross-chain-transfers',
|
|
79
|
-
// explorerUrl: '',
|
|
80
|
-
analyticsUrl: 'https://hyphen-info.biconomy.io/',
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
key: BridgeTool.polygon,
|
|
84
|
-
name: 'Polygon Bridge (PoS)',
|
|
85
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/polygon.png',
|
|
86
|
-
bridgeUrl: 'https://wallet.polygon.technology/bridge',
|
|
87
|
-
// discordUrl: '',
|
|
88
|
-
supportUrl: 'https://forum.matic.network/',
|
|
89
|
-
docsUrl: 'https://docs.polygon.technology/docs/develop/ethereum-polygon/pos/getting-started',
|
|
90
|
-
// explorerUrl: '',
|
|
91
|
-
// analyticsUrl: '',
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
key: BridgeTool.arbitrum,
|
|
95
|
-
name: 'Arbitrum Bridge',
|
|
96
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/arbitrum.png',
|
|
97
|
-
bridgeUrl: 'https://bridge.arbitrum.io/',
|
|
98
|
-
discordUrl: 'https://discord.gg/ZpZuw7p',
|
|
99
|
-
supportUrl: 'https://discord.gg/ZpZuw7p',
|
|
100
|
-
docsUrl: 'https://developer.offchainlabs.com/docs/bridging_assets',
|
|
101
|
-
// explorerUrl: '',
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
key: BridgeTool.avalanche,
|
|
105
|
-
name: 'AVAX Bridge',
|
|
106
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/avalanche.png',
|
|
107
|
-
bridgeUrl: 'https://bridge.avax.network/',
|
|
108
|
-
discordUrl: 'https://chat.avalabs.org/',
|
|
109
|
-
supportUrl: 'https://docs.avax.network/learn/avalanche-bridge-faq/',
|
|
110
|
-
docsUrl: 'https://docs.avax.network/learn/avalanche-bridge-faq/',
|
|
111
|
-
// explorerUrl: '',
|
|
112
|
-
// analyticsUrl: '',
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
key: BridgeTool.optimism,
|
|
116
|
-
name: 'Optimism Gateway',
|
|
117
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/optimism.png',
|
|
118
|
-
bridgeUrl: 'https://gateway.optimism.io/',
|
|
119
|
-
discordUrl: 'https://discord.com/invite/jrnFEvq',
|
|
120
|
-
supportUrl: 'https://discord.com/invite/jrnFEvq',
|
|
121
|
-
docsUrl: 'https://community.optimism.io/docs/developers/bridge/basics/',
|
|
122
|
-
// explorerUrl: '',
|
|
123
|
-
// analyticsUrl: '',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
key: BridgeTool.across,
|
|
127
|
-
name: 'Across',
|
|
128
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/acrossv2.png',
|
|
129
|
-
bridgeUrl: 'https://across.to/',
|
|
130
|
-
discordUrl: 'https://discord.gg/t4SZySkn',
|
|
131
|
-
supportUrl: 'https://discord.gg/t4SZySkn',
|
|
132
|
-
docsUrl: 'https://docs.across.to/',
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
key: BridgeTool.portal,
|
|
136
|
-
name: 'Wormhole Portal',
|
|
137
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/wormhole_portal.png',
|
|
138
|
-
bridgeUrl: 'https://portalbridge.com/',
|
|
139
|
-
discordUrl: 'https://discord.com/invite/wormholecrypto',
|
|
140
|
-
supportUrl: 'https://discord.com/invite/wormholecrypto',
|
|
141
|
-
docsUrl: 'https://docs.wormholenetwork.com/wormhole/',
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
key: BridgeTool.stargate,
|
|
145
|
-
name: 'Stargate',
|
|
146
|
-
logoURI: 'https://raw.githubusercontent.com/lifinance/types/5685c638772f533edad80fcb210b4bb89e30a50f/src/assets/icons/bridges/stargate.png',
|
|
147
|
-
bridgeUrl: 'https://stargate.finance/',
|
|
148
|
-
discordUrl: 'https://discord.com/invite/TyjeQ45',
|
|
149
|
-
supportUrl: 'https://discord.com/invite/TyjeQ45',
|
|
150
|
-
docsUrl: 'https://stargateprotocol.gitbook.io/stargate/',
|
|
151
|
-
},
|
|
152
|
-
// {
|
|
153
|
-
// key: BridgeTool.,
|
|
154
|
-
// name: '',
|
|
155
|
-
// logoURI:
|
|
156
|
-
// 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/.png',
|
|
157
|
-
// bridgeUrl: '',
|
|
158
|
-
// discordUrl: '',
|
|
159
|
-
// supportUrl: '',
|
|
160
|
-
// docsUrl: '',
|
|
161
|
-
// explorerUrl: '',
|
|
162
|
-
// analyticsUrl: '',
|
|
163
|
-
// },
|
|
164
|
-
// for cronos chain, we should confirm if these bridges are available to integrate
|
|
165
|
-
// https://bridge.evodefi.com/
|
|
166
|
-
// https://app.relaychain.com/#/
|
|
167
|
-
// for metis network, we should confirm these bridges as well
|
|
168
|
-
// https://bridge.metis.io/home
|
|
169
|
-
// https://apps.standard.tech/bridge
|
|
170
|
-
];
|
|
22
|
+
})(BridgeTool || (exports.BridgeTool = BridgeTool = {}));
|
package/dist/cjs/chains/Chain.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.prefixChainId = void 0;
|
|
4
|
-
const ethers_1 = require("ethers");
|
|
5
|
-
const prefixChainId = (chainId) => {
|
|
6
|
-
return '0x' + ethers_1.BigNumber.from(chainId)._hex.split('0x')[1].replace(/\b0+/g, '');
|
|
7
|
-
};
|
|
8
|
-
exports.prefixChainId = prefixChainId;
|
package/dist/cjs/chains/index.js
CHANGED
|
@@ -15,7 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Chain"), exports);
|
|
18
|
-
__exportStar(require("./chain.utils"), exports);
|
|
19
18
|
__exportStar(require("./EVMChain"), exports);
|
|
20
19
|
__exportStar(require("./SolanaChain"), exports);
|
|
21
|
-
__exportStar(require("./supported.chains"), exports);
|
package/dist/cjs/exchanges.d.ts
CHANGED
|
@@ -21,11 +21,6 @@ export interface ExchangeAggregator {
|
|
|
21
21
|
logoURI: string;
|
|
22
22
|
webUrl: string;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated
|
|
26
|
-
* These values are now obtainable from the LI.FI API
|
|
27
|
-
*/
|
|
28
|
-
export declare const supportedExchangeAggregators: Array<ExchangeAggregator>;
|
|
29
24
|
export interface Exchange {
|
|
30
25
|
key: ExchangeTools;
|
|
31
26
|
name: string;
|
|
@@ -39,12 +34,7 @@ export interface Exchange {
|
|
|
39
34
|
initCodeHash: string;
|
|
40
35
|
baseTokens: readonly StaticToken[];
|
|
41
36
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated
|
|
48
|
-
* Available exchanges should be queried from the API
|
|
49
|
-
*/
|
|
50
|
-
export declare const getExchangeByKey: (key: string) => Exchange;
|
|
37
|
+
export interface ExchangeDefinition {
|
|
38
|
+
tool: ExchangeTools;
|
|
39
|
+
chains: number[];
|
|
40
|
+
}
|