@lifi/types 6.0.0 → 7.0.0
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/CHANGELOG.md +13 -0
- package/dist/api.d.ts +31 -15
- package/dist/cjs/api.d.ts +31 -15
- package/dist/cjs/base.js +3 -3
- package/dist/cjs/bridges.js +1 -1
- package/dist/cjs/chains/Chain.js +1 -1
- package/dist/cjs/exchanges.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [7.0.0](https://github.com/lifinance/types/compare/v5.3.0...v7.0.0) (2023-06-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* new types for status endpoint (#166)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add vvs finance logo png ([8dd8990](https://github.com/lifinance/types/commit/8dd89901f905768aa12f8bca75ffa4a7e43169c2))
|
|
15
|
+
* error reporting ([#171](https://github.com/lifinance/types/issues/171)) ([97eae77](https://github.com/lifinance/types/commit/97eae7777f0efd0fdbb442f47e0ba6d43d19be4a))
|
|
16
|
+
* new types for status endpoint ([#166](https://github.com/lifinance/types/issues/166)) ([b7262e2](https://github.com/lifinance/types/commit/b7262e2bd531bcfb84fcc756e1cd96ad79a261b9))
|
|
17
|
+
|
|
5
18
|
## [6.0.0](https://github.com/lifinance/types/compare/v5.3.0...v6.0.0) (2023-05-09)
|
|
6
19
|
|
|
7
20
|
|
package/dist/api.d.ts
CHANGED
|
@@ -206,17 +206,24 @@ export interface GetStatusRequest {
|
|
|
206
206
|
fromChain?: number | string;
|
|
207
207
|
toChain?: number | string;
|
|
208
208
|
}
|
|
209
|
-
export interface
|
|
209
|
+
export interface BaseTransactionInfo {
|
|
210
210
|
txHash: string;
|
|
211
|
-
|
|
211
|
+
chainId: ChainId;
|
|
212
|
+
txLink: string;
|
|
213
|
+
}
|
|
214
|
+
export interface ExtendedTransactionInfo extends BaseTransactionInfo {
|
|
212
215
|
amount?: string;
|
|
216
|
+
amountUSD?: string;
|
|
213
217
|
token?: Token;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
gasPrice: string;
|
|
219
|
+
gasUsed: string;
|
|
220
|
+
gasToken: Token;
|
|
221
|
+
gasAmount: string;
|
|
222
|
+
gasAmountUSD: string;
|
|
223
|
+
timestamp?: number;
|
|
224
|
+
}
|
|
225
|
+
export interface PendingReceivingInfo {
|
|
226
|
+
chainId: ChainId;
|
|
220
227
|
}
|
|
221
228
|
declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
|
|
222
229
|
export type StatusMessage = (typeof _StatusMessage)[number];
|
|
@@ -230,15 +237,24 @@ export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
|
|
|
230
237
|
export declare const isSubstatusPending: (substatus: Substatus) => substatus is "UNKNOWN_ERROR" | "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "REFUND_IN_PROGRESS";
|
|
231
238
|
export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
|
|
232
239
|
export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
|
|
233
|
-
export interface
|
|
240
|
+
export interface BaseStatusData {
|
|
234
241
|
status: StatusMessage;
|
|
235
242
|
substatus?: Substatus;
|
|
236
243
|
substatusMessage?: string;
|
|
237
244
|
}
|
|
238
|
-
export interface
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
245
|
+
export interface StatusData extends BaseStatusData {
|
|
246
|
+
tool: string;
|
|
247
|
+
sending: BaseTransactionInfo;
|
|
248
|
+
receiving: PendingReceivingInfo;
|
|
249
|
+
}
|
|
250
|
+
export type StatusResponse = FullStatusData | StatusData;
|
|
251
|
+
export interface FullStatusData extends StatusData {
|
|
252
|
+
transactionId: string;
|
|
253
|
+
sending: ExtendedTransactionInfo;
|
|
254
|
+
receiving: PendingReceivingInfo | ExtendedTransactionInfo;
|
|
255
|
+
lifiExplorerLink: string;
|
|
256
|
+
fromAddress: string;
|
|
257
|
+
toAddress: string;
|
|
242
258
|
bridgeExplorerLink?: string;
|
|
243
259
|
}
|
|
244
260
|
export interface ExtendedChain extends Chain {
|
|
@@ -286,8 +302,8 @@ declare const _LIFuelState: readonly ["PENDING", "DONE", "NOT_FOUND"];
|
|
|
286
302
|
type LIFuelState = (typeof _LIFuelState)[number];
|
|
287
303
|
export type LIFuelStatusResponse = {
|
|
288
304
|
status: LIFuelState;
|
|
289
|
-
sending?:
|
|
290
|
-
receiving?:
|
|
305
|
+
sending?: ExtendedTransactionInfo;
|
|
306
|
+
receiving?: PendingReceivingInfo | ExtendedTransactionInfo;
|
|
291
307
|
};
|
|
292
308
|
export type GasRecommendationRequest = {
|
|
293
309
|
chainId: ChainId;
|
package/dist/cjs/api.d.ts
CHANGED
|
@@ -206,17 +206,24 @@ export interface GetStatusRequest {
|
|
|
206
206
|
fromChain?: number | string;
|
|
207
207
|
toChain?: number | string;
|
|
208
208
|
}
|
|
209
|
-
export interface
|
|
209
|
+
export interface BaseTransactionInfo {
|
|
210
210
|
txHash: string;
|
|
211
|
-
|
|
211
|
+
chainId: ChainId;
|
|
212
|
+
txLink: string;
|
|
213
|
+
}
|
|
214
|
+
export interface ExtendedTransactionInfo extends BaseTransactionInfo {
|
|
212
215
|
amount?: string;
|
|
216
|
+
amountUSD?: string;
|
|
213
217
|
token?: Token;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
gasPrice: string;
|
|
219
|
+
gasUsed: string;
|
|
220
|
+
gasToken: Token;
|
|
221
|
+
gasAmount: string;
|
|
222
|
+
gasAmountUSD: string;
|
|
223
|
+
timestamp?: number;
|
|
224
|
+
}
|
|
225
|
+
export interface PendingReceivingInfo {
|
|
226
|
+
chainId: ChainId;
|
|
220
227
|
}
|
|
221
228
|
declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
|
|
222
229
|
export type StatusMessage = (typeof _StatusMessage)[number];
|
|
@@ -230,15 +237,24 @@ export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
|
|
|
230
237
|
export declare const isSubstatusPending: (substatus: Substatus) => substatus is "UNKNOWN_ERROR" | "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "REFUND_IN_PROGRESS";
|
|
231
238
|
export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
|
|
232
239
|
export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
|
|
233
|
-
export interface
|
|
240
|
+
export interface BaseStatusData {
|
|
234
241
|
status: StatusMessage;
|
|
235
242
|
substatus?: Substatus;
|
|
236
243
|
substatusMessage?: string;
|
|
237
244
|
}
|
|
238
|
-
export interface
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
245
|
+
export interface StatusData extends BaseStatusData {
|
|
246
|
+
tool: string;
|
|
247
|
+
sending: BaseTransactionInfo;
|
|
248
|
+
receiving: PendingReceivingInfo;
|
|
249
|
+
}
|
|
250
|
+
export type StatusResponse = FullStatusData | StatusData;
|
|
251
|
+
export interface FullStatusData extends StatusData {
|
|
252
|
+
transactionId: string;
|
|
253
|
+
sending: ExtendedTransactionInfo;
|
|
254
|
+
receiving: PendingReceivingInfo | ExtendedTransactionInfo;
|
|
255
|
+
lifiExplorerLink: string;
|
|
256
|
+
fromAddress: string;
|
|
257
|
+
toAddress: string;
|
|
242
258
|
bridgeExplorerLink?: string;
|
|
243
259
|
}
|
|
244
260
|
export interface ExtendedChain extends Chain {
|
|
@@ -286,8 +302,8 @@ declare const _LIFuelState: readonly ["PENDING", "DONE", "NOT_FOUND"];
|
|
|
286
302
|
type LIFuelState = (typeof _LIFuelState)[number];
|
|
287
303
|
export type LIFuelStatusResponse = {
|
|
288
304
|
status: LIFuelState;
|
|
289
|
-
sending?:
|
|
290
|
-
receiving?:
|
|
305
|
+
sending?: ExtendedTransactionInfo;
|
|
306
|
+
receiving?: PendingReceivingInfo | ExtendedTransactionInfo;
|
|
291
307
|
};
|
|
292
308
|
export type GasRecommendationRequest = {
|
|
293
309
|
chainId: ChainId;
|
package/dist/cjs/base.js
CHANGED
|
@@ -62,7 +62,7 @@ var CoinKey;
|
|
|
62
62
|
CoinKey["MCB"] = "MCB";
|
|
63
63
|
CoinKey["CELR"] = "CELR";
|
|
64
64
|
CoinKey["IF"] = "IF";
|
|
65
|
-
})(CoinKey
|
|
65
|
+
})(CoinKey || (exports.CoinKey = CoinKey = {}));
|
|
66
66
|
var ChainKey;
|
|
67
67
|
(function (ChainKey) {
|
|
68
68
|
ChainKey["ETH"] = "eth";
|
|
@@ -124,7 +124,7 @@ var ChainKey;
|
|
|
124
124
|
ChainKey["MORT"] = "mort";
|
|
125
125
|
ChainKey["FTMT"] = "ftmt";
|
|
126
126
|
ChainKey["LNAT"] = "lnat";
|
|
127
|
-
})(ChainKey
|
|
127
|
+
})(ChainKey || (exports.ChainKey = ChainKey = {}));
|
|
128
128
|
var ChainId;
|
|
129
129
|
(function (ChainId) {
|
|
130
130
|
ChainId[ChainId["ETH"] = 1] = "ETH";
|
|
@@ -186,4 +186,4 @@ var ChainId;
|
|
|
186
186
|
ChainId[ChainId["MORT"] = 1287] = "MORT";
|
|
187
187
|
ChainId[ChainId["FTMT"] = 4002] = "FTMT";
|
|
188
188
|
ChainId[ChainId["LNAT"] = 59140] = "LNAT";
|
|
189
|
-
})(ChainId
|
|
189
|
+
})(ChainId || (exports.ChainId = ChainId = {}));
|
package/dist/cjs/bridges.js
CHANGED
|
@@ -19,7 +19,7 @@ var BridgeTool;
|
|
|
19
19
|
BridgeTool["across"] = "across";
|
|
20
20
|
BridgeTool["portal"] = "portal";
|
|
21
21
|
BridgeTool["stargate"] = "stargate";
|
|
22
|
-
})(BridgeTool
|
|
22
|
+
})(BridgeTool || (exports.BridgeTool = BridgeTool = {}));
|
|
23
23
|
/**
|
|
24
24
|
* @deprecated
|
|
25
25
|
* These values are now obtainable from the LI.FI API
|
package/dist/cjs/chains/Chain.js
CHANGED
package/dist/cjs/exchanges.js
CHANGED
|
@@ -13,7 +13,7 @@ var ExchangeTool;
|
|
|
13
13
|
ExchangeTool["openocean"] = "openocean";
|
|
14
14
|
ExchangeTool["zerox"] = "0x";
|
|
15
15
|
ExchangeTool["dodo"] = "dodo";
|
|
16
|
-
})(ExchangeTool
|
|
16
|
+
})(ExchangeTool || (exports.ExchangeTool = ExchangeTool = {}));
|
|
17
17
|
/**
|
|
18
18
|
* @deprecated
|
|
19
19
|
* These values are now obtainable from the LI.FI API
|