> For the complete documentation index, see [llms.txt](/llms.txt).

# Request signature

The `request` method facilitates the use of prebuilt transaction screens for signing transactions. The method will return [SignResponse](#signresponse). It can be used to sign transactions for any EVM chain and screens can be customized to your branding.

Please check the list of [JSON RPC methods](https://metamask-docs-git-dependabot-npmandya-6c9ea4-consensys-ddffed67.vercel.app/wallet/reference/json-rpc-api/), noting that the request method currently supports only the signing methods.

![Request Method](/img/embedded-wallets/wallet-services/mobile-request-method.png) 

## Parameters[​](#parameters "Direct link to Parameters")

| Parameter     | Description                                                                                                                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| method        | JSON RPC method name in String. Supports signing methods and smart account operations (see supported methods below).                                                                                    |
| requestParams | Parameters for the corresponding method. The parameters should be in the list and correct sequence. Take a look at [RPC methods](https://metamask-docs-git-dependabot-npmandya-6c9ea4-consensys-ddffed67.vercel.app/wallet/reference/json-rpc-api/) to know more. |
| path?         | The path where the signing service is located. Default value is "wallet/request". This is an internal routing path for the Wallet Services infrastructure.                                              |
| appState?     | It can be used to keep track of the app state. Default is null, and accepts String as a value.                                                                                                          |

warning

The chain configuration is now automatically retrieved from your project settings in the Web3Auth Dashboard. The request will use the appropriate chain based on your project configuration.

## Supported Methods[​](#supported-methods "Direct link to Supported Methods")

### Standard Signing Methods[​](#standard-signing-methods "Direct link to Standard Signing Methods")

- `personal_sign` - Sign a message
- `eth_sign` - Sign data
- `eth_signTypedData` - Sign typed structured data
- `eth_signTypedData_v4` - Sign typed structured data (v4)
- `eth_sendTransaction` - Send a transaction

### Smart Account Operations[​](#smart-account-operations "Direct link to Smart Account Operations")

When smart accounts are enabled in your dashboard, additional methods are available:

- `eth_sendUserOperation` - Send a user operation for account abstraction
- `eth_estimateUserOperationGas` - Estimate gas for a user operation
- `wallet_showUserOperation` - Display user operation details in wallet UI

## Usage[​](#usage "Direct link to Usage")

### Standard Transaction Signing[​](#standard-transaction-signing "Direct link to Standard Transaction Signing")

```
val params = JsonArray().apply {
    // Message to be signed
    add("Hello, World!")
    // User's EOA address
    add(address)
}

val signMsgCompletableFuture = web3Auth.request(
    "personal_sign",
    requestParams = params
)

signMsgCompletableFuture.whenComplete { signResult, error ->
    if (error == null) {
        Log.d("Sign Result", signResult.toString())

    } else {
        Log.d("Sign Error", error.message ?: "Something went wrong")
    }
}

```

### Smart Account User Operation[​](#smart-account-user-operation "Direct link to Smart Account User Operation")

When smart accounts are enabled, you can send user operations:

```
// Build user operation parameters
val userOp = JsonObject().apply {
    addProperty("sender", smartAccountAddress)
    addProperty("nonce", "0x0")
    addProperty("initCode", "0x")
    addProperty("callData", encodedCallData)
    addProperty("callGasLimit", "0x5208")
    addProperty("verificationGasLimit", "0x5208")
    addProperty("preVerificationGas", "0x5208")
    addProperty("maxFeePerGas", "0x3b9aca00")
    addProperty("maxPriorityFeePerGas", "0x3b9aca00")
    addProperty("paymasterAndData", "0x")
    addProperty("signature", "0x")
}

val params = JsonArray().apply {
    add(userOp)
}

val userOpCompletableFuture = web3Auth.request(
    "eth_sendUserOperation",
    requestParams = params
)

userOpCompletableFuture.whenComplete { result, error ->
    if (error == null) {
        Log.d("UserOp Hash", result.toString())
    } else {
        Log.d("UserOp Error", error.message ?: "Failed to send user operation")
    }
}

```

tip

For smart account operations, the Web3Auth dashboard will automatically handle:

- Bundler URL configuration
- Paymaster integration for sponsored transactions
- User operation validation

## SignResponse[​](#signresponse "Direct link to SignResponse")

| Name    | Description                                               |
| ------- | --------------------------------------------------------- |
| success | Determines whether the request was successful or not.     |
| result? | Holds the signature for the request when success is true. |
| error?  | Holds the error for the request when success is false.    |
