@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,11 +1,11 @@
|
|
|
1
|
-
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
2
|
-
import { Actions, Connector } from '@web3-react/types';
|
|
3
|
-
export declare class JsonRpcConnector extends Connector {
|
|
4
|
-
customProvider: JsonRpcProvider;
|
|
5
|
-
constructor({ actions, provider, onError, }: {
|
|
6
|
-
actions: Actions;
|
|
7
|
-
provider: JsonRpcProvider;
|
|
8
|
-
onError?: (error: Error) => void;
|
|
9
|
-
});
|
|
10
|
-
activate(): Promise<void>;
|
|
11
|
-
}
|
|
1
|
+
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
2
|
+
import { Actions, Connector } from '@web3-react/types';
|
|
3
|
+
export declare class JsonRpcConnector extends Connector {
|
|
4
|
+
customProvider: JsonRpcProvider;
|
|
5
|
+
constructor({ actions, provider, onError, }: {
|
|
6
|
+
actions: Actions;
|
|
7
|
+
provider: JsonRpcProvider;
|
|
8
|
+
onError?: (error: Error) => void;
|
|
9
|
+
});
|
|
10
|
+
activate(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { Connector, } from '@web3-react/types';
|
|
2
|
-
function parseChainId(chainId) {
|
|
3
|
-
return Number.parseInt(chainId, 16);
|
|
4
|
-
}
|
|
5
|
-
export class JsonRpcConnector extends Connector {
|
|
6
|
-
constructor({ actions, provider, onError, }) {
|
|
7
|
-
super(actions, onError);
|
|
8
|
-
this.customProvider = provider
|
|
9
|
-
.on('connect', ({ chainId }) => {
|
|
10
|
-
this.actions.update({ chainId: parseChainId(chainId) });
|
|
11
|
-
})
|
|
12
|
-
.on('disconnect', (error) => {
|
|
13
|
-
var _a;
|
|
14
|
-
(_a = this.onError) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
|
15
|
-
this.actions.resetState();
|
|
16
|
-
})
|
|
17
|
-
.on('chainChanged', (chainId) => {
|
|
18
|
-
this.actions.update({ chainId: parseChainId(chainId) });
|
|
19
|
-
})
|
|
20
|
-
.on('accountsChanged', (accounts) => {
|
|
21
|
-
this.actions.update({ accounts });
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
async activate() {
|
|
25
|
-
this.actions.startActivation();
|
|
26
|
-
try {
|
|
27
|
-
const [{ chainId }, accounts] = await Promise.all([
|
|
28
|
-
this.customProvider.getNetwork(),
|
|
29
|
-
this.customProvider.listAccounts(),
|
|
30
|
-
]);
|
|
31
|
-
this.actions.update({ chainId, accounts });
|
|
32
|
-
}
|
|
33
|
-
catch (e) {
|
|
34
|
-
this.actions.resetState();
|
|
35
|
-
throw e;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
import { Connector, } from '@web3-react/types';
|
|
2
|
+
function parseChainId(chainId) {
|
|
3
|
+
return Number.parseInt(chainId, 16);
|
|
4
|
+
}
|
|
5
|
+
export class JsonRpcConnector extends Connector {
|
|
6
|
+
constructor({ actions, provider, onError, }) {
|
|
7
|
+
super(actions, onError);
|
|
8
|
+
this.customProvider = provider
|
|
9
|
+
.on('connect', ({ chainId }) => {
|
|
10
|
+
this.actions.update({ chainId: parseChainId(chainId) });
|
|
11
|
+
})
|
|
12
|
+
.on('disconnect', (error) => {
|
|
13
|
+
var _a;
|
|
14
|
+
(_a = this.onError) === null || _a === void 0 ? void 0 : _a.call(this, error);
|
|
15
|
+
this.actions.resetState();
|
|
16
|
+
})
|
|
17
|
+
.on('chainChanged', (chainId) => {
|
|
18
|
+
this.actions.update({ chainId: parseChainId(chainId) });
|
|
19
|
+
})
|
|
20
|
+
.on('accountsChanged', (accounts) => {
|
|
21
|
+
this.actions.update({ accounts });
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
async activate() {
|
|
25
|
+
this.actions.startActivation();
|
|
26
|
+
try {
|
|
27
|
+
const [{ chainId }, accounts] = await Promise.all([
|
|
28
|
+
this.customProvider.getNetwork(),
|
|
29
|
+
this.customProvider.listAccounts(),
|
|
30
|
+
]);
|
|
31
|
+
this.actions.update({ chainId, accounts });
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
this.actions.resetState();
|
|
35
|
+
throw e;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
39
|
//# sourceMappingURL=JsonRpcConnector.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { WalletConnect, WalletConnectConstructorArgs } from '@web3-react/walletconnect';
|
|
2
|
-
export declare class WalletConnectPopup extends WalletConnect {
|
|
3
|
-
constructor({ actions, options, defaultChainId, timeout, onError, }: WalletConnectConstructorArgs);
|
|
4
|
-
}
|
|
5
|
-
export declare class WalletConnectQR extends WalletConnect {
|
|
6
|
-
static SVG_AVAILABLE: string;
|
|
7
|
-
svg?: string;
|
|
8
|
-
constructor({ actions, options, defaultChainId, timeout, onError, }: WalletConnectConstructorArgs);
|
|
9
|
-
deactivate(): Promise<void>;
|
|
10
|
-
}
|
|
1
|
+
import { WalletConnect, WalletConnectConstructorArgs } from '@web3-react/walletconnect';
|
|
2
|
+
export declare class WalletConnectPopup extends WalletConnect {
|
|
3
|
+
constructor({ actions, options, defaultChainId, timeout, onError, }: WalletConnectConstructorArgs);
|
|
4
|
+
}
|
|
5
|
+
export declare class WalletConnectQR extends WalletConnect {
|
|
6
|
+
static SVG_AVAILABLE: string;
|
|
7
|
+
svg?: string;
|
|
8
|
+
constructor({ actions, options, defaultChainId, timeout, onError, }: WalletConnectConstructorArgs);
|
|
9
|
+
deactivate(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -1,50 +1,51 @@
|
|
|
1
|
-
/* eslint-disable max-classes-per-file */
|
|
2
|
-
import { URI_AVAILABLE, WalletConnect, } from '@web3-react/walletconnect';
|
|
3
|
-
import QRCode from 'qrcode';
|
|
4
|
-
export class WalletConnectPopup extends WalletConnect {
|
|
5
|
-
constructor({ actions, options, defaultChainId, timeout, onError, }) {
|
|
6
|
-
super({
|
|
7
|
-
actions,
|
|
8
|
-
options: Object.assign(Object.assign({}, options), { qrcode: true }),
|
|
9
|
-
defaultChainId,
|
|
10
|
-
timeout,
|
|
11
|
-
onError,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
constructor({ actions, options, defaultChainId, timeout, onError, }) {
|
|
17
|
-
super({
|
|
18
|
-
actions,
|
|
19
|
-
options: Object.assign(Object.assign({}, options), { qrcode: false }),
|
|
20
|
-
defaultChainId,
|
|
21
|
-
timeout,
|
|
22
|
-
onError,
|
|
23
|
-
});
|
|
24
|
-
this.events.once(URI_AVAILABLE, () => {
|
|
25
|
-
var _a;
|
|
26
|
-
(_a = this.provider) === null || _a === void 0 ? void 0 : _a.connector.on('disconnect', () => {
|
|
27
|
-
this.deactivate();
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
this.events.on(URI_AVAILABLE, async (uri) => {
|
|
31
|
-
this.svg = undefined;
|
|
32
|
-
if (!uri)
|
|
33
|
-
return;
|
|
34
|
-
this.svg = await QRCode.toString(uri, {
|
|
35
|
-
// Leave a margin to increase contrast in dark mode.
|
|
36
|
-
margin: 1,
|
|
37
|
-
// Use 55*2=110 for the width to prevent distortion. The generated viewbox is "0 0 55 55".
|
|
38
|
-
width: 110,
|
|
39
|
-
type: 'svg',
|
|
40
|
-
});
|
|
41
|
-
this.events.emit(WalletConnectQR.SVG_AVAILABLE, this.svg);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
deactivate() {
|
|
45
|
-
this.events.emit(URI_AVAILABLE);
|
|
46
|
-
return super.deactivate();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
WalletConnectQR.SVG_AVAILABLE = 'svg_available';
|
|
1
|
+
/* eslint-disable max-classes-per-file */
|
|
2
|
+
import { URI_AVAILABLE, WalletConnect, } from '@web3-react/walletconnect';
|
|
3
|
+
import QRCode from 'qrcode';
|
|
4
|
+
export class WalletConnectPopup extends WalletConnect {
|
|
5
|
+
constructor({ actions, options, defaultChainId, timeout, onError, }) {
|
|
6
|
+
super({
|
|
7
|
+
actions,
|
|
8
|
+
options: Object.assign(Object.assign({}, options), { qrcode: true }),
|
|
9
|
+
defaultChainId,
|
|
10
|
+
timeout,
|
|
11
|
+
onError,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
class WalletConnectQR extends WalletConnect {
|
|
16
|
+
constructor({ actions, options, defaultChainId, timeout, onError, }) {
|
|
17
|
+
super({
|
|
18
|
+
actions,
|
|
19
|
+
options: Object.assign(Object.assign({}, options), { qrcode: false }),
|
|
20
|
+
defaultChainId,
|
|
21
|
+
timeout,
|
|
22
|
+
onError,
|
|
23
|
+
});
|
|
24
|
+
this.events.once(URI_AVAILABLE, () => {
|
|
25
|
+
var _a;
|
|
26
|
+
(_a = this.provider) === null || _a === void 0 ? void 0 : _a.connector.on('disconnect', () => {
|
|
27
|
+
this.deactivate();
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
this.events.on(URI_AVAILABLE, async (uri) => {
|
|
31
|
+
this.svg = undefined;
|
|
32
|
+
if (!uri)
|
|
33
|
+
return;
|
|
34
|
+
this.svg = await QRCode.toString(uri, {
|
|
35
|
+
// Leave a margin to increase contrast in dark mode.
|
|
36
|
+
margin: 1,
|
|
37
|
+
// Use 55*2=110 for the width to prevent distortion. The generated viewbox is "0 0 55 55".
|
|
38
|
+
width: 110,
|
|
39
|
+
type: 'svg',
|
|
40
|
+
});
|
|
41
|
+
this.events.emit(WalletConnectQR.SVG_AVAILABLE, this.svg);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
deactivate() {
|
|
45
|
+
this.events.emit(URI_AVAILABLE);
|
|
46
|
+
return super.deactivate();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
WalletConnectQR.SVG_AVAILABLE = 'svg_available';
|
|
50
|
+
export { WalletConnectQR };
|
|
50
51
|
//# sourceMappingURL=WalletConnect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletConnect.js","sourceRoot":"","sources":["../../src/utils/WalletConnect.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,OAAO,EACL,aAAa,EACb,aAAa,GAEd,MAAM,2BAA2B,CAAA;AAClC,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,MAAM,OAAO,kBAAmB,SAAQ,aAAa;IACnD,YAAY,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,OAAO,EACP,OAAO,GACsB;QAC7B,KAAK,CAAC;YACJ,OAAO;YACP,OAAO,kCAAO,OAAO,KAAE,MAAM,EAAE,IAAI,GAAE;YACrC,cAAc;YACd,OAAO;YACP,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF;AAED,
|
|
1
|
+
{"version":3,"file":"WalletConnect.js","sourceRoot":"","sources":["../../src/utils/WalletConnect.ts"],"names":[],"mappings":"AAAA,yCAAyC;AAEzC,OAAO,EACL,aAAa,EACb,aAAa,GAEd,MAAM,2BAA2B,CAAA;AAClC,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,MAAM,OAAO,kBAAmB,SAAQ,aAAa;IACnD,YAAY,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,OAAO,EACP,OAAO,GACsB;QAC7B,KAAK,CAAC;YACJ,OAAO;YACP,OAAO,kCAAO,OAAO,KAAE,MAAM,EAAE,IAAI,GAAE;YACrC,cAAc;YACd,OAAO;YACP,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF;AAED,MAAa,eAAgB,SAAQ,aAAa;IAKhD,YAAY,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,OAAO,EACP,OAAO,GACsB;QAC7B,KAAK,CAAC;YACJ,OAAO;YACP,OAAO,kCAAO,OAAO,KAAE,MAAM,EAAE,KAAK,GAAE;YACtC,cAAc;YACd,OAAO;YACP,OAAO;SACR,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE;;YACnC,MAAA,IAAI,CAAC,QAAQ,0CAAE,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;gBAC7C,IAAI,CAAC,UAAU,EAAE,CAAA;YACnB,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YAC1C,IAAI,CAAC,GAAG,GAAG,SAAS,CAAA;YACpB,IAAI,CAAC,GAAG;gBAAE,OAAM;YAEhB,IAAI,CAAC,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE;gBACpC,oDAAoD;gBACpD,MAAM,EAAE,CAAC;gBACT,0FAA0F;gBAC1F,KAAK,EAAE,GAAG;gBACV,IAAI,EAAE,KAAK;aACZ,CAAC,CAAA;YACF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;QAC3D,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,UAAU;QACR,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QAC/B,OAAO,KAAK,CAAC,UAAU,EAAE,CAAA;IAC3B,CAAC;;AA3CM,6BAAa,GAAG,eAAe,CAAA;SAD3B,eAAe"}
|
package/dist/utils/chain.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AddEthereumChainParameter } from '@web3-react/types';
|
|
2
|
-
interface BasicChainInformation {
|
|
2
|
+
export interface BasicChainInformation {
|
|
3
|
+
id: number;
|
|
3
4
|
urls: string[];
|
|
4
5
|
name: string;
|
|
5
6
|
explorer: string;
|
|
@@ -31,4 +32,5 @@ export declare const getWalletAddressAbbr: (address: string) => string;
|
|
|
31
32
|
* @param chainId a chain ID, which will be returned if it is a supported chain ID
|
|
32
33
|
*/
|
|
33
34
|
export declare function supportedChainId(chainId: number | undefined): ChainEnum | undefined;
|
|
35
|
+
export declare function findChainIdByName(chainName: string): number | undefined;
|
|
34
36
|
export {};
|
package/dist/utils/chain.js
CHANGED
|
@@ -30,6 +30,7 @@ export const CHAINS = {
|
|
|
30
30
|
// wait: 6,
|
|
31
31
|
// },
|
|
32
32
|
[ChainEnum.Polygon]: {
|
|
33
|
+
id: ChainEnum.Polygon,
|
|
33
34
|
urls: ['https://polygon-rpc.com/'],
|
|
34
35
|
name: 'Polygon',
|
|
35
36
|
nativeCurrency: MATIC,
|
|
@@ -39,6 +40,7 @@ export const CHAINS = {
|
|
|
39
40
|
icon: 'Polygon',
|
|
40
41
|
},
|
|
41
42
|
[ChainEnum.Goerli]: {
|
|
43
|
+
id: ChainEnum.Goerli,
|
|
42
44
|
urls: ['https://rpc.ankr.com/eth_goerli'],
|
|
43
45
|
name: 'Goerli',
|
|
44
46
|
nativeCurrency: ETH,
|
|
@@ -49,6 +51,7 @@ export const CHAINS = {
|
|
|
49
51
|
icon: 'Ethereum',
|
|
50
52
|
},
|
|
51
53
|
[ChainEnum.Mumbai]: {
|
|
54
|
+
id: ChainEnum.Mumbai,
|
|
52
55
|
urls: ['https://rpc.ankr.com/polygon_mumbai'],
|
|
53
56
|
name: 'Mumbai',
|
|
54
57
|
nativeCurrency: MATIC,
|
|
@@ -100,4 +103,8 @@ export function supportedChainId(chainId) {
|
|
|
100
103
|
}
|
|
101
104
|
return undefined;
|
|
102
105
|
}
|
|
106
|
+
export function findChainIdByName(chainName) {
|
|
107
|
+
const chainId = Object.keys(CHAINS).find((key) => CHAINS[Number(key)].name === chainName);
|
|
108
|
+
return chainId ? Number(chainId) : undefined;
|
|
109
|
+
}
|
|
103
110
|
//# sourceMappingURL=chain.js.map
|
package/dist/utils/chain.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/utils/chain.ts"],"names":[],"mappings":"AAEA,MAAM,GAAG,GAAgD;IACvD,IAAI,EAAE,OAAO;IACb,MAAM,EAAE,KAAK;IACb,QAAQ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EAAE,EAAE,CAAC,CAAA;AAEN,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAE,EAAE;IACtD,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,OAAO,CAAA;KACf;IACD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC1B,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,CAAA;AACxE,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAA2B;IAE3B,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,IAAI,SAAS,EAAE;QACvD,OAAO,OAAO,CAAA;KACf;IACD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,SAAS,EAAE;QAC/D,OAAO,MAAM,CAAC,OAAO,CAAC,CAAA;KACvB;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,SAAiB;IACjD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CACtC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAChD,CAAA;IACD,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AAC9C,CAAC"}
|
package/dist/utils/common.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const isEmpty: (value: undefined | null | any) => boolean;
|
|
2
|
-
export declare const openInNewTab: (url: string) => void;
|
|
3
|
-
export declare const sleep: (ms: number) => Promise<unknown>;
|
|
4
|
-
export declare const isIframe: () => boolean;
|
|
1
|
+
export declare const isEmpty: (value: undefined | null | any) => boolean;
|
|
2
|
+
export declare const openInNewTab: (url: string) => void;
|
|
3
|
+
export declare const sleep: (ms: number) => Promise<unknown>;
|
|
4
|
+
export declare const isIframe: () => boolean;
|
package/dist/utils/common.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2
|
-
export const isEmpty = (value) => value === undefined || value === null;
|
|
3
|
-
export const openInNewTab = (url) => {
|
|
4
|
-
// @ts-ignore
|
|
5
|
-
window.open(url, '_blank').focus();
|
|
6
|
-
};
|
|
7
|
-
export const sleep = (ms) =>
|
|
8
|
-
// eslint-disable-next-line no-promise-executor-return
|
|
9
|
-
new Promise((resolve) => setTimeout(resolve, ms));
|
|
10
|
-
export const isIframe = () => window !== window.parent;
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2
|
+
export const isEmpty = (value) => value === undefined || value === null;
|
|
3
|
+
export const openInNewTab = (url) => {
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
window.open(url, '_blank').focus();
|
|
6
|
+
};
|
|
7
|
+
export const sleep = (ms) =>
|
|
8
|
+
// eslint-disable-next-line no-promise-executor-return
|
|
9
|
+
new Promise((resolve) => setTimeout(resolve, ms));
|
|
10
|
+
export const isIframe = () => window !== window.parent;
|
|
11
11
|
//# sourceMappingURL=common.js.map
|
package/dist/utils/config.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export declare const configUtil: {
|
|
|
3
3
|
getEABaseUrlV1: (chainId: number) => string;
|
|
4
4
|
getRequestAPIUrl: (chainId: number, isDev?: boolean) => string;
|
|
5
5
|
getIdentityAPIUrl: (chainId: number, isDev?: boolean) => string;
|
|
6
|
+
getKYCProviderBaseUrl: (provider: 'Securitize', isDev?: boolean) => string;
|
|
6
7
|
DEFAULT_CHAIN_ID: number;
|
|
7
8
|
};
|
package/dist/utils/config.js
CHANGED
|
@@ -21,13 +21,22 @@ const getIdentityAPIUrl = (chainId, isDev = false) => {
|
|
|
21
21
|
const networkType = CHAINS[chainId].isTestnet ? 'testnet' : 'mainnet';
|
|
22
22
|
return `https://${getDevPrefix(isDev)}${networkType}.identity-verification.huma.finance`;
|
|
23
23
|
};
|
|
24
|
+
const getKYCProviderBaseUrl = (provider, isDev = false) => {
|
|
25
|
+
switch (provider) {
|
|
26
|
+
case 'Securitize':
|
|
27
|
+
return `https://id${isDev ? '.sandbox' : ''}.securitize.io`;
|
|
28
|
+
default:
|
|
29
|
+
throw new Error(`Unknown KYC provider: ${provider}`);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
24
32
|
// @todo: ReferenceError: Cannot access 'ChainEnum' before initialization
|
|
25
|
-
const DEFAULT_CHAIN_ID =
|
|
33
|
+
const DEFAULT_CHAIN_ID = 137;
|
|
26
34
|
export const configUtil = {
|
|
27
35
|
getEAVerseUrl,
|
|
28
36
|
getEABaseUrlV1,
|
|
29
37
|
getRequestAPIUrl,
|
|
30
38
|
getIdentityAPIUrl,
|
|
39
|
+
getKYCProviderBaseUrl,
|
|
31
40
|
DEFAULT_CHAIN_ID,
|
|
32
41
|
};
|
|
33
42
|
//# sourceMappingURL=config.js.map
|
package/dist/utils/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,MAAM,YAAY,GAAG,CAAC,KAAK,GAAG,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AAE7D,MAAM,aAAa,GAAG,CAAC,OAAe,EAAE,KAAK,GAAG,KAAK,EAAE,EAAE;IACvD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAA;IACpC,OAAO,WAAW,YAAY,CAAC,KAAK,CAAC,GAAG,OAAO,u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A;AAED,yEAAyE;AACzE,MAAM,gBAAgB,GAAG,GAAG,CAAA;AAE5B,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,qBAAqB;IACrB,gBAAgB;CACjB,CAAA"}
|
package/dist/utils/const.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const EARejectReason = "Your wallet does not meet qualifications";
|
|
2
|
-
export declare const EARejectMessage = "Based on your wallet transaction history your application was not approved.";
|
|
1
|
+
export declare const EARejectReason = "Your wallet does not meet qualifications";
|
|
2
|
+
export declare const EARejectMessage = "Based on your wallet transaction history your application was not approved.";
|
package/dist/utils/const.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const EARejectReason = 'Your wallet does not meet qualifications';
|
|
2
|
-
export const EARejectMessage = 'Based on your wallet transaction history your application was not approved.';
|
|
1
|
+
export const EARejectReason = 'Your wallet does not meet qualifications';
|
|
2
|
+
export const EARejectMessage = 'Based on your wallet transaction history your application was not approved.';
|
|
3
3
|
//# sourceMappingURL=const.js.map
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"sameValue()": "0x0811ff09",
|
|
3
|
-
"zeroAddressProvided()": "0x5ff75ab0",
|
|
4
|
-
"zeroAmountProvided()": "0x71799f2a",
|
|
5
|
-
"amountTooLow()": "0x5b05bfbf",
|
|
6
|
-
"invalidBasisPointHigherThan10000()": "0x07982d85",
|
|
7
|
-
"withdrawnAmountHigherThanBalance()": "0x477c0ab2",
|
|
8
|
-
"permissionDeniedNotAdmin()": "0xf2c5b6a7",
|
|
9
|
-
"permissionDeniedNotLender()": "0x68299b20",
|
|
10
|
-
"evaluationAgentServiceAccountRequired()": "0x9b3b1ed6",
|
|
11
|
-
"paymentDetectionServiceAccountRequired()": "0x731b978f",
|
|
12
|
-
"notPoolOwner()": "0xd39208c9",
|
|
13
|
-
"notProtocolOwner()": "0x97924c20",
|
|
14
|
-
"notEvaluationAgent()": "0x66f7b8b7",
|
|
15
|
-
"notPauser()": "0xdcdea7c8",
|
|
16
|
-
"notPool()": "0x26d29bbf",
|
|
17
|
-
"defaultGracePeriodLessThanMinAllowed()": "0xa733ff9c",
|
|
18
|
-
"treasuryFeeHighThanUpperLimit()": "0x39cda0d1",
|
|
19
|
-
"alreadyAPauser()": "0x9f694c22",
|
|
20
|
-
"alreadyPoolAdmin()": "0x7bb356e2",
|
|
21
|
-
"minPrincipalPaymentRateSettingTooHigh()": "0xc11fc042",
|
|
22
|
-
"proposedEADoesNotOwnProvidedEANFT()": "0x75b0da3b",
|
|
23
|
-
"underlyingTokenNotApprovedForHumaProtocol()": "0xce179d6d",
|
|
24
|
-
"poolOwnerNotEnoughLiquidity()": "0xe95282e2",
|
|
25
|
-
"evaluationAgentNotEnoughLiquidity()": "0x67e26217",
|
|
26
|
-
"protocolIsPaused()": "0x8f6fa2d4",
|
|
27
|
-
"poolIsNotOn()": "0x69b355df",
|
|
28
|
-
"creditExpiredDueToFirstDrawdownTooLate()": "0x9fac7390",
|
|
29
|
-
"creditExpiredDueToMaturity()": "0xa52f3c3f",
|
|
30
|
-
"creditLineNotInGoodStandingState()": "0x96e79474",
|
|
31
|
-
"creditLineNotInStateForMakingPayment()": "0xf023e48b",
|
|
32
|
-
"creditLineNotInStateForDrawdown()": "0x4ff95a6d",
|
|
33
|
-
"creditLineExceeded()": "0xef7d66ff",
|
|
34
|
-
"creditLineAlreadyExists()": "0x6c5805f2",
|
|
35
|
-
"creditLineGreatThanUpperLimit()": "0xd8c27d2f",
|
|
36
|
-
"greaterThanMaxCreditLine()": "0x8a754ae8",
|
|
37
|
-
"requestedCreditWithZeroDuration()": "0xb16dd34d",
|
|
38
|
-
"onlyBorrowerOrEACanReduceCreditLine()": "0xd61dbe31",
|
|
39
|
-
"exceededPoolLiquidityCap()": "0x5642ebd4",
|
|
40
|
-
"receivableAssetMismatch()": "0x41dbeec1",
|
|
41
|
-
"unsupportedReceivableAsset()": "0xe60c383e",
|
|
42
|
-
"receivableAssetParamMismatch()": "0x1400a0b4",
|
|
43
|
-
"insufficientReceivableAmount()": "0xf7f34854",
|
|
44
|
-
"borrowingAmountLessThanPlatformFees()": "0x97fde118",
|
|
45
|
-
"withdrawTooSoon()": "0x67982472",
|
|
46
|
-
"paymentAlreadyProcessed()": "0xfd6754cf",
|
|
47
|
-
"defaultTriggeredTooEarly()": "0x7872424e",
|
|
48
|
-
"defaultHasAlreadyBeenTriggered()": "0xeb8d2ccc",
|
|
49
|
-
"notOperator()": "0xf67113fe",
|
|
50
|
-
"notPoolOwnerTreasury()": "0x325bf3c2",
|
|
51
|
-
"notPoolOwnerOrEA()": "0xd6ed9384",
|
|
52
|
-
"alreadyAnOperator()": "0x75cea0fc",
|
|
53
|
-
"poolOperatorRequired()": "0xdc2dc6d0",
|
|
54
|
-
"drawdownFunctionUsedInsteadOfDrawdownWithReceivable()": "0x7e737537",
|
|
55
|
-
"notNFTOwner()": "0x091a5762",
|
|
56
|
-
"creditLineNotInApprovedState()": "0xfc91a989",
|
|
57
|
-
"notPoolOwnerTreasuryOrEA()": "0xc74cb44c",
|
|
58
|
-
"paymentIdNotUnderReview()": "0xd1696aaa",
|
|
59
|
-
"creditLineTooHigh()": "0x552b8377",
|
|
60
|
-
"creditLineOutstanding()": "0xc64e338c",
|
|
61
|
-
"allowanceTooLow()": "0xcd8ef369",
|
|
62
|
-
"durationTooLong()": "0xf1dd53a8",
|
|
63
|
-
"invalidFlowrate()": "0xd06a9328",
|
|
64
|
-
"settlementTooSoon()": "0x0453e75e",
|
|
65
|
-
"onlySuperfluid()": "0x3f9cd1c2",
|
|
66
|
-
"borrowerMismatch()": "0x27d3e640",
|
|
67
|
-
"notProcessor()": "0x90409ca1",
|
|
68
|
-
"receivableIdMismatch()": "0x97be2b67",
|
|
69
|
-
"flowKeyMismatch()": "0x29d5a5f3",
|
|
70
|
-
"flowIsNotTerminated()": "0xe9c5922f",
|
|
71
|
-
"invalidSuperfluidCallback()": "0xd2747f83",
|
|
72
|
-
"invalidSuperfluidAction()": "0x2f2cd9e9"
|
|
73
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"sameValue()": "0x0811ff09",
|
|
3
|
+
"zeroAddressProvided()": "0x5ff75ab0",
|
|
4
|
+
"zeroAmountProvided()": "0x71799f2a",
|
|
5
|
+
"amountTooLow()": "0x5b05bfbf",
|
|
6
|
+
"invalidBasisPointHigherThan10000()": "0x07982d85",
|
|
7
|
+
"withdrawnAmountHigherThanBalance()": "0x477c0ab2",
|
|
8
|
+
"permissionDeniedNotAdmin()": "0xf2c5b6a7",
|
|
9
|
+
"permissionDeniedNotLender()": "0x68299b20",
|
|
10
|
+
"evaluationAgentServiceAccountRequired()": "0x9b3b1ed6",
|
|
11
|
+
"paymentDetectionServiceAccountRequired()": "0x731b978f",
|
|
12
|
+
"notPoolOwner()": "0xd39208c9",
|
|
13
|
+
"notProtocolOwner()": "0x97924c20",
|
|
14
|
+
"notEvaluationAgent()": "0x66f7b8b7",
|
|
15
|
+
"notPauser()": "0xdcdea7c8",
|
|
16
|
+
"notPool()": "0x26d29bbf",
|
|
17
|
+
"defaultGracePeriodLessThanMinAllowed()": "0xa733ff9c",
|
|
18
|
+
"treasuryFeeHighThanUpperLimit()": "0x39cda0d1",
|
|
19
|
+
"alreadyAPauser()": "0x9f694c22",
|
|
20
|
+
"alreadyPoolAdmin()": "0x7bb356e2",
|
|
21
|
+
"minPrincipalPaymentRateSettingTooHigh()": "0xc11fc042",
|
|
22
|
+
"proposedEADoesNotOwnProvidedEANFT()": "0x75b0da3b",
|
|
23
|
+
"underlyingTokenNotApprovedForHumaProtocol()": "0xce179d6d",
|
|
24
|
+
"poolOwnerNotEnoughLiquidity()": "0xe95282e2",
|
|
25
|
+
"evaluationAgentNotEnoughLiquidity()": "0x67e26217",
|
|
26
|
+
"protocolIsPaused()": "0x8f6fa2d4",
|
|
27
|
+
"poolIsNotOn()": "0x69b355df",
|
|
28
|
+
"creditExpiredDueToFirstDrawdownTooLate()": "0x9fac7390",
|
|
29
|
+
"creditExpiredDueToMaturity()": "0xa52f3c3f",
|
|
30
|
+
"creditLineNotInGoodStandingState()": "0x96e79474",
|
|
31
|
+
"creditLineNotInStateForMakingPayment()": "0xf023e48b",
|
|
32
|
+
"creditLineNotInStateForDrawdown()": "0x4ff95a6d",
|
|
33
|
+
"creditLineExceeded()": "0xef7d66ff",
|
|
34
|
+
"creditLineAlreadyExists()": "0x6c5805f2",
|
|
35
|
+
"creditLineGreatThanUpperLimit()": "0xd8c27d2f",
|
|
36
|
+
"greaterThanMaxCreditLine()": "0x8a754ae8",
|
|
37
|
+
"requestedCreditWithZeroDuration()": "0xb16dd34d",
|
|
38
|
+
"onlyBorrowerOrEACanReduceCreditLine()": "0xd61dbe31",
|
|
39
|
+
"exceededPoolLiquidityCap()": "0x5642ebd4",
|
|
40
|
+
"receivableAssetMismatch()": "0x41dbeec1",
|
|
41
|
+
"unsupportedReceivableAsset()": "0xe60c383e",
|
|
42
|
+
"receivableAssetParamMismatch()": "0x1400a0b4",
|
|
43
|
+
"insufficientReceivableAmount()": "0xf7f34854",
|
|
44
|
+
"borrowingAmountLessThanPlatformFees()": "0x97fde118",
|
|
45
|
+
"withdrawTooSoon()": "0x67982472",
|
|
46
|
+
"paymentAlreadyProcessed()": "0xfd6754cf",
|
|
47
|
+
"defaultTriggeredTooEarly()": "0x7872424e",
|
|
48
|
+
"defaultHasAlreadyBeenTriggered()": "0xeb8d2ccc",
|
|
49
|
+
"notOperator()": "0xf67113fe",
|
|
50
|
+
"notPoolOwnerTreasury()": "0x325bf3c2",
|
|
51
|
+
"notPoolOwnerOrEA()": "0xd6ed9384",
|
|
52
|
+
"alreadyAnOperator()": "0x75cea0fc",
|
|
53
|
+
"poolOperatorRequired()": "0xdc2dc6d0",
|
|
54
|
+
"drawdownFunctionUsedInsteadOfDrawdownWithReceivable()": "0x7e737537",
|
|
55
|
+
"notNFTOwner()": "0x091a5762",
|
|
56
|
+
"creditLineNotInApprovedState()": "0xfc91a989",
|
|
57
|
+
"notPoolOwnerTreasuryOrEA()": "0xc74cb44c",
|
|
58
|
+
"paymentIdNotUnderReview()": "0xd1696aaa",
|
|
59
|
+
"creditLineTooHigh()": "0x552b8377",
|
|
60
|
+
"creditLineOutstanding()": "0xc64e338c",
|
|
61
|
+
"allowanceTooLow()": "0xcd8ef369",
|
|
62
|
+
"durationTooLong()": "0xf1dd53a8",
|
|
63
|
+
"invalidFlowrate()": "0xd06a9328",
|
|
64
|
+
"settlementTooSoon()": "0x0453e75e",
|
|
65
|
+
"onlySuperfluid()": "0x3f9cd1c2",
|
|
66
|
+
"borrowerMismatch()": "0x27d3e640",
|
|
67
|
+
"notProcessor()": "0x90409ca1",
|
|
68
|
+
"receivableIdMismatch()": "0x97be2b67",
|
|
69
|
+
"flowKeyMismatch()": "0x29d5a5f3",
|
|
70
|
+
"flowIsNotTerminated()": "0xe9c5922f",
|
|
71
|
+
"invalidSuperfluidCallback()": "0xd2747f83",
|
|
72
|
+
"invalidSuperfluidAction()": "0x2f2cd9e9"
|
|
73
|
+
}
|
package/dist/utils/credit.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { CreditRecordType, ReceivableInfoType } from '../hooks/usePoolContract';
|
|
2
|
-
export declare enum CreditState {
|
|
3
|
-
Deleted = 0,
|
|
4
|
-
Requested = 1,
|
|
5
|
-
Approved = 2,
|
|
6
|
-
GoodStanding = 3,
|
|
7
|
-
Delayed = 4,
|
|
8
|
-
Defaulted = 5
|
|
9
|
-
}
|
|
10
|
-
export declare const hasRFActiveLoan: (creditRecord?: CreditRecordType, receivableInfo?: ReceivableInfoType) => boolean;
|
|
11
|
-
export declare enum CreditEvent {
|
|
12
|
-
LiquidityDeposited = 0,
|
|
13
|
-
LiquidityWithdrawn = 1,
|
|
14
|
-
DrawdownMade = 2,
|
|
15
|
-
DrawdownMadeWithReceivable = 3,
|
|
16
|
-
PaymentMade = 4,
|
|
17
|
-
ReceivedPaymentProcessed = 5
|
|
18
|
-
}
|
|
19
|
-
export declare const CreditEventText: {
|
|
20
|
-
[x: string]: string;
|
|
21
|
-
};
|
|
1
|
+
import { CreditRecordType, ReceivableInfoType } from '../hooks/usePoolContract';
|
|
2
|
+
export declare enum CreditState {
|
|
3
|
+
Deleted = 0,
|
|
4
|
+
Requested = 1,
|
|
5
|
+
Approved = 2,
|
|
6
|
+
GoodStanding = 3,
|
|
7
|
+
Delayed = 4,
|
|
8
|
+
Defaulted = 5
|
|
9
|
+
}
|
|
10
|
+
export declare const hasRFActiveLoan: (creditRecord?: CreditRecordType, receivableInfo?: ReceivableInfoType) => boolean;
|
|
11
|
+
export declare enum CreditEvent {
|
|
12
|
+
LiquidityDeposited = 0,
|
|
13
|
+
LiquidityWithdrawn = 1,
|
|
14
|
+
DrawdownMade = 2,
|
|
15
|
+
DrawdownMadeWithReceivable = 3,
|
|
16
|
+
PaymentMade = 4,
|
|
17
|
+
ReceivedPaymentProcessed = 5
|
|
18
|
+
}
|
|
19
|
+
export declare const CreditEventText: {
|
|
20
|
+
[x: string]: string;
|
|
21
|
+
};
|