sign

Generates the signature for the provided transaction hash.

Example

import { sign } from "thirdweb/utils";
const signature = sign({
hash: "0x",
privateKey: "0x",
});
function sign(options: SignOptions): {
r: `0x${string}`;
s: `0x${string}`;
v: bigint;
yParity: number;
};

Parameters

The options for signing.

Type

let options: { hash: Hex; privateKey: Hex };

Returns

let returnType: {
r: `0x${string}`;
s: `0x${string}`;
v: bigint;
yParity: number;
};

The transaction signature.