Nethereum.AccountAbstraction.Bundler.InProcess
7.0.0
Prefix Reserved
dotnet add package Nethereum.AccountAbstraction.Bundler.InProcess --version 7.0.0
NuGet\Install-Package Nethereum.AccountAbstraction.Bundler.InProcess -Version 7.0.0
<PackageReference Include="Nethereum.AccountAbstraction.Bundler.InProcess" Version="7.0.0" />
<PackageVersion Include="Nethereum.AccountAbstraction.Bundler.InProcess" Version="7.0.0" />
<PackageReference Include="Nethereum.AccountAbstraction.Bundler.InProcess" />
paket add Nethereum.AccountAbstraction.Bundler.InProcess --version 7.0.0
#r "nuget: Nethereum.AccountAbstraction.Bundler.InProcess, 7.0.0"
#:package Nethereum.AccountAbstraction.Bundler.InProcess@7.0.0
#addin nuget:?package=Nethereum.AccountAbstraction.Bundler.InProcess&version=7.0.0
#tool nuget:?package=Nethereum.AccountAbstraction.Bundler.InProcess&version=7.0.0
Nethereum.AccountAbstraction.Bundler.InProcess
In-process DevChain + ERC-4337 bundler bootstrap, for tests and examples.
Overview
InProcessBundlerHost spins up an in-process Nethereum.DevChain node together with an in-process
Nethereum.AccountAbstraction.Bundler.BundlerService, with ERC-4337 validation switched on by
default. It exists so integration tests and example apps can exercise the full bundler pipeline -
mempool, validation, gas estimation, bundle execution - without a wire round-trip to a separate
process, and without needing an external anvil/geth dev node.
This package is test/example infrastructure and is deliberately kept out of
Nethereum.AccountAbstraction.Bundler (the shippable core bundler library) and its production-facing
packages (Nethereum.AccountAbstraction.Bundler.RpcServer for the standalone JSON-RPC host, .RocksDB
for persistent mempool/reputation storage), none of which need an in-process DevChain.
Key Features
InProcessBundlerHost: two-phase startup -StartAsyncbrings up the DevChain and an operatorWeb3for deploying the AA contract stack, thenStartBundlerwires the bundler once the EntryPoint address is known- Validation ON by default: unlike fixtures that disable validation for speed, the bootstrap
defaults to
UnsafeMode=false,SimulateValidation=true,StrictValidation=true - Owns lifetime: disposing the bootstrap disposes the DevChain node and its temp storage
Installation
dotnet add package Nethereum.AccountAbstraction.Bundler.InProcess
Dependencies
- Nethereum.AccountAbstraction.Bundler - the bundler service this package wires up in-process
- Nethereum.DevChain - the in-process devchain node this package bootstraps
Quick Start
using System.Numerics;
using Nethereum.AccountAbstraction.Bundler.InProcess;
using Nethereum.AccountAbstraction.EntryPoint;
using Nethereum.AccountAbstraction.EntryPoint.ContractDefinition;
using Nethereum.Signer;
using Nethereum.Web3.Accounts;
var chainId = new BigInteger(31337);
var operatorAccount = new Account(EthECKey.GenerateKey(), chainId);
var bundlerAccount = new Account(EthECKey.GenerateKey(), chainId);
// Phase 1: bring up the in-process DevChain and fund the operator/bundler accounts
await using var host = await InProcessBundlerHost.StartAsync(
operatorAccount,
chainId,
new[] { operatorAccount.Address, bundlerAccount.Address },
Nethereum.Web3.Web3.Convert.ToWei(10000));
// Deploy the EntryPoint through the operator Web3
var entryPointService = await EntryPointService.DeployContractAndGetServiceAsync(
host.OperatorWeb3, new EntryPointDeployment());
// Phase 2: wire the in-process bundler now that the EntryPoint address is known
var bundler = host.StartBundler(entryPointService.ContractAddress, bundlerAccount);
// bundler is an IAccountAbstractionBundlerService - send/query UserOperations against it
// exactly as you would against a hosted Nethereum.AccountAbstraction.Bundler.RpcServer
var supportedEntryPoints = await bundler.SupportedEntryPoints.SendRequestAsync();
// host.DisposeAsync() (or the `await using` above) disposes the DevChain node and its temp storage
API Reference
public class InProcessBundlerHost : IDisposable, IAsyncDisposable
{
public DevChainNode Node { get; }
public IWeb3 OperatorWeb3 { get; }
public BigInteger ChainId { get; }
public BundlerService BundlerService { get; }
public IAccountAbstractionBundlerService Bundler { get; }
public static Task<InProcessBundlerHost> StartAsync(
Web3Account operatorAccount,
BigInteger chainId,
IEnumerable<string> prefundedAddresses,
BigInteger prefundBalanceWei,
DevChainConfig config = null);
public IAccountAbstractionBundlerService StartBundler(
string entryPointAddress,
Web3Account bundlerAccount,
bool enableErc7562Validation = false,
Action<BundlerConfig> configureOverrides = null);
public static IAccountAbstractionBundlerService UseHostedUrl(string bundlerRpcUrl, BigInteger chainId);
}
Nodeis the underlyingDevChainNodethe host started - use it for anything beyond whatOperatorWeb3exposes (mining control, additionalWeb3instances for other accounts, direct node shutdown independent ofDispose).StartBundler's two extra optional parameters go beyond the Quick Start's two required ones:enableErc7562Validationturns on ERC-7562 full-validation-rule enforcement (off by default, even thoughSimulateValidation/StrictValidationare already on), andconfigureOverridesis invoked against theBundlerConfigthe host builds internally before the bundler is constructed - use it to tweak any otherBundlerConfigfield (mempool size, bundle gas, reputation) without hand-assembling the whole config yourself.UseHostedUrl(bundlerRpcUrl, chainId)is the counterpart for a bundler that is not in-process: it builds anIAccountAbstractionBundlerServicefrom a plain JSON-RPC URL (anNethereum.AccountAbstraction.Bundler.RpcServerinstance, for example), so code written againstIAccountAbstractionBundlerServicecan switch between an in-process host and a hosted bundler by changing only how the interface is obtained.
Related Packages
Dependencies
- Nethereum.AccountAbstraction.Bundler - The bundler service (
BundlerService,BundlerConfig) wired up in-process - Nethereum.DevChain - The in-process devchain node this package bootstraps
See Also
- Nethereum.AccountAbstraction.Bundler.RpcServer - The standalone, deployable/hosted bundler for production use - point real apps at this, not at
InProcessBundlerHost - Nethereum.AccountAbstraction - Core ERC-4337 client-side types and the
IAAClienton-ramp
Additional Resources
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Nethereum.AccountAbstraction.Bundler (>= 7.0.0)
- Nethereum.DevChain (>= 7.0.0)
- Nethereum.Util (>= 7.0.0)
- Newtonsoft.Json (>= 11.0.2 && < 14.0.0)
-
net8.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Nethereum.AccountAbstraction.Bundler (>= 7.0.0)
- Nethereum.DevChain (>= 7.0.0)
- Nethereum.Util (>= 7.0.0)
- Newtonsoft.Json (>= 11.0.2 && < 14.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.0.0 | 74 | 10/2/2026 |