
Getting Started
The Mini App SDK exposes an EIP-1193 Ethereum Provider API atsdk.wallet.getEthereumProvider().
We recommend using Wagmi to connect to and interact with
the user’s wallet. This is not required but provides high-level hooks for
interacting with the wallet in a type-safe way.
Use the Getting Started
guide to setup
Wagmi in your project.
import { http, createConfig } from 'wagmi'
import { base } from 'wagmi/chains'
import { farcasterMiniApp as miniAppConnector } from '@farcaster/miniapp-wagmi-connector'
export const config = createConfig({
chains: [base],
transports: {
[base.id]: http(),
},
connectors: [
miniAppConnector()
]
})
If a user already has a connected wallet the connector will automatically
connect to it (e.g.
isConnected will be true).It’s possible a user doesn’t have a connected wallet so you should always check
for a connection and prompt them to connect if they aren’t already connected:
import { useAccount, useConnect } from 'wagmi'
function ConnectMenu() {
const { isConnected, address } = useAccount()
const { connect, connectors } = useConnect()
if (isConnected) {
return (
<>
<div>You're connected!</div>
<div>Address: {address}</div>
</>
)
}
return (
<button
type="button"
onClick={() => connect({ connector: connectors[0] })}
>
Connect
</button>
)
}
Your Mini App won’t need to show a wallet selection dialog that is common in a
web based dapp, the Farcaster client hosting your app will take care of getting
the user connected to their preferred crypto wallet.
You’re now ready to prompt the user to transact. They will be shown a preview
of the transaction in their wallet and asked to confirm it:
Follow this guide from
Wagmi
on sending a transaction (note: skip step 1 since you’re already connected to
the user’s wallet).
Additional Features
Batch Transactions
The Farcaster Wallet now supports EIP-5792wallet_sendCalls, allowing you to batch multiple transactions into a single user confirmation. This improves the user experience by enabling operations like “approve and swap” in one step.
Common use cases include:
- Approving a token allowance and executing a swap
- Multiple NFT mints in one operation
- Complex DeFi interactions requiring multiple contract calls
Using Batch Transactions
With Wagmi’suseSendCalls hook, sending multiple transactions as a batch is simple:
Example: Token Approval and Swap
Limitations:
- Transactions execute sequentially, not atomically
- No paymaster support yet
- Available on all EVM chains Farcaster supports

