When you request a signature or transaction from a user’s embedded wallet from another app, Privy requires the user to explicitly confirm the signature or transaction. This is accomplished by opening a popup to the provider app’s domain, where the user confirms the action in an isolated environment.
To request signatures and transactions from a user’s embedded wallet from a provider app, use the signMessage, signTypedData, and sendTransaction methods returned by Privy’s useCrossAppAccounts hook
Report incorrect code
Copy
Ask AI
import {useCrossAppAccounts} from '@privy-io/react-auth';const {signMessage, signTypedData, sendTransaction} = useCrossAppAccounts();
These methods are similar to the signMessage, signTypedData, and sendTransaction methods returned by usePrivy except they all require an additional CrossAppWalletOptions object of the following type:
The address for the cross-app embedded wallet that you’d like to request a signature/transaction
from.
If the address you specify in this CrossAppWalletOptions object is not a valid embedded wallet
that has been linked to the current user from a provider app, these wallet methods will error.