UserOp

Sign UserOp

Learn how to sign user operations using the Okto SDK.

The signUserOp function signs a user operation for execution on the blockchain.

Method Overview

MethodDescription
async signUserOpSign a user operation

Sign User Operation

async signUserOp(oktoClient: OktoClient, userOp: UserOperation) signs a user operation for execution.

Parameters

ParameterTypeDescription
oktoClientOktoClientInstance of OktoClient obtained from useOkto hook
userOpUserOperationUser operation to sign

Response

Success Response

Field NameTypeDescription
signaturePromise<string>Signed user operation

Example

Ensure the user operation is properly formatted and includes all required fields before signing.

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