@lifi/types 8.2.0 → 8.3.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 +7 -0
- package/dist/api.d.ts +3 -6
- package/dist/api.js +2 -5
- package/dist/cjs/api.d.ts +3 -6
- package/dist/cjs/api.js +3 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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
|
+
## [8.3.0](https://github.com/lifinance/types/compare/v8.2.0...v8.3.0) (2023-08-04)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* move NOT_PROCESSABLE_REFUND_NEEDED to PENDING ([#185](https://github.com/lifinance/types/issues/185)) ([14ceea0](https://github.com/lifinance/types/commit/14ceea03f7e95466061c46b70998738114812f80))
|
|
11
|
+
|
|
5
12
|
## [8.2.0](https://github.com/lifinance/types/compare/v8.0.4...v8.2.0) (2023-07-26)
|
|
6
13
|
|
|
7
14
|
|
package/dist/api.d.ts
CHANGED
|
@@ -227,16 +227,13 @@ export interface PendingReceivingInfo {
|
|
|
227
227
|
}
|
|
228
228
|
declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
|
|
229
229
|
export type StatusMessage = (typeof _StatusMessage)[number];
|
|
230
|
-
declare const _SubstatusPending: readonly ["WAIT_SOURCE_CONFIRMATIONS", "WAIT_DESTINATION_TRANSACTION", "BRIDGE_NOT_AVAILABLE", "CHAIN_NOT_AVAILABLE", "REFUND_IN_PROGRESS", "UNKNOWN_ERROR"];
|
|
230
|
+
declare const _SubstatusPending: readonly ["WAIT_SOURCE_CONFIRMATIONS", "WAIT_DESTINATION_TRANSACTION", "BRIDGE_NOT_AVAILABLE", "CHAIN_NOT_AVAILABLE", "NOT_PROCESSABLE_REFUND_NEEDED", "REFUND_IN_PROGRESS", "UNKNOWN_ERROR"];
|
|
231
231
|
export type SubstatusPending = (typeof _SubstatusPending)[number];
|
|
232
232
|
declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
|
|
233
233
|
export type SubstatusDone = (typeof _SubstatusDone)[number];
|
|
234
|
-
|
|
235
|
-
export
|
|
236
|
-
export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
|
|
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";
|
|
234
|
+
export type Substatus = SubstatusPending | SubstatusDone;
|
|
235
|
+
export declare const isSubstatusPending: (substatus: Substatus) => substatus is "UNKNOWN_ERROR" | "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "NOT_PROCESSABLE_REFUND_NEEDED" | "REFUND_IN_PROGRESS";
|
|
238
236
|
export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
|
|
239
|
-
export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
|
|
240
237
|
export interface BaseStatusData {
|
|
241
238
|
status: StatusMessage;
|
|
242
239
|
substatus?: Substatus;
|
package/dist/api.js
CHANGED
|
@@ -25,6 +25,8 @@ const _SubstatusPending = [
|
|
|
25
25
|
'BRIDGE_NOT_AVAILABLE',
|
|
26
26
|
// The RPC for source/destination chain is temporarily unavailable
|
|
27
27
|
'CHAIN_NOT_AVAILABLE',
|
|
28
|
+
// The transfer cannot be completed, a refund is required
|
|
29
|
+
'NOT_PROCESSABLE_REFUND_NEEDED',
|
|
28
30
|
// A refund has been requested and is in progress
|
|
29
31
|
'REFUND_IN_PROGRESS',
|
|
30
32
|
// We cannot determine the status of the transfer
|
|
@@ -40,11 +42,6 @@ const _SubstatusDone = [
|
|
|
40
42
|
// The transfer was not successful but it has been refunded
|
|
41
43
|
'REFUNDED',
|
|
42
44
|
];
|
|
43
|
-
const _SubstatusFailed = [
|
|
44
|
-
// The transfer cannot be completed, a refund is required
|
|
45
|
-
'NOT_PROCESSABLE_REFUND_NEEDED',
|
|
46
|
-
];
|
|
47
45
|
export const isSubstatusPending = (substatus) => _SubstatusPending.includes(substatus);
|
|
48
46
|
export const isSubstatusDone = (substatus) => _SubstatusDone.includes(substatus);
|
|
49
|
-
export const isSubstatusFailed = (substatus) => _SubstatusFailed.includes(substatus);
|
|
50
47
|
const _LIFuelState = ['PENDING', 'DONE', 'NOT_FOUND'];
|
package/dist/cjs/api.d.ts
CHANGED
|
@@ -227,16 +227,13 @@ export interface PendingReceivingInfo {
|
|
|
227
227
|
}
|
|
228
228
|
declare const _StatusMessage: readonly ["NOT_FOUND", "INVALID", "PENDING", "DONE", "FAILED"];
|
|
229
229
|
export type StatusMessage = (typeof _StatusMessage)[number];
|
|
230
|
-
declare const _SubstatusPending: readonly ["WAIT_SOURCE_CONFIRMATIONS", "WAIT_DESTINATION_TRANSACTION", "BRIDGE_NOT_AVAILABLE", "CHAIN_NOT_AVAILABLE", "REFUND_IN_PROGRESS", "UNKNOWN_ERROR"];
|
|
230
|
+
declare const _SubstatusPending: readonly ["WAIT_SOURCE_CONFIRMATIONS", "WAIT_DESTINATION_TRANSACTION", "BRIDGE_NOT_AVAILABLE", "CHAIN_NOT_AVAILABLE", "NOT_PROCESSABLE_REFUND_NEEDED", "REFUND_IN_PROGRESS", "UNKNOWN_ERROR"];
|
|
231
231
|
export type SubstatusPending = (typeof _SubstatusPending)[number];
|
|
232
232
|
declare const _SubstatusDone: readonly ["COMPLETED", "PARTIAL", "REFUNDED"];
|
|
233
233
|
export type SubstatusDone = (typeof _SubstatusDone)[number];
|
|
234
|
-
|
|
235
|
-
export
|
|
236
|
-
export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
|
|
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";
|
|
234
|
+
export type Substatus = SubstatusPending | SubstatusDone;
|
|
235
|
+
export declare const isSubstatusPending: (substatus: Substatus) => substatus is "UNKNOWN_ERROR" | "WAIT_SOURCE_CONFIRMATIONS" | "WAIT_DESTINATION_TRANSACTION" | "BRIDGE_NOT_AVAILABLE" | "CHAIN_NOT_AVAILABLE" | "NOT_PROCESSABLE_REFUND_NEEDED" | "REFUND_IN_PROGRESS";
|
|
238
236
|
export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
|
|
239
|
-
export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
|
|
240
237
|
export interface BaseStatusData {
|
|
241
238
|
status: StatusMessage;
|
|
242
239
|
substatus?: Substatus;
|
package/dist/cjs/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isSubstatusDone = exports.isSubstatusPending = exports._InsuranceState = exports.Orders = void 0;
|
|
4
4
|
exports.Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST'];
|
|
5
5
|
exports._InsuranceState = [
|
|
6
6
|
'INSURED',
|
|
@@ -28,6 +28,8 @@ const _SubstatusPending = [
|
|
|
28
28
|
'BRIDGE_NOT_AVAILABLE',
|
|
29
29
|
// The RPC for source/destination chain is temporarily unavailable
|
|
30
30
|
'CHAIN_NOT_AVAILABLE',
|
|
31
|
+
// The transfer cannot be completed, a refund is required
|
|
32
|
+
'NOT_PROCESSABLE_REFUND_NEEDED',
|
|
31
33
|
// A refund has been requested and is in progress
|
|
32
34
|
'REFUND_IN_PROGRESS',
|
|
33
35
|
// We cannot determine the status of the transfer
|
|
@@ -43,14 +45,8 @@ const _SubstatusDone = [
|
|
|
43
45
|
// The transfer was not successful but it has been refunded
|
|
44
46
|
'REFUNDED',
|
|
45
47
|
];
|
|
46
|
-
const _SubstatusFailed = [
|
|
47
|
-
// The transfer cannot be completed, a refund is required
|
|
48
|
-
'NOT_PROCESSABLE_REFUND_NEEDED',
|
|
49
|
-
];
|
|
50
48
|
const isSubstatusPending = (substatus) => _SubstatusPending.includes(substatus);
|
|
51
49
|
exports.isSubstatusPending = isSubstatusPending;
|
|
52
50
|
const isSubstatusDone = (substatus) => _SubstatusDone.includes(substatus);
|
|
53
51
|
exports.isSubstatusDone = isSubstatusDone;
|
|
54
|
-
const isSubstatusFailed = (substatus) => _SubstatusFailed.includes(substatus);
|
|
55
|
-
exports.isSubstatusFailed = isSubstatusFailed;
|
|
56
52
|
const _LIFuelState = ['PENDING', 'DONE', 'NOT_FOUND'];
|