For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

useReceive

Composable to show the receive screen using the Wallet Services plugin in Vue.

info

This composable doesn't work for external wallet logins. It only works for social login embedded wallets.

Import​

import { useReceive } from '@web3auth/modal/vue'

Usage​

<script setup lang="ts">
import { useReceive } from '@web3auth/modal/vue'

const { showReceive, loading, error } = useReceive()
</script>

<template>
<button @click="showReceive()" :disabled="loading">
{{ loading ? 'Opening...' : 'Receive' }}
</button>
<div v-if="error">Error: {{ error.message }}</div>
</template>

Return type​

import type { IUseReceive } from '@web3auth/modal/vue'

loading​

Ref<boolean>

Whether the receive screen is being opened.

error​

Ref<Web3AuthError | null>

Error that occurred while opening the receive screen.

showReceive​

(showReceiveParams?: BaseEmbedControllerState["showReceive"]) => Promise<void>

Function to show the receive screen. Accepts optional parameters to customize the view.