function useSignAndSendPreparedCalls(params): UseSignAndSendPreparedCallsResult;Defined in: account-kit/react/src/hooks/useSignAndSendPreparedCalls.ts:86
Hook for signing and sending prepared calls from a smart account.
This hook provides functionality to sign and send previously prepared calls to a smart account. It handles both the signing and sending of prepared calls in a single operation, and does not support EOA wallets.
import { useSignAndSendPreparedCalls } from "@account-kit/react";
const {
signAndSendPreparedCalls,
signAndSendPreparedCallsAsync,
isSigningAndSendingPreparedCalls,
error,
} = useSignAndSendPreparedCalls();
// Sign and send prepared calls
await signAndSendPreparedCallsAsync({
preparedCalls: [
// unsigned prepared call objects
],
});- This hook only works with smart accounts and does not support EOA wallets
- The hook handles both signing and sending of prepared calls in a single operation
- The returned result contains the prepared call IDs
| Parameter | Type | Description |
|---|---|---|
| Configuration parameters for the hook |
UseSignAndSendPreparedCallsResult
An object containing:
signAndSendPreparedCalls: Function to sign and send prepared calls synchronously (returns void)signAndSendPreparedCallsAsync: Async function to sign and send prepared calls (returns Promise)signAndSendPreparedCallsResult: The result of the last successful prepared call executionisSigningAndSendingPreparedCalls: Boolean indicating if prepared calls are currently being signed and senterror: Error from the last failed prepared call execution, if any