UNPKG

@abstract-foundation/agw-client

Version:
37 lines 1.8 kB
import { type Account, type Chain, type Client, type PublicClient, type SendCallsParameters, type SendCallsReturnType, type Transport, type WalletClient } from "viem"; import type { ChainEIP712 } from "viem/zksync"; import type { CustomPaymasterHandler } from "../types/customPaymaster.js"; /** * Requests the connected wallet to send a batch of calls. * * - Docs: https://viem.sh/docs/actions/wallet/sendCalls * - JSON-RPC Methods: [`wallet_sendCalls`](https://eips.ethereum.org/EIPS/eip-5792) * * @param client - Client to use * @returns Transaction identifier. {@link SendCallsReturnType} * * @example * import { createWalletClient, custom } from 'viem' * import { mainnet } from 'viem/chains' * import { sendCalls } from 'viem/actions' * * const client = createWalletClient({ * chain: mainnet, * transport: custom(window.ethereum), * }) * const id = await sendCalls(client, { * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', * calls: [ * { * data: '0xdeadbeef', * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', * }, * { * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', * value: 69420n, * }, * ], * }) */ export declare function sendCalls<const calls extends readonly unknown[], chain extends Chain | undefined, account extends Account | undefined = undefined, chainOverride extends Chain | undefined = undefined>(client: Client<Transport, ChainEIP712, Account>, signerClient: WalletClient<Transport, ChainEIP712, Account>, publicClient: PublicClient<Transport, ChainEIP712>, parameters: SendCallsParameters<chain, account, chainOverride, calls>, isPrivyCrossApp?: boolean, customPaymasterHandler?: CustomPaymasterHandler | undefined): Promise<SendCallsReturnType>; //# sourceMappingURL=sendCalls.d.ts.map