2023-12-25 14:28:39 +07:00
|
|
|
import {
|
|
|
|
type NDKEvent,
|
|
|
|
NDKRelayList,
|
|
|
|
type NDKUserProfile,
|
|
|
|
} from "@nostr-dev-kit/ndk";
|
|
|
|
|
|
|
|
export interface RichContent {
|
|
|
|
parsed: string;
|
|
|
|
images: string[];
|
|
|
|
videos: string[];
|
|
|
|
links: string[];
|
|
|
|
notes: string[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Account {
|
|
|
|
id: string;
|
|
|
|
pubkey: string;
|
|
|
|
is_active: number;
|
|
|
|
contacts: string[];
|
2024-01-11 07:56:28 +07:00
|
|
|
relayList: string[];
|
2023-12-25 14:28:39 +07:00
|
|
|
}
|
|
|
|
|
2023-12-29 13:12:37 +07:00
|
|
|
export interface IColumn {
|
2023-12-31 20:53:51 +07:00
|
|
|
id?: number;
|
2023-12-29 13:12:37 +07:00
|
|
|
kind: number;
|
|
|
|
title: string;
|
|
|
|
content: string;
|
|
|
|
}
|
|
|
|
|
2023-12-25 14:28:39 +07:00
|
|
|
export interface Opengraph {
|
|
|
|
url: string;
|
|
|
|
title?: string;
|
|
|
|
description?: string;
|
|
|
|
image?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface NDKEventWithReplies extends NDKEvent {
|
|
|
|
replies: Array<NDKEvent>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface NostrBuildResponse {
|
|
|
|
ok: boolean;
|
|
|
|
data?: {
|
|
|
|
message: string;
|
|
|
|
status: string;
|
|
|
|
data: Array<{
|
|
|
|
blurhash: string;
|
|
|
|
dimensions: {
|
|
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
};
|
|
|
|
mime: string;
|
|
|
|
name: string;
|
|
|
|
sha256: string;
|
|
|
|
size: number;
|
|
|
|
url: string;
|
|
|
|
}>;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface NDKCacheUser {
|
|
|
|
pubkey: string;
|
|
|
|
profile: string | NDKUserProfile;
|
|
|
|
createdAt: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface NDKCacheUserProfile extends NDKUserProfile {
|
2024-01-04 08:52:45 +07:00
|
|
|
npub: string;
|
2023-12-25 14:28:39 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface NDKCacheEvent {
|
|
|
|
id: string;
|
|
|
|
pubkey: string;
|
|
|
|
content: string;
|
|
|
|
kind: number;
|
|
|
|
createdAt: number;
|
|
|
|
relay: string;
|
|
|
|
event: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface NDKCacheEventTag {
|
|
|
|
id: string;
|
|
|
|
eventId: string;
|
|
|
|
tag: string;
|
|
|
|
value: string;
|
|
|
|
tagValue: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface NIP11 {
|
|
|
|
name: string;
|
|
|
|
description: string;
|
|
|
|
pubkey: string;
|
|
|
|
contact: string;
|
|
|
|
supported_nips: number[];
|
|
|
|
software: string;
|
|
|
|
version: string;
|
|
|
|
limitation: {
|
|
|
|
[key: string]: string | number | boolean;
|
|
|
|
};
|
|
|
|
relay_countries: string[];
|
|
|
|
language_tags: string[];
|
|
|
|
tags: string[];
|
|
|
|
posting_policy: string;
|
|
|
|
payments_url: string;
|
|
|
|
icon: string[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface NIP05 {
|
|
|
|
names: {
|
|
|
|
[key: string]: string;
|
|
|
|
};
|
2024-01-10 09:22:13 +07:00
|
|
|
nip46: {
|
|
|
|
[key: string]: {
|
|
|
|
[key: string]: string[];
|
|
|
|
};
|
|
|
|
};
|
2023-12-25 14:28:39 +07:00
|
|
|
}
|
2024-01-20 09:06:00 +07:00
|
|
|
|
|
|
|
export interface Interests {
|
|
|
|
hashtags: string[];
|
|
|
|
users: string[];
|
|
|
|
words: string[];
|
|
|
|
}
|