@huma-finance/shared 0.0.36 → 0.0.37
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/BaseCreditPoolReceivable.json +764 -0
- package/dist/abis/BaseFeeManager.json +480 -480
- package/dist/abis/BasePoolConfig.json +1364 -1364
- package/dist/abis/ERC20TransferableReceivable.json +648 -648
- package/dist/abis/ERC20TransferrableReceivable.json +648 -0
- 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 +127 -127
- package/dist/abis/erc2612.json +132 -132
- package/dist/abis/erc721.json +673 -673
- package/dist/abis/index.js +3 -3
- package/dist/abis/types/BaseCreditPool.js +1 -1
- package/dist/abis/types/BaseCreditPoolReceivable.d.ts +518 -0
- package/dist/abis/types/BaseCreditPoolReceivable.js +2 -0
- package/dist/abis/types/BaseCreditPoolReceivable.js.map +1 -0
- package/dist/abis/types/BaseFeeManager.js +1 -1
- package/dist/abis/types/BasePoolConfig.js +1 -1
- package/dist/abis/types/ERC20TransferableReceivable.js +1 -1
- package/dist/abis/types/ERC20TransferrableReceivable.d.ts +407 -0
- package/dist/abis/types/ERC20TransferrableReceivable.js +2 -0
- package/dist/abis/types/ERC20TransferrableReceivable.js.map +1 -0
- package/dist/abis/types/Erc20.d.ts +184 -184
- package/dist/abis/types/Erc20.js +1 -1
- package/dist/abis/types/Erc2612.js +1 -1
- package/dist/abis/types/Erc721.js +1 -1
- package/dist/abis/types/HDT.js +1 -1
- package/dist/abis/types/IConstantFlowAgreementV1.js +1 -1
- package/dist/abis/types/ISuperfluid.js +1 -1
- package/dist/abis/types/InvoiceNFT.js +1 -1
- package/dist/abis/types/Multisend.js +1 -1
- package/dist/abis/types/RealWorldReceivable.js +1 -1
- package/dist/abis/types/ReceivableFactoringPool.js +1 -1
- package/dist/abis/types/StreamFactoringPool.js +1 -1
- package/dist/abis/types/StreamFeeManager.js +1 -1
- package/dist/abis/types/SuperfluidPoolProcessor.js +1 -1
- package/dist/abis/types/TestERC20.js +1 -1
- package/dist/abis/types/TradableStream.js +1 -1
- package/dist/abis/types/Transfer.js +1 -1
- package/dist/abis/types/TransferNFT.js +1 -1
- package/dist/abis/types/common.js +1 -1
- package/dist/abis/types/factories/BaseCreditPoolReceivable__factory.d.ts +597 -0
- package/dist/abis/types/factories/BaseCreditPoolReceivable__factory.js +778 -0
- package/dist/abis/types/factories/BaseCreditPoolReceivable__factory.js.map +1 -0
- package/dist/abis/types/factories/BaseCreditPool__factory.js +1192 -1192
- package/dist/abis/types/factories/BaseFeeManager__factory.js +493 -493
- package/dist/abis/types/factories/BasePoolConfig__factory.js +1377 -1377
- package/dist/abis/types/factories/ERC20TransferableReceivable__factory.js +661 -661
- package/dist/abis/types/factories/ERC20TransferrableReceivable__factory.d.ts +508 -0
- package/dist/abis/types/factories/ERC20TransferrableReceivable__factory.js +663 -0
- package/dist/abis/types/factories/ERC20TransferrableReceivable__factory.js.map +1 -0
- package/dist/abis/types/factories/Erc20__factory.d.ts +193 -193
- package/dist/abis/types/factories/Erc20__factory.js +259 -259
- package/dist/abis/types/factories/Erc2612__factory.js +278 -278
- package/dist/abis/types/factories/Erc721__factory.js +686 -686
- package/dist/abis/types/factories/HDT__factory.js +525 -525
- package/dist/abis/types/factories/IConstantFlowAgreementV1__factory.js +903 -903
- package/dist/abis/types/factories/ISuperfluid__factory.js +1135 -1135
- package/dist/abis/types/factories/InvoiceNFT__factory.js +638 -638
- package/dist/abis/types/factories/Multisend__factory.js +39 -39
- package/dist/abis/types/factories/RealWorldReceivable__factory.js +836 -836
- package/dist/abis/types/factories/ReceivableFactoringPool__factory.js +1542 -1542
- package/dist/abis/types/factories/StreamFactoringPool__factory.js +1536 -1536
- package/dist/abis/types/factories/StreamFeeManager__factory.js +535 -535
- package/dist/abis/types/factories/SuperfluidPoolProcessor__factory.js +705 -705
- package/dist/abis/types/factories/TestERC20__factory.js +371 -371
- package/dist/abis/types/factories/TradableStream__factory.js +863 -863
- package/dist/abis/types/factories/TransferNFT__factory.js +40 -40
- package/dist/abis/types/factories/Transfer__factory.js +37 -37
- package/dist/abis/types/factories/index.js +24 -24
- package/dist/abis/types/index.js +22 -22
- package/dist/cjs/abis/BaseCreditPool.json +1179 -1179
- package/dist/cjs/abis/BaseCreditPoolReceivable.json +764 -0
- 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 +127 -127
- 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/BaseCreditPoolReceivable.d.ts +518 -0
- package/dist/cjs/abis/types/BaseCreditPoolReceivable.js +3 -0
- package/dist/cjs/abis/types/BaseCreditPoolReceivable.js.map +1 -0
- 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 +184 -184
- 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/BaseCreditPoolReceivable__factory.d.ts +597 -0
- package/dist/cjs/abis/types/factories/BaseCreditPoolReceivable__factory.js +782 -0
- package/dist/cjs/abis/types/factories/BaseCreditPoolReceivable__factory.js.map +1 -0
- 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 +193 -193
- package/dist/cjs/abis/types/factories/Erc20__factory.js +263 -263
- 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 +28 -28
- 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 +74 -74
- package/dist/cjs/hooks/usePoolContract.js +310 -310
- package/dist/cjs/hooks/useRFPoolContract.d.ts +23 -23
- 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 +11 -11
- package/dist/cjs/hooks/web3/index.js +146 -146
- 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 +64 -64
- 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 +52 -52
- package/dist/cjs/services/IdentityService.js +83 -83
- 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 +39 -39
- package/dist/cjs/utils/chain.js +126 -126
- 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 -8
- package/dist/cjs/utils/config.js +45 -45
- 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 +41 -41
- 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 -20
- package/dist/cjs/utils/index.js +23 -23
- package/dist/cjs/utils/jsonRpcEndpoints.d.ts +12 -12
- package/dist/cjs/utils/jsonRpcEndpoints.js +21 -21
- package/dist/cjs/utils/notifi.d.ts +4 -4
- package/dist/cjs/utils/notifi.js +42 -42
- package/dist/cjs/utils/number.d.ts +6 -6
- package/dist/cjs/utils/number.js +74 -74
- package/dist/cjs/utils/pool.d.ts +97 -96
- package/dist/cjs/utils/pool.js +402 -371
- package/dist/cjs/utils/pool.js.map +1 -1
- package/dist/cjs/utils/realWorldReceivable.d.ts +12 -12
- package/dist/cjs/utils/realWorldReceivable.js +2 -2
- 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/components/icons/approve-lender.svg +30 -0
- package/dist/components/icons/auto-payback.svg +40 -0
- package/dist/components/icons/check-circle.svg +3 -0
- package/dist/components/icons/check-green.svg +3 -0
- package/dist/components/icons/check.svg +10 -0
- package/dist/components/icons/donut.svg +904 -0
- package/dist/components/icons/ellipse.svg +3 -0
- package/dist/components/icons/ethereum.svg +1 -0
- package/dist/components/icons/huma-full.svg +22 -0
- package/dist/components/icons/huma.svg +15 -0
- package/dist/components/icons/index.d.ts +19 -0
- package/dist/components/icons/index.js +70 -0
- package/dist/components/icons/index.js.map +1 -0
- package/dist/components/icons/loader.svg +229 -0
- package/dist/components/icons/metamask.svg +31 -0
- package/dist/components/icons/polygon.svg +16 -0
- package/dist/components/icons/receipt.svg +3 -0
- package/dist/components/icons/separator.svg +3 -0
- package/dist/components/icons/sorry.svg +31 -0
- package/dist/components/icons/usdc.svg +5 -0
- package/dist/components/icons/wallet-connect.svg +12 -0
- package/dist/hooks/index.js +18 -18
- package/dist/hooks/useActiveRoute.js +7 -7
- package/dist/hooks/useAsyncError.js +22 -22
- package/dist/hooks/useCLPoolContract.d.ts +28 -28
- package/dist/hooks/useCLPoolContract.js +38 -38
- package/dist/hooks/useContract.js +40 -40
- package/dist/hooks/useContractFunction.js +54 -54
- package/dist/hooks/useERC2612Permit/ethPermit/index.js +139 -139
- package/dist/hooks/useERC2612Permit/ethPermit/lib.js +21 -21
- package/dist/hooks/useERC2612Permit/ethPermit/rpc.js +96 -96
- package/dist/hooks/useERC2612Permit/index.js +31 -31
- package/dist/hooks/useFactoring.js +90 -90
- package/dist/hooks/useForceRefresh.js +8 -8
- package/dist/hooks/useGetSizes.js +19 -19
- package/dist/hooks/useInvoiceNFTContract.js +64 -64
- package/dist/hooks/useMQ.js +14 -14
- package/dist/hooks/useMount.js +8 -8
- package/dist/hooks/useParamsSearch.js +6 -6
- package/dist/hooks/usePool.js +39 -39
- package/dist/hooks/usePoolContract.d.ts +74 -74
- package/dist/hooks/usePoolContract.js +287 -287
- package/dist/hooks/useRFPoolContract.d.ts +23 -23
- package/dist/hooks/useRFPoolContract.js +29 -29
- package/dist/hooks/useRefresh.js +47 -47
- package/dist/hooks/web3/index.d.ts +11 -11
- package/dist/hooks/web3/index.js +141 -141
- package/dist/hooks/web3/useConnectors.js +24 -24
- package/dist/hooks/web3/useJsonRpcUrlsMap.js +55 -55
- package/dist/index.js +5 -5
- package/dist/services/EAService.js +77 -77
- package/dist/services/IdentityService.d.ts +52 -52
- package/dist/services/IdentityService.js +80 -80
- package/dist/services/RNService.js +10 -10
- package/dist/services/index.js +3 -3
- package/dist/theme/breakpoints.d.ts +5 -0
- package/dist/theme/breakpoints.js +4 -0
- package/dist/theme/breakpoints.js.map +1 -0
- package/dist/theme/components.d.ts +6 -0
- package/dist/theme/components.js +62 -0
- package/dist/theme/components.js.map +1 -0
- package/dist/theme/coreThemeConstants.d.ts +18 -0
- package/dist/theme/coreThemeConstants.js +30 -0
- package/dist/theme/coreThemeConstants.js.map +1 -0
- package/dist/theme/cssMixins.d.ts +20 -0
- package/dist/theme/cssMixins.js +90 -0
- package/dist/theme/cssMixins.js.map +1 -0
- package/dist/theme/index.d.ts +8 -0
- package/dist/theme/index.js +27 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/palette.d.ts +53 -0
- package/dist/theme/palette.js +137 -0
- package/dist/theme/palette.js.map +1 -0
- package/dist/theme/shape.d.ts +2 -0
- package/dist/theme/shape.js +5 -0
- package/dist/theme/shape.js.map +1 -0
- package/dist/theme/theme.types.d.ts +72 -0
- package/dist/theme/theme.types.js +2 -0
- package/dist/theme/theme.types.js.map +1 -0
- package/dist/theme/typography.d.ts +2 -0
- package/dist/theme/typography.js +116 -0
- package/dist/theme/typography.js.map +1 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/utils/JsonRpcConnector.js +38 -38
- package/dist/utils/WalletConnect.js +49 -49
- package/dist/utils/chain.d.ts +39 -39
- package/dist/utils/chain.js +118 -118
- package/dist/utils/common.js +10 -10
- package/dist/utils/config.d.ts +8 -8
- package/dist/utils/config.js +42 -42
- 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.js +37 -37
- package/dist/utils/ddLogger.d.ts +4 -0
- package/dist/utils/ddLogger.js +48 -0
- package/dist/utils/ddLogger.js.map +1 -0
- package/dist/utils/errors.js +39 -39
- package/dist/utils/index.d.ts +20 -20
- package/dist/utils/index.js +20 -20
- package/dist/utils/jsonRpcEndpoints.js +18 -18
- package/dist/utils/notifi.d.ts +4 -4
- package/dist/utils/notifi.js +36 -36
- package/dist/utils/number.d.ts +6 -6
- package/dist/utils/number.js +66 -66
- package/dist/utils/pool.d.ts +97 -96
- package/dist/utils/pool.js +395 -364
- package/dist/utils/pool.js.map +1 -1
- package/dist/utils/realWorldReceivable.d.ts +12 -12
- package/dist/utils/realWorldReceivable.js +1 -1
- package/dist/utils/request.js +38 -38
- package/dist/utils/scientificToDecimal.js +57 -57
- package/dist/utils/sentry.d.ts +1 -0
- package/dist/utils/sentry.js +19 -0
- package/dist/utils/sentry.js.map +1 -0
- package/dist/utils/storage.d.ts +12 -0
- package/dist/utils/storage.js +32 -0
- package/dist/utils/storage.js.map +1 -0
- package/dist/utils/string.js +1 -1
- package/dist/utils/style.js +12 -12
- package/dist/utils/time.js +50 -50
- package/dist/utils/transaction.js +87 -87
- package/dist/utils/web3.js +34 -34
- package/package.json +2 -2
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import { configUtil } from '../utils/config';
|
|
2
|
-
import { EARejectionError } from '../utils/errors';
|
|
3
|
-
import { downScale } from '../utils/number';
|
|
4
|
-
import { requestPost } from '../utils/request';
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
-
const isRejection = (obj) => obj !== null && typeof obj === 'object' && Array.isArray(obj.reasons);
|
|
7
|
-
/**
|
|
8
|
-
* Submits a credit underwriting request to Huma's EAVerse. This approves a creditline
|
|
9
|
-
* in Huma's pools that can be drawn down by the borrower.
|
|
10
|
-
*
|
|
11
|
-
* @param {EAPayload} payload The payload for the underwrite approval.
|
|
12
|
-
* @param {number} chainId The chain ID.
|
|
13
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
14
|
-
* @returns {Promise<Approval>} Promise that returns the approval on success.
|
|
15
|
-
* @throws {EARejectionError} If the underwrite approval is rejected.
|
|
16
|
-
*/
|
|
17
|
-
const approve = async (payload, chainId, isDev = false) => {
|
|
18
|
-
const approvalResult = await requestPost(`${configUtil.getEAVerseUrl(chainId, isDev)}/underwriter/underwrite`, payload);
|
|
19
|
-
const { result } = approvalResult;
|
|
20
|
-
if (isRejection(result)) {
|
|
21
|
-
throw new EARejectionError();
|
|
22
|
-
}
|
|
23
|
-
if (!result) {
|
|
24
|
-
throw new Error('Sorry, there was an error approving your wallet', {
|
|
25
|
-
cause: 'server error',
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
const { terms, receivable, token } = result;
|
|
29
|
-
if (terms === null || terms === void 0 ? void 0 : terms.creditLimit) {
|
|
30
|
-
terms.creditLimit = String(result.terms.creditLimit);
|
|
31
|
-
terms.creditLimitFormatted = downScale(String(result.terms.creditLimit), token.decimal);
|
|
32
|
-
}
|
|
33
|
-
if (receivable === null || receivable === void 0 ? void 0 : receivable.amount) {
|
|
34
|
-
receivable.amount = String(receivable.amount);
|
|
35
|
-
receivable.amountFormatted = downScale(String(receivable.amount), token.decimal);
|
|
36
|
-
}
|
|
37
|
-
return result;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Checks whether or not a credit underwriting request to Huma's EAVerse would be approved.
|
|
41
|
-
* Note that this does not approve a creditline in Huma's pools and an approve call is still required.
|
|
42
|
-
*
|
|
43
|
-
* @param {EAPreapprovalPayload} payload The payload for the underwrite approval.
|
|
44
|
-
* @param {number} chainId The chain ID.
|
|
45
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
46
|
-
* @returns {Promise<Approval>} Promise that returns the approval on success.
|
|
47
|
-
*/
|
|
48
|
-
const preapprove = async (payload, chainId, isDev = false) => requestPost(`${configUtil.getEAVerseUrl(chainId, isDev)}/underwriter/pre-approve`, payload);
|
|
49
|
-
const approveLender = async (payload, chainId) => {
|
|
50
|
-
var _a, _b;
|
|
51
|
-
const generalErrorMessage = 'Sorry, there was an error approving your wallet as a lender.';
|
|
52
|
-
try {
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
-
const data = await requestPost(`${configUtil.getEABaseUrlV1(chainId)}/addApprovedLender`, payload);
|
|
55
|
-
if (data.statusCode >= 500) {
|
|
56
|
-
throw new Error(data.errorMessage ? data.errorMessage[0] : generalErrorMessage);
|
|
57
|
-
}
|
|
58
|
-
else if (data.status) {
|
|
59
|
-
throw new Error(data.reason[0]);
|
|
60
|
-
}
|
|
61
|
-
else if ((_a = data.rejectionReason) === null || _a === void 0 ? void 0 : _a.length) {
|
|
62
|
-
throw new Error(data.rejectionReason[0]);
|
|
63
|
-
}
|
|
64
|
-
return data;
|
|
65
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
|
-
}
|
|
67
|
-
catch (error) {
|
|
68
|
-
throw new Error((_b = error.message) !== null && _b !== void 0 ? _b : generalErrorMessage, {
|
|
69
|
-
cause: 'server error',
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
export const EAService = {
|
|
74
|
-
approve,
|
|
75
|
-
approveLender,
|
|
76
|
-
preapprove,
|
|
77
|
-
};
|
|
1
|
+
import { configUtil } from '../utils/config';
|
|
2
|
+
import { EARejectionError } from '../utils/errors';
|
|
3
|
+
import { downScale } from '../utils/number';
|
|
4
|
+
import { requestPost } from '../utils/request';
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
const isRejection = (obj) => obj !== null && typeof obj === 'object' && Array.isArray(obj.reasons);
|
|
7
|
+
/**
|
|
8
|
+
* Submits a credit underwriting request to Huma's EAVerse. This approves a creditline
|
|
9
|
+
* in Huma's pools that can be drawn down by the borrower.
|
|
10
|
+
*
|
|
11
|
+
* @param {EAPayload} payload The payload for the underwrite approval.
|
|
12
|
+
* @param {number} chainId The chain ID.
|
|
13
|
+
* @param {boolean} isDev Is dev environment or not.
|
|
14
|
+
* @returns {Promise<Approval>} Promise that returns the approval on success.
|
|
15
|
+
* @throws {EARejectionError} If the underwrite approval is rejected.
|
|
16
|
+
*/
|
|
17
|
+
const approve = async (payload, chainId, isDev = false) => {
|
|
18
|
+
const approvalResult = await requestPost(`${configUtil.getEAVerseUrl(chainId, isDev)}/underwriter/underwrite`, payload);
|
|
19
|
+
const { result } = approvalResult;
|
|
20
|
+
if (isRejection(result)) {
|
|
21
|
+
throw new EARejectionError();
|
|
22
|
+
}
|
|
23
|
+
if (!result) {
|
|
24
|
+
throw new Error('Sorry, there was an error approving your wallet', {
|
|
25
|
+
cause: 'server error',
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
const { terms, receivable, token } = result;
|
|
29
|
+
if (terms === null || terms === void 0 ? void 0 : terms.creditLimit) {
|
|
30
|
+
terms.creditLimit = String(result.terms.creditLimit);
|
|
31
|
+
terms.creditLimitFormatted = downScale(String(result.terms.creditLimit), token.decimal);
|
|
32
|
+
}
|
|
33
|
+
if (receivable === null || receivable === void 0 ? void 0 : receivable.amount) {
|
|
34
|
+
receivable.amount = String(receivable.amount);
|
|
35
|
+
receivable.amountFormatted = downScale(String(receivable.amount), token.decimal);
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Checks whether or not a credit underwriting request to Huma's EAVerse would be approved.
|
|
41
|
+
* Note that this does not approve a creditline in Huma's pools and an approve call is still required.
|
|
42
|
+
*
|
|
43
|
+
* @param {EAPreapprovalPayload} payload The payload for the underwrite approval.
|
|
44
|
+
* @param {number} chainId The chain ID.
|
|
45
|
+
* @param {boolean} isDev Is dev environment or not.
|
|
46
|
+
* @returns {Promise<Approval>} Promise that returns the approval on success.
|
|
47
|
+
*/
|
|
48
|
+
const preapprove = async (payload, chainId, isDev = false) => requestPost(`${configUtil.getEAVerseUrl(chainId, isDev)}/underwriter/pre-approve`, payload);
|
|
49
|
+
const approveLender = async (payload, chainId) => {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
const generalErrorMessage = 'Sorry, there was an error approving your wallet as a lender.';
|
|
52
|
+
try {
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
+
const data = await requestPost(`${configUtil.getEABaseUrlV1(chainId)}/addApprovedLender`, payload);
|
|
55
|
+
if (data.statusCode >= 500) {
|
|
56
|
+
throw new Error(data.errorMessage ? data.errorMessage[0] : generalErrorMessage);
|
|
57
|
+
}
|
|
58
|
+
else if (data.status) {
|
|
59
|
+
throw new Error(data.reason[0]);
|
|
60
|
+
}
|
|
61
|
+
else if ((_a = data.rejectionReason) === null || _a === void 0 ? void 0 : _a.length) {
|
|
62
|
+
throw new Error(data.rejectionReason[0]);
|
|
63
|
+
}
|
|
64
|
+
return data;
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
throw new Error((_b = error.message) !== null && _b !== void 0 ? _b : generalErrorMessage, {
|
|
69
|
+
cause: 'server error',
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
export const EAService = {
|
|
74
|
+
approve,
|
|
75
|
+
approveLender,
|
|
76
|
+
preapprove,
|
|
77
|
+
};
|
|
78
78
|
//# sourceMappingURL=EAService.js.map
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enum representing the identity status.
|
|
3
|
-
* @typedef {Enum} IdentityStatus
|
|
4
|
-
*/
|
|
5
|
-
declare enum IdentityVerificationStatus {
|
|
6
|
-
ACCREDITED = "ACCREDITED",
|
|
7
|
-
ACCREDITATION_NOT_APPLICABLE = "ACCREDITATION_NOT_APPLICABLE",
|
|
8
|
-
NOT_ACCREDITED = "NOT_ACCREDITED",
|
|
9
|
-
ACCREDITATION_PENDING = "ACCREDITATION_PENDING",
|
|
10
|
-
IDENTITY_VERIFICATION_COMPLETED = "IDENTITY_VERIFICATION_COMPLETED",
|
|
11
|
-
IDENTITY_VERIFICATION_FAILED = "IDENTITY_VERIFICATION_FAILED",
|
|
12
|
-
IDENTITY_VERIFICATION_PENDING = "IDENTITY_VERIFICATION_PENDING",
|
|
13
|
-
IDENTITY_VERIFICATION_UPDATES_REQUIRED = "IDENTITY_VERIFICATION_UPDATES_REQUIRED",
|
|
14
|
-
IDENTITY_VERIFICATION_NOT_STARTED = "IDENTITY_VERIFICATION_NOT_STARTED",
|
|
15
|
-
USER_NOT_ONBOARDED = "USER_NOT_ONBOARDED"
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Object representing the response to the identity verification status request.
|
|
19
|
-
* @typedef {Object} VerificationStatus
|
|
20
|
-
* @property {string} walletAddress the wallet address to get the verification status.
|
|
21
|
-
* @property {IdentityVerificationStatus} identityVerificationStatus The wallet's identity verification status.
|
|
22
|
-
* @property {boolean} isVerified the wallet address has been verified or not.
|
|
23
|
-
* @property {boolean} isNotOnboarded the wallet address has been not onboarded or not.
|
|
24
|
-
*/
|
|
25
|
-
export type VerificationStatusResult = {
|
|
26
|
-
walletAddress: string;
|
|
27
|
-
verificationStatus: IdentityVerificationStatus;
|
|
28
|
-
isVerified: boolean;
|
|
29
|
-
isNotOnboarded: boolean;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Object representing the response to the document signature status request.
|
|
33
|
-
* @typedef {Object} DocSignatureStatus
|
|
34
|
-
* @property {string} envelopeId the envelope id to get the document signature status.
|
|
35
|
-
* @property {string} status the document signature status.
|
|
36
|
-
*/
|
|
37
|
-
export type DocSignatureStatus = {
|
|
38
|
-
envelopeId: string;
|
|
39
|
-
status: 'completed' | 'created' | 'declined' | 'deleted' | 'delivered' | 'processing' | 'sent' | 'signed' | 'template' | 'voided';
|
|
40
|
-
};
|
|
41
|
-
export declare const IdentityService: {
|
|
42
|
-
getVerificationStatus: (walletAddress: string, pool: string, chainId: number, isDev?: boolean) => Promise<VerificationStatusResult>;
|
|
43
|
-
onboard: (walletAddress: string, code: string, pool: string, chainId: number, isDev?: boolean) => Promise<string>;
|
|
44
|
-
getDocSignatureStatus: (envelopeId: string, chainId: number, isDev?: boolean) => Promise<DocSignatureStatus>;
|
|
45
|
-
requestDocSignature: (walletAddress: string, chainId: number, isDev?: boolean) => Promise<{
|
|
46
|
-
envelopeId: string;
|
|
47
|
-
}>;
|
|
48
|
-
resendDocSignatureLink: (envelopeId: string, chainId: number, isDev?: boolean) => Promise<{
|
|
49
|
-
envelopeId: string;
|
|
50
|
-
}>;
|
|
51
|
-
};
|
|
52
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing the identity status.
|
|
3
|
+
* @typedef {Enum} IdentityStatus
|
|
4
|
+
*/
|
|
5
|
+
declare enum IdentityVerificationStatus {
|
|
6
|
+
ACCREDITED = "ACCREDITED",
|
|
7
|
+
ACCREDITATION_NOT_APPLICABLE = "ACCREDITATION_NOT_APPLICABLE",
|
|
8
|
+
NOT_ACCREDITED = "NOT_ACCREDITED",
|
|
9
|
+
ACCREDITATION_PENDING = "ACCREDITATION_PENDING",
|
|
10
|
+
IDENTITY_VERIFICATION_COMPLETED = "IDENTITY_VERIFICATION_COMPLETED",
|
|
11
|
+
IDENTITY_VERIFICATION_FAILED = "IDENTITY_VERIFICATION_FAILED",
|
|
12
|
+
IDENTITY_VERIFICATION_PENDING = "IDENTITY_VERIFICATION_PENDING",
|
|
13
|
+
IDENTITY_VERIFICATION_UPDATES_REQUIRED = "IDENTITY_VERIFICATION_UPDATES_REQUIRED",
|
|
14
|
+
IDENTITY_VERIFICATION_NOT_STARTED = "IDENTITY_VERIFICATION_NOT_STARTED",
|
|
15
|
+
USER_NOT_ONBOARDED = "USER_NOT_ONBOARDED"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Object representing the response to the identity verification status request.
|
|
19
|
+
* @typedef {Object} VerificationStatus
|
|
20
|
+
* @property {string} walletAddress the wallet address to get the verification status.
|
|
21
|
+
* @property {IdentityVerificationStatus} identityVerificationStatus The wallet's identity verification status.
|
|
22
|
+
* @property {boolean} isVerified the wallet address has been verified or not.
|
|
23
|
+
* @property {boolean} isNotOnboarded the wallet address has been not onboarded or not.
|
|
24
|
+
*/
|
|
25
|
+
export type VerificationStatusResult = {
|
|
26
|
+
walletAddress: string;
|
|
27
|
+
verificationStatus: IdentityVerificationStatus;
|
|
28
|
+
isVerified: boolean;
|
|
29
|
+
isNotOnboarded: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Object representing the response to the document signature status request.
|
|
33
|
+
* @typedef {Object} DocSignatureStatus
|
|
34
|
+
* @property {string} envelopeId the envelope id to get the document signature status.
|
|
35
|
+
* @property {string} status the document signature status.
|
|
36
|
+
*/
|
|
37
|
+
export type DocSignatureStatus = {
|
|
38
|
+
envelopeId: string;
|
|
39
|
+
status: 'completed' | 'created' | 'declined' | 'deleted' | 'delivered' | 'processing' | 'sent' | 'signed' | 'template' | 'voided';
|
|
40
|
+
};
|
|
41
|
+
export declare const IdentityService: {
|
|
42
|
+
getVerificationStatus: (walletAddress: string, pool: string, chainId: number, isDev?: boolean) => Promise<VerificationStatusResult>;
|
|
43
|
+
onboard: (walletAddress: string, code: string, pool: string, chainId: number, isDev?: boolean) => Promise<string>;
|
|
44
|
+
getDocSignatureStatus: (envelopeId: string, chainId: number, isDev?: boolean) => Promise<DocSignatureStatus>;
|
|
45
|
+
requestDocSignature: (walletAddress: string, chainId: number, isDev?: boolean) => Promise<{
|
|
46
|
+
envelopeId: string;
|
|
47
|
+
}>;
|
|
48
|
+
resendDocSignatureLink: (envelopeId: string, chainId: number, isDev?: boolean) => Promise<{
|
|
49
|
+
envelopeId: string;
|
|
50
|
+
}>;
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { configUtil } from '../utils/config';
|
|
2
|
-
import { requestGet, requestPost, requestPut } from '../utils/request';
|
|
3
|
-
/**
|
|
4
|
-
* Enum representing the identity status.
|
|
5
|
-
* @typedef {Enum} IdentityStatus
|
|
6
|
-
*/
|
|
7
|
-
var IdentityVerificationStatus;
|
|
8
|
-
(function (IdentityVerificationStatus) {
|
|
9
|
-
IdentityVerificationStatus["ACCREDITED"] = "ACCREDITED";
|
|
10
|
-
IdentityVerificationStatus["ACCREDITATION_NOT_APPLICABLE"] = "ACCREDITATION_NOT_APPLICABLE";
|
|
11
|
-
IdentityVerificationStatus["NOT_ACCREDITED"] = "NOT_ACCREDITED";
|
|
12
|
-
IdentityVerificationStatus["ACCREDITATION_PENDING"] = "ACCREDITATION_PENDING";
|
|
13
|
-
IdentityVerificationStatus["IDENTITY_VERIFICATION_COMPLETED"] = "IDENTITY_VERIFICATION_COMPLETED";
|
|
14
|
-
IdentityVerificationStatus["IDENTITY_VERIFICATION_FAILED"] = "IDENTITY_VERIFICATION_FAILED";
|
|
15
|
-
IdentityVerificationStatus["IDENTITY_VERIFICATION_PENDING"] = "IDENTITY_VERIFICATION_PENDING";
|
|
16
|
-
IdentityVerificationStatus["IDENTITY_VERIFICATION_UPDATES_REQUIRED"] = "IDENTITY_VERIFICATION_UPDATES_REQUIRED";
|
|
17
|
-
IdentityVerificationStatus["IDENTITY_VERIFICATION_NOT_STARTED"] = "IDENTITY_VERIFICATION_NOT_STARTED";
|
|
18
|
-
IdentityVerificationStatus["USER_NOT_ONBOARDED"] = "USER_NOT_ONBOARDED";
|
|
19
|
-
})(IdentityVerificationStatus || (IdentityVerificationStatus = {}));
|
|
20
|
-
/**
|
|
21
|
-
* Get wallet's identity verification status.
|
|
22
|
-
*
|
|
23
|
-
* @param {string} walletAddress The wallet address.
|
|
24
|
-
* @param {string} pool The pool address.
|
|
25
|
-
* @param {number} chainId chain Id.
|
|
26
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
27
|
-
* @returns {Promise<VerificationStatusResult>} Promise that returns the verification status result.
|
|
28
|
-
*/
|
|
29
|
-
const getVerificationStatus = async (walletAddress, pool, chainId, isDev = false) => {
|
|
30
|
-
const result = await requestPut(`${configUtil.getIdentityAPIUrl(chainId, isDev)}/wallets/${walletAddress}/verification-status?poolAddress=${pool}`);
|
|
31
|
-
result.isVerified = [IdentityVerificationStatus.ACCREDITED].includes(result.verificationStatus);
|
|
32
|
-
result.isNotOnboarded =
|
|
33
|
-
result.verificationStatus === IdentityVerificationStatus.USER_NOT_ONBOARDED;
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Onboard user
|
|
38
|
-
*
|
|
39
|
-
* @param {string} walletAddress The wallet address.
|
|
40
|
-
* @param {string} code The investor code.
|
|
41
|
-
* @param {string} pool Pool address.
|
|
42
|
-
* @param {number} chainId chain Id.
|
|
43
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
44
|
-
* @returns {Promise<string>} Promise that returns the onboard result
|
|
45
|
-
*/
|
|
46
|
-
const onboard = async (walletAddress, code, pool, chainId, isDev = false) => requestPost(`${configUtil.getIdentityAPIUrl(chainId, isDev)}/wallets/${walletAddress}/onboard?code=${code}&poolAddress=${pool}`);
|
|
47
|
-
/**
|
|
48
|
-
* Get document signature status
|
|
49
|
-
*
|
|
50
|
-
* @param {string} envelopeId The envelope id.
|
|
51
|
-
* @param {number} chainId chain Id.
|
|
52
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
53
|
-
* @returns {Promise<{envelopeId: string}>} Promise that returns the envelope id
|
|
54
|
-
*/
|
|
55
|
-
const getDocSignatureStatus = async (envelopeId, chainId, isDev = false) => requestGet(`${configUtil.getIdentityAPIUrl(chainId, isDev)}/${envelopeId}/document-signature-status`);
|
|
56
|
-
/**
|
|
57
|
-
* Request document signature
|
|
58
|
-
*
|
|
59
|
-
* @param {string} walletAddress The wallet address.
|
|
60
|
-
* @param {number} chainId chain Id.
|
|
61
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
62
|
-
* @returns {Promise<{envelopeId: string}>} Promise that returns the envelope id
|
|
63
|
-
*/
|
|
64
|
-
const requestDocSignature = async (walletAddress, chainId, isDev = false) => requestPost(`${configUtil.getIdentityAPIUrl(chainId, isDev)}/request-document-signature`, { walletAddress });
|
|
65
|
-
/**
|
|
66
|
-
* Resend document signature link
|
|
67
|
-
*
|
|
68
|
-
* @param {string} envelopeId The envelope id.
|
|
69
|
-
* @param {number} chainId chain Id.
|
|
70
|
-
* @param {boolean} isDev Is dev environment or not.
|
|
71
|
-
* @returns {Promise<{envelopeId: string}>} Promise that returns the envelope id
|
|
72
|
-
*/
|
|
73
|
-
const resendDocSignatureLink = async (envelopeId, chainId, isDev = false) => requestPost(`${configUtil.getIdentityAPIUrl(chainId, isDev)}/resend-document-signature-link`, { envelopeId });
|
|
74
|
-
export const IdentityService = {
|
|
75
|
-
getVerificationStatus,
|
|
76
|
-
onboard,
|
|
77
|
-
getDocSignatureStatus,
|
|
78
|
-
requestDocSignature,
|
|
79
|
-
resendDocSignatureLink,
|
|
80
|
-
};
|
|
1
|
+
import { configUtil } from '../utils/config';
|
|
2
|
+
import { requestGet, requestPost, requestPut } from '../utils/request';
|
|
3
|
+
/**
|
|
4
|
+
* Enum representing the identity status.
|
|
5
|
+
* @typedef {Enum} IdentityStatus
|
|
6
|
+
*/
|
|
7
|
+
var IdentityVerificationStatus;
|
|
8
|
+
(function (IdentityVerificationStatus) {
|
|
9
|
+
IdentityVerificationStatus["ACCREDITED"] = "ACCREDITED";
|
|
10
|
+
IdentityVerificationStatus["ACCREDITATION_NOT_APPLICABLE"] = "ACCREDITATION_NOT_APPLICABLE";
|
|
11
|
+
IdentityVerificationStatus["NOT_ACCREDITED"] = "NOT_ACCREDITED";
|
|
12
|
+
IdentityVerificationStatus["ACCREDITATION_PENDING"] = "ACCREDITATION_PENDING";
|
|
13
|
+
IdentityVerificationStatus["IDENTITY_VERIFICATION_COMPLETED"] = "IDENTITY_VERIFICATION_COMPLETED";
|
|
14
|
+
IdentityVerificationStatus["IDENTITY_VERIFICATION_FAILED"] = "IDENTITY_VERIFICATION_FAILED";
|
|
15
|
+
IdentityVerificationStatus["IDENTITY_VERIFICATION_PENDING"] = "IDENTITY_VERIFICATION_PENDING";
|
|
16
|
+
IdentityVerificationStatus["IDENTITY_VERIFICATION_UPDATES_REQUIRED"] = "IDENTITY_VERIFICATION_UPDATES_REQUIRED";
|
|
17
|
+
IdentityVerificationStatus["IDENTITY_VERIFICATION_NOT_STARTED"] = "IDENTITY_VERIFICATION_NOT_STARTED";
|
|
18
|
+
IdentityVerificationStatus["USER_NOT_ONBOARDED"] = "USER_NOT_ONBOARDED";
|
|
19
|
+
})(IdentityVerificationStatus || (IdentityVerificationStatus = {}));
|
|
20
|
+
/**
|
|
21
|
+
* Get wallet's identity verification status.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} walletAddress The wallet address.
|
|
24
|
+
* @param {string} pool The pool address.
|
|
25
|
+
* @param {number} chainId chain Id.
|
|
26
|
+
* @param {boolean} isDev Is dev environment or not.
|
|
27
|
+
* @returns {Promise<VerificationStatusResult>} Promise that returns the verification status result.
|
|
28
|
+
*/
|
|
29
|
+
const getVerificationStatus = async (walletAddress, pool, chainId, isDev = false) => {
|
|
30
|
+
const result = await requestPut(`${configUtil.getIdentityAPIUrl(chainId, isDev)}/wallets/${walletAddress}/verification-status?poolAddress=${pool}`);
|
|
31
|
+
result.isVerified = [IdentityVerificationStatus.ACCREDITED].includes(result.verificationStatus);
|
|
32
|
+
result.isNotOnboarded =
|
|
33
|
+
result.verificationStatus === IdentityVerificationStatus.USER_NOT_ONBOARDED;
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Onboard user
|
|
38
|
+
*
|
|
39
|
+
* @param {string} walletAddress The wallet address.
|
|
40
|
+
* @param {string} code The investor code.
|
|
41
|
+
* @param {string} pool Pool address.
|
|
42
|
+
* @param {number} chainId chain Id.
|
|
43
|
+
* @param {boolean} isDev Is dev environment or not.
|
|
44
|
+
* @returns {Promise<string>} Promise that returns the onboard result
|
|
45
|
+
*/
|
|
46
|
+
const onboard = async (walletAddress, code, pool, chainId, isDev = false) => requestPost(`${configUtil.getIdentityAPIUrl(chainId, isDev)}/wallets/${walletAddress}/onboard?code=${code}&poolAddress=${pool}`);
|
|
47
|
+
/**
|
|
48
|
+
* Get document signature status
|
|
49
|
+
*
|
|
50
|
+
* @param {string} envelopeId The envelope id.
|
|
51
|
+
* @param {number} chainId chain Id.
|
|
52
|
+
* @param {boolean} isDev Is dev environment or not.
|
|
53
|
+
* @returns {Promise<{envelopeId: string}>} Promise that returns the envelope id
|
|
54
|
+
*/
|
|
55
|
+
const getDocSignatureStatus = async (envelopeId, chainId, isDev = false) => requestGet(`${configUtil.getIdentityAPIUrl(chainId, isDev)}/${envelopeId}/document-signature-status`);
|
|
56
|
+
/**
|
|
57
|
+
* Request document signature
|
|
58
|
+
*
|
|
59
|
+
* @param {string} walletAddress The wallet address.
|
|
60
|
+
* @param {number} chainId chain Id.
|
|
61
|
+
* @param {boolean} isDev Is dev environment or not.
|
|
62
|
+
* @returns {Promise<{envelopeId: string}>} Promise that returns the envelope id
|
|
63
|
+
*/
|
|
64
|
+
const requestDocSignature = async (walletAddress, chainId, isDev = false) => requestPost(`${configUtil.getIdentityAPIUrl(chainId, isDev)}/request-document-signature`, { walletAddress });
|
|
65
|
+
/**
|
|
66
|
+
* Resend document signature link
|
|
67
|
+
*
|
|
68
|
+
* @param {string} envelopeId The envelope id.
|
|
69
|
+
* @param {number} chainId chain Id.
|
|
70
|
+
* @param {boolean} isDev Is dev environment or not.
|
|
71
|
+
* @returns {Promise<{envelopeId: string}>} Promise that returns the envelope id
|
|
72
|
+
*/
|
|
73
|
+
const resendDocSignatureLink = async (envelopeId, chainId, isDev = false) => requestPost(`${configUtil.getIdentityAPIUrl(chainId, isDev)}/resend-document-signature-link`, { envelopeId });
|
|
74
|
+
export const IdentityService = {
|
|
75
|
+
getVerificationStatus,
|
|
76
|
+
onboard,
|
|
77
|
+
getDocSignatureStatus,
|
|
78
|
+
requestDocSignature,
|
|
79
|
+
resendDocSignatureLink,
|
|
80
|
+
};
|
|
81
81
|
//# sourceMappingURL=IdentityService.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { configUtil } from '../utils/config';
|
|
2
|
-
import { requestGet } from '../utils/request';
|
|
3
|
-
const getRequestInfo = async (requestId, chainId) => {
|
|
4
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
|
-
const data = await requestGet(`${configUtil.getRequestAPIUrl(chainId)}/request?id=${requestId}`);
|
|
6
|
-
return data;
|
|
7
|
-
};
|
|
8
|
-
export const RNService = {
|
|
9
|
-
getRequestInfo,
|
|
10
|
-
};
|
|
1
|
+
import { configUtil } from '../utils/config';
|
|
2
|
+
import { requestGet } from '../utils/request';
|
|
3
|
+
const getRequestInfo = async (requestId, chainId) => {
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
|
+
const data = await requestGet(`${configUtil.getRequestAPIUrl(chainId)}/request?id=${requestId}`);
|
|
6
|
+
return data;
|
|
7
|
+
};
|
|
8
|
+
export const RNService = {
|
|
9
|
+
getRequestInfo,
|
|
10
|
+
};
|
|
11
11
|
//# sourceMappingURL=RNService.js.map
|
package/dist/services/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './EAService';
|
|
2
|
-
export * from './RNService';
|
|
3
|
-
export * from './IdentityService';
|
|
1
|
+
export * from './EAService';
|
|
2
|
+
export * from './RNService';
|
|
3
|
+
export * from './IdentityService';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoints.js","sourceRoot":"","sources":["../../src/theme/breakpoints.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAKpB;IACF,MAAM,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE;CAC1D,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file can be used to override default props and styles on the various Material components
|
|
3
|
+
* see: https://mui.com/customization/theme-components/
|
|
4
|
+
*/
|
|
5
|
+
import { Theme, ThemeOptions } from '@mui/material';
|
|
6
|
+
export declare function components(theme: Theme): ThemeOptions['components'];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export function components(theme) {
|
|
2
|
+
return {
|
|
3
|
+
MuiButton: {
|
|
4
|
+
defaultProps: {
|
|
5
|
+
disableElevation: true,
|
|
6
|
+
},
|
|
7
|
+
styleOverrides: {
|
|
8
|
+
contained: {
|
|
9
|
+
// align outlined vs contained borders
|
|
10
|
+
border: '1px solid transparent',
|
|
11
|
+
background: 'linear-gradient(232.71deg, #A363F4 4.17%, #FF6A8A 178.69%)',
|
|
12
|
+
},
|
|
13
|
+
outlined: {
|
|
14
|
+
'.MuiBox-root': {
|
|
15
|
+
background: 'linear-gradient(232.71deg, #A363F4 4.17%, #FF6A8A 178.69%)',
|
|
16
|
+
backgroundClip: 'text',
|
|
17
|
+
textFillColor: 'transparent',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
root: {
|
|
21
|
+
fontFamily: 'Uni-Neue-Bold',
|
|
22
|
+
fontSize: '15px',
|
|
23
|
+
borderRadius: '32px',
|
|
24
|
+
'&.MuiButton-containedPrimary': {
|
|
25
|
+
'&:hover': {
|
|
26
|
+
backgroundColor: theme.palette.primary.main,
|
|
27
|
+
},
|
|
28
|
+
boxShadow: '0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px rgba(0, 0, 0, 0.14), 0px 1px 5px rgba(0, 0, 0, 0.12)',
|
|
29
|
+
},
|
|
30
|
+
'&.MuiButton-outlinedPrimary': {
|
|
31
|
+
'&:hover': {
|
|
32
|
+
backgroundColor: theme.palette.common.white,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
textTransform: 'none',
|
|
36
|
+
'&:disabled': {
|
|
37
|
+
border: 'none',
|
|
38
|
+
background: 'rgba(0, 0, 0, 0.12)',
|
|
39
|
+
boxShadow: 'unset',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
MuiButtonBase: {
|
|
45
|
+
defaultProps: {},
|
|
46
|
+
},
|
|
47
|
+
MuiCssBaseline: {
|
|
48
|
+
styleOverrides: {
|
|
49
|
+
dd: {
|
|
50
|
+
margin: 0,
|
|
51
|
+
},
|
|
52
|
+
dl: {
|
|
53
|
+
margin: 0,
|
|
54
|
+
},
|
|
55
|
+
dt: {
|
|
56
|
+
margin: 0,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/theme/components.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,UAAU,CAAC,KAAY;IACrC,OAAO;QACL,SAAS,EAAE;YACT,YAAY,EAAE;gBACZ,gBAAgB,EAAE,IAAI;aACvB;YACD,cAAc,EAAE;gBACd,SAAS,EAAE;oBACT,sCAAsC;oBACtC,MAAM,EAAE,uBAAuB;oBAC/B,UAAU,EACR,4DAA4D;iBAC/D;gBACD,QAAQ,EAAE;oBACR,cAAc,EAAE;wBACd,UAAU,EACR,4DAA4D;wBAC9D,cAAc,EAAE,MAAM;wBACtB,aAAa,EAAE,aAAa;qBAC7B;iBACF;gBACD,IAAI,EAAE;oBACJ,UAAU,EAAE,eAAe;oBAC3B,QAAQ,EAAE,MAAM;oBAChB,YAAY,EAAE,MAAM;oBACpB,8BAA8B,EAAE;wBAC9B,SAAS,EAAE;4BACT,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;yBAC5C;wBACD,SAAS,EACP,uGAAuG;qBAC1G;oBACD,6BAA6B,EAAE;wBAC7B,SAAS,EAAE;4BACT,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;yBAC5C;qBACF;oBACD,aAAa,EAAE,MAAM;oBACrB,YAAY,EAAE;wBACZ,MAAM,EAAE,MAAM;wBACd,UAAU,EAAE,qBAAqB;wBACjC,SAAS,EAAE,OAAO;qBACnB;iBACF;aACF;SACF;QACD,aAAa,EAAE;YACb,YAAY,EAAE,EAAE;SACjB;QACD,cAAc,EAAE;YACd,cAAc,EAAE;gBACd,EAAE,EAAE;oBACF,MAAM,EAAE,CAAC;iBACV;gBACD,EAAE,EAAE;oBACF,MAAM,EAAE,CAAC;iBACV;gBACD,EAAE,EAAE;oBACF,MAAM,EAAE,CAAC;iBACV;aACF;SACF;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const coreThemeConstants: {
|
|
2
|
+
borderRadius: {
|
|
3
|
+
md: number;
|
|
4
|
+
};
|
|
5
|
+
fontFamily: string;
|
|
6
|
+
letterSpacing: {
|
|
7
|
+
lg: string;
|
|
8
|
+
md: string;
|
|
9
|
+
sm: string;
|
|
10
|
+
xs: string;
|
|
11
|
+
};
|
|
12
|
+
lineHeight: {
|
|
13
|
+
lg: number;
|
|
14
|
+
md: number;
|
|
15
|
+
xl: number;
|
|
16
|
+
};
|
|
17
|
+
spacingBase: number;
|
|
18
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const coreThemeConstants = {
|
|
2
|
+
borderRadius: {
|
|
3
|
+
md: 4,
|
|
4
|
+
},
|
|
5
|
+
fontFamily: [
|
|
6
|
+
'Roboto',
|
|
7
|
+
'-apple-system',
|
|
8
|
+
'BlinkMacSystemFont',
|
|
9
|
+
'"Segoe UI"',
|
|
10
|
+
'"Helvetica Neue"',
|
|
11
|
+
'Arial',
|
|
12
|
+
'sans-serif',
|
|
13
|
+
'"Apple Color Emoji"',
|
|
14
|
+
'"Segoe UI Emoji"',
|
|
15
|
+
'"Segoe UI Symbol"',
|
|
16
|
+
].join(','),
|
|
17
|
+
letterSpacing: {
|
|
18
|
+
lg: '2px',
|
|
19
|
+
md: '1px',
|
|
20
|
+
sm: '0.45px',
|
|
21
|
+
xs: '0.25px',
|
|
22
|
+
},
|
|
23
|
+
lineHeight: {
|
|
24
|
+
lg: 1.4,
|
|
25
|
+
md: 1.1875,
|
|
26
|
+
xl: 1.5, // 24px on 16
|
|
27
|
+
},
|
|
28
|
+
spacingBase: 8, // 8px grid
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=coreThemeConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coreThemeConstants.js","sourceRoot":"","sources":["../../src/theme/coreThemeConstants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,YAAY,EAAE;QACZ,EAAE,EAAE,CAAC;KACN;IACD,UAAU,EAAE;QACV,QAAQ;QACR,eAAe;QACf,oBAAoB;QACpB,YAAY;QACZ,kBAAkB;QAClB,OAAO;QACP,YAAY;QACZ,qBAAqB;QACrB,kBAAkB;QAClB,mBAAmB;KACpB,CAAC,IAAI,CAAC,GAAG,CAAC;IACX,aAAa,EAAE;QACb,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,QAAQ;KACb;IACD,UAAU,EAAE;QACV,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,MAAM;QACV,EAAE,EAAE,GAAG,EAAE,aAAa;KACvB;IACD,WAAW,EAAE,CAAC,EAAE,WAAW;CAC5B,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SerializedStyles } from '@emotion/react';
|
|
2
|
+
export declare const cssMixins: {
|
|
3
|
+
appHeaderHeight: string;
|
|
4
|
+
appFooterHeight: string;
|
|
5
|
+
colCentered: SerializedStyles;
|
|
6
|
+
colHCentered: SerializedStyles;
|
|
7
|
+
colStretch: SerializedStyles;
|
|
8
|
+
colVCentered: SerializedStyles;
|
|
9
|
+
rowCentered: SerializedStyles;
|
|
10
|
+
rowHCentered: SerializedStyles;
|
|
11
|
+
rowStretch: SerializedStyles;
|
|
12
|
+
rowSpaceBetweened: SerializedStyles;
|
|
13
|
+
rowFlexEnd: SerializedStyles;
|
|
14
|
+
rowVCentered: SerializedStyles;
|
|
15
|
+
spaceSimpleH: (spacing: number) => SerializedStyles;
|
|
16
|
+
spaceSimpleV: (spacing: number) => SerializedStyles;
|
|
17
|
+
stretchAll: SerializedStyles;
|
|
18
|
+
stretchBottom: SerializedStyles;
|
|
19
|
+
stretchTop: SerializedStyles;
|
|
20
|
+
};
|