signTransaction

Signs a transaction to be sent to a node.

Example

import { signTransaction } from "thirdweb";
signTransaction({
transaction: {
...
},
privateKey: "0x...",
});
function signTransaction(options: SignTransactionOptions): Hex;

Parameters

The options for signing.

Type

let options: {
privateKey: Hex;
transaction: TransactionSerializable;
};

Returns

let returnType: `0x${string}`;

The signed transaction as a hex string