createUnsignedUserOp
Creates an unsigned user operation from a prepared transaction.
import { createUnsignedUserOp } from "thirdweb/wallets/smart"; const transaction = prepareContractCall(...); const userOp = await createUnsignedUserOp({ transaction, factoryContract, accountContract, adminAddress, sponsorGas, overrides,});
function createUnsignedUserOp(args: {  adminAddress: string;  overrides?: {    accountAddress?: string;    accountSalt?: string;    bundlerUrl?: string;    createAccount?: (    entrypointAddress?: string;    erc20Paymaster?: { address: string; token: string };    execute?: (      transaction: SendTransactionOption,    executeBatch?: (      transactions: Array<SendTransactionOption>,    getAccountNonce?: (    ) => Promise<bigint>;    paymaster?: (      userOp: UserOperationV06 | UserOperationV07,    predictAddress?: (    ) => Promise<string>;  };  sponsorGas: boolean;}): Promise<UserOperationV06 | UserOperationV07>;
The prepared transaction and options
let args: {  adminAddress: string;  overrides?: {    accountAddress?: string;    accountSalt?: string;    bundlerUrl?: string;    createAccount?: (    entrypointAddress?: string;    erc20Paymaster?: { address: string; token: string };    execute?: (      transaction: SendTransactionOption,    executeBatch?: (      transactions: Array<SendTransactionOption>,    getAccountNonce?: (    ) => Promise<bigint>;    paymaster?: (      userOp: UserOperationV06 | UserOperationV07,    predictAddress?: (    ) => Promise<string>;  };  sponsorGas: boolean;};