Skip to content

createBundlerClientFromExisting

Creates a bundler client from an existing public client with the provided transport and chain.

Import

import { createBundlerClientFromExisting } from "@aa-sdk/core";

Usage

import { createPublicClient } from "viem";
import { createBundlerClientFromExisting } from "@aa-sdk/core";
 
const publicClient = createPublicClient(...);
const bundlerClient = createBundlerClientFromExisting(publicClient);

Parameters

client

PublicClient<T, Chain> The existing public client to be extended with bundler actions

Returns

BundlerClient<T> A bundler client that extends the functionality of the provided public client