Request signature
The request method facilitates the use of templated transaction screens for signing transactions. The method returns a SignResponse?. It can be used to sign transactions for any EVM chain and screens can be whitelabeled to your branding.
Please check the list of JSON RPC methods, noting that the request method currently supports only the signing methods.
Chain configuration is retrieved automatically from your project settings in the Web3Auth Dashboard.

Parameters
| Parameter | Description |
|---|---|
method | JSON RPC method name in String. Currently, the request method only supports the signing methods. |
requestParams | Parameters for the corresponding method. The parameters should be in the list and in the correct sequence. Take a look at RPC methods to know more. |
path? | Path in the wallet WebView. Defaults to "wallet/request". |
appState? | Optional app state string to be passed through the request flow. |
Usage
do {
var params = [Any]()
// Message to be signed
params.append("Hello, Web3Auth from iOS!")
// User's EOA address
params.append(address)
let response = try await web3Auth.request(
method: "personal_sign",
requestParams: params
)
if let response = response {
if response.success {
print(response.result!)
} else {
// Handle Error
print(response.error!)
}
}
} catch {
print(error.localizedDescription)
// Handle error
}
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. |