@gearbox-protocol/sdk 0.0.99 → 0.0.102
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/lib/apy/convexAPY.d.ts +8 -0
- package/lib/apy/convexAPY.js +202 -0
- package/lib/apy/lidoAPY.d.ts +4 -0
- package/lib/apy/lidoAPY.js +104 -0
- package/lib/config.d.ts +1 -0
- package/lib/config.js +2 -1
- package/lib/contracts/contracts.d.ts +6 -1
- package/lib/contracts/contracts.js +52 -14
- package/lib/contracts/contractsRegister.js +16 -4
- package/lib/core/constants.d.ts +6 -0
- package/lib/core/constants.js +10 -4
- package/lib/core/creditAccount.d.ts +3 -1
- package/lib/core/creditAccount.js +31 -31
- package/lib/core/creditManager.d.ts +13 -2
- package/lib/core/creditManager.js +79 -29
- package/lib/core/errors.d.ts +10 -0
- package/lib/core/errors.js +16 -1
- package/lib/core/events.js +9 -9
- package/lib/core/multicall.d.ts +1 -1
- package/lib/core/pool.d.ts +1 -1
- package/lib/core/pool.js +7 -5
- package/lib/core/price.d.ts +2 -0
- package/lib/core/price.js +9 -0
- package/lib/core/strategy.d.ts +38 -0
- package/lib/core/strategy.js +56 -0
- package/lib/index.d.ts +7 -1
- package/lib/index.js +8 -3
- package/lib/pathfinder/path.js +1 -1
- package/lib/pathfinder/yVault.js +5 -5
- package/lib/payload/creditAccount.d.ts +4 -26
- package/lib/payload/creditManager.d.ts +3 -25
- package/lib/payload/pool.d.ts +2 -17
- package/lib/payload/pool.js +0 -1
- package/lib/tokens/token.js +8 -8
- package/lib/utils/formatter.d.ts +1 -0
- package/lib/utils/formatter.js +6 -1
- package/lib/utils/mappers.d.ts +2 -1
- package/lib/utils/mappers.js +13 -5
- package/lib/utils/multicall.js +4 -3
- package/lib/utils/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/apy/convexAPY.ts +250 -0
- package/src/apy/lidoAPY.ts +88 -0
- package/src/config.ts +2 -1
- package/src/contracts/contracts.ts +69 -16
- package/src/contracts/contractsRegister.ts +19 -4
- package/src/core/constants.ts +10 -3
- package/src/core/creditAccount.ts +46 -37
- package/src/core/creditManager.ts +231 -148
- package/src/core/errors.ts +24 -0
- package/src/core/events.ts +921 -915
- package/src/core/multicall.ts +1 -1
- package/src/core/pool.ts +56 -51
- package/src/core/price.ts +9 -0
- package/src/core/strategy.ts +130 -0
- package/src/index.ts +8 -1
- package/src/pathfinder/path.ts +154 -154
- package/src/pathfinder/yVault.ts +63 -62
- package/src/payload/creditAccount.ts +4 -26
- package/src/payload/creditManager.ts +4 -26
- package/src/payload/pool.ts +2 -19
- package/src/tokens/token.ts +14 -9
- package/src/utils/formatter.ts +5 -1
- package/src/utils/mappers.ts +12 -5
- package/src/utils/multicall.ts +4 -9
- package/src/utils/types.ts +6 -2
- package/lib/core/adapters.d.ts +0 -15
- package/lib/core/adapters.js +0 -19
- package/lib/core/contracts.d.ts +0 -67
- package/lib/core/contracts.js +0 -254
- package/lib/core/contractsRegister.d.ts +0 -2
- package/lib/core/contractsRegister.js +0 -58
- package/lib/core/creditCard.d.ts +0 -13
- package/lib/core/creditCard.js +0 -2
- package/lib/core/oracles.d.ts +0 -38
- package/lib/core/oracles.js +0 -12
- package/lib/core/priceFeeds.d.ts +0 -3
- package/lib/core/priceFeeds.js +0 -492
- package/lib/core/protocols.d.ts +0 -13
- package/lib/core/protocols.js +0 -39
- package/lib/core/swap.d.ts +0 -4
- package/lib/core/swap.js +0 -8
- package/lib/core/trade.d.ts +0 -35
- package/lib/core/trade.js +0 -62
- package/lib/core/tradeTypes.d.ts +0 -79
- package/lib/core/tradeTypes.js +0 -21
|
@@ -1,174 +1,257 @@
|
|
|
1
|
-
import {BigNumber, ethers, Signer} from "ethers";
|
|
2
|
-
import {formatBN} from "../utils/formatter";
|
|
1
|
+
import { BigNumber, ethers, Signer } from "ethers";
|
|
3
2
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
UNDERLYING_TOKEN_LIQUIDATION_THRESHOLD
|
|
7
|
-
} from "./constants";
|
|
8
|
-
import {
|
|
9
|
-
CreditManagerDataPayload,
|
|
10
|
-
CreditManagerStatPayload
|
|
3
|
+
CreditManagerDataPayload,
|
|
4
|
+
CreditManagerStatPayload
|
|
11
5
|
} from "../payload/creditManager";
|
|
12
|
-
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
ICreditManager,
|
|
9
|
+
ICreditManager__factory,
|
|
10
|
+
ICreditFacade__factory
|
|
11
|
+
} from "../types";
|
|
12
|
+
|
|
13
|
+
import { MultiCall } from "./multicall";
|
|
14
|
+
import {
|
|
15
|
+
PERCENTAGE_FACTOR,
|
|
16
|
+
RAY,
|
|
17
|
+
UNDERLYING_TOKEN_LIQUIDATION_THRESHOLD,
|
|
18
|
+
LEVERAGE_DECIMALS,
|
|
19
|
+
PERCENTAGE_DECIMALS
|
|
20
|
+
} from "./constants";
|
|
21
|
+
import { OpenAccountError } from "./errors";
|
|
13
22
|
|
|
14
23
|
export class CreditManagerData {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
24
|
+
public readonly id: string;
|
|
25
|
+
public readonly address: string;
|
|
26
|
+
public readonly underlyingToken: string;
|
|
27
|
+
public readonly isWETH: boolean;
|
|
28
|
+
public readonly canBorrow: boolean;
|
|
29
|
+
public readonly borrowRate: number;
|
|
30
|
+
public readonly minAmount: BigNumber;
|
|
31
|
+
public readonly maxAmount: BigNumber;
|
|
32
|
+
public readonly maxLeverageFactor: number; // for V1 only
|
|
33
|
+
public readonly availableLiquidity: BigNumber;
|
|
34
|
+
public readonly allowedTokens: Array<string>;
|
|
35
|
+
public readonly adapters: Record<string, string>;
|
|
36
|
+
|
|
37
|
+
public readonly liquidationThresholds: Record<string, BigNumber>;
|
|
38
|
+
public readonly version: number;
|
|
39
|
+
public readonly creditFacade: string; // V2 only: address of creditFacade
|
|
40
|
+
public readonly isDegenMode: boolean; // V2 only: true if contract is in Degen mode
|
|
41
|
+
public readonly degenNFT: string; // V2 only: degenNFT, address(0) if not in degen mode
|
|
42
|
+
public readonly isIncreaseDebtForbidden: boolean; // V2 only: true if increasing debt is forbidden
|
|
43
|
+
public readonly forbiddenTokenMask: BigNumber; // V2 only: mask which forbids some particular tokens
|
|
44
|
+
|
|
45
|
+
constructor(payload: CreditManagerDataPayload) {
|
|
46
|
+
this.id = payload.addr;
|
|
47
|
+
this.address = payload.addr;
|
|
48
|
+
|
|
49
|
+
this.underlyingToken = payload.underlying || "";
|
|
50
|
+
|
|
51
|
+
this.isWETH = payload.isWETH || false;
|
|
52
|
+
this.canBorrow = payload.canBorrow || false;
|
|
53
|
+
|
|
54
|
+
this.borrowRate =
|
|
55
|
+
BigNumber.from(payload.borrowRate || 0)
|
|
56
|
+
.mul(PERCENTAGE_FACTOR)
|
|
57
|
+
.mul(PERCENTAGE_DECIMALS)
|
|
58
|
+
.div(RAY)
|
|
59
|
+
.toNumber() / PERCENTAGE_FACTOR;
|
|
60
|
+
this.minAmount = BigNumber.from(payload.minAmount || 0);
|
|
61
|
+
this.maxAmount = BigNumber.from(payload.maxAmount || 0);
|
|
62
|
+
|
|
63
|
+
this.maxLeverageFactor = BigNumber.from(
|
|
64
|
+
payload.maxLeverageFactor || 0
|
|
65
|
+
).toNumber();
|
|
66
|
+
this.availableLiquidity = BigNumber.from(payload.availableLiquidity || 0);
|
|
67
|
+
|
|
68
|
+
this.allowedTokens = payload.collateralTokens || [];
|
|
69
|
+
this.adapters = (payload.adapters || []).reduce<Record<string, string>>(
|
|
70
|
+
(acc, { allowedContract, adapter }) => ({
|
|
71
|
+
...acc,
|
|
72
|
+
[allowedContract]: adapter
|
|
73
|
+
}),
|
|
74
|
+
{}
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
this.liquidationThresholds = (payload.liquidationThresholds || []).reduce<
|
|
78
|
+
Record<string, BigNumber>
|
|
79
|
+
>((acc, threshold, index) => {
|
|
80
|
+
const address = payload.collateralTokens[index];
|
|
81
|
+
|
|
82
|
+
if (address) acc[address.toLowerCase()] = BigNumber.from(threshold);
|
|
83
|
+
|
|
84
|
+
return acc;
|
|
85
|
+
}, {});
|
|
86
|
+
|
|
87
|
+
this.version = BigNumber.from(payload.version || 1).toNumber();
|
|
88
|
+
this.creditFacade = payload.creditFacade || "";
|
|
89
|
+
this.isDegenMode = payload.isDegenMode || false;
|
|
90
|
+
this.degenNFT = payload.degenNFT || "";
|
|
91
|
+
this.isIncreaseDebtForbidden = payload.isIncreaseDebtForbidden || false;
|
|
92
|
+
this.forbiddenTokenMask = BigNumber.from(payload.forbiddenTokenMask || 0);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
get isPaused(): boolean {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
getContractETH(signer: Signer | ethers.providers.Provider): ICreditManager {
|
|
100
|
+
return ICreditManager__factory.connect(this.address, signer);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
contractToAdapter(contractAddress: string): string | undefined {
|
|
104
|
+
return this.adapters[contractAddress];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
encodeAddCollateral(
|
|
108
|
+
accountAddress: string,
|
|
109
|
+
tokenAddress: string,
|
|
110
|
+
amount: BigNumber
|
|
111
|
+
): MultiCall {
|
|
112
|
+
if (this.version !== 2)
|
|
113
|
+
throw new Error("Multicall is eligible only for version 2");
|
|
114
|
+
return {
|
|
115
|
+
target: this.creditFacade,
|
|
116
|
+
callData: ICreditFacade__factory.createInterface().encodeFunctionData(
|
|
117
|
+
"addCollateral",
|
|
118
|
+
[accountAddress, tokenAddress, amount]
|
|
119
|
+
)
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
encodeIncreaseDebt(amount: BigNumber): MultiCall {
|
|
124
|
+
if (this.version !== 2)
|
|
125
|
+
throw new Error("Multicall is eligible only for version 2");
|
|
126
|
+
return {
|
|
127
|
+
target: this.creditFacade,
|
|
128
|
+
callData: ICreditFacade__factory.createInterface().encodeFunctionData(
|
|
129
|
+
"increaseDebt",
|
|
130
|
+
[amount]
|
|
131
|
+
)
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
encodeDecreaseDebt(amount: BigNumber): MultiCall {
|
|
136
|
+
if (this.version !== 2)
|
|
137
|
+
throw new Error("Multicall is eligible only for version 2");
|
|
138
|
+
return {
|
|
139
|
+
target: this.creditFacade,
|
|
140
|
+
callData: ICreditFacade__factory.createInterface().encodeFunctionData(
|
|
141
|
+
"decreaseDebt",
|
|
142
|
+
[amount]
|
|
143
|
+
)
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
validateOpenAccount(totalAmount: BigNumber, leverage: number): true {
|
|
148
|
+
if (totalAmount.lt(this.minAmount))
|
|
149
|
+
throw new OpenAccountError("amountLessMin", this.minAmount);
|
|
150
|
+
|
|
151
|
+
if (totalAmount.gt(this.maxAmount))
|
|
152
|
+
throw new OpenAccountError("amountGreaterMax", this.maxAmount);
|
|
153
|
+
|
|
154
|
+
if (leverage > this.maxLeverageFactor)
|
|
155
|
+
throw new OpenAccountError(
|
|
156
|
+
"leverageGreaterMax",
|
|
157
|
+
BigNumber.from(this.maxLeverageFactor)
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
if (
|
|
161
|
+
totalAmount
|
|
162
|
+
.mul(leverage)
|
|
163
|
+
.div(LEVERAGE_DECIMALS)
|
|
164
|
+
.gt(this.availableLiquidity)
|
|
165
|
+
)
|
|
166
|
+
throw new OpenAccountError(
|
|
167
|
+
"insufficientPoolLiquidity",
|
|
168
|
+
BigNumber.from(this.availableLiquidity)
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
91
173
|
}
|
|
92
174
|
|
|
93
175
|
export function calcMaxIncreaseBorrow(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
176
|
+
healthFactor: number,
|
|
177
|
+
borrowAmountPlusInterest: BigNumber,
|
|
178
|
+
maxLeverageFactor: number
|
|
97
179
|
): BigNumber {
|
|
98
|
-
|
|
180
|
+
const healthFactorPercentage = Math.floor(healthFactor * PERCENTAGE_FACTOR);
|
|
99
181
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
182
|
+
const minHealthFactor = Math.floor(
|
|
183
|
+
(UNDERLYING_TOKEN_LIQUIDATION_THRESHOLD *
|
|
184
|
+
(maxLeverageFactor + LEVERAGE_DECIMALS)) /
|
|
185
|
+
maxLeverageFactor
|
|
186
|
+
);
|
|
104
187
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
188
|
+
const result = borrowAmountPlusInterest
|
|
189
|
+
.mul(healthFactorPercentage - minHealthFactor)
|
|
190
|
+
.div(minHealthFactor - UNDERLYING_TOKEN_LIQUIDATION_THRESHOLD);
|
|
191
|
+
return result.isNegative() ? BigNumber.from(0) : result;
|
|
109
192
|
}
|
|
110
193
|
|
|
111
194
|
export function calcHealthFactorAfterIncreasingBorrow(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
195
|
+
healthFactor: number | undefined,
|
|
196
|
+
borrowAmountPlusInterest: BigNumber | undefined,
|
|
197
|
+
additional: BigNumber
|
|
115
198
|
): number {
|
|
116
|
-
|
|
199
|
+
if (!healthFactor || !borrowAmountPlusInterest) return 0;
|
|
117
200
|
|
|
118
|
-
|
|
201
|
+
const healthFactorPercentage = Math.floor(healthFactor * PERCENTAGE_FACTOR);
|
|
119
202
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
203
|
+
return (
|
|
204
|
+
borrowAmountPlusInterest
|
|
205
|
+
.mul(healthFactorPercentage)
|
|
206
|
+
.add(additional.mul(UNDERLYING_TOKEN_LIQUIDATION_THRESHOLD))
|
|
207
|
+
.div(borrowAmountPlusInterest.add(additional))
|
|
208
|
+
.toNumber() / PERCENTAGE_FACTOR
|
|
209
|
+
);
|
|
127
210
|
}
|
|
128
211
|
|
|
129
212
|
export function calcHealthFactorAfterAddingCollateral(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
213
|
+
healthFactor: number | undefined,
|
|
214
|
+
borrowAmountPlusInterest: BigNumber | undefined,
|
|
215
|
+
additionalCollateral: BigNumber
|
|
133
216
|
): number {
|
|
134
|
-
|
|
217
|
+
if (!healthFactor || !borrowAmountPlusInterest) return 0;
|
|
135
218
|
|
|
136
|
-
|
|
219
|
+
const healthFactorPercentage = Math.floor(healthFactor * PERCENTAGE_FACTOR);
|
|
137
220
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
221
|
+
return (
|
|
222
|
+
borrowAmountPlusInterest
|
|
223
|
+
.mul(healthFactorPercentage)
|
|
224
|
+
.add(additionalCollateral.mul(UNDERLYING_TOKEN_LIQUIDATION_THRESHOLD))
|
|
225
|
+
.div(borrowAmountPlusInterest)
|
|
226
|
+
.toNumber() / PERCENTAGE_FACTOR
|
|
227
|
+
);
|
|
145
228
|
}
|
|
146
229
|
|
|
147
230
|
export class CreditManagerStat extends CreditManagerData {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
231
|
+
public readonly uniqueUsers: number;
|
|
232
|
+
public readonly openedAccountsCount: number;
|
|
233
|
+
public readonly totalOpenedAccounts: number;
|
|
234
|
+
public readonly totalClosedAccounts: number;
|
|
235
|
+
public readonly totalRepaidAccounts: number;
|
|
236
|
+
public readonly totalLiquidatedAccounts: number;
|
|
237
|
+
public readonly totalBorrowed: BigNumber;
|
|
238
|
+
public readonly cumulativeBorrowed: BigNumber;
|
|
239
|
+
public readonly totalRepaid: BigNumber;
|
|
240
|
+
public readonly totalProfit: BigNumber;
|
|
241
|
+
public readonly totalLosses: BigNumber;
|
|
242
|
+
|
|
243
|
+
constructor(payload: CreditManagerStatPayload) {
|
|
244
|
+
super(payload);
|
|
245
|
+
this.uniqueUsers = payload.uniqueUsers;
|
|
246
|
+
this.openedAccountsCount = payload.openedAccountsCount || 0;
|
|
247
|
+
this.totalOpenedAccounts = payload.totalOpenedAccounts || 0;
|
|
248
|
+
this.totalClosedAccounts = payload.totalClosedAccounts || 0;
|
|
249
|
+
this.totalRepaidAccounts = payload.totalRepaidAccounts || 0;
|
|
250
|
+
this.totalLiquidatedAccounts = payload.totalLiquidatedAccounts || 0;
|
|
251
|
+
this.totalBorrowed = BigNumber.from(payload.totalBorrowed || 0);
|
|
252
|
+
this.cumulativeBorrowed = BigNumber.from(payload.cumulativeBorrowed || 0);
|
|
253
|
+
this.totalRepaid = BigNumber.from(payload.totalRepaid || 0);
|
|
254
|
+
this.totalProfit = BigNumber.from(payload.totalProfit || 0);
|
|
255
|
+
this.totalLosses = BigNumber.from(payload.totalLosses || 0);
|
|
256
|
+
}
|
|
174
257
|
}
|
package/src/core/errors.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { BigNumber } from "ethers";
|
|
2
|
+
|
|
1
3
|
export interface MetamaskError {
|
|
2
4
|
code: number;
|
|
3
5
|
message: string;
|
|
@@ -43,3 +45,25 @@ export class AccountsInAlllCreditManagersError extends Error {
|
|
|
43
45
|
super("errors.youOpenedAccountsInAllCreditManagersError");
|
|
44
46
|
}
|
|
45
47
|
}
|
|
48
|
+
|
|
49
|
+
export type OpenAccountErrorTypes =
|
|
50
|
+
| "insufficientPoolLiquidity"
|
|
51
|
+
| "leverageGreaterMax"
|
|
52
|
+
| "amountGreaterMax"
|
|
53
|
+
| "amountLessMin";
|
|
54
|
+
|
|
55
|
+
export class OpenAccountError extends Error {
|
|
56
|
+
message: OpenAccountErrorTypes;
|
|
57
|
+
payload: { amount: BigNumber };
|
|
58
|
+
|
|
59
|
+
constructor(errorType: OpenAccountErrorTypes, amount: BigNumber) {
|
|
60
|
+
super();
|
|
61
|
+
Object.setPrototypeOf(this, OpenAccountError.prototype);
|
|
62
|
+
this.message = errorType;
|
|
63
|
+
this.payload = { amount };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static isOpenAccountError(e: unknown): e is OpenAccountError {
|
|
67
|
+
return e instanceof OpenAccountError;
|
|
68
|
+
}
|
|
69
|
+
}
|