@better-auth-ui/core
Version:
Authentication components and data utilities for [Better Auth](https://better-auth.com), available for React and Solid.
65 lines (64 loc) • 2.38 kB
TypeScript
import { SiweAuthClient } from './siwe-auth-client.js';
import { SiweWalletConnector, SiweWalletManager } from './siwe-wallet.js';
export declare const siweMutationKeys: {
readonly all: readonly ["auth", "siwe"];
readonly signIn: readonly ["auth", "siwe", "signIn"];
readonly link: readonly ["auth", "siwe", "link"];
readonly unlink: readonly ["auth", "siwe", "unlink"];
readonly setPrimary: readonly ["auth", "siwe", "setPrimary"];
};
export type SignInSiweVariables = {
email?: string;
};
export type SignInSiweConfig = {
connector: SiweWalletConnector;
domain: string;
uri: string;
statement?: string;
};
export declare const signInSiweOptions: (authClient: SiweAuthClient, config: SignInSiweConfig) => {
mutationKey: readonly ["auth", "siwe", "signIn"];
mutationFn: ({ email }?: SignInSiweVariables) => Promise<Omit<{
token: string;
success: boolean;
user: {
id: string;
walletAddress: string;
chainId: number;
};
}, "user"> & {
user: import('better-auth').StripEmptyObjects<{
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
}>;
}>;
meta: {
awaits: (readonly ["auth", "getSession"])[];
};
};
export declare const linkSiweWalletOptions: (manager: SiweWalletManager, connector: SiweWalletConnector, userId?: string) => {
mutationKey: readonly ["auth", "siwe", "link"];
mutationFn: () => Promise<void>;
meta: {
awaits: (readonly ["auth", "user", string | undefined, "siwe", "wallets"])[];
};
};
export declare const unlinkSiweWalletOptions: (manager: SiweWalletManager, userId?: string) => {
mutationKey: readonly ["auth", "siwe", "unlink"];
mutationFn: (walletId: string) => Promise<void>;
meta: {
awaits: (readonly ["auth", "user", string | undefined, "siwe", "wallets"])[];
};
};
export declare const setPrimarySiweWalletOptions: (manager: SiweWalletManager, userId?: string) => {
mutationKey: readonly ["auth", "siwe", "setPrimary"];
mutationFn: (walletId: string) => Promise<void>;
meta: {
awaits: (readonly ["auth", "user", string | undefined, "siwe", "wallets"])[];
};
};