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

MethodDescription
async executeUserOpExecute a signed user operation

Execute User Operation

async executeUserOp(oktoClient: OktoClient, userOp: UserOperation) executes a signed user operation.

Parameters

ParameterTypeDescription
oktoClientOktoClientInstance of OktoClient obtained from useOkto hook
userOpUserOperationSigned user operation to execute

Response

Success Response

Field NameTypeDescription
resultPromise<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.

On this page