@lifi/types 2.5.1 → 2.5.3

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 CHANGED
@@ -2,6 +2,20 @@
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
+ ### [2.5.3](https://github.com/lifinance/types/compare/v2.5.2...v2.5.3) (2023-03-17)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * make insurance on route optional ([f526874](https://github.com/lifinance/types/commit/f526874aa0fab83e2dfb697e45380bdbbbfc7f8b))
11
+
12
+ ### [2.5.2](https://github.com/lifinance/types/compare/v2.5.1...v2.5.2) (2023-03-16)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * set to two decimals ([#142](https://github.com/lifinance/types/issues/142)) ([ef2fe3f](https://github.com/lifinance/types/commit/ef2fe3f41f0258d1358908b10bc8ef0d40c36f80))
18
+
5
19
  ### [2.5.1](https://github.com/lifinance/types/compare/v2.5.0...v2.5.1) (2023-03-14)
6
20
 
7
21
 
package/dist/api.d.ts CHANGED
@@ -50,18 +50,15 @@ export interface AllowDenyPrefer {
50
50
  deny?: string[];
51
51
  prefer?: string[];
52
52
  }
53
- export declare enum InsuranceState {
54
- INSURED = "INSURED",
55
- INSURABLE = "INSURABLE",
56
- NOT_INSURABLE = "NOT_INSURABLE"
57
- }
53
+ export declare const _InsuranceState: readonly ["INSURED", "INSURABLE", "NOT_INSURABLE"];
54
+ export type InsuranceState = (typeof _InsuranceState)[number];
58
55
  export interface Insurance {
59
56
  state: InsuranceState;
60
57
  feeAmountUsd: string;
61
58
  }
62
59
  export interface Route {
63
60
  id: string;
64
- insurance: Insurance;
61
+ insurance?: Insurance;
65
62
  fromChainId: number;
66
63
  fromAmountUSD: string;
67
64
  fromAmount: string;
@@ -216,7 +213,7 @@ export type SubstatusDone = (typeof _SubstatusDone)[number];
216
213
  declare const _SubstatusFailed: readonly ["NOT_PROCESSABLE_REFUND_NEEDED"];
217
214
  export type SubstatusFailed = (typeof _SubstatusFailed)[number];
218
215
  export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
219
- 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";
216
+ 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";
220
217
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
221
218
  export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
222
219
  export interface StatusInformation {
package/dist/api.js CHANGED
@@ -1,10 +1,9 @@
1
1
  export const Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST'];
2
- export var InsuranceState;
3
- (function (InsuranceState) {
4
- InsuranceState["INSURED"] = "INSURED";
5
- InsuranceState["INSURABLE"] = "INSURABLE";
6
- InsuranceState["NOT_INSURABLE"] = "NOT_INSURABLE";
7
- })(InsuranceState || (InsuranceState = {}));
2
+ export const _InsuranceState = [
3
+ 'INSURED',
4
+ 'INSURABLE',
5
+ 'NOT_INSURABLE',
6
+ ];
8
7
  const _StatusMessage = [
9
8
  // The transaction was not found -- likely not mined yet
10
9
  'NOT_FOUND',
package/dist/cjs/api.d.ts CHANGED
@@ -50,18 +50,15 @@ export interface AllowDenyPrefer {
50
50
  deny?: string[];
51
51
  prefer?: string[];
52
52
  }
53
- export declare enum InsuranceState {
54
- INSURED = "INSURED",
55
- INSURABLE = "INSURABLE",
56
- NOT_INSURABLE = "NOT_INSURABLE"
57
- }
53
+ export declare const _InsuranceState: readonly ["INSURED", "INSURABLE", "NOT_INSURABLE"];
54
+ export type InsuranceState = (typeof _InsuranceState)[number];
58
55
  export interface Insurance {
59
56
  state: InsuranceState;
60
57
  feeAmountUsd: string;
61
58
  }
62
59
  export interface Route {
63
60
  id: string;
64
- insurance: Insurance;
61
+ insurance?: Insurance;
65
62
  fromChainId: number;
66
63
  fromAmountUSD: string;
67
64
  fromAmount: string;
@@ -216,7 +213,7 @@ export type SubstatusDone = (typeof _SubstatusDone)[number];
216
213
  declare const _SubstatusFailed: readonly ["NOT_PROCESSABLE_REFUND_NEEDED"];
217
214
  export type SubstatusFailed = (typeof _SubstatusFailed)[number];
218
215
  export type Substatus = SubstatusPending | SubstatusDone | SubstatusFailed;
219
- 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";
216
+ 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";
220
217
  export declare const isSubstatusDone: (substatus: Substatus) => substatus is "COMPLETED" | "PARTIAL" | "REFUNDED";
221
218
  export declare const isSubstatusFailed: (substatus: Substatus) => substatus is "NOT_PROCESSABLE_REFUND_NEEDED";
222
219
  export interface StatusInformation {
package/dist/cjs/api.js CHANGED
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSubstatusFailed = exports.isSubstatusDone = exports.isSubstatusPending = exports.InsuranceState = exports.Orders = void 0;
3
+ exports.isSubstatusFailed = exports.isSubstatusDone = exports.isSubstatusPending = exports._InsuranceState = exports.Orders = void 0;
4
4
  exports.Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST'];
5
- var InsuranceState;
6
- (function (InsuranceState) {
7
- InsuranceState["INSURED"] = "INSURED";
8
- InsuranceState["INSURABLE"] = "INSURABLE";
9
- InsuranceState["NOT_INSURABLE"] = "NOT_INSURABLE";
10
- })(InsuranceState = exports.InsuranceState || (exports.InsuranceState = {}));
5
+ exports._InsuranceState = [
6
+ 'INSURED',
7
+ 'INSURABLE',
8
+ 'NOT_INSURABLE',
9
+ ];
11
10
  const _StatusMessage = [
12
11
  // The transaction was not found -- likely not mined yet
13
12
  'NOT_FOUND',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "2.5.1",
3
+ "version": "2.5.3",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/index.js",
@@ -75,24 +75,24 @@
75
75
  "devDependencies": {
76
76
  "@commitlint/cli": "^17.4.4",
77
77
  "@commitlint/config-conventional": "^17.4.4",
78
- "@types/jest": "^29.4.0",
79
- "@typescript-eslint/eslint-plugin": "^5.54.0",
80
- "@typescript-eslint/parser": "^5.54.0",
81
- "eslint": "^8.35.0",
82
- "eslint-config-prettier": "^8.6.0",
78
+ "@types/jest": "^29.5.0",
79
+ "@typescript-eslint/eslint-plugin": "^5.55.0",
80
+ "@typescript-eslint/parser": "^5.55.0",
81
+ "eslint": "^8.36.0",
82
+ "eslint-config-prettier": "^8.7.0",
83
83
  "eslint-plugin-prettier": "^4.2.1",
84
84
  "husky": "^8.0.3",
85
- "jest": "^29.4.3",
86
- "lint-staged": "^13.1.2",
85
+ "jest": "^29.5.0",
86
+ "lint-staged": "^13.2.0",
87
87
  "npm-run-all": "^4.1.5",
88
88
  "pinst": "^3.0.0",
89
89
  "prettier": "^2.8.4",
90
90
  "standard-version": "^9.5.0",
91
91
  "ts-jest": "^29.0.5",
92
- "typescript": "^4.9.5"
92
+ "typescript": "^5.0.2"
93
93
  },
94
94
  "directories": {
95
95
  "test": "test"
96
96
  },
97
- "packageManager": "yarn@3.4.1"
97
+ "packageManager": "yarn@3.5.0"
98
98
  }