based-auth
Version:
A Next.js/Node.js authentication and wallet API kit for Ethereum and Solana, with utilities for serialization and contract interaction, designed for serverless and API route usage.
40 lines (39 loc) • 946 B
TypeScript
import { Document, Model } from 'mongoose';
import { NetworkSymbols } from '../../../basedauth/src/networks';
import { UserRole } from '../types';
export interface IUserMetaInfo {
website: string;
twitter: string;
telegram: string;
discord: string;
}
export interface IUser {
name: string;
network: NetworkSymbols;
address: string;
social: string;
provider: string;
chainId: number;
image: string;
role: UserRole;
}
export interface IUserProfile extends Document {
_id: string;
name: string;
network: NetworkSymbols;
bio: string;
address: string;
social: string;
image: string;
banner: string;
metaInfo: IUserMetaInfo;
role: UserRole;
lastNetwork: string;
lastSignedIn: Date;
lastAddress: string;
followers: string[];
createdAt: Date;
updatedAt: Date;
users: IUser[];
}
export declare const UserProfileModel: Model<IUserProfile>;