useSendPreparedCalls

Hook for sending prepared calls to a smart account.

This hook provides functionality to send previously prepared calls to a smart account. It handles the signing and sending of prepared calls, but does not support EOA wallets.

Import

1import { useSendPreparedCalls } from "@account-kit/react";

Usage

1const { sendPreparedCalls, sendPreparedCallsAsync, isSendingPreparedCalls, error } = useSendPreparedCalls();
2
3// Send prepared calls
4await sendPreparedCallsAsync({
5preparedCalls: [/* prepared call objects *\/]
6});

Parameters

params

UseSendPreparedCallsParams

  • Configuration parameters for the hook

params.client

GetSmartWalletClientResult<Address>

  • Smart wallet client instance

Returns

UseSendPreparedCallsResult An object containing:

  • sendPreparedCalls: Function to send prepared calls synchronously (returns void)
  • sendPreparedCallsAsync: Async function to send prepared calls (returns Promise)
  • sendPreparedCallsResult: The result of the last successful prepared call execution
  • isSendingPreparedCalls: Boolean indicating if prepared calls are currently being sent
  • error: Error from the last failed prepared call execution, if any