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: SerializableTransaction;
};

Returns

let returnType: ox__Hex.Hex;

The signed transaction as a hex string