Mobile (WalletConnect)
Actions
The connection actions provided by wc-client.
wc-client reduces WalletConnect to four actions, available from useProvider():
const { actions } = useProvider();
| Action | Description |
|---|---|
connect |
Start a new connection, opening the connect modal by default |
disconnect |
End the active session |
reconnect |
Restore a stored session |
generate |
Create a connection URI and deep link for your own button or QR code |
Every action resolves to { data, error } rather than throwing, so check error after each call:
const { data, error } = await actions.connect();
if (error) {
// handle or report the error
}
useProvider() also returns { config, provider, session, accounts, chains, chain, setChain, uri }. Accounts are formatted as xrpl:<chain>:<address>.