engineAccount
Creates an account that uses your engine backend wallet for sending transactions and signing messages.
import { engineAccount } from "thirdweb/wallets/engine"; const engineAcc = engineAccount({ engineUrl: "https://engine.thirdweb.com", authToken: "your-auth-token", walletAddress: "0x...",}); // then use the account as you would any other accountconst transaction = claimTo({ contract, to: "0x...", quantity: 1n,});const result = await sendTransaction({ transaction, account: engineAcc,});console.log("Transaction sent:", result.transactionHash);
The options for the engine account.
let options: { authToken: string; engineUrl: string; walletAddress: string;};
let returnType: { address: Address; onTransactionRequested?: ( ) => Promise<void>; sendBatchTransaction?: ( txs: Array<SendTransactionOption>, ) => Promise<SendTransactionResult>; sendRawTransaction?: ( tx: SendRawTransactionOptions, ) => Promise<SendTransactionResult>; sendTransaction: ( tx: SendTransactionOption, ) => Promise<SendTransactionResult>; signAuthorization?: ( signMessage: ({ message, }: { message: SignableMessage; }) => Promise<Hex>; signTransaction?: (tx: SerializableTransaction) => Promise<Hex>; signTypedData: ( _typedData: ox__TypedData.Definition<typedData, primaryType>, ) => Promise<Hex>; watchAsset?: (asset: WatchAssetParams) => Promise<boolean>;};
An account that uses your engine backend wallet.