createAndSignUserOp

Create and sign a user operation.

Example

import { createAndSignUserOp } from "thirdweb/wallets/smart";
const userOp = await createAndSignUserOp({
client,
adminAccount,
smartWalletOptions,
transactions,
});
function createAndSignUserOp(options: {
adminAccount: Account;
client: ThirdwebClient;
smartWalletOptions: SmartWalletOptions;
transactions: Array<PreparedTransaction>;
waitForDeployment?: boolean;
}): Promise<UserOperationV06 | UserOperationV07>;

Parameters

The options for creating and signing the user operation

Type

let options: {
adminAccount: Account;
client: ThirdwebClient;
smartWalletOptions: SmartWalletOptions;
transactions: Array<PreparedTransaction>;
waitForDeployment?: boolean;
};

Returns

let returnType: Promise<UserOperationV06 | UserOperationV07>;
  • The signed user operation