Skip to main content
Use the provider from Connect external wallets for subsequent wallet requests. It routes requests to the account the user selected. The examples below assume the user selected an external wallet. They use @rhinestone/1auth version 0.10.2.

Read the active account

Read the selected address without opening a connection dialog. Disable signing and transaction actions when no account is connected.
wallet.ts
Read the address again before each action instead of reusing an address captured before a wallet switch. A locally remembered address does not prove that the external wallet is still connected or unlocked.

Sign a message

Call personal_sign with a hex-encoded message and the selected address:
The external wallet displays its signing prompt. For structured data, use eth_signTypedData_v4 or viem’s signTypedData action through the same provider.

Send a transaction

Switch to the intended chain before submitting. This example sends ETH on Base; the external account needs enough ETH for both the transfer and gas.
The user approves the transaction in their external wallet. For this external-wallet flow, the result is a transaction hash. Wait for its receipt on the submission chain and check the receipt status before showing success. With viem, use a public client’s waitForTransactionReceipt action.

Batch transactions

For external accounts, the 1auth provider implements wallet_sendCalls as sequential transactions, not an atomic batch. Users may see multiple approval prompts, and earlier transactions can succeed even if a later one fails. The external-wallet wallet_getCallsStatus response is not proof of onchain confirmation. Track transaction receipts when your application needs final settlement status.

Switch wallets and reconnect

Call wallet_connect again from your wallet-switching UI:
The chooser lets users select an external wallet or return to their embedded account. Refresh the displayed account after the request succeeds and discard any unsigned transaction prepared for the previous account. After a reload, eth_accounts can report a remembered address, but it does not verify that the external connection is usable. Offer an explicit reconnect action when needed. If you use createOneAuthConnection with your own picker, call connection.connect() instead. Host-provided external wallet connections are memory-only; your wallet integration must reconnect them after a reload.

Disconnect

This clears the provider’s active account and local connection state. It does not revoke token approvals, undo transactions, or guarantee removal of the site’s permissions in the external wallet. Users manage those permissions in their wallet. For a custom connection created with createOneAuthConnection, use connection.disconnect() and clear any additional connection state owned by your wallet integration.

Next steps

See Ecosystem to use the connected provider with viem or wagmi.