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
Method | Description |
---|---|
async signUserOp | Sign a user operation |
Sign User Operation
async signUserOp(oktoClient: OktoClient, userOp: UserOperation)
signs a user operation for execution.
Parameters
Parameter | Type | Description |
---|---|---|
oktoClient | OktoClient | Instance of OktoClient obtained from useOkto hook |
userOp | UserOperation | User operation to sign |
Response
Success Response
Field Name | Type | Description |
---|---|---|
signature | Promise<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.