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.
27 lines (26 loc) • 693 B
TypeScript
import { NetworkSymbols } from '../../../basedauth/src/networks';
import { Model } from 'mongoose';
export interface ICommentContent {
type: "text" | "image";
data: string;
}
export interface IUserRef {
address: string;
network: NetworkSymbols;
}
export interface IComment extends Document {
_id: string;
chainId: number;
address: string;
wroteBy: IUserRef;
content: ICommentContent[];
timestamp: number;
updatedAt: number | null;
likedBy: IUserRef[];
dislikedBy: IUserRef[];
parentId: string | null;
isEdited: boolean;
score: number;
getChildren(): Promise<IComment[]>;
}
export declare const CommentModel: Model<IComment>;