import { InferOptionSchema } from "../../types/plugins.mjs"; import { WalletAddressSchema, schema } from "./schema.mjs"; import { ENSLookupArgs, ENSLookupResult, SIWEVerifyMessageArgs } from "./types.mjs"; import * as better_call0 from "better-call"; import * as z from "zod"; //#region src/plugins/siwe/index.d.ts declare module "@better-auth/core" { interface BetterAuthPluginRegistry { siwe: { creator: typeof siwe; }; } } interface SIWEPluginOptions { domain: string; emailDomainName?: string | undefined; anonymous?: boolean | undefined; getNonce: () => Promise; verifyMessage: (args: SIWEVerifyMessageArgs) => Promise; ensLookup?: ((args: ENSLookupArgs) => Promise) | undefined; schema?: InferOptionSchema | undefined; } declare const siwe: (options: SIWEPluginOptions) => { id: "siwe"; version: string; schema: WalletAddressSchema; endpoints: { getSiweNonce: better_call0.StrictEndpoint<"/siwe/nonce" | "/siwe/get-nonce", { method: "POST"; body: z.ZodObject<{ walletAddress: z.ZodOptional; address: z.ZodOptional; chainId: z.ZodDefault>; }, z.core.$strip>; }, { nonce: string; }>; getNonce: better_call0.StrictEndpoint<"/siwe/nonce" | "/siwe/get-nonce", { method: "POST"; body: z.ZodObject<{ walletAddress: z.ZodOptional; address: z.ZodOptional; chainId: z.ZodDefault>; }, z.core.$strip>; }, { nonce: string; }>; verifySiweMessage: better_call0.StrictEndpoint<"/siwe/verify", { method: "POST"; body: z.ZodObject<{ message: z.ZodString; signature: z.ZodString; walletAddress: z.ZodString; chainId: z.ZodDefault>; email: z.ZodOptional; }, z.core.$strip>; requireRequest: true; }, { token: string; success: boolean; user: { id: string; walletAddress: string; chainId: number; }; }>; }; options: SIWEPluginOptions; }; //#endregion export { SIWEPluginOptions, siwe };