addSignerFor

Adds farcaster signer for a given user. Helpful if you want to cover the gas fee for a user.

Example

import { addSignerFor } from "thirdweb/extensions/farcaster";
import { sendTransaction } from "thirdweb";
const transaction = addSignerFor({
client,
appAccount,
userAccount,
signerPublicKey,
});
await sendTransaction({ transaction, account });
function addSignerFor(

Parameters

The options for adding the signer.

Type

let options: Prettify<
{
chain?: Chain;
client: ThirdwebClient;
disableCache?: boolean;
signerPublicKey: Hex;
} & (
| { appAccount: Account }
| {
appAccountAddress: Address;
deadline: bigint;
signedKeyRequestMetadata: Hex;
}
) &
(
| { userAccount: Account }
| { addSignature: Hex; deadline: bigint; userAddress: Address }
)
>;

Returns

let returnType: PreparedTransaction<
[],
AbiFunction,
>;

A prepared transaction object to add the signer to the account.