getSignedKeyRequestMetadata

Generates the signed key request metadata to add a signer to an account. This function can either sign a new key request using an account object or use an existing key request signature. It prepares the metadata necessary for transactions involving signed key requests.

Example

import { getSignedKeyRequestMetadata } from "thirdweb/extensions/farcaster";
// Using an existing signature
const signedMetadata = await getSignedKeyRequestMetadata({
keyRequestSignature: "0xabcd...",
accountAddress: "0x123...",
message: {
requestFid: 123456789n,
deadline: 1657758061n,
},
});
// Signing a new key request
const signedMetadata = await getSignedKeyRequestMetadata({
account,
message: {
requestFid: 123456789n,
deadline: 1657758061n,
},
});

Parameters

Returns

A promise that resolves to the hexadecimal string of the encoded ABI parameters.