@mocanetwork/airkit-connector package so your React app can use wagmi hooks (useAccount, useConnect, useSendTransaction, etc.) with AIR Kit smart accounts.
Prerequisites
- A React project with wagmi v2+ installed
- AIR Kit SDK installed:
npm install @mocanetwork/airkit @mocanetwork/airkit-connector - A Partner ID from the Developer Dashboard
Step 1: Create the wagmi config
Step 2: Wrap your app with WagmiProvider
Step 3: Connect and use the account
Step 4: Access AirService from the connector
Once connected, you can access the underlyingAirService for credential operations:
Step 5: Send a transaction
With the connector active, standard wagmi transaction hooks work against the user’s AIR Kit smart account:Next steps
- Wagmi Connector reference for the full API
- Smart Accounts for account abstraction details
- Supported Chains for the list of available networks