signUserOp

Sign a user operation.

Example

import { signUserOp } from "thirdweb/wallets/smart";
const userOp = await createUnsignedUserOp(...);
const signedUserOp = await signUserOp({
client,
userOp,
chain,
adminAccount,
});
function signUserOp(args: {
adminAccount: Account;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
entrypointAddress?: string;
userOp: UserOperationV06 | UserOperationV07;
}): Promise<UserOperationV06 | UserOperationV07>;

Parameters

Type

let args: {
adminAccount: Account;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
entrypointAddress?: string;
userOp: UserOperationV06 | UserOperationV07;
};

Returns

let returnType: Promise<UserOperationV06 | UserOperationV07>;
  • The user operation with the signature field populated