Send User Operations
Once your users have been authenticated, you can start sending user operations! Account Kit makes it really easy to send user operations using React hooks.
Sending user operations is pretty straightforward. All you have to do is use the useSendUserOperation()
hook from the @account-kit/react-native
package.
If you want to sponsor the gas for a user, see our guide.
Single user operation
In the below example, we use ModularAccountV2
as the underlying Smart
Contract type. You can also use a different account type (see other options
here).
send-user-operation.tsx
Batch user operation
To send multiple user operations in a single call, simply pass an array of user operations to the sendUserOperation
method.
batch-user-operation-component.tsx