@huma-finance/shared 0.0.30 → 0.0.32
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/abis/BaseCreditPool.json +1179 -1179
- package/dist/abis/BaseFeeManager.json +480 -480
- package/dist/abis/BasePoolConfig.json +1364 -1364
- package/dist/abis/ERC20TransferableReceivable.json +648 -648
- package/dist/abis/HDT.json +512 -512
- package/dist/abis/IConstantFlowAgreementV1.json +890 -890
- package/dist/abis/ISuperfluid.json +1122 -1122
- package/dist/abis/InvoiceNFT.json +625 -625
- package/dist/abis/Multisend.json +26 -26
- package/dist/abis/RealWorldReceivable.json +823 -823
- package/dist/abis/ReceivableFactoringPool.json +1529 -1529
- package/dist/abis/StreamFactoringPool.json +1523 -1523
- package/dist/abis/StreamFeeManager.json +522 -522
- package/dist/abis/SuperfluidPoolProcessor.json +692 -692
- package/dist/abis/TestERC20.json +358 -358
- package/dist/abis/TradableStream.json +850 -850
- package/dist/abis/Transfer.json +24 -24
- package/dist/abis/TransferNFT.json +27 -27
- package/dist/abis/erc20.json +117 -117
- package/dist/abis/erc2612.json +132 -132
- package/dist/abis/erc721.json +673 -673
- package/dist/abis/index.d.ts +3 -3
- package/dist/abis/index.js +3 -3
- package/dist/abis/types/BaseCreditPool.d.ts +803 -803
- package/dist/abis/types/BaseCreditPool.js +1 -1
- package/dist/abis/types/BaseFeeManager.d.ts +408 -408
- package/dist/abis/types/BaseFeeManager.js +1 -1
- package/dist/abis/types/BasePoolConfig.d.ts +1097 -1097
- package/dist/abis/types/BasePoolConfig.js +1 -1
- package/dist/abis/types/ERC20TransferableReceivable.d.ts +407 -407
- package/dist/abis/types/ERC20TransferableReceivable.js +1 -1
- package/dist/abis/types/Erc20.d.ts +168 -168
- package/dist/abis/types/Erc20.js +1 -1
- package/dist/abis/types/Erc2612.d.ts +192 -192
- package/dist/abis/types/Erc2612.js +1 -1
- package/dist/abis/types/Erc721.d.ts +474 -474
- package/dist/abis/types/Erc721.js +1 -1
- package/dist/abis/types/HDT.d.ts +369 -369
- package/dist/abis/types/HDT.js +1 -1
- package/dist/abis/types/IConstantFlowAgreementV1.d.ts +573 -573
- package/dist/abis/types/IConstantFlowAgreementV1.js +1 -1
- package/dist/abis/types/ISuperfluid.d.ts +728 -728
- package/dist/abis/types/ISuperfluid.js +1 -1
- package/dist/abis/types/InvoiceNFT.d.ts +425 -425
- package/dist/abis/types/InvoiceNFT.js +1 -1
- package/dist/abis/types/Multisend.d.ts +50 -50
- package/dist/abis/types/Multisend.js +1 -1
- package/dist/abis/types/RealWorldReceivable.d.ts +564 -564
- package/dist/abis/types/RealWorldReceivable.js +1 -1
- package/dist/abis/types/ReceivableFactoringPool.d.ts +999 -999
- package/dist/abis/types/ReceivableFactoringPool.js +1 -1
- package/dist/abis/types/StreamFactoringPool.d.ts +985 -985
- package/dist/abis/types/StreamFactoringPool.js +1 -1
- package/dist/abis/types/StreamFeeManager.d.ts +440 -440
- package/dist/abis/types/StreamFeeManager.js +1 -1
- package/dist/abis/types/SuperfluidPoolProcessor.d.ts +398 -398
- package/dist/abis/types/SuperfluidPoolProcessor.js +1 -1
- package/dist/abis/types/TestERC20.d.ts +270 -270
- package/dist/abis/types/TestERC20.js +1 -1
- package/dist/abis/types/TradableStream.d.ts +607 -607
- package/dist/abis/types/TradableStream.js +1 -1
- package/dist/abis/types/Transfer.d.ts +45 -45
- package/dist/abis/types/Transfer.js +1 -1
- package/dist/abis/types/TransferNFT.d.ts +45 -45
- package/dist/abis/types/TransferNFT.js +1 -1
- package/dist/abis/types/common.d.ts +22 -22
- package/dist/abis/types/common.js +1 -1
- package/dist/abis/types/factories/BaseCreditPool__factory.d.ts +931 -931
- package/dist/abis/types/factories/BaseCreditPool__factory.js +1193 -1192
- package/dist/abis/types/factories/BaseCreditPool__factory.js.map +1 -1
- package/dist/abis/types/factories/BaseFeeManager__factory.d.ts +379 -379
- package/dist/abis/types/factories/BaseFeeManager__factory.js +494 -493
- package/dist/abis/types/factories/BaseFeeManager__factory.js.map +1 -1
- package/dist/abis/types/factories/BasePoolConfig__factory.d.ts +1074 -1074
- package/dist/abis/types/factories/BasePoolConfig__factory.js +1378 -1377
- package/dist/abis/types/factories/BasePoolConfig__factory.js.map +1 -1
- package/dist/abis/types/factories/ERC20TransferableReceivable__factory.d.ts +508 -508
- package/dist/abis/types/factories/ERC20TransferableReceivable__factory.js +662 -661
- package/dist/abis/types/factories/ERC20TransferableReceivable__factory.js.map +1 -1
- package/dist/abis/types/factories/Erc20__factory.d.ts +175 -175
- package/dist/abis/types/factories/Erc20__factory.js +236 -235
- package/dist/abis/types/factories/Erc20__factory.js.map +1 -1
- package/dist/abis/types/factories/Erc2612__factory.d.ts +209 -209
- package/dist/abis/types/factories/Erc2612__factory.js +279 -278
- package/dist/abis/types/factories/Erc2612__factory.js.map +1 -1
- package/dist/abis/types/factories/Erc721__factory.d.ts +539 -539
- package/dist/abis/types/factories/Erc721__factory.js +687 -686
- package/dist/abis/types/factories/Erc721__factory.js.map +1 -1
- package/dist/abis/types/factories/HDT__factory.d.ts +399 -399
- package/dist/abis/types/factories/HDT__factory.js +526 -525
- package/dist/abis/types/factories/HDT__factory.js.map +1 -1
- package/dist/abis/types/factories/IConstantFlowAgreementV1__factory.d.ts +695 -695
- package/dist/abis/types/factories/IConstantFlowAgreementV1__factory.js +904 -903
- package/dist/abis/types/factories/IConstantFlowAgreementV1__factory.js.map +1 -1
- package/dist/abis/types/factories/ISuperfluid__factory.d.ts +866 -866
- package/dist/abis/types/factories/ISuperfluid__factory.js +1136 -1135
- package/dist/abis/types/factories/ISuperfluid__factory.js.map +1 -1
- package/dist/abis/types/factories/InvoiceNFT__factory.d.ts +489 -489
- package/dist/abis/types/factories/InvoiceNFT__factory.js +639 -638
- package/dist/abis/types/factories/InvoiceNFT__factory.js.map +1 -1
- package/dist/abis/types/factories/Multisend__factory.d.ts +26 -26
- package/dist/abis/types/factories/Multisend__factory.js +40 -39
- package/dist/abis/types/factories/Multisend__factory.js.map +1 -1
- package/dist/abis/types/factories/RealWorldReceivable__factory.d.ts +645 -645
- package/dist/abis/types/factories/RealWorldReceivable__factory.js +837 -836
- package/dist/abis/types/factories/RealWorldReceivable__factory.js.map +1 -1
- package/dist/abis/types/factories/ReceivableFactoringPool__factory.d.ts +1204 -1204
- package/dist/abis/types/factories/ReceivableFactoringPool__factory.js +1543 -1542
- package/dist/abis/types/factories/ReceivableFactoringPool__factory.js.map +1 -1
- package/dist/abis/types/factories/StreamFactoringPool__factory.d.ts +1200 -1200
- package/dist/abis/types/factories/StreamFactoringPool__factory.js +1537 -1536
- package/dist/abis/types/factories/StreamFactoringPool__factory.js.map +1 -1
- package/dist/abis/types/factories/StreamFeeManager__factory.d.ts +412 -412
- package/dist/abis/types/factories/StreamFeeManager__factory.js +536 -535
- package/dist/abis/types/factories/StreamFeeManager__factory.js.map +1 -1
- package/dist/abis/types/factories/SuperfluidPoolProcessor__factory.d.ts +546 -546
- package/dist/abis/types/factories/SuperfluidPoolProcessor__factory.js +706 -705
- package/dist/abis/types/factories/SuperfluidPoolProcessor__factory.js.map +1 -1
- package/dist/abis/types/factories/TestERC20__factory.d.ts +280 -280
- package/dist/abis/types/factories/TestERC20__factory.js +372 -371
- package/dist/abis/types/factories/TestERC20__factory.js.map +1 -1
- package/dist/abis/types/factories/TradableStream__factory.d.ts +663 -663
- package/dist/abis/types/factories/TradableStream__factory.js +864 -863
- package/dist/abis/types/factories/TradableStream__factory.js.map +1 -1
- package/dist/abis/types/factories/TransferNFT__factory.d.ts +28 -28
- package/dist/abis/types/factories/TransferNFT__factory.js +41 -40
- package/dist/abis/types/factories/TransferNFT__factory.js.map +1 -1
- package/dist/abis/types/factories/Transfer__factory.d.ts +25 -25
- package/dist/abis/types/factories/Transfer__factory.js +38 -37
- package/dist/abis/types/factories/Transfer__factory.js.map +1 -1
- package/dist/abis/types/factories/index.d.ts +21 -21
- package/dist/abis/types/factories/index.js +24 -24
- package/dist/abis/types/index.d.ts +43 -43
- package/dist/abis/types/index.js +22 -22
- package/dist/cjs/hooks/web3/index.js +2 -2
- package/dist/cjs/hooks/web3/index.js.map +1 -1
- package/dist/cjs/services/IdentityService.d.ts +17 -0
- package/dist/cjs/services/IdentityService.js +31 -4
- package/dist/cjs/services/IdentityService.js.map +1 -1
- package/dist/cjs/utils/chain.d.ts +3 -1
- package/dist/cjs/utils/chain.js +9 -1
- package/dist/cjs/utils/chain.js.map +1 -1
- package/dist/cjs/utils/config.d.ts +1 -0
- package/dist/cjs/utils/config.js +10 -1
- package/dist/cjs/utils/config.js.map +1 -1
- package/dist/cjs/utils/index.d.ts +2 -0
- package/dist/cjs/utils/index.js +2 -0
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/notifi.d.ts +3 -0
- package/dist/cjs/utils/notifi.js +40 -0
- package/dist/cjs/utils/notifi.js.map +1 -0
- package/dist/cjs/utils/number.js +7 -1
- package/dist/cjs/utils/number.js.map +1 -1
- package/dist/cjs/utils/pool.d.ts +1 -0
- package/dist/cjs/utils/pool.js +9 -6
- package/dist/cjs/utils/pool.js.map +1 -1
- package/dist/cjs/utils/realWorldReceivable.d.ts +12 -0
- package/dist/cjs/utils/realWorldReceivable.js +3 -0
- package/dist/cjs/utils/realWorldReceivable.js.map +1 -0
- package/dist/hooks/index.d.ts +18 -18
- package/dist/hooks/index.js +18 -18
- package/dist/hooks/useActiveRoute.d.ts +8 -8
- package/dist/hooks/useActiveRoute.js +7 -7
- package/dist/hooks/useAsyncError.d.ts +14 -14
- package/dist/hooks/useAsyncError.js +22 -22
- package/dist/hooks/useCLPoolContract.d.ts +27 -27
- package/dist/hooks/useContract.d.ts +7 -7
- package/dist/hooks/useContractFunction.d.ts +18 -18
- package/dist/hooks/useContractFunction.js +54 -54
- package/dist/hooks/useERC2612Permit/ethPermit/index.d.ts +35 -35
- package/dist/hooks/useERC2612Permit/ethPermit/index.js +139 -139
- package/dist/hooks/useERC2612Permit/ethPermit/lib.d.ts +1 -1
- package/dist/hooks/useERC2612Permit/ethPermit/lib.js +21 -21
- package/dist/hooks/useERC2612Permit/ethPermit/rpc.d.ts +10 -10
- package/dist/hooks/useERC2612Permit/ethPermit/rpc.js +96 -96
- package/dist/hooks/useERC2612Permit/index.d.ts +6 -6
- package/dist/hooks/useERC2612Permit/index.js +31 -31
- package/dist/hooks/useFactoring.d.ts +19 -19
- package/dist/hooks/useForceRefresh.d.ts +1 -1
- package/dist/hooks/useForceRefresh.js +8 -8
- package/dist/hooks/useGetSizes.d.ts +12 -12
- package/dist/hooks/useGetSizes.js +19 -19
- package/dist/hooks/useInvoiceNFTContract.d.ts +11 -11
- package/dist/hooks/useMQ.d.ts +6 -6
- package/dist/hooks/useMQ.js +14 -14
- package/dist/hooks/useMount.d.ts +2 -2
- package/dist/hooks/useMount.js +8 -8
- package/dist/hooks/useParamsSearch.d.ts +2 -2
- package/dist/hooks/useParamsSearch.js +6 -6
- package/dist/hooks/usePool.d.ts +4 -4
- package/dist/hooks/usePoolContract.d.ts +73 -73
- package/dist/hooks/useRFPoolContract.d.ts +22 -22
- package/dist/hooks/useRefresh.d.ts +1 -1
- package/dist/hooks/useRefresh.js +47 -47
- package/dist/hooks/web3/index.d.ts +15 -15
- package/dist/hooks/web3/index.js +2 -2
- package/dist/hooks/web3/index.js.map +1 -1
- package/dist/hooks/web3/useConnectors.d.ts +17 -17
- package/dist/hooks/web3/useConnectors.js +24 -24
- package/dist/hooks/web3/useJsonRpcUrlsMap.d.ts +13 -13
- package/dist/index.d.ts +5 -5
- package/dist/services/EAService.d.ts +153 -153
- package/dist/services/IdentityService.d.ts +17 -0
- package/dist/services/IdentityService.js +32 -5
- package/dist/services/IdentityService.js.map +1 -1
- package/dist/services/RNService.d.ts +14 -14
- package/dist/services/index.d.ts +3 -3
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/utils/JsonRpcConnector.d.ts +11 -11
- package/dist/utils/JsonRpcConnector.js +38 -38
- package/dist/utils/WalletConnect.d.ts +10 -10
- package/dist/utils/WalletConnect.js +50 -49
- package/dist/utils/WalletConnect.js.map +1 -1
- package/dist/utils/chain.d.ts +3 -1
- package/dist/utils/chain.js +7 -0
- package/dist/utils/chain.js.map +1 -1
- package/dist/utils/common.d.ts +4 -4
- package/dist/utils/common.js +10 -10
- package/dist/utils/config.d.ts +1 -0
- package/dist/utils/config.js +10 -1
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/const.d.ts +2 -2
- package/dist/utils/const.js +2 -2
- package/dist/utils/contractError.json +73 -73
- package/dist/utils/credit.d.ts +21 -21
- package/dist/utils/credit.js +35 -35
- package/dist/utils/errors.d.ts +26 -26
- package/dist/utils/errors.js +39 -39
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/jsonRpcEndpoints.d.ts +12 -12
- package/dist/utils/notifi.d.ts +3 -0
- package/dist/utils/notifi.js +35 -0
- package/dist/utils/notifi.js.map +1 -0
- package/dist/utils/number.d.ts +5 -5
- package/dist/utils/number.js +7 -1
- package/dist/utils/number.js.map +1 -1
- package/dist/utils/pool.d.ts +1 -0
- package/dist/utils/pool.js +9 -6
- package/dist/utils/pool.js.map +1 -1
- package/dist/utils/realWorldReceivable.d.ts +12 -0
- package/dist/utils/realWorldReceivable.js +2 -0
- package/dist/utils/realWorldReceivable.js.map +1 -0
- package/dist/utils/request.d.ts +3 -3
- package/dist/utils/request.js +38 -38
- package/dist/utils/scientificToDecimal.d.ts +1 -1
- package/dist/utils/scientificToDecimal.js +57 -57
- package/dist/utils/string.d.ts +1 -1
- package/dist/utils/string.js +1 -1
- package/dist/utils/style.d.ts +1 -1
- package/dist/utils/style.js +12 -12
- package/dist/utils/time.d.ts +26 -26
- package/dist/utils/time.js +50 -50
- package/dist/utils/transaction.d.ts +32 -32
- package/dist/utils/transaction.js +87 -87
- package/dist/utils/web3.d.ts +4 -4
- package/dist/utils/web3.js +34 -34
- package/package.json +3 -3
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
|
-
/* eslint-disable no-underscore-dangle */
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
-
const randomId = () => Math.floor(Math.random() * 10000000000);
|
|
6
|
-
export const send = (provider, method, params) => new Promise((resolve, reject) => {
|
|
7
|
-
const payload = {
|
|
8
|
-
id: randomId(),
|
|
9
|
-
method,
|
|
10
|
-
params,
|
|
11
|
-
};
|
|
12
|
-
const callback = (err, result) => {
|
|
13
|
-
if (err) {
|
|
14
|
-
reject(err);
|
|
15
|
-
}
|
|
16
|
-
else if (result.error) {
|
|
17
|
-
console.error(result.error);
|
|
18
|
-
reject(result.error);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
resolve(result.result);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
if (provider.getUncheckedSigner /* ethers provider */) {
|
|
25
|
-
provider
|
|
26
|
-
.send(method, params)
|
|
27
|
-
.then((r) => resolve(r))
|
|
28
|
-
.catch((e) => reject(e));
|
|
29
|
-
}
|
|
30
|
-
else if (provider.sendAsync) {
|
|
31
|
-
provider.sendAsync(payload, callback);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
provider.send(payload, callback).catch((error) => {
|
|
35
|
-
if (error.message ===
|
|
36
|
-
"Hardhat Network doesn't support JSON-RPC params sent as an object") {
|
|
37
|
-
provider
|
|
38
|
-
.send(method, params)
|
|
39
|
-
.then((r) => resolve(r))
|
|
40
|
-
.catch((e) => reject(e));
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
throw error;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
const splitSignatureToRSV = (signature) => {
|
|
49
|
-
const r = `0x${signature.substring(2).substring(0, 64)}`;
|
|
50
|
-
const s = `0x${signature.substring(2).substring(64, 128)}`;
|
|
51
|
-
const v = parseInt(signature.substring(2).substring(128, 130), 16);
|
|
52
|
-
return { r, s, v };
|
|
53
|
-
};
|
|
54
|
-
const signWithEthers = async (signer, fromAddress, typeData) => {
|
|
55
|
-
const signerAddress = await signer.getAddress();
|
|
56
|
-
if (signerAddress.toLowerCase() !== fromAddress.toLowerCase()) {
|
|
57
|
-
throw new Error('Signer address does not match requested signing address');
|
|
58
|
-
}
|
|
59
|
-
const _a = typeData.types, { EIP712Domain: _unused } = _a, types = __rest(_a, ["EIP712Domain"]);
|
|
60
|
-
const rawSignature = await (signer.signTypedData
|
|
61
|
-
? signer.signTypedData(typeData.domain, types, typeData.message)
|
|
62
|
-
: signer._signTypedData(typeData.domain, types, typeData.message));
|
|
63
|
-
return splitSignatureToRSV(rawSignature);
|
|
64
|
-
};
|
|
65
|
-
export const signData = async (provider, fromAddress, typeData) => {
|
|
66
|
-
if (provider._signTypedData || provider.signTypedData) {
|
|
67
|
-
return signWithEthers(provider, fromAddress, typeData);
|
|
68
|
-
}
|
|
69
|
-
const typeDataString = typeof typeData === 'string' ? typeData : JSON.stringify(typeData);
|
|
70
|
-
const result = await send(provider, 'eth_signTypedData_v4', [
|
|
71
|
-
fromAddress,
|
|
72
|
-
typeDataString,
|
|
73
|
-
]).catch((error) => {
|
|
74
|
-
if (error.message === 'Method eth_signTypedData_v4 not supported.') {
|
|
75
|
-
return send(provider, 'eth_signTypedData', [fromAddress, typeData]);
|
|
76
|
-
}
|
|
77
|
-
throw error;
|
|
78
|
-
});
|
|
79
|
-
return {
|
|
80
|
-
r: result.slice(0, 66),
|
|
81
|
-
s: `0x${result.slice(66, 130)}`,
|
|
82
|
-
v: parseInt(result.slice(130, 132), 16),
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
let chainIdOverride = null;
|
|
86
|
-
export const setChainIdOverride = (id) => {
|
|
87
|
-
chainIdOverride = id;
|
|
88
|
-
};
|
|
89
|
-
export const getChainId = async (provider) => chainIdOverride || send(provider, 'eth_chainId');
|
|
90
|
-
export const call = (provider, to, data) => send(provider, 'eth_call', [
|
|
91
|
-
{
|
|
92
|
-
to,
|
|
93
|
-
data,
|
|
94
|
-
},
|
|
95
|
-
'latest',
|
|
96
|
-
]);
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
|
+
/* eslint-disable no-underscore-dangle */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
+
const randomId = () => Math.floor(Math.random() * 10000000000);
|
|
6
|
+
export const send = (provider, method, params) => new Promise((resolve, reject) => {
|
|
7
|
+
const payload = {
|
|
8
|
+
id: randomId(),
|
|
9
|
+
method,
|
|
10
|
+
params,
|
|
11
|
+
};
|
|
12
|
+
const callback = (err, result) => {
|
|
13
|
+
if (err) {
|
|
14
|
+
reject(err);
|
|
15
|
+
}
|
|
16
|
+
else if (result.error) {
|
|
17
|
+
console.error(result.error);
|
|
18
|
+
reject(result.error);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
resolve(result.result);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
if (provider.getUncheckedSigner /* ethers provider */) {
|
|
25
|
+
provider
|
|
26
|
+
.send(method, params)
|
|
27
|
+
.then((r) => resolve(r))
|
|
28
|
+
.catch((e) => reject(e));
|
|
29
|
+
}
|
|
30
|
+
else if (provider.sendAsync) {
|
|
31
|
+
provider.sendAsync(payload, callback);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
provider.send(payload, callback).catch((error) => {
|
|
35
|
+
if (error.message ===
|
|
36
|
+
"Hardhat Network doesn't support JSON-RPC params sent as an object") {
|
|
37
|
+
provider
|
|
38
|
+
.send(method, params)
|
|
39
|
+
.then((r) => resolve(r))
|
|
40
|
+
.catch((e) => reject(e));
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const splitSignatureToRSV = (signature) => {
|
|
49
|
+
const r = `0x${signature.substring(2).substring(0, 64)}`;
|
|
50
|
+
const s = `0x${signature.substring(2).substring(64, 128)}`;
|
|
51
|
+
const v = parseInt(signature.substring(2).substring(128, 130), 16);
|
|
52
|
+
return { r, s, v };
|
|
53
|
+
};
|
|
54
|
+
const signWithEthers = async (signer, fromAddress, typeData) => {
|
|
55
|
+
const signerAddress = await signer.getAddress();
|
|
56
|
+
if (signerAddress.toLowerCase() !== fromAddress.toLowerCase()) {
|
|
57
|
+
throw new Error('Signer address does not match requested signing address');
|
|
58
|
+
}
|
|
59
|
+
const _a = typeData.types, { EIP712Domain: _unused } = _a, types = __rest(_a, ["EIP712Domain"]);
|
|
60
|
+
const rawSignature = await (signer.signTypedData
|
|
61
|
+
? signer.signTypedData(typeData.domain, types, typeData.message)
|
|
62
|
+
: signer._signTypedData(typeData.domain, types, typeData.message));
|
|
63
|
+
return splitSignatureToRSV(rawSignature);
|
|
64
|
+
};
|
|
65
|
+
export const signData = async (provider, fromAddress, typeData) => {
|
|
66
|
+
if (provider._signTypedData || provider.signTypedData) {
|
|
67
|
+
return signWithEthers(provider, fromAddress, typeData);
|
|
68
|
+
}
|
|
69
|
+
const typeDataString = typeof typeData === 'string' ? typeData : JSON.stringify(typeData);
|
|
70
|
+
const result = await send(provider, 'eth_signTypedData_v4', [
|
|
71
|
+
fromAddress,
|
|
72
|
+
typeDataString,
|
|
73
|
+
]).catch((error) => {
|
|
74
|
+
if (error.message === 'Method eth_signTypedData_v4 not supported.') {
|
|
75
|
+
return send(provider, 'eth_signTypedData', [fromAddress, typeData]);
|
|
76
|
+
}
|
|
77
|
+
throw error;
|
|
78
|
+
});
|
|
79
|
+
return {
|
|
80
|
+
r: result.slice(0, 66),
|
|
81
|
+
s: `0x${result.slice(66, 130)}`,
|
|
82
|
+
v: parseInt(result.slice(130, 132), 16),
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
let chainIdOverride = null;
|
|
86
|
+
export const setChainIdOverride = (id) => {
|
|
87
|
+
chainIdOverride = id;
|
|
88
|
+
};
|
|
89
|
+
export const getChainId = async (provider) => chainIdOverride || send(provider, 'eth_chainId');
|
|
90
|
+
export const call = (provider, to, data) => send(provider, 'eth_call', [
|
|
91
|
+
{
|
|
92
|
+
to,
|
|
93
|
+
data,
|
|
94
|
+
},
|
|
95
|
+
'latest',
|
|
96
|
+
]);
|
|
97
97
|
//# sourceMappingURL=rpc.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { signERC2612Permit } from './ethPermit';
|
|
2
|
-
export type ERC2612SignResult = Awaited<ReturnType<typeof signERC2612Permit>>;
|
|
3
|
-
export declare const useERC2612Permit: () => {
|
|
4
|
-
getERC2612PermitMessage: (tokenAddress: string, spender: string, amount: string) => Promise<import("./ethPermit").ERC2612PermitMessage & import("./ethPermit/rpc").RSV>;
|
|
5
|
-
getTradableStreamPermitMessage: (NFT: string, receiver: string, tokenAddress: string, origin: string, owner: string, flowrate: string, durationInSeconds: number) => Promise<import("./ethPermit").TradableStreamPermitMessage & import("./ethPermit/rpc").RSV>;
|
|
6
|
-
};
|
|
1
|
+
import { signERC2612Permit } from './ethPermit';
|
|
2
|
+
export type ERC2612SignResult = Awaited<ReturnType<typeof signERC2612Permit>>;
|
|
3
|
+
export declare const useERC2612Permit: () => {
|
|
4
|
+
getERC2612PermitMessage: (tokenAddress: string, spender: string, amount: string) => Promise<import("./ethPermit").ERC2612PermitMessage & import("./ethPermit/rpc").RSV>;
|
|
5
|
+
getTradableStreamPermitMessage: (NFT: string, receiver: string, tokenAddress: string, origin: string, owner: string, flowrate: string, durationInSeconds: number) => Promise<import("./ethPermit").TradableStreamPermitMessage & import("./ethPermit/rpc").RSV>;
|
|
6
|
+
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { useWeb3React } from '@web3-react/core';
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
|
-
import { signERC2612Permit, signTradableStreamPermit } from './ethPermit';
|
|
4
|
-
export const useERC2612Permit = () => {
|
|
5
|
-
const { account, provider, chainId } = useWeb3React();
|
|
6
|
-
const getDeadline = useCallback(async () => {
|
|
7
|
-
const FIVE_MINUTES = 5 * 60;
|
|
8
|
-
const latestBlock = await provider.getBlock('latest');
|
|
9
|
-
return latestBlock.timestamp + FIVE_MINUTES;
|
|
10
|
-
}, [provider]);
|
|
11
|
-
const getERC2612PermitMessage = useCallback(async (tokenAddress, spender, amount) => {
|
|
12
|
-
const deadline = await getDeadline();
|
|
13
|
-
const result = await signERC2612Permit(provider, tokenAddress, account, spender, amount, deadline);
|
|
14
|
-
return result;
|
|
15
|
-
}, [account, getDeadline, provider]);
|
|
16
|
-
const getTradableStreamPermitMessage = useCallback(async (NFT, receiver, tokenAddress, origin, owner, flowrate, durationInSeconds) => {
|
|
17
|
-
const domain = {
|
|
18
|
-
name: 'TradableStream',
|
|
19
|
-
version: '1',
|
|
20
|
-
chainId: chainId,
|
|
21
|
-
verifyingContract: NFT,
|
|
22
|
-
};
|
|
23
|
-
const deadline = await getDeadline();
|
|
24
|
-
const result = await signTradableStreamPermit(provider, domain, receiver, tokenAddress, origin, owner, flowrate, durationInSeconds, deadline);
|
|
25
|
-
return result;
|
|
26
|
-
}, [chainId, getDeadline, provider]);
|
|
27
|
-
return {
|
|
28
|
-
getERC2612PermitMessage,
|
|
29
|
-
getTradableStreamPermitMessage,
|
|
30
|
-
};
|
|
31
|
-
};
|
|
1
|
+
import { useWeb3React } from '@web3-react/core';
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { signERC2612Permit, signTradableStreamPermit } from './ethPermit';
|
|
4
|
+
export const useERC2612Permit = () => {
|
|
5
|
+
const { account, provider, chainId } = useWeb3React();
|
|
6
|
+
const getDeadline = useCallback(async () => {
|
|
7
|
+
const FIVE_MINUTES = 5 * 60;
|
|
8
|
+
const latestBlock = await provider.getBlock('latest');
|
|
9
|
+
return latestBlock.timestamp + FIVE_MINUTES;
|
|
10
|
+
}, [provider]);
|
|
11
|
+
const getERC2612PermitMessage = useCallback(async (tokenAddress, spender, amount) => {
|
|
12
|
+
const deadline = await getDeadline();
|
|
13
|
+
const result = await signERC2612Permit(provider, tokenAddress, account, spender, amount, deadline);
|
|
14
|
+
return result;
|
|
15
|
+
}, [account, getDeadline, provider]);
|
|
16
|
+
const getTradableStreamPermitMessage = useCallback(async (NFT, receiver, tokenAddress, origin, owner, flowrate, durationInSeconds) => {
|
|
17
|
+
const domain = {
|
|
18
|
+
name: 'TradableStream',
|
|
19
|
+
version: '1',
|
|
20
|
+
chainId: chainId,
|
|
21
|
+
verifyingContract: NFT,
|
|
22
|
+
};
|
|
23
|
+
const deadline = await getDeadline();
|
|
24
|
+
const result = await signTradableStreamPermit(provider, domain, receiver, tokenAddress, origin, owner, flowrate, durationInSeconds, deadline);
|
|
25
|
+
return result;
|
|
26
|
+
}, [chainId, getDeadline, provider]);
|
|
27
|
+
return {
|
|
28
|
+
getERC2612PermitMessage,
|
|
29
|
+
getTradableStreamPermitMessage,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { POOL_NAME, POOL_TYPE } from '../utils/pool';
|
|
2
|
-
export declare function useFactoring<T>(poolName: POOL_NAME, poolType: POOL_TYPE, getPaidSuccessCallback?: () => void): {
|
|
3
|
-
accountStats: import("./usePoolContract").AccountStats;
|
|
4
|
-
accountHasActiveLoan: boolean;
|
|
5
|
-
actionType: "borrow" | "payment" | undefined;
|
|
6
|
-
loading: boolean;
|
|
7
|
-
poolInfo: import("../utils/pool").PoolInfoType | undefined;
|
|
8
|
-
modalIsOpen: boolean;
|
|
9
|
-
selectedItem: T | undefined;
|
|
10
|
-
styles: {
|
|
11
|
-
wrapper: import("@emotion/utils").SerializedStyles;
|
|
12
|
-
title: import("@emotion/utils").SerializedStyles;
|
|
13
|
-
description: import("@emotion/utils").SerializedStyles;
|
|
14
|
-
};
|
|
15
|
-
handleGetPaid: (item: T) => void;
|
|
16
|
-
handleGetPaidSuccess: (blockNumber?: number) => void;
|
|
17
|
-
handlePayManually: (item: T) => void;
|
|
18
|
-
handleClose: () => void;
|
|
19
|
-
};
|
|
1
|
+
import { POOL_NAME, POOL_TYPE } from '../utils/pool';
|
|
2
|
+
export declare function useFactoring<T>(poolName: POOL_NAME, poolType: POOL_TYPE, getPaidSuccessCallback?: () => void): {
|
|
3
|
+
accountStats: import("./usePoolContract").AccountStats;
|
|
4
|
+
accountHasActiveLoan: boolean;
|
|
5
|
+
actionType: "borrow" | "payment" | undefined;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
poolInfo: import("../utils/pool").PoolInfoType | undefined;
|
|
8
|
+
modalIsOpen: boolean;
|
|
9
|
+
selectedItem: T | undefined;
|
|
10
|
+
styles: {
|
|
11
|
+
wrapper: import("@emotion/utils").SerializedStyles;
|
|
12
|
+
title: import("@emotion/utils").SerializedStyles;
|
|
13
|
+
description: import("@emotion/utils").SerializedStyles;
|
|
14
|
+
};
|
|
15
|
+
handleGetPaid: (item: T) => void;
|
|
16
|
+
handleGetPaidSuccess: (blockNumber?: number) => void;
|
|
17
|
+
handlePayManually: (item: T) => void;
|
|
18
|
+
handleClose: () => void;
|
|
19
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useForceRefresh: () => [number, () => void];
|
|
1
|
+
export declare const useForceRefresh: () => [number, () => void];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useCallback, useState } from 'react';
|
|
2
|
-
export const useForceRefresh = () => {
|
|
3
|
-
const [refreshCount, setRefreshCount] = useState(0);
|
|
4
|
-
const refresh = useCallback(() => {
|
|
5
|
-
setRefreshCount((pre) => pre + 1);
|
|
6
|
-
}, []);
|
|
7
|
-
return [refreshCount, refresh];
|
|
8
|
-
};
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
export const useForceRefresh = () => {
|
|
3
|
+
const [refreshCount, setRefreshCount] = useState(0);
|
|
4
|
+
const refresh = useCallback(() => {
|
|
5
|
+
setRefreshCount((pre) => pre + 1);
|
|
6
|
+
}, []);
|
|
7
|
+
return [refreshCount, refresh];
|
|
8
|
+
};
|
|
9
9
|
//# sourceMappingURL=useForceRefresh.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Theme } from '@mui/material';
|
|
2
|
-
type UseGetSizesType = {
|
|
3
|
-
isAboveSm: boolean;
|
|
4
|
-
isBelowLgSize: boolean;
|
|
5
|
-
isBelowMdSize: boolean;
|
|
6
|
-
isLgSize: boolean;
|
|
7
|
-
isMediumSize: boolean;
|
|
8
|
-
isMobileDisplay: boolean;
|
|
9
|
-
isXsSize: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare function useGetSizes(theme: Theme): UseGetSizesType;
|
|
12
|
-
export {};
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
type UseGetSizesType = {
|
|
3
|
+
isAboveSm: boolean;
|
|
4
|
+
isBelowLgSize: boolean;
|
|
5
|
+
isBelowMdSize: boolean;
|
|
6
|
+
isLgSize: boolean;
|
|
7
|
+
isMediumSize: boolean;
|
|
8
|
+
isMobileDisplay: boolean;
|
|
9
|
+
isXsSize: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function useGetSizes(theme: Theme): UseGetSizesType;
|
|
12
|
+
export {};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { useMediaQuery } from '@mui/material';
|
|
2
|
-
export function useGetSizes(theme) {
|
|
3
|
-
const isMobileDisplay = useMediaQuery(theme.breakpoints.down('md'));
|
|
4
|
-
const isLgSize = useMediaQuery(theme.breakpoints.up('lg'));
|
|
5
|
-
const isBelowLgSize = useMediaQuery(theme.breakpoints.down('lg'));
|
|
6
|
-
const isXsSize = useMediaQuery(theme.breakpoints.down('sm'));
|
|
7
|
-
const isAboveSm = useMediaQuery(theme.breakpoints.up('sm'));
|
|
8
|
-
const isBelowMdSize = useMediaQuery(theme.breakpoints.down('md'));
|
|
9
|
-
const isMediumSize = isMobileDisplay && isAboveSm;
|
|
10
|
-
return {
|
|
11
|
-
isAboveSm,
|
|
12
|
-
isBelowLgSize,
|
|
13
|
-
isBelowMdSize,
|
|
14
|
-
isLgSize,
|
|
15
|
-
isMediumSize,
|
|
16
|
-
isMobileDisplay,
|
|
17
|
-
isXsSize,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
1
|
+
import { useMediaQuery } from '@mui/material';
|
|
2
|
+
export function useGetSizes(theme) {
|
|
3
|
+
const isMobileDisplay = useMediaQuery(theme.breakpoints.down('md'));
|
|
4
|
+
const isLgSize = useMediaQuery(theme.breakpoints.up('lg'));
|
|
5
|
+
const isBelowLgSize = useMediaQuery(theme.breakpoints.down('lg'));
|
|
6
|
+
const isXsSize = useMediaQuery(theme.breakpoints.down('sm'));
|
|
7
|
+
const isAboveSm = useMediaQuery(theme.breakpoints.up('sm'));
|
|
8
|
+
const isBelowMdSize = useMediaQuery(theme.breakpoints.down('md'));
|
|
9
|
+
const isMediumSize = isMobileDisplay && isAboveSm;
|
|
10
|
+
return {
|
|
11
|
+
isAboveSm,
|
|
12
|
+
isBelowLgSize,
|
|
13
|
+
isBelowMdSize,
|
|
14
|
+
isLgSize,
|
|
15
|
+
isMediumSize,
|
|
16
|
+
isMobileDisplay,
|
|
17
|
+
isXsSize,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
20
|
//# sourceMappingURL=useGetSizes.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BigNumber } from 'ethers';
|
|
2
|
-
import { ERC20TransferableReceivable } from '../abis/types/ERC20TransferableReceivable';
|
|
3
|
-
import { POOL_NAME } from '../utils/pool';
|
|
4
|
-
export declare function useInvoiceNFTContract(poolName: POOL_NAME): ERC20TransferableReceivable | null;
|
|
5
|
-
export declare function useNFTIds(poolName: POOL_NAME, account?: string): [BigNumber[] | undefined, () => void];
|
|
6
|
-
export declare function useInvoiceNFTMetadata(poolName: POOL_NAME): {
|
|
7
|
-
getTokenMetadatas: (tokenIds: string[]) => Promise<any[] | undefined>;
|
|
8
|
-
};
|
|
9
|
-
export declare function useInvoiceNFTApproved(poolName: POOL_NAME): {
|
|
10
|
-
getApprovedBy: (tokenId: string) => Promise<string | undefined>;
|
|
11
|
-
};
|
|
1
|
+
import { BigNumber } from 'ethers';
|
|
2
|
+
import { ERC20TransferableReceivable } from '../abis/types/ERC20TransferableReceivable';
|
|
3
|
+
import { POOL_NAME } from '../utils/pool';
|
|
4
|
+
export declare function useInvoiceNFTContract(poolName: POOL_NAME): ERC20TransferableReceivable | null;
|
|
5
|
+
export declare function useNFTIds(poolName: POOL_NAME, account?: string): [BigNumber[] | undefined, () => void];
|
|
6
|
+
export declare function useInvoiceNFTMetadata(poolName: POOL_NAME): {
|
|
7
|
+
getTokenMetadatas: (tokenIds: string[]) => Promise<any[] | undefined>;
|
|
8
|
+
};
|
|
9
|
+
export declare function useInvoiceNFTApproved(poolName: POOL_NAME): {
|
|
10
|
+
getApprovedBy: (tokenId: string) => Promise<string | undefined>;
|
|
11
|
+
};
|
package/dist/hooks/useMQ.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const useMQ: () => {
|
|
2
|
-
isXsSize: boolean;
|
|
3
|
-
isSmSize: boolean;
|
|
4
|
-
isMdSize: boolean;
|
|
5
|
-
isLgSize: boolean;
|
|
6
|
-
};
|
|
1
|
+
export declare const useMQ: () => {
|
|
2
|
+
isXsSize: boolean;
|
|
3
|
+
isSmSize: boolean;
|
|
4
|
+
isMdSize: boolean;
|
|
5
|
+
isLgSize: boolean;
|
|
6
|
+
};
|
package/dist/hooks/useMQ.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useMediaQuery, useTheme } from '@mui/material';
|
|
2
|
-
export const useMQ = () => {
|
|
3
|
-
const theme = useTheme();
|
|
4
|
-
const isXsSize = useMediaQuery(theme.breakpoints.down('sm'));
|
|
5
|
-
const isSmSize = useMediaQuery(theme.breakpoints.down('md'));
|
|
6
|
-
const isMdSize = useMediaQuery(theme.breakpoints.down('lg'));
|
|
7
|
-
const isLgSize = useMediaQuery(theme.breakpoints.up('lg'));
|
|
8
|
-
return {
|
|
9
|
-
isXsSize,
|
|
10
|
-
isSmSize,
|
|
11
|
-
isMdSize,
|
|
12
|
-
isLgSize,
|
|
13
|
-
};
|
|
14
|
-
};
|
|
1
|
+
import { useMediaQuery, useTheme } from '@mui/material';
|
|
2
|
+
export const useMQ = () => {
|
|
3
|
+
const theme = useTheme();
|
|
4
|
+
const isXsSize = useMediaQuery(theme.breakpoints.down('sm'));
|
|
5
|
+
const isSmSize = useMediaQuery(theme.breakpoints.down('md'));
|
|
6
|
+
const isMdSize = useMediaQuery(theme.breakpoints.down('lg'));
|
|
7
|
+
const isLgSize = useMediaQuery(theme.breakpoints.up('lg'));
|
|
8
|
+
return {
|
|
9
|
+
isXsSize,
|
|
10
|
+
isSmSize,
|
|
11
|
+
isMdSize,
|
|
12
|
+
isLgSize,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
15
|
//# sourceMappingURL=useMQ.js.map
|
package/dist/hooks/useMount.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const isFunction: (value: unknown) => value is Function;
|
|
2
|
-
export declare const useMount: (fn: () => void) => void;
|
|
1
|
+
export declare const isFunction: (value: unknown) => value is Function;
|
|
2
|
+
export declare const useMount: (fn: () => void) => void;
|
package/dist/hooks/useMount.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useEffect } from 'react';
|
|
2
|
-
export const isFunction = (value) => typeof value === 'function';
|
|
3
|
-
export const useMount = (fn) => {
|
|
4
|
-
useEffect(() => {
|
|
5
|
-
fn === null || fn === void 0 ? void 0 : fn();
|
|
6
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7
|
-
}, []);
|
|
8
|
-
};
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
export const isFunction = (value) => typeof value === 'function';
|
|
3
|
+
export const useMount = (fn) => {
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
fn === null || fn === void 0 ? void 0 : fn();
|
|
6
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7
|
+
}, []);
|
|
8
|
+
};
|
|
9
9
|
//# sourceMappingURL=useMount.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as queryString from 'query-string';
|
|
2
|
-
export declare const useParamsSearch: () => queryString.ParsedQuery<string>;
|
|
1
|
+
import * as queryString from 'query-string';
|
|
2
|
+
export declare const useParamsSearch: () => queryString.ParsedQuery<string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useLocation } from 'react-router';
|
|
2
|
-
import * as queryString from 'query-string';
|
|
3
|
-
export const useParamsSearch = () => {
|
|
4
|
-
const location = useLocation();
|
|
5
|
-
return queryString.parse(location.search);
|
|
6
|
-
};
|
|
1
|
+
import { useLocation } from 'react-router';
|
|
2
|
+
import * as queryString from 'query-string';
|
|
3
|
+
export const useParamsSearch = () => {
|
|
4
|
+
const location = useLocation();
|
|
5
|
+
return queryString.parse(location.search);
|
|
6
|
+
};
|
|
7
7
|
//# sourceMappingURL=useParamsSearch.js.map
|
package/dist/hooks/usePool.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { POOL_NAME, POOL_TYPE, PoolInfoType } from '../utils/pool';
|
|
2
|
-
export declare const usePoolName: () => POOL_NAME;
|
|
3
|
-
export declare const usePoolChainCheck: () => POOL_NAME;
|
|
4
|
-
export declare const usePoolInfo: (poolName: POOL_NAME, poolType: POOL_TYPE) => PoolInfoType | undefined;
|
|
1
|
+
import { POOL_NAME, POOL_TYPE, PoolInfoType } from '../utils/pool';
|
|
2
|
+
export declare const usePoolName: () => POOL_NAME;
|
|
3
|
+
export declare const usePoolChainCheck: () => POOL_NAME;
|
|
4
|
+
export declare const usePoolInfo: (poolName: POOL_NAME, poolType: POOL_TYPE) => PoolInfoType | undefined;
|