sendUserOperation method

  1. @override
Future<UserOperationResponse> sendUserOperation(
  1. Map<String, dynamic> userOp,
  2. EthereumAddress entrypoint
)
override

Sends a user operation to the given network.

  • userOp: The user operation.
  • entrypoint: The entrypoint address through which the operation should pass.

Returns a Future that completes with a UserOperationResponse object.

Implementation

@override
Future<UserOperationResponse> sendUserOperation(
    Map<String, dynamic> userOp, EthereumAddress entrypoint) async {
  require(_initialized, "sendUserOp: Wallet Provider not initialized");
  final opHash = await _bundlerRpc
      .send<String>('eth_sendUserOperation', [userOp, entrypoint.hex]);
  return UserOperationResponse(opHash, wait);
}