@web3auth/no-modal 10.3.1 → 10.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.cjs/base/analytics.js +2 -0
- package/dist/lib.cjs/base/utils.js +1 -1
- package/dist/lib.cjs/connectors/auth-connector/authConnector.js +10 -2
- package/dist/lib.cjs/connectors/coinbase-connector/coinbaseConnector.js +10 -3
- package/dist/lib.cjs/connectors/injected-evm-connector/injectedEvmConnector.js +10 -3
- package/dist/lib.cjs/connectors/injected-solana-connector/walletStandardConnector.js +10 -3
- package/dist/lib.cjs/connectors/metamask-connector/metamaskConnector.js +11 -5
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/walletConnectV2Connector.js +22 -9
- package/dist/lib.cjs/noModal.js +8 -1
- package/dist/lib.cjs/plugins/wallet-services-plugin/plugin.js +37 -13
- package/dist/lib.cjs/react/hooks/useFunding.js +47 -0
- package/dist/lib.cjs/react/hooks/useReceive.js +47 -0
- package/dist/lib.cjs/react/index.js +4 -0
- package/dist/lib.cjs/types/base/analytics.d.ts +2 -0
- package/dist/lib.cjs/types/base/connector/interfaces.d.ts +2 -0
- package/dist/lib.cjs/types/connectors/auth-connector/authConnector.d.ts +2 -4
- package/dist/lib.cjs/types/connectors/injected-evm-connector/injectedEvmConnector.d.ts +2 -4
- package/dist/lib.cjs/types/connectors/injected-solana-connector/walletStandardConnector.d.ts +2 -4
- package/dist/lib.cjs/types/plugins/wallet-services-plugin/plugin.d.ts +2 -0
- package/dist/lib.cjs/types/react/hooks/index.d.ts +2 -0
- package/dist/lib.cjs/types/react/hooks/useFunding.d.ts +8 -0
- package/dist/lib.cjs/types/react/hooks/useReceive.d.ts +8 -0
- package/dist/lib.cjs/types/vue/composables/index.d.ts +2 -0
- package/dist/lib.cjs/types/vue/composables/useFunding.d.ts +9 -0
- package/dist/lib.cjs/types/vue/composables/useReceive.d.ts +9 -0
- package/dist/lib.cjs/vue/composables/useFunding.js +47 -0
- package/dist/lib.cjs/vue/composables/useReceive.js +47 -0
- package/dist/lib.cjs/vue/index.js +4 -0
- package/dist/lib.esm/base/analytics.js +2 -0
- package/dist/lib.esm/base/utils.js +1 -1
- package/dist/lib.esm/connectors/auth-connector/authConnector.js +10 -2
- package/dist/lib.esm/connectors/coinbase-connector/coinbaseConnector.js +10 -3
- package/dist/lib.esm/connectors/injected-evm-connector/injectedEvmConnector.js +10 -3
- package/dist/lib.esm/connectors/injected-solana-connector/walletStandardConnector.js +10 -3
- package/dist/lib.esm/connectors/metamask-connector/metamaskConnector.js +11 -5
- package/dist/lib.esm/connectors/wallet-connect-v2-connector/walletConnectV2Connector.js +22 -9
- package/dist/lib.esm/noModal.js +9 -1
- package/dist/lib.esm/plugins/wallet-services-plugin/plugin.js +39 -13
- package/dist/lib.esm/react/hooks/useFunding.js +32 -0
- package/dist/lib.esm/react/hooks/useReceive.js +32 -0
- package/dist/lib.esm/react/index.js +2 -0
- package/dist/lib.esm/vue/composables/useFunding.js +32 -0
- package/dist/lib.esm/vue/composables/useReceive.js +32 -0
- package/dist/lib.esm/vue/index.js +2 -0
- package/dist/noModal.umd.min.js +1 -1
- package/package.json +5 -5
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { Web3AuthProvider } from './Web3AuthProvider.js';
|
|
2
2
|
export { useCheckout } from './hooks/useCheckout.js';
|
|
3
3
|
export { useEnableMFA } from './hooks/useEnableMFA.js';
|
|
4
|
+
export { useFunding } from './hooks/useFunding.js';
|
|
4
5
|
export { useIdentityToken } from './hooks/useIdentityToken.js';
|
|
5
6
|
export { useManageMFA } from './hooks/useManageMFA.js';
|
|
7
|
+
export { useReceive } from './hooks/useReceive.js';
|
|
6
8
|
export { useSwap } from './hooks/useSwap.js';
|
|
7
9
|
export { useSwitchChain } from './hooks/useSwitchChain.js';
|
|
8
10
|
export { useWalletConnectScanner } from './hooks/useWalletConnectScanner.js';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
|
|
3
|
+
import { WalletServicesPluginError } from '../../base/plugin/errors.js';
|
|
4
|
+
|
|
5
|
+
const useFunding = () => {
|
|
6
|
+
const {
|
|
7
|
+
plugin,
|
|
8
|
+
ready
|
|
9
|
+
} = useWalletServicesPlugin();
|
|
10
|
+
const loading = ref(false);
|
|
11
|
+
const error = ref(null);
|
|
12
|
+
const showFunding = async showFundingParams => {
|
|
13
|
+
loading.value = true;
|
|
14
|
+
error.value = null;
|
|
15
|
+
try {
|
|
16
|
+
if (!plugin) throw WalletServicesPluginError.notInitialized();
|
|
17
|
+
if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
|
|
18
|
+
await plugin.value.showFunding(showFundingParams);
|
|
19
|
+
} catch (err) {
|
|
20
|
+
error.value = err;
|
|
21
|
+
} finally {
|
|
22
|
+
loading.value = false;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
loading,
|
|
27
|
+
error,
|
|
28
|
+
showFunding
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { useFunding };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
import { useWalletServicesPlugin } from './useWalletServicesPlugin.js';
|
|
3
|
+
import { WalletServicesPluginError } from '../../base/plugin/errors.js';
|
|
4
|
+
|
|
5
|
+
const useReceive = () => {
|
|
6
|
+
const {
|
|
7
|
+
plugin,
|
|
8
|
+
ready
|
|
9
|
+
} = useWalletServicesPlugin();
|
|
10
|
+
const loading = ref(false);
|
|
11
|
+
const error = ref(null);
|
|
12
|
+
const showReceive = async showReceiveParams => {
|
|
13
|
+
loading.value = true;
|
|
14
|
+
error.value = null;
|
|
15
|
+
try {
|
|
16
|
+
if (!plugin) throw WalletServicesPluginError.notInitialized();
|
|
17
|
+
if (!ready) throw WalletServicesPluginError.walletPluginNotConnected();
|
|
18
|
+
await plugin.value.showReceive(showReceiveParams);
|
|
19
|
+
} catch (err) {
|
|
20
|
+
error.value = err;
|
|
21
|
+
} finally {
|
|
22
|
+
loading.value = false;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
loading,
|
|
27
|
+
error,
|
|
28
|
+
showReceive
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { useReceive };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { Web3AuthProvider } from './Web3AuthProvider.js';
|
|
2
2
|
export { useCheckout } from './composables/useCheckout.js';
|
|
3
3
|
export { useEnableMFA } from './composables/useEnableMFA.js';
|
|
4
|
+
export { useFunding } from './composables/useFunding.js';
|
|
4
5
|
export { useIdentityToken } from './composables/useIdentityToken.js';
|
|
5
6
|
export { useManageMFA } from './composables/useManageMFA.js';
|
|
7
|
+
export { useReceive } from './composables/useReceive.js';
|
|
6
8
|
export { useSwap } from './composables/useSwap.js';
|
|
7
9
|
export { useSwitchChain } from './composables/useSwitchChain.js';
|
|
8
10
|
export { useWalletConnectScanner } from './composables/useWalletConnectScanner.js';
|