better-near-auth
Version:
Sign in with NEAR (SIWN) plugin for Better Auth
27 lines • 908 B
TypeScript
import type { BetterAuthPlugin } from "better-auth/types";
import type { AccountId, Profile } from "./types.js";
export * from "./types.js";
export interface RelayerConfig {
accountId?: string;
privateKey?: string;
privateKeys?: string[];
whitelistedContracts?: string[];
maxGasPerTransaction?: string;
maxDepositPerTransaction?: string;
}
export interface SIWNPluginOptions {
recipient: string;
requireFullAccessKey?: boolean;
getNonce?: () => Promise<Uint8Array>;
getProfile?: (accountId: AccountId) => Promise<Profile | null>;
validateLimitedAccessKey?: (args: {
accountId: AccountId;
publicKey: string;
recipient?: string;
}) => Promise<boolean>;
apiKey?: string;
rpcUrl?: string;
relayer?: RelayerConfig;
}
export declare const siwn: (options: SIWNPluginOptions) => BetterAuthPlugin;
//# sourceMappingURL=index.d.ts.map