signLoginPayload

Signs the login payload using the provided account.

Example

import { signLoginPayload } from "thirdweb/auth";
const { signature, payload } = await signLoginPayload({
payload: loginPayload,
account: account,
});
function signLoginPayload(
): Promise<{ payload: LoginPayload; signature: `0x${string}` }>;

Parameters

The options for signing the login payload.

Type

let options: { account: Account; payload: LoginPayload };

Returns

let returnType: {
address: string;
chain_id?: string;
domain: string;
expiration_time: string;
invalid_before: string;
issued_at: string;
nonce: string;
resources?: Array<string>;
statement: string;
uri?: string;
version: string;
};

An object containing the signature and the payload.