@multiversx/sdk-dapp-liquidity 2.0.0 → 2.1.0-alpha.1
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/all-networks--dfVLHLJ.js +2 -0
- package/all-networks-Czd8zS1n.mjs +4 -0
- package/api/checkAccount.js +1 -21
- package/api/checkAccount.mjs +13 -13
- package/api/confirmRate.js +1 -29
- package/api/confirmRate.mjs +17 -22
- package/api/getChains.js +1 -17
- package/api/getChains.mjs +10 -10
- package/api/getRate.js +1 -27
- package/api/getRate.mjs +17 -20
- package/api/getTokens.js +1 -22
- package/api/getTokens.mjs +14 -15
- package/api/getTokensBalances.js +1 -21
- package/api/getTokensBalances.mjs +13 -13
- package/api/getTransactions.js +1 -38
- package/api/getTransactions.mjs +25 -31
- package/api/index.js +1 -18
- package/api/index.mjs +16 -16
- package/api/sendTransactions.js +1 -32
- package/api/sendTransactions.mjs +19 -19
- package/api/tests/confirmRate.spec.js +1 -130
- package/api/tests/confirmRate.spec.mjs +44 -58
- package/api/tests/getChains.spec.js +1 -43
- package/api/tests/getChains.spec.mjs +15 -18
- package/api/tests/getRate.spec.js +1 -87
- package/api/tests/getRate.spec.mjs +35 -49
- package/api/tests/getTokens.spec.js +1 -68
- package/api/tests/getTokens.spec.mjs +23 -29
- package/api/tests/getTransactions.spec.js +1 -94
- package/api/tests/getTransactions.spec.mjs +35 -51
- package/api/tests/sendTransactions.spec.js +1 -96
- package/api/tests/sendTransactions.spec.mjs +44 -52
- package/constants/index.js +1 -4
- package/constants/index.mjs +2 -2
- package/default-D0Jk5ROI.mjs +4 -0
- package/default-DbU6vPaB.js +2 -0
- package/helpers/assertRateConfirmationMatchesIntent.d.ts +8 -0
- package/helpers/assertRateConfirmationMatchesIntent.js +2 -0
- package/helpers/assertRateConfirmationMatchesIntent.mjs +20 -0
- package/helpers/base64Utils.js +1 -31
- package/helpers/base64Utils.mjs +14 -24
- package/helpers/decodeLoginToken.js +1 -27
- package/helpers/decodeLoginToken.mjs +13 -18
- package/helpers/decodeToken.js +1 -39
- package/helpers/decodeToken.mjs +20 -31
- package/helpers/getApiURL.js +1 -7
- package/helpers/getApiURL.mjs +3 -5
- package/helpers/getBridgeURL.js +1 -7
- package/helpers/getBridgeURL.mjs +3 -5
- package/helpers/getDisplayName.js +1 -11
- package/helpers/getDisplayName.mjs +3 -8
- package/helpers/getMvxApiURL.js +1 -7
- package/helpers/getMvxApiURL.mjs +3 -5
- package/helpers/getMvxChainId.js +1 -7
- package/helpers/getMvxChainId.mjs +3 -5
- package/helpers/getMvxExplorerAddress.js +1 -7
- package/helpers/getMvxExplorerAddress.mjs +3 -5
- package/helpers/index.d.ts +2 -0
- package/helpers/index.js +1 -22
- package/helpers/index.mjs +24 -20
- package/helpers/safeImageUrl.d.ts +1 -0
- package/helpers/safeImageUrl.js +2 -0
- package/helpers/safeImageUrl.mjs +13 -0
- package/helpers/serializeTransaction.js +1 -8
- package/helpers/serializeTransaction.mjs +3 -5
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.d.ts +1 -0
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.js +2 -0
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.mjs +52 -0
- package/helpers/tests/base64Utils.spec.js +1 -29
- package/helpers/tests/base64Utils.spec.mjs +11 -24
- package/helpers/tests/decodeLoginToken.spec.js +1 -34
- package/helpers/tests/decodeLoginToken.spec.mjs +13 -24
- package/helpers/tests/decodeToken.spec.js +1 -27
- package/helpers/tests/decodeToken.spec.mjs +7 -12
- package/helpers/tests/safeImageUrl.spec.d.ts +1 -0
- package/helpers/tests/safeImageUrl.spec.js +2 -0
- package/helpers/tests/safeImageUrl.spec.mjs +32 -0
- package/helpers/tests/serializeTransaction.spec.d.ts +1 -0
- package/helpers/tests/serializeTransaction.spec.js +2 -0
- package/helpers/tests/serializeTransaction.spec.mjs +24 -0
- package/index.js +1 -228
- package/index.mjs +196 -192
- package/package.json +14 -9
- package/react.esm-B0AMOHxa.js +73 -0
- package/react.esm-BxvJJ86Q.mjs +9949 -0
- package/reactjs/adapters/SuiAdapter.d.ts +14 -0
- package/reactjs/adapters/SuiAdapter.js +1 -349
- package/reactjs/adapters/SuiAdapter.mjs +171 -199
- package/reactjs/components/AccountAddress/AccountAddress.js +1 -31
- package/reactjs/components/AccountAddress/AccountAddress.mjs +16 -16
- package/reactjs/components/AccountAddress/index.js +1 -4
- package/reactjs/components/AccountAddress/index.mjs +2 -2
- package/reactjs/components/AmountCard/AmountCard.js +1 -33
- package/reactjs/components/AmountCard/AmountCard.mjs +19 -21
- package/reactjs/components/AmountCard/index.js +1 -4
- package/reactjs/components/AmountCard/index.mjs +2 -2
- package/reactjs/components/AmountInput/AmountInput.js +1 -71
- package/reactjs/components/AmountInput/AmountInput.mjs +42 -46
- package/reactjs/components/AmountInput/index.js +1 -4
- package/reactjs/components/AmountInput/index.mjs +2 -2
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +9 -0
- package/reactjs/components/BridgeForm/BridgeForm.js +1 -89
- package/reactjs/components/BridgeForm/BridgeForm.mjs +72 -79
- package/reactjs/components/BridgeForm/Deposit.js +1 -673
- package/reactjs/components/BridgeForm/Deposit.mjs +381 -503
- package/reactjs/components/BridgeForm/Transfer.js +1 -559
- package/reactjs/components/BridgeForm/Transfer.mjs +316 -427
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.js +1 -78
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.mjs +47 -70
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.js +1 -58
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.mjs +36 -47
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.js +1 -266
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.mjs +163 -231
- package/reactjs/components/BridgeForm/index.js +1 -4
- package/reactjs/components/BridgeForm/index.mjs +2 -2
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.js +1 -76
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.mjs +35 -65
- package/reactjs/components/BridgeHistory/BridgeHistory.js +1 -367
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +177 -193
- package/reactjs/components/BridgeHistory/index.js +1 -4
- package/reactjs/components/BridgeHistory/index.mjs +2 -2
- package/reactjs/components/Connect/BridgeAccountDisplay.js +1 -150
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +99 -115
- package/reactjs/components/Connect/BridgeConnectButton.js +1 -34
- package/reactjs/components/Connect/BridgeConnectButton.mjs +20 -19
- package/reactjs/components/Connect/ChainSelectConnect.js +1 -144
- package/reactjs/components/Connect/ChainSelectConnect.mjs +70 -83
- package/reactjs/components/Connect/CustomConnectButton.js +1 -40
- package/reactjs/components/Connect/CustomConnectButton.mjs +24 -30
- package/reactjs/components/Connect/MvxAccountDisplay.js +1 -97
- package/reactjs/components/Connect/MvxAccountDisplay.mjs +47 -50
- package/reactjs/components/Connect/MvxConnectButton.js +1 -43
- package/reactjs/components/Connect/MvxConnectButton.mjs +35 -40
- package/reactjs/components/Connect/SwitchChainButton.js +1 -29
- package/reactjs/components/Connect/SwitchChainButton.mjs +15 -18
- package/reactjs/components/Connect/index.js +1 -16
- package/reactjs/components/Connect/index.mjs +14 -14
- package/reactjs/components/CopyButton/CopyButton.js +1 -46
- package/reactjs/components/CopyButton/CopyButton.mjs +33 -36
- package/reactjs/components/CopyButton/index.js +1 -4
- package/reactjs/components/CopyButton/index.mjs +2 -2
- package/reactjs/components/CopyButton/utils/copyToClipboard.js +1 -38
- package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +20 -32
- package/reactjs/components/CopyButton/utils/index.js +1 -4
- package/reactjs/components/CopyButton/utils/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/DisplayAmount.js +1 -90
- package/reactjs/components/DisplayAmount/DisplayAmount.mjs +68 -75
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +1 -39
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +26 -33
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +1 -61
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +38 -46
- package/reactjs/components/DisplayAmount/index.js +1 -4
- package/reactjs/components/DisplayAmount/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/utils/index.js +1 -4
- package/reactjs/components/DisplayAmount/utils/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/utils/truncateAmount.js +1 -21
- package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +9 -13
- package/reactjs/components/Error/Error.js +1 -66
- package/reactjs/components/Error/Error.mjs +29 -29
- package/reactjs/components/Error/index.js +1 -4
- package/reactjs/components/Error/index.mjs +2 -2
- package/reactjs/components/SmallLoader/SmallLoader.js +1 -21
- package/reactjs/components/SmallLoader/SmallLoader.mjs +13 -18
- package/reactjs/components/SmallLoader/index.js +1 -4
- package/reactjs/components/SmallLoader/index.mjs +2 -2
- package/reactjs/components/ToggleDirection/ToggleDirection.js +1 -30
- package/reactjs/components/ToggleDirection/ToggleDirection.mjs +22 -28
- package/reactjs/components/TokenSelector/TokenSelector.js +1 -172
- package/reactjs/components/TokenSelector/TokenSelector.mjs +98 -118
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +1 -94
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +48 -57
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +1 -51
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +45 -44
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +1 -18
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +9 -14
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +1 -6
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +2 -4
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +1 -39
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +22 -18
- package/reactjs/components/TokenSelector/components/SelectContainer.js +1 -40
- package/reactjs/components/TokenSelector/components/SelectContainer.mjs +36 -38
- package/reactjs/components/TokenSelector/components/SelectContent.js +1 -136
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +79 -103
- package/reactjs/components/TokenSelector/components/SelectedOption.js +1 -28
- package/reactjs/components/TokenSelector/components/SelectedOption.mjs +22 -24
- package/reactjs/components/TokenSelector/components/TokenIcon.js +1 -81
- package/reactjs/components/TokenSelector/components/TokenIcon.mjs +52 -57
- package/reactjs/components/TokenSelector/components/TokenItem.js +1 -80
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +41 -54
- package/reactjs/components/TokenSelector/components/TokenList.js +1 -23
- package/reactjs/components/TokenSelector/components/TokenList.mjs +19 -21
- package/reactjs/components/TokenSelector/components/TokenSymbol.js +1 -25
- package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +14 -15
- package/reactjs/components/TokenSelector/index.js +1 -4
- package/reactjs/components/TokenSelector/index.mjs +2 -2
- package/reactjs/components/TransactionToast/TransactionToast.js +1 -53
- package/reactjs/components/TransactionToast/TransactionToast.mjs +27 -28
- package/reactjs/components/TransactionToast/TransactionToastContainer.js +1 -20
- package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +16 -18
- package/reactjs/components/TransactionToast/index.js +1 -6
- package/reactjs/components/TransactionToast/index.mjs +4 -4
- package/reactjs/components/TrimAddress/TrimAddress.js +1 -27
- package/reactjs/components/TrimAddress/TrimAddress.mjs +19 -24
- package/reactjs/components/TrimAddress/index.js +1 -4
- package/reactjs/components/TrimAddress/index.mjs +2 -2
- package/reactjs/components/base/MxButton/MxButton.js +1 -71
- package/reactjs/components/base/MxButton/MxButton.mjs +46 -46
- package/reactjs/components/base/MxButton/index.js +1 -4
- package/reactjs/components/base/MxButton/index.mjs +2 -2
- package/reactjs/components/base/MxCard/MxCard.js +1 -54
- package/reactjs/components/base/MxCard/MxCard.mjs +34 -34
- package/reactjs/components/base/MxCard/index.js +1 -4
- package/reactjs/components/base/MxCard/index.mjs +2 -2
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +1 -28
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +24 -26
- package/reactjs/components/base/MxCircleLoader/index.js +1 -4
- package/reactjs/components/base/MxCircleLoader/index.mjs +2 -2
- package/reactjs/components/base/MxLink/MxLink.js +1 -70
- package/reactjs/components/base/MxLink/MxLink.mjs +44 -46
- package/reactjs/components/base/MxLink/index.js +1 -4
- package/reactjs/components/base/MxLink/index.mjs +2 -2
- package/reactjs/components/base/MxSearch/MxSearch.js +1 -69
- package/reactjs/components/base/MxSearch/MxSearch.mjs +37 -41
- package/reactjs/components/base/MxSearch/index.js +1 -4
- package/reactjs/components/base/MxSearch/index.mjs +2 -2
- package/reactjs/components/base/MxSlideover/MxSlideover.js +1 -78
- package/reactjs/components/base/MxSlideover/MxSlideover.mjs +72 -74
- package/reactjs/components/base/MxSlideover/index.js +1 -4
- package/reactjs/components/base/MxSlideover/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/MxTooltip.js +1 -163
- package/reactjs/components/base/MxTooltip/MxTooltip.mjs +92 -135
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +1 -33
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +29 -31
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +1 -4
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +1 -27
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +23 -25
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +1 -4
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/components/index.js +1 -6
- package/reactjs/components/base/MxTooltip/components/index.mjs +4 -4
- package/reactjs/components/base/MxTooltip/index.js +1 -4
- package/reactjs/components/base/MxTooltip/index.mjs +2 -2
- package/reactjs/components/base/index.js +1 -14
- package/reactjs/components/base/index.mjs +12 -12
- package/reactjs/components/index.js +1 -54
- package/reactjs/components/index.mjs +52 -52
- package/reactjs/constants/chains.js +1 -54
- package/reactjs/constants/chains.mjs +33 -52
- package/reactjs/constants/index.js +1 -13
- package/reactjs/constants/index.mjs +9 -10
- package/reactjs/context/Web3AppProvider.js +1 -40
- package/reactjs/context/Web3AppProvider.mjs +34 -34
- package/reactjs/context/queryClient.js +1 -11
- package/reactjs/context/queryClient.mjs +5 -8
- package/reactjs/context/useWeb3App.js +1 -12
- package/reactjs/context/useWeb3App.mjs +7 -8
- package/reactjs/helpers/index.js +1 -6
- package/reactjs/helpers/index.mjs +4 -4
- package/reactjs/helpers/resolveBridgeApiChainId.js +1 -40
- package/reactjs/helpers/resolveBridgeApiChainId.mjs +21 -34
- package/reactjs/hooks/index.js +1 -35
- package/reactjs/hooks/index.mjs +33 -33
- package/reactjs/hooks/tests/useGenericSignMessage.spec.d.ts +1 -0
- package/reactjs/hooks/tests/useGenericSignMessage.spec.js +2 -0
- package/reactjs/hooks/tests/useGenericSignMessage.spec.mjs +52 -0
- package/reactjs/hooks/tests/useSignTransaction.spec.d.ts +1 -0
- package/reactjs/hooks/tests/useSignTransaction.spec.js +2 -0
- package/reactjs/hooks/tests/useSignTransaction.spec.mjs +156 -0
- package/reactjs/hooks/useAccount.js +1 -13
- package/reactjs/hooks/useAccount.mjs +7 -8
- package/reactjs/hooks/useBalances.js +1 -53
- package/reactjs/hooks/useBalances.mjs +28 -40
- package/reactjs/hooks/useBridgeApiChainId.js +1 -13
- package/reactjs/hooks/useBridgeApiChainId.mjs +9 -9
- package/reactjs/hooks/useBridgeFormik.js +1 -162
- package/reactjs/hooks/useBridgeFormik.mjs +110 -150
- package/reactjs/hooks/useDebounce.js +1 -13
- package/reactjs/hooks/useDebounce.mjs +8 -10
- package/reactjs/hooks/useFetchBridgeData.js +1 -45
- package/reactjs/hooks/useFetchBridgeData.mjs +37 -38
- package/reactjs/hooks/useFetchTokens.js +1 -113
- package/reactjs/hooks/useFetchTokens.mjs +80 -106
- package/reactjs/hooks/useGenericSignMessage.js +1 -55
- package/reactjs/hooks/useGenericSignMessage.mjs +47 -47
- package/reactjs/hooks/useGetChainId.js +1 -11
- package/reactjs/hooks/useGetChainId.mjs +7 -8
- package/reactjs/hooks/useResolveTokenChain.js +1 -20
- package/reactjs/hooks/useResolveTokenChain.mjs +11 -14
- package/reactjs/hooks/useSendTransactions.js +1 -25
- package/reactjs/hooks/useSendTransactions.mjs +19 -23
- package/reactjs/hooks/useSignTransaction.js +1 -86
- package/reactjs/hooks/useSignTransaction.mjs +59 -59
- package/reactjs/hooks/useSuiConnect.js +1 -86
- package/reactjs/hooks/useSuiConnect.mjs +52 -70
- package/reactjs/hooks/validation/index.js +1 -10
- package/reactjs/hooks/validation/index.mjs +8 -8
- package/reactjs/hooks/validation/useAmountSchema.js +1 -32
- package/reactjs/hooks/validation/useAmountSchema.mjs +8 -11
- package/reactjs/hooks/validation/useSecondAmountSchema.js +1 -26
- package/reactjs/hooks/validation/useSecondAmountSchema.mjs +5 -6
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +1 -37
- package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +20 -29
- package/reactjs/hooks/validation/useTestIsConnected.js +1 -27
- package/reactjs/hooks/validation/useTestIsConnected.mjs +13 -19
- package/reactjs/index.js +1 -190
- package/reactjs/index.mjs +154 -154
- package/reactjs/init/index.js +1 -5
- package/reactjs/init/index.mjs +3 -3
- package/reactjs/init/init.d.ts +1 -0
- package/reactjs/init/init.js +1 -139
- package/reactjs/init/init.mjs +59 -72
- package/reactjs/queries/index.js +1 -17
- package/reactjs/queries/index.mjs +15 -15
- package/reactjs/queries/useCheckAccount.query.js +1 -39
- package/reactjs/queries/useCheckAccount.query.mjs +29 -33
- package/reactjs/queries/useGetAllTokens.query.js +1 -35
- package/reactjs/queries/useGetAllTokens.query.mjs +26 -30
- package/reactjs/queries/useGetChains.query.js +1 -34
- package/reactjs/queries/useGetChains.query.mjs +26 -28
- package/reactjs/queries/useGetHistory.query.d.ts +1 -1
- package/reactjs/queries/useGetHistory.query.js +1 -68
- package/reactjs/queries/useGetHistory.query.mjs +55 -58
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +1 -1
- package/reactjs/queries/useGetMvxTokensBalances.query.js +1 -71
- package/reactjs/queries/useGetMvxTokensBalances.query.mjs +40 -53
- package/reactjs/queries/useGetNonMvxTokensBalances.query.d.ts +1 -1
- package/reactjs/queries/useGetNonMvxTokensBalances.query.js +1 -81
- package/reactjs/queries/useGetNonMvxTokensBalances.query.mjs +51 -59
- package/reactjs/queries/useGetRate.mutation.js +1 -18
- package/reactjs/queries/useGetRate.mutation.mjs +12 -15
- package/reactjs/reexports.js +1 -48
- package/reactjs/reexports.mjs +13 -13
- package/reactjs/utils/delay.js +1 -6
- package/reactjs/utils/delay.mjs +3 -3
- package/reactjs/utils/formatAmount.js +1 -23
- package/reactjs/utils/formatAmount.mjs +16 -17
- package/reactjs/utils/getCleanStringAmount.js +1 -11
- package/reactjs/utils/getCleanStringAmount.mjs +6 -8
- package/reactjs/utils/getCompletePathname.js +1 -5
- package/reactjs/utils/getCompletePathname.mjs +3 -3
- package/reactjs/utils/getInitialTokens.js +1 -12
- package/reactjs/utils/getInitialTokens.mjs +6 -7
- package/reactjs/utils/hasEnoughFunds.js +1 -19
- package/reactjs/utils/hasEnoughFunds.mjs +11 -14
- package/reactjs/utils/index.js +1 -26
- package/reactjs/utils/index.mjs +24 -24
- package/reactjs/utils/isStringFloat.js +1 -21
- package/reactjs/utils/isStringFloat.mjs +11 -18
- package/reactjs/utils/mxClsx.js +1 -8
- package/reactjs/utils/mxClsx.mjs +4 -6
- package/reactjs/utils/pipe.js +1 -25
- package/reactjs/utils/pipe.mjs +13 -17
- package/reactjs/utils/removeCommas.js +1 -6
- package/reactjs/utils/removeCommas.mjs +2 -4
- package/reactjs/utils/roundAmount.js +1 -40
- package/reactjs/utils/roundAmount.mjs +16 -36
- package/reactjs/utils/testNumber.js +1 -4
- package/reactjs/utils/testNumber.mjs +2 -2
- package/store/inMemoryStore.js +1 -39
- package/store/inMemoryStore.mjs +17 -21
- package/style.css +1 -2274
- package/types/chainType.js +1 -11
- package/types/chainType.mjs +2 -9
- package/types/errors.d.ts +3 -0
- package/types/errors.js +2 -0
- package/types/errors.mjs +8 -0
- package/types/providerType.js +1 -9
- package/types/providerType.mjs +2 -7
- package/types/transaction.d.ts +2 -0
- package/all-networks-EJIVYZ_i.mjs +0 -4
- package/all-networks-NYACMyeN.js +0 -4
- package/default-BYtXv70Z.mjs +0 -4
- package/default-H3AbmzFV.js +0 -4
- package/reactjs/hooks/useSignTransaction.d.ts +0 -511
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { AdapterBlueprint, WalletConnectConnector, WcHelpersUtil } from "@reown/appkit-controllers";
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
constructor(opts) {
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var v = (d, o, t) => o in d ? y(d, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[o] = t;
|
|
3
|
+
var h = (d, o, t) => v(d, typeof o != "symbol" ? o + "" : o, t);
|
|
4
|
+
import { AdapterBlueprint as w, WalletConnectConnector as S, WcHelpersUtil as g } from "@reown/appkit-controllers";
|
|
5
|
+
const p = "walletConnect", f = ["sui:mainnet", "sui:testnet", "sui:devnet"];
|
|
6
|
+
class P extends w {
|
|
7
|
+
constructor(t) {
|
|
9
8
|
super({
|
|
10
9
|
namespace: "sui",
|
|
11
10
|
adapterType: "sui"
|
|
@@ -15,117 +14,102 @@ class SuiAdapter extends AdapterBlueprint {
|
|
|
15
14
|
* @see @reown/appkit-adapter-solana — adapters must NOT call UniversalProvider.init() again
|
|
16
15
|
* (duplicate Core breaks pairing / QR). `listenWalletConnect` attaches `display_uri` here only.
|
|
17
16
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
h(this, "sharedWcProvider");
|
|
18
|
+
h(this, "explicitCaipChainsFromInit");
|
|
19
|
+
h(this, "expectedSuiAddress");
|
|
20
20
|
/**
|
|
21
21
|
* AppKit passes `networks` here from `createAppKit({ networks })` filtered by namespace.
|
|
22
22
|
* `ChainController.getRequestedCaipNetworks('sui')` is often still empty → we must keep this.
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
this.explicitCaipChainsFromInit = (
|
|
24
|
+
h(this, "suiNetworksFromConfig", []);
|
|
25
|
+
this.explicitCaipChainsFromInit = (t == null ? void 0 : t.explicitCaipChains) ?? [], this.expectedSuiAddress = t == null ? void 0 : t.expectedSuiAddress;
|
|
26
26
|
}
|
|
27
|
-
construct(
|
|
28
|
-
super.construct(
|
|
29
|
-
this.suiNetworksFromConfig = params.networks ?? [];
|
|
27
|
+
construct(t) {
|
|
28
|
+
super.construct(t), this.suiNetworksFromConfig = t.networks ?? [];
|
|
30
29
|
}
|
|
31
30
|
/**
|
|
32
31
|
* Resolves CAIP-2 chain ids for the WC session. Never return [] (breaks pairing + QR UI).
|
|
33
32
|
*/
|
|
34
|
-
pickChainsFromExplicit(
|
|
35
|
-
if (
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const match = explicit.find(
|
|
41
|
-
(c) => c === `sui:${cid}` || c.endsWith(`:${cid}`)
|
|
33
|
+
pickChainsFromExplicit(t, e) {
|
|
34
|
+
if (t.length === 0)
|
|
35
|
+
return f;
|
|
36
|
+
if (e != null) {
|
|
37
|
+
const n = e.toString(), i = t.find(
|
|
38
|
+
(s) => s === `sui:${n}` || s.endsWith(`:${n}`)
|
|
42
39
|
);
|
|
43
|
-
if (
|
|
44
|
-
return [
|
|
45
|
-
}
|
|
40
|
+
if (i)
|
|
41
|
+
return [i];
|
|
46
42
|
}
|
|
47
|
-
return
|
|
43
|
+
return t;
|
|
48
44
|
}
|
|
49
|
-
resolveSuiChainsForConnect(
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
if (source.length === 0) {
|
|
45
|
+
resolveSuiChainsForConnect(t) {
|
|
46
|
+
const e = this.getCaipNetworks("sui"), n = e.length > 0 ? e : this.suiNetworksFromConfig;
|
|
47
|
+
if (n.length === 0)
|
|
53
48
|
return this.pickChainsFromExplicit(
|
|
54
49
|
this.explicitCaipChainsFromInit,
|
|
55
|
-
|
|
50
|
+
t
|
|
56
51
|
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return ((_a = n.id) == null ? void 0 : _a.toString()) === chainId.toString();
|
|
52
|
+
const i = (s) => s.caipNetworkId || `sui:${s.id}`;
|
|
53
|
+
if (t != null) {
|
|
54
|
+
const s = n.find((r) => {
|
|
55
|
+
var c;
|
|
56
|
+
return ((c = r.id) == null ? void 0 : c.toString()) === t.toString();
|
|
63
57
|
});
|
|
64
|
-
if (
|
|
65
|
-
return [
|
|
66
|
-
}
|
|
58
|
+
if (s)
|
|
59
|
+
return [i(s)];
|
|
67
60
|
}
|
|
68
|
-
return
|
|
61
|
+
return n.map(i);
|
|
69
62
|
}
|
|
70
63
|
/**
|
|
71
64
|
* `WalletConnectConnector` typings require `caipNetworks` (ChainController may still be empty
|
|
72
65
|
* when this runs). Prefer networks from `construct`, else explicit/init CAIP ids.
|
|
73
66
|
*/
|
|
74
67
|
getCaipNetworksForWalletConnectConnector() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
const caipIds = this.explicitCaipChainsFromInit.length > 0 ? this.explicitCaipChainsFromInit : DEFAULT_SUI_CAIP_CHAINS;
|
|
79
|
-
return caipIds.map((caip) => {
|
|
80
|
-
const id = caip.startsWith("sui:") ? caip.slice(4) : caip;
|
|
68
|
+
return this.suiNetworksFromConfig.length > 0 ? this.suiNetworksFromConfig : (this.explicitCaipChainsFromInit.length > 0 ? this.explicitCaipChainsFromInit : f).map((e) => {
|
|
69
|
+
const n = e.startsWith("sui:") ? e.slice(4) : e;
|
|
81
70
|
return {
|
|
82
|
-
id,
|
|
71
|
+
id: n,
|
|
83
72
|
chainNamespace: "sui",
|
|
84
|
-
caipNetworkId:
|
|
73
|
+
caipNetworkId: e,
|
|
85
74
|
name: "Sui",
|
|
86
75
|
nativeCurrency: { name: "SUI", symbol: "SUI", decimals: 9 },
|
|
87
76
|
rpcUrls: {
|
|
88
|
-
default: { http: [`https://fullnode.${
|
|
77
|
+
default: { http: [`https://fullnode.${n}.sui.io:443`] }
|
|
89
78
|
}
|
|
90
79
|
};
|
|
91
80
|
});
|
|
92
81
|
}
|
|
93
82
|
syncConnectors() {
|
|
94
83
|
}
|
|
95
|
-
async setUniversalProvider(
|
|
96
|
-
this.sharedWcProvider =
|
|
97
|
-
const
|
|
98
|
-
provider:
|
|
84
|
+
async setUniversalProvider(t) {
|
|
85
|
+
this.sharedWcProvider = t;
|
|
86
|
+
const e = new S({
|
|
87
|
+
provider: t,
|
|
99
88
|
namespace: "sui",
|
|
100
89
|
caipNetworks: this.getCaipNetworksForWalletConnectConnector()
|
|
101
90
|
});
|
|
102
|
-
this.addConnector(
|
|
103
|
-
|
|
104
|
-
universalProvider: sharedProvider,
|
|
91
|
+
this.addConnector(e), g.listenWcProvider({
|
|
92
|
+
universalProvider: t,
|
|
105
93
|
namespace: "sui",
|
|
106
|
-
onConnect: (
|
|
107
|
-
onDisconnect: () => this.onDisconnect(
|
|
108
|
-
onAccountsChanged: (
|
|
94
|
+
onConnect: (n) => this.onConnect(n, p),
|
|
95
|
+
onDisconnect: () => this.onDisconnect(p),
|
|
96
|
+
onAccountsChanged: (n) => this.onAccountsChanged(n, p, !1)
|
|
109
97
|
});
|
|
110
98
|
}
|
|
111
99
|
getWcProvider() {
|
|
112
|
-
if (!this.sharedWcProvider)
|
|
100
|
+
if (!this.sharedWcProvider)
|
|
113
101
|
throw new Error(
|
|
114
102
|
"SuiAdapter: UniversalProvider not ready — setUniversalProvider must run before connect"
|
|
115
103
|
);
|
|
116
|
-
}
|
|
117
104
|
return this.sharedWcProvider;
|
|
118
105
|
}
|
|
119
|
-
async connectWalletConnect(
|
|
120
|
-
var
|
|
121
|
-
const
|
|
122
|
-
if ((
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const chains = this.resolveSuiChainsForConnect(chainId);
|
|
127
|
-
const safeChains = chains.length > 0 ? chains : DEFAULT_SUI_CAIP_CHAINS;
|
|
128
|
-
await wc.connect({
|
|
106
|
+
async connectWalletConnect(t) {
|
|
107
|
+
var r, c;
|
|
108
|
+
const e = this.getWcProvider();
|
|
109
|
+
if ((c = (r = e.session) == null ? void 0 : r.namespaces) != null && c.sui)
|
|
110
|
+
return { clientId: await e.client.core.crypto.getClientId() };
|
|
111
|
+
const n = this.resolveSuiChainsForConnect(t), i = n.length > 0 ? n : f;
|
|
112
|
+
return await e.connect({
|
|
129
113
|
optionalNamespaces: {
|
|
130
114
|
sui: {
|
|
131
115
|
methods: [
|
|
@@ -133,191 +117,179 @@ class SuiAdapter extends AdapterBlueprint {
|
|
|
133
117
|
"sui_signTransaction",
|
|
134
118
|
"sui_signAndExecuteTransaction"
|
|
135
119
|
],
|
|
136
|
-
chains:
|
|
120
|
+
chains: i,
|
|
137
121
|
events: []
|
|
138
122
|
}
|
|
139
123
|
}
|
|
140
|
-
});
|
|
141
|
-
const clientId = await wc.client.core.crypto.getClientId();
|
|
142
|
-
return { clientId };
|
|
124
|
+
}), { clientId: await e.client.core.crypto.getClientId() };
|
|
143
125
|
}
|
|
144
|
-
async connect(
|
|
145
|
-
var
|
|
146
|
-
const
|
|
147
|
-
if (!
|
|
126
|
+
async connect(t) {
|
|
127
|
+
var l, m, C;
|
|
128
|
+
const e = this.connectors.find((u) => u.id === t.id);
|
|
129
|
+
if (!e)
|
|
148
130
|
throw new Error("Sui connector not found");
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
connectorId: connector.id,
|
|
131
|
+
const n = this.getConnection({
|
|
132
|
+
address: t.address,
|
|
133
|
+
connectorId: e.id,
|
|
153
134
|
connections: this.connections,
|
|
154
135
|
connectors: this.connectors
|
|
155
136
|
});
|
|
156
|
-
if (
|
|
157
|
-
const
|
|
158
|
-
this.emit("accountChanged", {
|
|
159
|
-
address:
|
|
160
|
-
chainId:
|
|
161
|
-
connector
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
type: connector.type
|
|
137
|
+
if (n != null && n.account) {
|
|
138
|
+
const u = ((l = n.caipNetwork) == null ? void 0 : l.id) ?? t.chainId ?? "mainnet";
|
|
139
|
+
return this.emit("accountChanged", {
|
|
140
|
+
address: n.account.address,
|
|
141
|
+
chainId: u,
|
|
142
|
+
connector: e
|
|
143
|
+
}), {
|
|
144
|
+
id: e.id,
|
|
145
|
+
address: n.account.address,
|
|
146
|
+
chainId: u,
|
|
147
|
+
provider: e.provider,
|
|
148
|
+
type: e.type
|
|
169
149
|
};
|
|
170
150
|
}
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
wc,
|
|
151
|
+
const i = this.getWcProvider(), r = (m = g.getWalletConnectAccounts(
|
|
152
|
+
i,
|
|
174
153
|
"sui"
|
|
175
|
-
);
|
|
176
|
-
|
|
177
|
-
if (!address) {
|
|
154
|
+
)[0]) == null ? void 0 : m.address;
|
|
155
|
+
if (!r)
|
|
178
156
|
throw new Error("No Sui account found after WalletConnect session");
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
157
|
+
if (this.expectedSuiAddress && r !== this.expectedSuiAddress)
|
|
158
|
+
throw new Error(
|
|
159
|
+
`Sui account mismatch: expected ${this.expectedSuiAddress}, got ${r}`
|
|
160
|
+
);
|
|
161
|
+
const c = (C = this.getCaipNetworks()) == null ? void 0 : C.find(
|
|
162
|
+
(u) => u.id === t.chainId
|
|
182
163
|
);
|
|
183
164
|
this.addConnection({
|
|
184
|
-
connectorId:
|
|
185
|
-
accounts: [{ address }],
|
|
186
|
-
caipNetwork
|
|
165
|
+
connectorId: e.id,
|
|
166
|
+
accounts: [{ address: r }],
|
|
167
|
+
caipNetwork: c
|
|
187
168
|
});
|
|
188
|
-
const
|
|
189
|
-
this.emit("accountChanged", {
|
|
190
|
-
address,
|
|
191
|
-
chainId,
|
|
192
|
-
connector
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
type: connector.type
|
|
169
|
+
const a = t.chainId ?? (c == null ? void 0 : c.id) ?? "mainnet";
|
|
170
|
+
return this.emit("accountChanged", {
|
|
171
|
+
address: r,
|
|
172
|
+
chainId: a,
|
|
173
|
+
connector: e
|
|
174
|
+
}), {
|
|
175
|
+
id: e.id,
|
|
176
|
+
address: r,
|
|
177
|
+
chainId: a,
|
|
178
|
+
provider: e.provider,
|
|
179
|
+
type: e.type
|
|
200
180
|
};
|
|
201
181
|
}
|
|
202
|
-
async disconnect(
|
|
203
|
-
if (
|
|
204
|
-
if (this.sharedWcProvider)
|
|
182
|
+
async disconnect(t) {
|
|
183
|
+
if (t != null && t.id) {
|
|
184
|
+
if (this.sharedWcProvider)
|
|
205
185
|
try {
|
|
206
186
|
await this.sharedWcProvider.disconnect();
|
|
207
187
|
} catch {
|
|
208
188
|
}
|
|
209
|
-
|
|
210
|
-
this.deleteConnection(params.id);
|
|
189
|
+
this.deleteConnection(t.id);
|
|
211
190
|
}
|
|
212
|
-
|
|
213
|
-
this.emit("disconnect");
|
|
214
|
-
} else {
|
|
215
|
-
this.emitFirstAvailableConnection();
|
|
216
|
-
}
|
|
217
|
-
return { connections: this.connections };
|
|
191
|
+
return this.connections.length === 0 ? this.emit("disconnect") : this.emitFirstAvailableConnection(), { connections: this.connections };
|
|
218
192
|
}
|
|
219
|
-
async getAccounts(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
"sui"
|
|
226
|
-
);
|
|
227
|
-
return {
|
|
228
|
-
accounts: accounts.map((a) => ({
|
|
193
|
+
async getAccounts(t) {
|
|
194
|
+
return this.sharedWcProvider ? {
|
|
195
|
+
accounts: g.getWalletConnectAccounts(
|
|
196
|
+
this.sharedWcProvider,
|
|
197
|
+
"sui"
|
|
198
|
+
).map((n) => ({
|
|
229
199
|
namespace: "sui",
|
|
230
|
-
address:
|
|
200
|
+
address: n.address,
|
|
231
201
|
type: "eoa"
|
|
232
202
|
}))
|
|
233
|
-
};
|
|
203
|
+
} : { accounts: [] };
|
|
234
204
|
}
|
|
235
|
-
async getBalance(
|
|
236
|
-
var
|
|
237
|
-
if (!
|
|
205
|
+
async getBalance(t) {
|
|
206
|
+
var e, n, i;
|
|
207
|
+
if (!t.address)
|
|
238
208
|
return { balance: "0", symbol: "SUI" };
|
|
239
|
-
}
|
|
240
209
|
try {
|
|
241
|
-
const
|
|
242
|
-
(
|
|
243
|
-
)
|
|
244
|
-
|
|
245
|
-
if (!rpcUrl) {
|
|
210
|
+
const s = (e = this.getCaipNetworks()) == null ? void 0 : e.find(
|
|
211
|
+
(C) => C.id === t.chainId
|
|
212
|
+
), r = `https://fullnode.${s == null ? void 0 : s.id}.sui.io:443`;
|
|
213
|
+
if (!r)
|
|
246
214
|
return { balance: "0", symbol: "SUI" };
|
|
247
|
-
|
|
248
|
-
const res = await fetch(rpcUrl, {
|
|
215
|
+
const a = await (await fetch(r, {
|
|
249
216
|
method: "POST",
|
|
250
217
|
headers: { "Content-Type": "application/json" },
|
|
251
218
|
body: JSON.stringify({
|
|
252
219
|
jsonrpc: "2.0",
|
|
253
220
|
id: 1,
|
|
254
221
|
method: "suix_getBalance",
|
|
255
|
-
params: [
|
|
222
|
+
params: [t.address, "0x2::sui::SUI"]
|
|
256
223
|
})
|
|
257
|
-
});
|
|
258
|
-
const data = await res.json();
|
|
259
|
-
const totalBalance = ((_b = data == null ? void 0 : data.result) == null ? void 0 : _b.totalBalance) ?? "0";
|
|
260
|
-
const formatted = (parseInt(totalBalance, 10) / 1e9).toString();
|
|
224
|
+
})).json(), l = ((n = a == null ? void 0 : a.result) == null ? void 0 : n.totalBalance) ?? "0";
|
|
261
225
|
return {
|
|
262
|
-
balance:
|
|
263
|
-
symbol: ((
|
|
226
|
+
balance: (parseInt(l, 10) / 1e9).toString(),
|
|
227
|
+
symbol: ((i = s == null ? void 0 : s.nativeCurrency) == null ? void 0 : i.symbol) || "SUI"
|
|
264
228
|
};
|
|
265
229
|
} catch {
|
|
266
230
|
return { balance: "0", symbol: "SUI" };
|
|
267
231
|
}
|
|
268
232
|
}
|
|
269
|
-
async switchNetwork(
|
|
270
|
-
await super.switchNetwork(
|
|
233
|
+
async switchNetwork(t) {
|
|
234
|
+
await super.switchNetwork(t);
|
|
271
235
|
}
|
|
272
|
-
async syncConnection(
|
|
273
|
-
return this.connect({ ...
|
|
236
|
+
async syncConnection(t) {
|
|
237
|
+
return this.connect({ ...t, type: "" });
|
|
274
238
|
}
|
|
275
239
|
async syncConnections({
|
|
276
|
-
connectToFirstConnector,
|
|
277
|
-
caipNetwork
|
|
240
|
+
connectToFirstConnector: t,
|
|
241
|
+
caipNetwork: e
|
|
278
242
|
}) {
|
|
279
|
-
if (!this.sharedWcProvider)
|
|
243
|
+
if (!this.sharedWcProvider)
|
|
280
244
|
return;
|
|
281
|
-
|
|
282
|
-
const accounts = WcHelpersUtil.getWalletConnectAccounts(
|
|
245
|
+
const n = g.getWalletConnectAccounts(
|
|
283
246
|
this.sharedWcProvider,
|
|
284
247
|
"sui"
|
|
285
248
|
);
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
if (connectToFirstConnector) {
|
|
294
|
-
this.emitFirstAvailableConnection();
|
|
295
|
-
}
|
|
249
|
+
n.length > 0 && this.addConnection({
|
|
250
|
+
connectorId: p,
|
|
251
|
+
accounts: n.map((i) => ({ address: i.address })),
|
|
252
|
+
caipNetwork: e
|
|
253
|
+
}), t && this.emitFirstAvailableConnection();
|
|
296
254
|
}
|
|
297
|
-
getWalletConnectProvider(
|
|
298
|
-
return
|
|
255
|
+
getWalletConnectProvider(t) {
|
|
256
|
+
return t.provider;
|
|
299
257
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
258
|
+
/**
|
|
259
|
+
* Resolves the CAIP-2 chain scope string for WalletConnect requests.
|
|
260
|
+
* Resolution order:
|
|
261
|
+
* 1. `caipNetworkId` argument (if it starts with `'sui:'`)
|
|
262
|
+
* 2. First `'sui:'`-prefixed entry in `explicitCaipChainsFromInit`
|
|
263
|
+
* 3. `'sui:mainnet'` as a safe last resort
|
|
264
|
+
*/
|
|
265
|
+
getChainScope(t) {
|
|
266
|
+
if (t != null && t.startsWith("sui:"))
|
|
267
|
+
return t;
|
|
268
|
+
const e = this.explicitCaipChainsFromInit.find(
|
|
269
|
+
(n) => n.startsWith("sui:")
|
|
270
|
+
);
|
|
271
|
+
return e || "sui:mainnet";
|
|
272
|
+
}
|
|
273
|
+
async signMessage(t) {
|
|
274
|
+
const e = this.getWcProvider(), n = this.getChainScope();
|
|
275
|
+
return { signature: (await e.request(
|
|
303
276
|
{
|
|
304
277
|
method: "sui_signPersonalMessage",
|
|
305
|
-
params: { message:
|
|
278
|
+
params: { message: t.message, address: t.address }
|
|
306
279
|
},
|
|
307
|
-
|
|
308
|
-
);
|
|
309
|
-
return { signature: result.signature };
|
|
280
|
+
n
|
|
281
|
+
)).signature };
|
|
310
282
|
}
|
|
311
|
-
async sendTransaction(
|
|
312
|
-
|
|
313
|
-
const
|
|
283
|
+
async sendTransaction(t) {
|
|
284
|
+
var s;
|
|
285
|
+
const e = this.getWcProvider(), n = this.getChainScope((s = t.caipNetwork) == null ? void 0 : s.caipNetworkId);
|
|
286
|
+
return { hash: (await e.request(
|
|
314
287
|
{
|
|
315
288
|
method: "sui_signAndExecuteTransaction",
|
|
316
|
-
params: { transaction:
|
|
289
|
+
params: { transaction: t.data, address: t.to }
|
|
317
290
|
},
|
|
318
|
-
|
|
319
|
-
);
|
|
320
|
-
return { hash: result.digest };
|
|
291
|
+
n
|
|
292
|
+
)).digest };
|
|
321
293
|
}
|
|
322
294
|
async estimateGas() {
|
|
323
295
|
return { gas: 0n };
|
|
@@ -345,5 +317,5 @@ class SuiAdapter extends AdapterBlueprint {
|
|
|
345
317
|
}
|
|
346
318
|
}
|
|
347
319
|
export {
|
|
348
|
-
SuiAdapter
|
|
320
|
+
P as SuiAdapter
|
|
349
321
|
};
|
|
@@ -1,32 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
-
const reactjs_utils_mxClsx = require("../../utils/mxClsx.js");
|
|
6
|
-
const reactjs_components_TrimAddress_TrimAddress = require("../TrimAddress/TrimAddress.js");
|
|
7
|
-
const AccountAddress = ({
|
|
8
|
-
address,
|
|
9
|
-
username,
|
|
10
|
-
showTag = true,
|
|
11
|
-
className = ""
|
|
12
|
-
}) => {
|
|
13
|
-
const heroTag = username ? `@${username.replace(".elrond", "")}` : void 0;
|
|
14
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
-
"div",
|
|
16
|
-
{
|
|
17
|
-
className: reactjs_utils_mxClsx.mxClsx(
|
|
18
|
-
"liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]",
|
|
19
|
-
className
|
|
20
|
-
),
|
|
21
|
-
children: heroTag && showTag ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
-
"div",
|
|
23
|
-
{
|
|
24
|
-
className: "liq-truncate liq-text-left liq-text-neutral-100 uppercase",
|
|
25
|
-
"data-testid": "mx-address",
|
|
26
|
-
children: heroTag
|
|
27
|
-
}
|
|
28
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(reactjs_components_TrimAddress_TrimAddress.TrimAddress, { address, "data-testid": "mx-address" })
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
exports.AccountAddress = AccountAddress;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../utils/mxClsx.js"),n=require("../TrimAddress/TrimAddress.js"),c=({address:t,username:s,showTag:i=!0,className:d=""})=>{const r=s?`@${s.replace(".elrond","")}`:void 0;return e.jsx("div",{className:l.mxClsx("liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]",d),children:r&&i?e.jsx("div",{className:"liq-truncate liq-text-left liq-text-neutral-100 uppercase","data-testid":"mx-address",children:r}):e.jsx(n.TrimAddress,{address:t,"data-testid":"mx-address"})})};exports.AccountAddress=c;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { mxClsx } from "../../utils/mxClsx.mjs";
|
|
3
|
-
import { TrimAddress } from "../TrimAddress/TrimAddress.mjs";
|
|
4
|
-
const
|
|
5
|
-
address,
|
|
6
|
-
username,
|
|
7
|
-
showTag =
|
|
8
|
-
className = ""
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { mxClsx as s } from "../../utils/mxClsx.mjs";
|
|
3
|
+
import { TrimAddress as o } from "../TrimAddress/TrimAddress.mjs";
|
|
4
|
+
const c = ({
|
|
5
|
+
address: t,
|
|
6
|
+
username: r,
|
|
7
|
+
showTag: l = !0,
|
|
8
|
+
className: d = ""
|
|
9
9
|
}) => {
|
|
10
|
-
const
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
const i = r ? `@${r.replace(".elrond", "")}` : void 0;
|
|
11
|
+
return /* @__PURE__ */ e(
|
|
12
12
|
"div",
|
|
13
13
|
{
|
|
14
|
-
className:
|
|
14
|
+
className: s(
|
|
15
15
|
"liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]",
|
|
16
|
-
|
|
16
|
+
d
|
|
17
17
|
),
|
|
18
|
-
children:
|
|
18
|
+
children: i && l ? /* @__PURE__ */ e(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
21
21
|
className: "liq-truncate liq-text-left liq-text-neutral-100 uppercase",
|
|
22
22
|
"data-testid": "mx-address",
|
|
23
|
-
children:
|
|
23
|
+
children: i
|
|
24
24
|
}
|
|
25
|
-
) : /* @__PURE__ */
|
|
25
|
+
) : /* @__PURE__ */ e(o, { address: t, "data-testid": "mx-address" })
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
AccountAddress
|
|
30
|
+
c as AccountAddress
|
|
31
31
|
};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const reactjs_components_AccountAddress_AccountAddress = require("./AccountAddress.js");
|
|
5
|
-
exports.AccountAddress = reactjs_components_AccountAddress_AccountAddress.AccountAddress;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./AccountAddress.js");exports.AccountAddress=e.AccountAddress;
|
|
@@ -1,34 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
-
const reactjs_utils_mxClsx = require("../../utils/mxClsx.js");
|
|
6
|
-
const reactjs_components_base_MxCard_MxCard = require("../base/MxCard/MxCard.js");
|
|
7
|
-
require("../base/MxLink/MxLink.js");
|
|
8
|
-
require("../base/MxSearch/MxSearch.js");
|
|
9
|
-
require("@fortawesome/free-solid-svg-icons/faClose");
|
|
10
|
-
require("@fortawesome/react-fontawesome");
|
|
11
|
-
require("@headlessui/react");
|
|
12
|
-
require("react");
|
|
13
|
-
require("react-dom");
|
|
14
|
-
require("react-popper");
|
|
15
|
-
require("../base/MxTooltip/components/TooltipContainer/TooltipContainer.js");
|
|
16
|
-
require("../../constants/index.js");
|
|
17
|
-
const AmountCard = ({
|
|
18
|
-
className,
|
|
19
|
-
children
|
|
20
|
-
}) => {
|
|
21
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
-
reactjs_components_base_MxCard_MxCard.MxCard,
|
|
23
|
-
{
|
|
24
|
-
cardSize: "lg",
|
|
25
|
-
variant: "neutral-750",
|
|
26
|
-
className: reactjs_utils_mxClsx.mxClsx(
|
|
27
|
-
"liq-flex liq-flex-col liq-gap-4 liq-outline liq-outline-transparent",
|
|
28
|
-
className
|
|
29
|
-
),
|
|
30
|
-
children
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
exports.AmountCard = AmountCard;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),u=require("../../utils/mxClsx.js"),t=require("../base/MxCard/MxCard.js");require("../base/MxLink/MxLink.js");require("../base/MxSearch/MxSearch.js");require("@fortawesome/free-solid-svg-icons/faClose");require("@fortawesome/react-fontawesome");require("@headlessui/react");require("react");require("react-dom");require("react-popper");require("../base/MxTooltip/components/TooltipContainer/TooltipContainer.js");require("../../constants/index.js");const n=({className:e,children:r})=>i.jsx(t.MxCard,{cardSize:"lg",variant:"neutral-750",className:u.mxClsx("liq-flex liq-flex-col liq-gap-4 liq-outline liq-outline-transparent",e),children:r});exports.AmountCard=n;
|