/opt/canhelp/node_modules/better-auth/dist/plugins/siwe
Edit: /opt/canhelp/node_modules/better-auth/dist/plugins/siwe/index.d.mts (1867B)
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";
schema: WalletAddressSchema;
endpoints: {
getSiweNonce: better_call0.StrictEndpoint<"/siwe/nonce", {
method: "POST";
body: z.ZodObject<{
walletAddress: z.ZodString;
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 };
//# sourceMappingURL=index.d.mts.map