function prepareCalls<TAccount>(
client,
params,
): Promise<{} | {} | {} | ({} & object)>;Defined in: account-kit/wallet-client/src/client/actions/prepareCalls.ts:57
Prepares a set of contract calls for execution by building a user operation. Returns the built user operation and a signature request that needs to be signed before submitting to sendPreparedCalls.
// Prepare a sponsored user operation call
const result = await client.prepareCalls({
calls: [
{
to: "0x1234...",
data: "0xabcdef...",
value: "0x0",
},
],
capabilities: {
paymasterService: { policyId: "your-policy-id" },
},
});| Type Parameter | Default type |
|---|---|
|
|
| Parameter | Type | Description |
|---|---|---|
|
| The wallet API client to use for the request |
|
| Parameters for preparing calls |
Promise<
| {
}
| {
}
| {
}
| {
} & object>
A Promise that resolves to the prepared calls result containing the user operation data and signature request