@huma-finance/shared 0.0.29 → 0.0.31
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/LICENSE +660 -660
- package/README.md +28 -28
- 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 +1192 -1192
- package/dist/abis/types/factories/BaseFeeManager__factory.d.ts +379 -379
- package/dist/abis/types/factories/BaseFeeManager__factory.js +493 -493
- package/dist/abis/types/factories/BasePoolConfig__factory.d.ts +1074 -1074
- package/dist/abis/types/factories/BasePoolConfig__factory.js +1377 -1377
- package/dist/abis/types/factories/ERC20TransferableReceivable__factory.d.ts +508 -508
- package/dist/abis/types/factories/ERC20TransferableReceivable__factory.js +661 -661
- package/dist/abis/types/factories/Erc20__factory.d.ts +175 -175
- package/dist/abis/types/factories/Erc20__factory.js +235 -235
- package/dist/abis/types/factories/Erc2612__factory.d.ts +209 -209
- package/dist/abis/types/factories/Erc2612__factory.js +278 -278
- package/dist/abis/types/factories/Erc721__factory.d.ts +539 -539
- package/dist/abis/types/factories/Erc721__factory.js +686 -686
- package/dist/abis/types/factories/HDT__factory.d.ts +399 -399
- package/dist/abis/types/factories/HDT__factory.js +525 -525
- package/dist/abis/types/factories/IConstantFlowAgreementV1__factory.d.ts +695 -695
- package/dist/abis/types/factories/IConstantFlowAgreementV1__factory.js +903 -903
- package/dist/abis/types/factories/ISuperfluid__factory.d.ts +866 -866
- package/dist/abis/types/factories/ISuperfluid__factory.js +1135 -1135
- package/dist/abis/types/factories/InvoiceNFT__factory.d.ts +489 -489
- package/dist/abis/types/factories/InvoiceNFT__factory.js +638 -638
- package/dist/abis/types/factories/Multisend__factory.d.ts +26 -26
- package/dist/abis/types/factories/Multisend__factory.js +39 -39
- package/dist/abis/types/factories/RealWorldReceivable__factory.d.ts +645 -645
- package/dist/abis/types/factories/RealWorldReceivable__factory.js +836 -836
- package/dist/abis/types/factories/ReceivableFactoringPool__factory.d.ts +1204 -1204
- package/dist/abis/types/factories/ReceivableFactoringPool__factory.js +1542 -1542
- package/dist/abis/types/factories/StreamFactoringPool__factory.d.ts +1200 -1200
- package/dist/abis/types/factories/StreamFactoringPool__factory.js +1536 -1536
- package/dist/abis/types/factories/StreamFeeManager__factory.d.ts +412 -412
- package/dist/abis/types/factories/StreamFeeManager__factory.js +535 -535
- package/dist/abis/types/factories/SuperfluidPoolProcessor__factory.d.ts +546 -546
- package/dist/abis/types/factories/SuperfluidPoolProcessor__factory.js +705 -705
- package/dist/abis/types/factories/TestERC20__factory.d.ts +280 -280
- package/dist/abis/types/factories/TestERC20__factory.js +371 -371
- package/dist/abis/types/factories/TradableStream__factory.d.ts +663 -663
- package/dist/abis/types/factories/TradableStream__factory.js +863 -863
- package/dist/abis/types/factories/TransferNFT__factory.d.ts +28 -28
- package/dist/abis/types/factories/TransferNFT__factory.js +40 -40
- package/dist/abis/types/factories/Transfer__factory.d.ts +25 -25
- package/dist/abis/types/factories/Transfer__factory.js +37 -37
- 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/abis/BaseCreditPool.json +1179 -1179
- package/dist/cjs/abis/BaseFeeManager.json +480 -480
- package/dist/cjs/abis/BasePoolConfig.json +1364 -1364
- package/dist/cjs/abis/ERC20TransferableReceivable.json +648 -648
- package/dist/cjs/abis/HDT.json +512 -512
- package/dist/cjs/abis/IConstantFlowAgreementV1.json +890 -890
- package/dist/cjs/abis/ISuperfluid.json +1122 -1122
- package/dist/cjs/abis/InvoiceNFT.json +625 -625
- package/dist/cjs/abis/Multisend.json +26 -26
- package/dist/cjs/abis/RealWorldReceivable.json +823 -823
- package/dist/cjs/abis/ReceivableFactoringPool.json +1529 -1529
- package/dist/cjs/abis/StreamFactoringPool.json +1523 -1523
- package/dist/cjs/abis/StreamFeeManager.json +522 -522
- package/dist/cjs/abis/SuperfluidPoolProcessor.json +692 -692
- package/dist/cjs/abis/TestERC20.json +358 -358
- package/dist/cjs/abis/TradableStream.json +850 -850
- package/dist/cjs/abis/Transfer.json +24 -24
- package/dist/cjs/abis/TransferNFT.json +27 -27
- package/dist/cjs/abis/erc20.json +117 -117
- package/dist/cjs/abis/erc2612.json +132 -132
- package/dist/cjs/abis/erc721.json +673 -673
- package/dist/cjs/abis/index.d.ts +3 -3
- package/dist/cjs/abis/index.js +12 -12
- package/dist/cjs/abis/types/BaseCreditPool.d.ts +803 -803
- package/dist/cjs/abis/types/BaseCreditPool.js +2 -2
- package/dist/cjs/abis/types/BaseFeeManager.d.ts +408 -408
- package/dist/cjs/abis/types/BaseFeeManager.js +2 -2
- package/dist/cjs/abis/types/BasePoolConfig.d.ts +1097 -1097
- package/dist/cjs/abis/types/BasePoolConfig.js +2 -2
- package/dist/cjs/abis/types/ERC20TransferableReceivable.d.ts +407 -407
- package/dist/cjs/abis/types/ERC20TransferableReceivable.js +2 -2
- package/dist/cjs/abis/types/Erc20.d.ts +168 -168
- package/dist/cjs/abis/types/Erc20.js +2 -2
- package/dist/cjs/abis/types/Erc2612.d.ts +192 -192
- package/dist/cjs/abis/types/Erc2612.js +2 -2
- package/dist/cjs/abis/types/Erc721.d.ts +474 -474
- package/dist/cjs/abis/types/Erc721.js +2 -2
- package/dist/cjs/abis/types/HDT.d.ts +369 -369
- package/dist/cjs/abis/types/HDT.js +2 -2
- package/dist/cjs/abis/types/IConstantFlowAgreementV1.d.ts +573 -573
- package/dist/cjs/abis/types/IConstantFlowAgreementV1.js +2 -2
- package/dist/cjs/abis/types/ISuperfluid.d.ts +728 -728
- package/dist/cjs/abis/types/ISuperfluid.js +2 -2
- package/dist/cjs/abis/types/InvoiceNFT.d.ts +425 -425
- package/dist/cjs/abis/types/InvoiceNFT.js +2 -2
- package/dist/cjs/abis/types/Multisend.d.ts +50 -50
- package/dist/cjs/abis/types/Multisend.js +2 -2
- package/dist/cjs/abis/types/RealWorldReceivable.d.ts +564 -564
- package/dist/cjs/abis/types/RealWorldReceivable.js +2 -2
- package/dist/cjs/abis/types/ReceivableFactoringPool.d.ts +999 -999
- package/dist/cjs/abis/types/ReceivableFactoringPool.js +2 -2
- package/dist/cjs/abis/types/StreamFactoringPool.d.ts +985 -985
- package/dist/cjs/abis/types/StreamFactoringPool.js +2 -2
- package/dist/cjs/abis/types/StreamFeeManager.d.ts +440 -440
- package/dist/cjs/abis/types/StreamFeeManager.js +2 -2
- package/dist/cjs/abis/types/SuperfluidPoolProcessor.d.ts +398 -398
- package/dist/cjs/abis/types/SuperfluidPoolProcessor.js +2 -2
- package/dist/cjs/abis/types/TestERC20.d.ts +270 -270
- package/dist/cjs/abis/types/TestERC20.js +2 -2
- package/dist/cjs/abis/types/TradableStream.d.ts +607 -607
- package/dist/cjs/abis/types/TradableStream.js +2 -2
- package/dist/cjs/abis/types/Transfer.d.ts +45 -45
- package/dist/cjs/abis/types/Transfer.js +2 -2
- package/dist/cjs/abis/types/TransferNFT.d.ts +45 -45
- package/dist/cjs/abis/types/TransferNFT.js +2 -2
- package/dist/cjs/abis/types/common.d.ts +22 -22
- package/dist/cjs/abis/types/common.js +2 -2
- package/dist/cjs/abis/types/factories/BaseCreditPool__factory.d.ts +931 -931
- package/dist/cjs/abis/types/factories/BaseCreditPool__factory.js +1196 -1196
- package/dist/cjs/abis/types/factories/BaseFeeManager__factory.d.ts +379 -379
- package/dist/cjs/abis/types/factories/BaseFeeManager__factory.js +497 -497
- package/dist/cjs/abis/types/factories/BasePoolConfig__factory.d.ts +1074 -1074
- package/dist/cjs/abis/types/factories/BasePoolConfig__factory.js +1381 -1381
- package/dist/cjs/abis/types/factories/ERC20TransferableReceivable__factory.d.ts +508 -508
- package/dist/cjs/abis/types/factories/ERC20TransferableReceivable__factory.js +665 -665
- package/dist/cjs/abis/types/factories/Erc20__factory.d.ts +175 -175
- package/dist/cjs/abis/types/factories/Erc20__factory.js +239 -239
- package/dist/cjs/abis/types/factories/Erc2612__factory.d.ts +209 -209
- package/dist/cjs/abis/types/factories/Erc2612__factory.js +282 -282
- package/dist/cjs/abis/types/factories/Erc721__factory.d.ts +539 -539
- package/dist/cjs/abis/types/factories/Erc721__factory.js +690 -690
- package/dist/cjs/abis/types/factories/HDT__factory.d.ts +399 -399
- package/dist/cjs/abis/types/factories/HDT__factory.js +529 -529
- package/dist/cjs/abis/types/factories/IConstantFlowAgreementV1__factory.d.ts +695 -695
- package/dist/cjs/abis/types/factories/IConstantFlowAgreementV1__factory.js +907 -907
- package/dist/cjs/abis/types/factories/ISuperfluid__factory.d.ts +866 -866
- package/dist/cjs/abis/types/factories/ISuperfluid__factory.js +1139 -1139
- package/dist/cjs/abis/types/factories/InvoiceNFT__factory.d.ts +489 -489
- package/dist/cjs/abis/types/factories/InvoiceNFT__factory.js +642 -642
- package/dist/cjs/abis/types/factories/Multisend__factory.d.ts +26 -26
- package/dist/cjs/abis/types/factories/Multisend__factory.js +43 -43
- package/dist/cjs/abis/types/factories/RealWorldReceivable__factory.d.ts +645 -645
- package/dist/cjs/abis/types/factories/RealWorldReceivable__factory.js +840 -840
- package/dist/cjs/abis/types/factories/ReceivableFactoringPool__factory.d.ts +1204 -1204
- package/dist/cjs/abis/types/factories/ReceivableFactoringPool__factory.js +1546 -1546
- package/dist/cjs/abis/types/factories/StreamFactoringPool__factory.d.ts +1200 -1200
- package/dist/cjs/abis/types/factories/StreamFactoringPool__factory.js +1540 -1540
- package/dist/cjs/abis/types/factories/StreamFeeManager__factory.d.ts +412 -412
- package/dist/cjs/abis/types/factories/StreamFeeManager__factory.js +539 -539
- package/dist/cjs/abis/types/factories/SuperfluidPoolProcessor__factory.d.ts +546 -546
- package/dist/cjs/abis/types/factories/SuperfluidPoolProcessor__factory.js +709 -709
- package/dist/cjs/abis/types/factories/TestERC20__factory.d.ts +280 -280
- package/dist/cjs/abis/types/factories/TestERC20__factory.js +375 -375
- package/dist/cjs/abis/types/factories/TradableStream__factory.d.ts +663 -663
- package/dist/cjs/abis/types/factories/TradableStream__factory.js +867 -867
- package/dist/cjs/abis/types/factories/TransferNFT__factory.d.ts +28 -28
- package/dist/cjs/abis/types/factories/TransferNFT__factory.js +44 -44
- package/dist/cjs/abis/types/factories/Transfer__factory.d.ts +25 -25
- package/dist/cjs/abis/types/factories/Transfer__factory.js +41 -41
- package/dist/cjs/abis/types/factories/index.d.ts +21 -21
- package/dist/cjs/abis/types/factories/index.js +48 -48
- package/dist/cjs/abis/types/index.d.ts +43 -43
- package/dist/cjs/abis/types/index.js +47 -47
- package/dist/cjs/hooks/index.d.ts +18 -18
- package/dist/cjs/hooks/index.js +21 -21
- package/dist/cjs/hooks/useActiveRoute.d.ts +8 -8
- package/dist/cjs/hooks/useActiveRoute.js +11 -11
- package/dist/cjs/hooks/useAsyncError.d.ts +14 -14
- package/dist/cjs/hooks/useAsyncError.js +26 -26
- package/dist/cjs/hooks/useCLPoolContract.d.ts +27 -27
- package/dist/cjs/hooks/useCLPoolContract.js +53 -53
- package/dist/cjs/hooks/useContract.d.ts +7 -7
- package/dist/cjs/hooks/useContract.js +49 -49
- package/dist/cjs/hooks/useContractFunction.d.ts +18 -18
- package/dist/cjs/hooks/useContractFunction.js +57 -57
- package/dist/cjs/hooks/useERC2612Permit/ethPermit/index.d.ts +35 -35
- package/dist/cjs/hooks/useERC2612Permit/ethPermit/index.js +145 -145
- package/dist/cjs/hooks/useERC2612Permit/ethPermit/lib.d.ts +1 -1
- package/dist/cjs/hooks/useERC2612Permit/ethPermit/lib.js +26 -26
- package/dist/cjs/hooks/useERC2612Permit/ethPermit/rpc.d.ts +10 -10
- package/dist/cjs/hooks/useERC2612Permit/ethPermit/rpc.js +104 -104
- package/dist/cjs/hooks/useERC2612Permit/index.d.ts +6 -6
- package/dist/cjs/hooks/useERC2612Permit/index.js +35 -35
- package/dist/cjs/hooks/useFactoring.d.ts +19 -19
- package/dist/cjs/hooks/useFactoring.js +94 -94
- package/dist/cjs/hooks/useForceRefresh.d.ts +1 -1
- package/dist/cjs/hooks/useForceRefresh.js +12 -12
- package/dist/cjs/hooks/useGetSizes.d.ts +12 -12
- package/dist/cjs/hooks/useGetSizes.js +23 -23
- package/dist/cjs/hooks/useInvoiceNFTContract.d.ts +11 -11
- package/dist/cjs/hooks/useInvoiceNFTContract.js +72 -72
- package/dist/cjs/hooks/useMQ.d.ts +6 -6
- package/dist/cjs/hooks/useMQ.js +18 -18
- package/dist/cjs/hooks/useMount.d.ts +2 -2
- package/dist/cjs/hooks/useMount.js +13 -13
- package/dist/cjs/hooks/useParamsSearch.d.ts +2 -2
- package/dist/cjs/hooks/useParamsSearch.js +11 -11
- package/dist/cjs/hooks/usePool.d.ts +4 -4
- package/dist/cjs/hooks/usePool.js +45 -45
- package/dist/cjs/hooks/usePoolContract.d.ts +73 -73
- package/dist/cjs/hooks/usePoolContract.js +309 -309
- package/dist/cjs/hooks/useRFPoolContract.d.ts +22 -22
- package/dist/cjs/hooks/useRFPoolContract.js +41 -41
- package/dist/cjs/hooks/useRefresh.d.ts +1 -1
- package/dist/cjs/hooks/useRefresh.js +51 -51
- package/dist/cjs/hooks/web3/index.d.ts +15 -15
- package/dist/cjs/hooks/web3/index.js +147 -147
- package/dist/cjs/hooks/web3/index.js.map +1 -1
- package/dist/cjs/hooks/web3/useConnectors.d.ts +17 -17
- package/dist/cjs/hooks/web3/useConnectors.js +30 -30
- package/dist/cjs/hooks/web3/useJsonRpcUrlsMap.d.ts +13 -13
- package/dist/cjs/hooks/web3/useJsonRpcUrlsMap.js +62 -62
- package/dist/cjs/index.d.ts +5 -5
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/services/EAService.d.ts +153 -153
- package/dist/cjs/services/EAService.js +80 -80
- package/dist/cjs/services/IdentityService.d.ts +35 -35
- package/dist/cjs/services/IdentityService.js +56 -56
- package/dist/cjs/services/RNService.d.ts +14 -14
- package/dist/cjs/services/RNService.js +13 -13
- package/dist/cjs/services/index.d.ts +3 -3
- package/dist/cjs/services/index.js +6 -6
- package/dist/cjs/utils/JsonRpcConnector.d.ts +11 -11
- package/dist/cjs/utils/JsonRpcConnector.js +42 -42
- package/dist/cjs/utils/WalletConnect.d.ts +10 -10
- package/dist/cjs/utils/WalletConnect.js +55 -55
- package/dist/cjs/utils/chain.d.ts +35 -34
- package/dist/cjs/utils/chain.js +113 -108
- package/dist/cjs/utils/chain.js.map +1 -1
- package/dist/cjs/utils/common.d.ts +4 -4
- package/dist/cjs/utils/common.js +17 -17
- package/dist/cjs/utils/config.d.ts +8 -7
- package/dist/cjs/utils/config.js +44 -35
- package/dist/cjs/utils/config.js.map +1 -1
- package/dist/cjs/utils/const.d.ts +2 -2
- package/dist/cjs/utils/const.js +5 -5
- package/dist/cjs/utils/contractError.json +73 -73
- package/dist/cjs/utils/contractconfig.json +19 -19
- package/dist/cjs/utils/credit.d.ts +21 -21
- package/dist/cjs/utils/credit.js +39 -39
- package/dist/cjs/utils/errors.d.ts +26 -26
- package/dist/cjs/utils/errors.js +46 -46
- package/dist/cjs/utils/index.d.ts +20 -18
- package/dist/cjs/utils/index.js +23 -21
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/jsonRpcEndpoints.d.ts +12 -12
- package/dist/cjs/utils/jsonRpcEndpoints.js +28 -28
- package/dist/cjs/utils/notifi.d.ts +3 -0
- package/dist/cjs/utils/notifi.js +29 -0
- package/dist/cjs/utils/notifi.js.map +1 -0
- package/dist/cjs/utils/number.d.ts +5 -5
- package/dist/cjs/utils/number.js +55 -55
- package/dist/cjs/utils/pool.d.ts +96 -88
- package/dist/cjs/utils/pool.js +416 -384
- package/dist/cjs/utils/pool.js.map +1 -1
- package/dist/cjs/utils/realWorldReceivable.d.ts +12 -0
- package/dist/cjs/{abis/types/BaseCreditPoolReceivable.js → utils/realWorldReceivable.js} +3 -3
- package/dist/cjs/utils/realWorldReceivable.js.map +1 -0
- package/dist/cjs/utils/request.d.ts +3 -3
- package/dist/cjs/utils/request.js +45 -45
- package/dist/cjs/utils/scientificToDecimal.d.ts +1 -1
- package/dist/cjs/utils/scientificToDecimal.js +61 -61
- package/dist/cjs/utils/string.d.ts +1 -1
- package/dist/cjs/utils/string.js +5 -5
- package/dist/cjs/utils/style.d.ts +1 -1
- package/dist/cjs/utils/style.js +16 -16
- package/dist/cjs/utils/time.d.ts +26 -26
- package/dist/cjs/utils/time.js +58 -58
- package/dist/cjs/utils/transaction.d.ts +32 -32
- package/dist/cjs/utils/transaction.js +96 -96
- package/dist/cjs/utils/web3.d.ts +4 -4
- package/dist/cjs/utils/web3.js +39 -39
- 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/useCLPoolContract.js +38 -38
- package/dist/hooks/useContract.d.ts +7 -7
- package/dist/hooks/useContract.js +40 -40
- 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/useFactoring.js +90 -90
- 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/useInvoiceNFTContract.js +64 -64
- 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/usePool.js +39 -39
- package/dist/hooks/usePoolContract.d.ts +73 -73
- package/dist/hooks/usePoolContract.js +286 -286
- package/dist/hooks/useRFPoolContract.d.ts +22 -22
- package/dist/hooks/useRFPoolContract.js +29 -29
- 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 +142 -142
- 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/hooks/web3/useJsonRpcUrlsMap.js +53 -53
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/services/EAService.d.ts +153 -153
- package/dist/services/EAService.js +77 -77
- package/dist/services/IdentityService.d.ts +35 -35
- package/dist/services/IdentityService.js +53 -53
- package/dist/services/RNService.d.ts +14 -14
- package/dist/services/RNService.js +10 -10
- package/dist/services/index.d.ts +3 -3
- package/dist/services/index.js +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 +49 -49
- package/dist/utils/chain.d.ts +35 -34
- package/dist/utils/chain.js +106 -102
- 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 +8 -7
- package/dist/utils/config.js +41 -32
- 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/contractconfig.json +19 -19
- 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 +20 -18
- package/dist/utils/index.js +20 -18
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/jsonRpcEndpoints.d.ts +12 -12
- package/dist/utils/jsonRpcEndpoints.js +25 -25
- package/dist/utils/notifi.d.ts +3 -0
- package/dist/utils/notifi.js +24 -0
- package/dist/utils/notifi.js.map +1 -0
- package/dist/utils/number.d.ts +5 -5
- package/dist/utils/number.js +48 -48
- package/dist/utils/pool.d.ts +96 -88
- package/dist/utils/pool.js +409 -378
- 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 +12 -7
- package/dist/abis/BaseCreditPoolReceivable.json +0 -764
- package/dist/abis/ERC20TransferrableReceivable.json +0 -648
- package/dist/abis/types/BaseCreditPoolReceivable.d.ts +0 -518
- package/dist/abis/types/BaseCreditPoolReceivable.js +0 -2
- package/dist/abis/types/BaseCreditPoolReceivable.js.map +0 -1
- package/dist/abis/types/ERC20TransferrableReceivable.d.ts +0 -407
- package/dist/abis/types/ERC20TransferrableReceivable.js +0 -2
- package/dist/abis/types/ERC20TransferrableReceivable.js.map +0 -1
- package/dist/abis/types/factories/BaseCreditPoolReceivable__factory.d.ts +0 -597
- package/dist/abis/types/factories/BaseCreditPoolReceivable__factory.js +0 -778
- package/dist/abis/types/factories/BaseCreditPoolReceivable__factory.js.map +0 -1
- package/dist/abis/types/factories/ERC20TransferrableReceivable__factory.d.ts +0 -508
- package/dist/abis/types/factories/ERC20TransferrableReceivable__factory.js +0 -663
- package/dist/abis/types/factories/ERC20TransferrableReceivable__factory.js.map +0 -1
- package/dist/cjs/abis/BaseCreditPoolReceivable.json +0 -764
- package/dist/cjs/abis/types/BaseCreditPoolReceivable.d.ts +0 -518
- package/dist/cjs/abis/types/BaseCreditPoolReceivable.js.map +0 -1
- package/dist/cjs/abis/types/factories/BaseCreditPoolReceivable__factory.d.ts +0 -597
- package/dist/cjs/abis/types/factories/BaseCreditPoolReceivable__factory.js +0 -782
- package/dist/cjs/abis/types/factories/BaseCreditPoolReceivable__factory.js.map +0 -1
- package/dist/components/icons/approve-lender.svg +0 -30
- package/dist/components/icons/auto-payback.svg +0 -40
- package/dist/components/icons/check-circle.svg +0 -3
- package/dist/components/icons/check-green.svg +0 -3
- package/dist/components/icons/check.svg +0 -10
- package/dist/components/icons/donut.svg +0 -904
- package/dist/components/icons/ellipse.svg +0 -3
- package/dist/components/icons/ethereum.svg +0 -1
- package/dist/components/icons/huma-full.svg +0 -22
- package/dist/components/icons/huma.svg +0 -15
- package/dist/components/icons/index.d.ts +0 -19
- package/dist/components/icons/index.js +0 -70
- package/dist/components/icons/index.js.map +0 -1
- package/dist/components/icons/loader.svg +0 -229
- package/dist/components/icons/metamask.svg +0 -31
- package/dist/components/icons/polygon.svg +0 -16
- package/dist/components/icons/receipt.svg +0 -3
- package/dist/components/icons/separator.svg +0 -3
- package/dist/components/icons/sorry.svg +0 -31
- package/dist/components/icons/usdc.svg +0 -5
- package/dist/components/icons/wallet-connect.svg +0 -12
- package/dist/theme/breakpoints.d.ts +0 -5
- package/dist/theme/breakpoints.js +0 -4
- package/dist/theme/breakpoints.js.map +0 -1
- package/dist/theme/components.d.ts +0 -6
- package/dist/theme/components.js +0 -62
- package/dist/theme/components.js.map +0 -1
- package/dist/theme/coreThemeConstants.d.ts +0 -18
- package/dist/theme/coreThemeConstants.js +0 -30
- package/dist/theme/coreThemeConstants.js.map +0 -1
- package/dist/theme/cssMixins.d.ts +0 -20
- package/dist/theme/cssMixins.js +0 -90
- package/dist/theme/cssMixins.js.map +0 -1
- package/dist/theme/index.d.ts +0 -8
- package/dist/theme/index.js +0 -27
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/palette.d.ts +0 -53
- package/dist/theme/palette.js +0 -137
- package/dist/theme/palette.js.map +0 -1
- package/dist/theme/shape.d.ts +0 -2
- package/dist/theme/shape.js +0 -5
- package/dist/theme/shape.js.map +0 -1
- package/dist/theme/theme.types.d.ts +0 -72
- package/dist/theme/theme.types.js +0 -2
- package/dist/theme/theme.types.js.map +0 -1
- package/dist/theme/typography.d.ts +0 -2
- package/dist/theme/typography.js +0 -116
- package/dist/theme/typography.js.map +0 -1
- package/dist/utils/ddLogger.d.ts +0 -4
- package/dist/utils/ddLogger.js +0 -48
- package/dist/utils/ddLogger.js.map +0 -1
- package/dist/utils/sentry.d.ts +0 -1
- package/dist/utils/sentry.js +0 -19
- package/dist/utils/sentry.js.map +0 -1
- package/dist/utils/storage.d.ts +0 -12
- package/dist/utils/storage.js +0 -32
- package/dist/utils/storage.js.map +0 -1
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeLogs = exports.getTransactionErrorFromError = exports.getTransactionErrorFromHash = exports.increaseGasLimit = exports.isTxFailed = exports.TxStateType = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const ethers_1 = require("ethers");
|
|
6
|
-
const contractError_json_1 = tslib_1.__importDefault(require("./contractError.json"));
|
|
7
|
-
const string_1 = require("./string");
|
|
8
|
-
var TxStateType;
|
|
9
|
-
(function (TxStateType) {
|
|
10
|
-
TxStateType["Success"] = "Success";
|
|
11
|
-
TxStateType["Denied"] = "Denied";
|
|
12
|
-
TxStateType["Invalid"] = "Invalid";
|
|
13
|
-
TxStateType["Failed"] = "Failed";
|
|
14
|
-
TxStateType["New"] = "New";
|
|
15
|
-
TxStateType["GasEstimating"] = "GasEstimating";
|
|
16
|
-
TxStateType["Signing"] = "Signing";
|
|
17
|
-
TxStateType["Confirming"] = "Confirming";
|
|
18
|
-
})(TxStateType = exports.TxStateType || (exports.TxStateType = {}));
|
|
19
|
-
const isTxFailed = (txState) => [TxStateType.Denied, TxStateType.Invalid, TxStateType.Failed].includes(txState);
|
|
20
|
-
exports.isTxFailed = isTxFailed;
|
|
21
|
-
const increaseGasLimit = (estimatedGasLimit) => {
|
|
22
|
-
if (!estimatedGasLimit || Number.isNaN(estimatedGasLimit.toNumber())) {
|
|
23
|
-
console.log('estimatedGasLimit', estimatedGasLimit);
|
|
24
|
-
throw new Error('Estimated gas limited error.');
|
|
25
|
-
}
|
|
26
|
-
return estimatedGasLimit.mul(150).div(100);
|
|
27
|
-
};
|
|
28
|
-
exports.increaseGasLimit = increaseGasLimit;
|
|
29
|
-
const parseErrorMessageToUserFriendlyMessage = (message) => (0, string_1.capitalizeFirstLetter)(message
|
|
30
|
-
.replace('()', '')
|
|
31
|
-
.split(/(?=[A-Z])/)
|
|
32
|
-
.join(' ')
|
|
33
|
-
.toLowerCase());
|
|
34
|
-
const findContractErrorMessage = (code) => {
|
|
35
|
-
let reason = null;
|
|
36
|
-
Object.keys(contractError_json_1.default).forEach((key) => {
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
if (code.toLowerCase() === contractError_json_1.default[key].toLowerCase()) {
|
|
39
|
-
reason = parseErrorMessageToUserFriendlyMessage(key);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
return reason;
|
|
43
|
-
};
|
|
44
|
-
const getTransactionErrorFromHash = async (provider, txHash) => {
|
|
45
|
-
const commonErrorMessage = 'Send transaction failed';
|
|
46
|
-
try {
|
|
47
|
-
const originTx = await provider.getTransaction(txHash);
|
|
48
|
-
const { from, to, data, gasLimit, blockNumber } = originTx;
|
|
49
|
-
// Only provide necessary params to get the tx return which can avoid unexpected error
|
|
50
|
-
const tx = { from, to, data, gasLimit };
|
|
51
|
-
const code = await provider.call(tx, blockNumber);
|
|
52
|
-
const reason = findContractErrorMessage(code);
|
|
53
|
-
return reason !== null && reason !== void 0 ? reason : commonErrorMessage;
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
if (!error.data) {
|
|
58
|
-
console.error(error);
|
|
59
|
-
return commonErrorMessage;
|
|
60
|
-
}
|
|
61
|
-
const code = error.data.replace('Reverted ', '');
|
|
62
|
-
const reason = ethers_1.ethers.utils.toUtf8String(`0x${code.substr(138)}`);
|
|
63
|
-
return reason;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
exports.getTransactionErrorFromHash = getTransactionErrorFromHash;
|
|
67
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
|
-
const getTransactionErrorFromError = (e) => {
|
|
69
|
-
var _a, _b, _c, _d, _e;
|
|
70
|
-
const errorCode = ((_c = (_b = (_a = e.error) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.originalError) === null || _c === void 0 ? void 0 : _c.data) || ((_e = (_d = e.error) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.data);
|
|
71
|
-
if (errorCode) {
|
|
72
|
-
const contractErrorMessage = findContractErrorMessage(errorCode);
|
|
73
|
-
if (contractErrorMessage) {
|
|
74
|
-
return contractErrorMessage;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return null;
|
|
78
|
-
};
|
|
79
|
-
exports.getTransactionErrorFromError = getTransactionErrorFromError;
|
|
80
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
-
const decodeLogs = (txlogs, abi) => {
|
|
82
|
-
const result = [];
|
|
83
|
-
const iface = new ethers_1.ethers.utils.Interface(abi);
|
|
84
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
85
|
-
for (const log of txlogs) {
|
|
86
|
-
try {
|
|
87
|
-
result.push(iface.parseLog(log));
|
|
88
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
console.error(error);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return result;
|
|
95
|
-
};
|
|
96
|
-
exports.decodeLogs = decodeLogs;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeLogs = exports.getTransactionErrorFromError = exports.getTransactionErrorFromHash = exports.increaseGasLimit = exports.isTxFailed = exports.TxStateType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const ethers_1 = require("ethers");
|
|
6
|
+
const contractError_json_1 = tslib_1.__importDefault(require("./contractError.json"));
|
|
7
|
+
const string_1 = require("./string");
|
|
8
|
+
var TxStateType;
|
|
9
|
+
(function (TxStateType) {
|
|
10
|
+
TxStateType["Success"] = "Success";
|
|
11
|
+
TxStateType["Denied"] = "Denied";
|
|
12
|
+
TxStateType["Invalid"] = "Invalid";
|
|
13
|
+
TxStateType["Failed"] = "Failed";
|
|
14
|
+
TxStateType["New"] = "New";
|
|
15
|
+
TxStateType["GasEstimating"] = "GasEstimating";
|
|
16
|
+
TxStateType["Signing"] = "Signing";
|
|
17
|
+
TxStateType["Confirming"] = "Confirming";
|
|
18
|
+
})(TxStateType = exports.TxStateType || (exports.TxStateType = {}));
|
|
19
|
+
const isTxFailed = (txState) => [TxStateType.Denied, TxStateType.Invalid, TxStateType.Failed].includes(txState);
|
|
20
|
+
exports.isTxFailed = isTxFailed;
|
|
21
|
+
const increaseGasLimit = (estimatedGasLimit) => {
|
|
22
|
+
if (!estimatedGasLimit || Number.isNaN(estimatedGasLimit.toNumber())) {
|
|
23
|
+
console.log('estimatedGasLimit', estimatedGasLimit);
|
|
24
|
+
throw new Error('Estimated gas limited error.');
|
|
25
|
+
}
|
|
26
|
+
return estimatedGasLimit.mul(150).div(100);
|
|
27
|
+
};
|
|
28
|
+
exports.increaseGasLimit = increaseGasLimit;
|
|
29
|
+
const parseErrorMessageToUserFriendlyMessage = (message) => (0, string_1.capitalizeFirstLetter)(message
|
|
30
|
+
.replace('()', '')
|
|
31
|
+
.split(/(?=[A-Z])/)
|
|
32
|
+
.join(' ')
|
|
33
|
+
.toLowerCase());
|
|
34
|
+
const findContractErrorMessage = (code) => {
|
|
35
|
+
let reason = null;
|
|
36
|
+
Object.keys(contractError_json_1.default).forEach((key) => {
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
if (code.toLowerCase() === contractError_json_1.default[key].toLowerCase()) {
|
|
39
|
+
reason = parseErrorMessageToUserFriendlyMessage(key);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return reason;
|
|
43
|
+
};
|
|
44
|
+
const getTransactionErrorFromHash = async (provider, txHash) => {
|
|
45
|
+
const commonErrorMessage = 'Send transaction failed';
|
|
46
|
+
try {
|
|
47
|
+
const originTx = await provider.getTransaction(txHash);
|
|
48
|
+
const { from, to, data, gasLimit, blockNumber } = originTx;
|
|
49
|
+
// Only provide necessary params to get the tx return which can avoid unexpected error
|
|
50
|
+
const tx = { from, to, data, gasLimit };
|
|
51
|
+
const code = await provider.call(tx, blockNumber);
|
|
52
|
+
const reason = findContractErrorMessage(code);
|
|
53
|
+
return reason !== null && reason !== void 0 ? reason : commonErrorMessage;
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
if (!error.data) {
|
|
58
|
+
console.error(error);
|
|
59
|
+
return commonErrorMessage;
|
|
60
|
+
}
|
|
61
|
+
const code = error.data.replace('Reverted ', '');
|
|
62
|
+
const reason = ethers_1.ethers.utils.toUtf8String(`0x${code.substr(138)}`);
|
|
63
|
+
return reason;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
exports.getTransactionErrorFromHash = getTransactionErrorFromHash;
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
|
+
const getTransactionErrorFromError = (e) => {
|
|
69
|
+
var _a, _b, _c, _d, _e;
|
|
70
|
+
const errorCode = ((_c = (_b = (_a = e.error) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.originalError) === null || _c === void 0 ? void 0 : _c.data) || ((_e = (_d = e.error) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.data);
|
|
71
|
+
if (errorCode) {
|
|
72
|
+
const contractErrorMessage = findContractErrorMessage(errorCode);
|
|
73
|
+
if (contractErrorMessage) {
|
|
74
|
+
return contractErrorMessage;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
};
|
|
79
|
+
exports.getTransactionErrorFromError = getTransactionErrorFromError;
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
+
const decodeLogs = (txlogs, abi) => {
|
|
82
|
+
const result = [];
|
|
83
|
+
const iface = new ethers_1.ethers.utils.Interface(abi);
|
|
84
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
85
|
+
for (const log of txlogs) {
|
|
86
|
+
try {
|
|
87
|
+
result.push(iface.parseLog(log));
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
console.error(error);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
};
|
|
96
|
+
exports.decodeLogs = decodeLogs;
|
|
97
97
|
//# sourceMappingURL=transaction.js.map
|
package/dist/cjs/utils/web3.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Contract } from '@ethersproject/contracts';
|
|
2
|
-
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
3
|
-
export declare function isAddress(value: any): string | false;
|
|
4
|
-
export declare function getContract(address: string, ABI: any, provider: JsonRpcProvider, account?: string): Contract;
|
|
1
|
+
import { Contract } from '@ethersproject/contracts';
|
|
2
|
+
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
3
|
+
export declare function isAddress(value: any): string | false;
|
|
4
|
+
export declare function getContract(address: string, ABI: any, provider: JsonRpcProvider, account?: string): Contract;
|
package/dist/cjs/utils/web3.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getContract = exports.isAddress = void 0;
|
|
4
|
-
const contracts_1 = require("@ethersproject/contracts");
|
|
5
|
-
const constants_1 = require("@ethersproject/constants");
|
|
6
|
-
const address_1 = require("@ethersproject/address");
|
|
7
|
-
// returns the checksummed address if the address is valid, otherwise returns false
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
-
function isAddress(value) {
|
|
10
|
-
try {
|
|
11
|
-
// Alphabetical letters must be made lowercase for getAddress to work.
|
|
12
|
-
// See documentation here: https://docs.ethers.io/v5/api/utils/address/
|
|
13
|
-
return (0, address_1.getAddress)(value.toLowerCase());
|
|
14
|
-
}
|
|
15
|
-
catch (_a) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.isAddress = isAddress;
|
|
20
|
-
// account is not optional
|
|
21
|
-
function getSigner(provider, account) {
|
|
22
|
-
return provider.getSigner(account).connectUnchecked();
|
|
23
|
-
}
|
|
24
|
-
// account is optional
|
|
25
|
-
function getProviderOrSigner(provider, account) {
|
|
26
|
-
return account ? getSigner(provider, account) : provider;
|
|
27
|
-
}
|
|
28
|
-
// account is optional
|
|
29
|
-
function getContract(address,
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
-
ABI, provider, account) {
|
|
32
|
-
if (!isAddress(address) || address === constants_1.AddressZero) {
|
|
33
|
-
throw Error(`Invalid 'address' parameter '${address}'.`);
|
|
34
|
-
}
|
|
35
|
-
return new contracts_1.Contract(address, ABI,
|
|
36
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
|
-
getProviderOrSigner(provider, account));
|
|
38
|
-
}
|
|
39
|
-
exports.getContract = getContract;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getContract = exports.isAddress = void 0;
|
|
4
|
+
const contracts_1 = require("@ethersproject/contracts");
|
|
5
|
+
const constants_1 = require("@ethersproject/constants");
|
|
6
|
+
const address_1 = require("@ethersproject/address");
|
|
7
|
+
// returns the checksummed address if the address is valid, otherwise returns false
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
function isAddress(value) {
|
|
10
|
+
try {
|
|
11
|
+
// Alphabetical letters must be made lowercase for getAddress to work.
|
|
12
|
+
// See documentation here: https://docs.ethers.io/v5/api/utils/address/
|
|
13
|
+
return (0, address_1.getAddress)(value.toLowerCase());
|
|
14
|
+
}
|
|
15
|
+
catch (_a) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.isAddress = isAddress;
|
|
20
|
+
// account is not optional
|
|
21
|
+
function getSigner(provider, account) {
|
|
22
|
+
return provider.getSigner(account).connectUnchecked();
|
|
23
|
+
}
|
|
24
|
+
// account is optional
|
|
25
|
+
function getProviderOrSigner(provider, account) {
|
|
26
|
+
return account ? getSigner(provider, account) : provider;
|
|
27
|
+
}
|
|
28
|
+
// account is optional
|
|
29
|
+
function getContract(address,
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
ABI, provider, account) {
|
|
32
|
+
if (!isAddress(address) || address === constants_1.AddressZero) {
|
|
33
|
+
throw Error(`Invalid 'address' parameter '${address}'.`);
|
|
34
|
+
}
|
|
35
|
+
return new contracts_1.Contract(address, ABI,
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
|
+
getProviderOrSigner(provider, account));
|
|
38
|
+
}
|
|
39
|
+
exports.getContract = getContract;
|
|
40
40
|
//# sourceMappingURL=web3.js.map
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export * from './useERC2612Permit';
|
|
2
|
-
export * from './web3';
|
|
3
|
-
export * from './useActiveRoute';
|
|
4
|
-
export * from './useAsyncError';
|
|
5
|
-
export * from './useCLPoolContract';
|
|
6
|
-
export * from './useContract';
|
|
7
|
-
export * from './useContractFunction';
|
|
8
|
-
export * from './useFactoring';
|
|
9
|
-
export * from './useForceRefresh';
|
|
10
|
-
export * from './useInvoiceNFTContract';
|
|
11
|
-
export * from './useMQ';
|
|
12
|
-
export * from './useMount';
|
|
13
|
-
export * from './useParamsSearch';
|
|
14
|
-
export * from './usePool';
|
|
15
|
-
export * from './usePoolContract';
|
|
16
|
-
export * from './useRFPoolContract';
|
|
17
|
-
export * from './useRefresh';
|
|
18
|
-
export * from './useGetSizes';
|
|
1
|
+
export * from './useERC2612Permit';
|
|
2
|
+
export * from './web3';
|
|
3
|
+
export * from './useActiveRoute';
|
|
4
|
+
export * from './useAsyncError';
|
|
5
|
+
export * from './useCLPoolContract';
|
|
6
|
+
export * from './useContract';
|
|
7
|
+
export * from './useContractFunction';
|
|
8
|
+
export * from './useFactoring';
|
|
9
|
+
export * from './useForceRefresh';
|
|
10
|
+
export * from './useInvoiceNFTContract';
|
|
11
|
+
export * from './useMQ';
|
|
12
|
+
export * from './useMount';
|
|
13
|
+
export * from './useParamsSearch';
|
|
14
|
+
export * from './usePool';
|
|
15
|
+
export * from './usePoolContract';
|
|
16
|
+
export * from './useRFPoolContract';
|
|
17
|
+
export * from './useRefresh';
|
|
18
|
+
export * from './useGetSizes';
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from './useERC2612Permit';
|
|
2
|
-
export * from './web3';
|
|
3
|
-
export * from './useActiveRoute';
|
|
4
|
-
export * from './useAsyncError';
|
|
5
|
-
export * from './useCLPoolContract';
|
|
6
|
-
export * from './useContract';
|
|
7
|
-
export * from './useContractFunction';
|
|
8
|
-
export * from './useFactoring';
|
|
9
|
-
export * from './useForceRefresh';
|
|
10
|
-
export * from './useInvoiceNFTContract';
|
|
11
|
-
export * from './useMQ';
|
|
12
|
-
export * from './useMount';
|
|
13
|
-
export * from './useParamsSearch';
|
|
14
|
-
export * from './usePool';
|
|
15
|
-
export * from './usePoolContract';
|
|
16
|
-
export * from './useRFPoolContract';
|
|
17
|
-
export * from './useRefresh';
|
|
18
|
-
export * from './useGetSizes';
|
|
1
|
+
export * from './useERC2612Permit';
|
|
2
|
+
export * from './web3';
|
|
3
|
+
export * from './useActiveRoute';
|
|
4
|
+
export * from './useAsyncError';
|
|
5
|
+
export * from './useCLPoolContract';
|
|
6
|
+
export * from './useContract';
|
|
7
|
+
export * from './useContractFunction';
|
|
8
|
+
export * from './useFactoring';
|
|
9
|
+
export * from './useForceRefresh';
|
|
10
|
+
export * from './useInvoiceNFTContract';
|
|
11
|
+
export * from './useMQ';
|
|
12
|
+
export * from './useMount';
|
|
13
|
+
export * from './useParamsSearch';
|
|
14
|
+
export * from './usePool';
|
|
15
|
+
export * from './usePoolContract';
|
|
16
|
+
export * from './useRFPoolContract';
|
|
17
|
+
export * from './useRefresh';
|
|
18
|
+
export * from './useGetSizes';
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const useActiveRoute: (routes: {
|
|
2
|
-
[page: string]: {
|
|
3
|
-
path: string;
|
|
4
|
-
};
|
|
5
|
-
}) => Partial<{
|
|
6
|
-
path: string;
|
|
7
|
-
isRoot?: boolean | undefined;
|
|
8
|
-
}>;
|
|
1
|
+
export declare const useActiveRoute: (routes: {
|
|
2
|
+
[page: string]: {
|
|
3
|
+
path: string;
|
|
4
|
+
};
|
|
5
|
+
}) => Partial<{
|
|
6
|
+
path: string;
|
|
7
|
+
isRoot?: boolean | undefined;
|
|
8
|
+
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import { matchPath, useLocation } from 'react-router-dom';
|
|
3
|
-
export const useActiveRoute = (routes) => {
|
|
4
|
-
const location = useLocation();
|
|
5
|
-
const activeRoute = useMemo(() => Object.values(routes).find((route) => !!matchPath(location.pathname, { path: route.path, exact: true })), [location.pathname, routes]);
|
|
6
|
-
return activeRoute !== null && activeRoute !== void 0 ? activeRoute : {};
|
|
7
|
-
};
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { matchPath, useLocation } from 'react-router-dom';
|
|
3
|
+
export const useActiveRoute = (routes) => {
|
|
4
|
+
const location = useLocation();
|
|
5
|
+
const activeRoute = useMemo(() => Object.values(routes).find((route) => !!matchPath(location.pathname, { path: route.path, exact: true })), [location.pathname, routes]);
|
|
6
|
+
return activeRoute !== null && activeRoute !== void 0 ? activeRoute : {};
|
|
7
|
+
};
|
|
8
8
|
//# sourceMappingURL=useActiveRoute.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Throws an error from outside of the React lifecycle.
|
|
3
|
-
* Errors thrown through this method will correctly trigger the ErrorBoundary.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* const throwError = useAsyncError()
|
|
7
|
-
* useEffect(() => {
|
|
8
|
-
* fetch('http://example.com')
|
|
9
|
-
* .catch((e: Error) => {
|
|
10
|
-
* throwError(toWidgetError(e))
|
|
11
|
-
* })
|
|
12
|
-
* }, [throwError])
|
|
13
|
-
*/
|
|
14
|
-
export declare function useAsyncError(): (error: unknown) => void;
|
|
1
|
+
/**
|
|
2
|
+
* Throws an error from outside of the React lifecycle.
|
|
3
|
+
* Errors thrown through this method will correctly trigger the ErrorBoundary.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const throwError = useAsyncError()
|
|
7
|
+
* useEffect(() => {
|
|
8
|
+
* fetch('http://example.com')
|
|
9
|
+
* .catch((e: Error) => {
|
|
10
|
+
* throwError(toWidgetError(e))
|
|
11
|
+
* })
|
|
12
|
+
* }, [throwError])
|
|
13
|
+
*/
|
|
14
|
+
export declare function useAsyncError(): (error: unknown) => void;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { useCallback, useState } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Throws an error from outside of the React lifecycle.
|
|
4
|
-
* Errors thrown through this method will correctly trigger the ErrorBoundary.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* const throwError = useAsyncError()
|
|
8
|
-
* useEffect(() => {
|
|
9
|
-
* fetch('http://example.com')
|
|
10
|
-
* .catch((e: Error) => {
|
|
11
|
-
* throwError(toWidgetError(e))
|
|
12
|
-
* })
|
|
13
|
-
* }, [throwError])
|
|
14
|
-
*/
|
|
15
|
-
export function useAsyncError() {
|
|
16
|
-
const [, setError] = useState();
|
|
17
|
-
return useCallback((error) => setError(() => {
|
|
18
|
-
if (error instanceof Error)
|
|
19
|
-
throw error;
|
|
20
|
-
throw new Error(error);
|
|
21
|
-
}), []);
|
|
22
|
-
}
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Throws an error from outside of the React lifecycle.
|
|
4
|
+
* Errors thrown through this method will correctly trigger the ErrorBoundary.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const throwError = useAsyncError()
|
|
8
|
+
* useEffect(() => {
|
|
9
|
+
* fetch('http://example.com')
|
|
10
|
+
* .catch((e: Error) => {
|
|
11
|
+
* throwError(toWidgetError(e))
|
|
12
|
+
* })
|
|
13
|
+
* }, [throwError])
|
|
14
|
+
*/
|
|
15
|
+
export function useAsyncError() {
|
|
16
|
+
const [, setError] = useState();
|
|
17
|
+
return useCallback((error) => setError(() => {
|
|
18
|
+
if (error instanceof Error)
|
|
19
|
+
throw error;
|
|
20
|
+
throw new Error(error);
|
|
21
|
+
}), []);
|
|
22
|
+
}
|
|
23
23
|
//# sourceMappingURL=useAsyncError.js.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { BaseCreditPool } from '../abis/types/BaseCreditPool';
|
|
2
|
-
import { POOL_NAME } from '../utils/pool';
|
|
3
|
-
export declare function useCLPoolContract(poolName: POOL_NAME): BaseCreditPool | null;
|
|
4
|
-
export declare function useCLBaseConfigPoolContract(poolName: POOL_NAME): BaseCreditPool | null;
|
|
5
|
-
export declare function useCLPoolUnderlyingTokenContract(poolName: POOL_NAME): import("..").Erc20 | null;
|
|
6
|
-
export declare function useCLPoolUnderlyingToken(poolName: POOL_NAME): Partial<{
|
|
7
|
-
address: string;
|
|
8
|
-
symbol: string;
|
|
9
|
-
decimals: number;
|
|
10
|
-
}>;
|
|
11
|
-
export declare function useCLPoolUnderlyingTokenBalance(poolName: POOL_NAME, account?: string): import("ethers").BigNumber;
|
|
12
|
-
export declare function useCLPoolBalance(poolName: POOL_NAME): [import("ethers").BigNumber | undefined, () => void];
|
|
13
|
-
export declare function useCLStats(poolName: POOL_NAME, account?: string): [import("./usePoolContract").AccountStats, () => void];
|
|
14
|
-
export declare function useCLCreditRecord(poolName: POOL_NAME, account?: string): {
|
|
15
|
-
checkIsApproved: () => Promise<boolean>;
|
|
16
|
-
};
|
|
17
|
-
export declare function useCLFeeManager(poolName: POOL_NAME): {
|
|
18
|
-
fees: import("./usePoolContract").FeesType | undefined;
|
|
19
|
-
getFeesCharged: (requestedLoan: number) => number;
|
|
20
|
-
};
|
|
21
|
-
export declare function useCLPoolAllowance(poolName: POOL_NAME, account?: string): {
|
|
22
|
-
approved: boolean;
|
|
23
|
-
allowance: import("ethers").BigNumber;
|
|
24
|
-
loaded: boolean;
|
|
25
|
-
};
|
|
26
|
-
export declare function useCLLenderPosition(poolName: POOL_NAME, account?: string): [import("ethers").BigNumber | undefined, () => void];
|
|
27
|
-
export declare function useCLLenderApproved(poolName: POOL_NAME, account?: string): [boolean | undefined, () => void];
|
|
1
|
+
import { BaseCreditPool } from '../abis/types/BaseCreditPool';
|
|
2
|
+
import { POOL_NAME } from '../utils/pool';
|
|
3
|
+
export declare function useCLPoolContract(poolName: POOL_NAME): BaseCreditPool | null;
|
|
4
|
+
export declare function useCLBaseConfigPoolContract(poolName: POOL_NAME): BaseCreditPool | null;
|
|
5
|
+
export declare function useCLPoolUnderlyingTokenContract(poolName: POOL_NAME): import("..").Erc20 | null;
|
|
6
|
+
export declare function useCLPoolUnderlyingToken(poolName: POOL_NAME): Partial<{
|
|
7
|
+
address: string;
|
|
8
|
+
symbol: string;
|
|
9
|
+
decimals: number;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function useCLPoolUnderlyingTokenBalance(poolName: POOL_NAME, account?: string): import("ethers").BigNumber;
|
|
12
|
+
export declare function useCLPoolBalance(poolName: POOL_NAME): [import("ethers").BigNumber | undefined, () => void];
|
|
13
|
+
export declare function useCLStats(poolName: POOL_NAME, account?: string): [import("./usePoolContract").AccountStats, () => void];
|
|
14
|
+
export declare function useCLCreditRecord(poolName: POOL_NAME, account?: string): {
|
|
15
|
+
checkIsApproved: () => Promise<boolean>;
|
|
16
|
+
};
|
|
17
|
+
export declare function useCLFeeManager(poolName: POOL_NAME): {
|
|
18
|
+
fees: import("./usePoolContract").FeesType | undefined;
|
|
19
|
+
getFeesCharged: (requestedLoan: number) => number;
|
|
20
|
+
};
|
|
21
|
+
export declare function useCLPoolAllowance(poolName: POOL_NAME, account?: string): {
|
|
22
|
+
approved: boolean;
|
|
23
|
+
allowance: import("ethers").BigNumber;
|
|
24
|
+
loaded: boolean;
|
|
25
|
+
};
|
|
26
|
+
export declare function useCLLenderPosition(poolName: POOL_NAME, account?: string): [import("ethers").BigNumber | undefined, () => void];
|
|
27
|
+
export declare function useCLLenderApproved(poolName: POOL_NAME, account?: string): [boolean | undefined, () => void];
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { POOL_TYPE } from '../utils/pool';
|
|
2
|
-
import { useAccountStats, useBaseConfigPoolContract, useCreditRecord, useFeeManager, useLenderApproved, useLenderPosition, usePoolAllowance, usePoolBalance, usePoolContract, usePoolUnderlyingToken, usePoolUnderlyingTokenBalance, usePoolUnderlyingTokenContract, } from './usePoolContract';
|
|
3
|
-
export function useCLPoolContract(poolName) {
|
|
4
|
-
return usePoolContract(poolName, POOL_TYPE.CreditLine);
|
|
5
|
-
}
|
|
6
|
-
export function useCLBaseConfigPoolContract(poolName) {
|
|
7
|
-
return useBaseConfigPoolContract(poolName, POOL_TYPE.CreditLine);
|
|
8
|
-
}
|
|
9
|
-
export function useCLPoolUnderlyingTokenContract(poolName) {
|
|
10
|
-
return usePoolUnderlyingTokenContract(poolName, POOL_TYPE.CreditLine);
|
|
11
|
-
}
|
|
12
|
-
export function useCLPoolUnderlyingToken(poolName) {
|
|
13
|
-
return usePoolUnderlyingToken(poolName, POOL_TYPE.CreditLine);
|
|
14
|
-
}
|
|
15
|
-
export function useCLPoolUnderlyingTokenBalance(poolName, account) {
|
|
16
|
-
return usePoolUnderlyingTokenBalance(poolName, POOL_TYPE.CreditLine, account);
|
|
17
|
-
}
|
|
18
|
-
export function useCLPoolBalance(poolName) {
|
|
19
|
-
return usePoolBalance(poolName, POOL_TYPE.CreditLine);
|
|
20
|
-
}
|
|
21
|
-
export function useCLStats(poolName, account) {
|
|
22
|
-
return useAccountStats(poolName, POOL_TYPE.CreditLine, account);
|
|
23
|
-
}
|
|
24
|
-
export function useCLCreditRecord(poolName, account) {
|
|
25
|
-
return useCreditRecord(poolName, POOL_TYPE.CreditLine, account);
|
|
26
|
-
}
|
|
27
|
-
export function useCLFeeManager(poolName) {
|
|
28
|
-
return useFeeManager(poolName, POOL_TYPE.CreditLine);
|
|
29
|
-
}
|
|
30
|
-
export function useCLPoolAllowance(poolName, account) {
|
|
31
|
-
return usePoolAllowance(poolName, POOL_TYPE.CreditLine, account);
|
|
32
|
-
}
|
|
33
|
-
export function useCLLenderPosition(poolName, account) {
|
|
34
|
-
return useLenderPosition(poolName, POOL_TYPE.CreditLine, account);
|
|
35
|
-
}
|
|
36
|
-
export function useCLLenderApproved(poolName, account) {
|
|
37
|
-
return useLenderApproved(poolName, POOL_TYPE.CreditLine, account);
|
|
38
|
-
}
|
|
1
|
+
import { POOL_TYPE } from '../utils/pool';
|
|
2
|
+
import { useAccountStats, useBaseConfigPoolContract, useCreditRecord, useFeeManager, useLenderApproved, useLenderPosition, usePoolAllowance, usePoolBalance, usePoolContract, usePoolUnderlyingToken, usePoolUnderlyingTokenBalance, usePoolUnderlyingTokenContract, } from './usePoolContract';
|
|
3
|
+
export function useCLPoolContract(poolName) {
|
|
4
|
+
return usePoolContract(poolName, POOL_TYPE.CreditLine);
|
|
5
|
+
}
|
|
6
|
+
export function useCLBaseConfigPoolContract(poolName) {
|
|
7
|
+
return useBaseConfigPoolContract(poolName, POOL_TYPE.CreditLine);
|
|
8
|
+
}
|
|
9
|
+
export function useCLPoolUnderlyingTokenContract(poolName) {
|
|
10
|
+
return usePoolUnderlyingTokenContract(poolName, POOL_TYPE.CreditLine);
|
|
11
|
+
}
|
|
12
|
+
export function useCLPoolUnderlyingToken(poolName) {
|
|
13
|
+
return usePoolUnderlyingToken(poolName, POOL_TYPE.CreditLine);
|
|
14
|
+
}
|
|
15
|
+
export function useCLPoolUnderlyingTokenBalance(poolName, account) {
|
|
16
|
+
return usePoolUnderlyingTokenBalance(poolName, POOL_TYPE.CreditLine, account);
|
|
17
|
+
}
|
|
18
|
+
export function useCLPoolBalance(poolName) {
|
|
19
|
+
return usePoolBalance(poolName, POOL_TYPE.CreditLine);
|
|
20
|
+
}
|
|
21
|
+
export function useCLStats(poolName, account) {
|
|
22
|
+
return useAccountStats(poolName, POOL_TYPE.CreditLine, account);
|
|
23
|
+
}
|
|
24
|
+
export function useCLCreditRecord(poolName, account) {
|
|
25
|
+
return useCreditRecord(poolName, POOL_TYPE.CreditLine, account);
|
|
26
|
+
}
|
|
27
|
+
export function useCLFeeManager(poolName) {
|
|
28
|
+
return useFeeManager(poolName, POOL_TYPE.CreditLine);
|
|
29
|
+
}
|
|
30
|
+
export function useCLPoolAllowance(poolName, account) {
|
|
31
|
+
return usePoolAllowance(poolName, POOL_TYPE.CreditLine, account);
|
|
32
|
+
}
|
|
33
|
+
export function useCLLenderPosition(poolName, account) {
|
|
34
|
+
return useLenderPosition(poolName, POOL_TYPE.CreditLine, account);
|
|
35
|
+
}
|
|
36
|
+
export function useCLLenderApproved(poolName, account) {
|
|
37
|
+
return useLenderApproved(poolName, POOL_TYPE.CreditLine, account);
|
|
38
|
+
}
|
|
39
39
|
//# sourceMappingURL=useCLPoolContract.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Contract } from '@ethersproject/contracts';
|
|
2
|
-
import { Erc20, Erc721, TestERC20, Multisend } from '../abis/types';
|
|
3
|
-
export declare function useContract<T extends Contract = Contract>(address: string | undefined, ABI: any, withSignerIfPossible?: boolean): T | null;
|
|
4
|
-
export declare function useERC20Contract(tokenAddress?: string, withSignerIfPossible?: boolean): Erc20 | null;
|
|
5
|
-
export declare function useTestERC20Contract(tokenAddress?: string, withSignerIfPossible?: boolean): TestERC20 | null;
|
|
6
|
-
export declare function useERC721Contract(NFTAddress?: string): Erc721 | null;
|
|
7
|
-
export declare function useMultiSendContract(): Multisend | null;
|
|
1
|
+
import { Contract } from '@ethersproject/contracts';
|
|
2
|
+
import { Erc20, Erc721, TestERC20, Multisend } from '../abis/types';
|
|
3
|
+
export declare function useContract<T extends Contract = Contract>(address: string | undefined, ABI: any, withSignerIfPossible?: boolean): T | null;
|
|
4
|
+
export declare function useERC20Contract(tokenAddress?: string, withSignerIfPossible?: boolean): Erc20 | null;
|
|
5
|
+
export declare function useTestERC20Contract(tokenAddress?: string, withSignerIfPossible?: boolean): TestERC20 | null;
|
|
6
|
+
export declare function useERC721Contract(NFTAddress?: string): Erc721 | null;
|
|
7
|
+
export declare function useMultiSendContract(): Multisend | null;
|