UserOp
Execute UserOp
Learn how to execute signed user operations using the Okto SDK.
The executeUserOp
function submits a signed user operation to the blockchain for execution.
Method Overview
Method | Description |
---|---|
async executeUserOp | Execute a signed user operation |
Execute User Operation
async executeUserOp(oktoClient: OktoClient, userOp: UserOperation)
executes a signed user operation.
Parameters
Parameter | Type | Description |
---|---|---|
oktoClient | OktoClient | Instance of OktoClient obtained from useOkto hook |
userOp | UserOperation | Signed user operation to execute |
Response
Success Response
Field Name | Type | Description |
---|---|---|
result | Promise<string> | Job Id of the executed operation |
Example
Ensure the user operation is properly signed before execution. Failed transactions may still consume gas.
Note
In case of errors, debug the error using the error code and refer to the SDK errors and warnings documentation for more details.