2024-02-06 12:28:46 +00:00
|
|
|
export interface Keys {
|
2024-05-07 07:14:21 +00:00
|
|
|
npub: string;
|
|
|
|
nsec: string;
|
2024-02-06 12:28:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export enum Kind {
|
2024-05-07 07:14:21 +00:00
|
|
|
Metadata = 0,
|
|
|
|
Text = 1,
|
|
|
|
RecommendRelay = 2,
|
|
|
|
Contacts = 3,
|
|
|
|
Repost = 6,
|
|
|
|
Reaction = 7,
|
|
|
|
ZapReceipt = 9735,
|
|
|
|
// NIP-89: App Metadata
|
|
|
|
AppRecommendation = 31989,
|
|
|
|
AppHandler = 31990,
|
|
|
|
// #TODO: Add all nostr kinds
|
2024-02-06 12:28:46 +00:00
|
|
|
}
|
|
|
|
|
2024-06-12 01:27:53 +00:00
|
|
|
export interface Meta {
|
|
|
|
content: string;
|
|
|
|
images: string[];
|
|
|
|
videos: string[];
|
|
|
|
events: string[];
|
|
|
|
mentions: string[];
|
|
|
|
hashtags: string[];
|
|
|
|
}
|
|
|
|
|
2024-05-25 08:21:40 +00:00
|
|
|
export interface NostrEvent {
|
2024-05-07 07:14:21 +00:00
|
|
|
id: string;
|
|
|
|
pubkey: string;
|
|
|
|
created_at: number;
|
|
|
|
kind: Kind;
|
|
|
|
tags: string[][];
|
|
|
|
content: string;
|
|
|
|
sig: string;
|
2024-06-12 01:27:53 +00:00
|
|
|
meta: Meta;
|
2024-02-06 12:28:46 +00:00
|
|
|
}
|
|
|
|
|
2024-05-25 08:21:40 +00:00
|
|
|
export interface EventWithReplies extends NostrEvent {
|
|
|
|
replies: Array<NostrEvent>;
|
2024-02-09 08:33:27 +00:00
|
|
|
}
|
|
|
|
|
2024-06-17 06:52:06 +00:00
|
|
|
export interface EventTag {
|
|
|
|
id: string;
|
|
|
|
relayHint: string;
|
|
|
|
}
|
|
|
|
|
2024-02-06 12:28:46 +00:00
|
|
|
export interface Metadata {
|
2024-05-07 07:14:21 +00:00
|
|
|
name?: string;
|
|
|
|
display_name?: string;
|
|
|
|
about?: string;
|
|
|
|
website?: string;
|
|
|
|
picture?: string;
|
|
|
|
banner?: string;
|
|
|
|
nip05?: string;
|
|
|
|
lud06?: string;
|
|
|
|
lud16?: string;
|
2024-02-06 12:28:46 +00:00
|
|
|
}
|
|
|
|
|
2024-04-07 08:11:20 +00:00
|
|
|
export interface ColumnRouteSearch {
|
2024-05-07 07:14:21 +00:00
|
|
|
account: string;
|
|
|
|
label: string;
|
|
|
|
name: string;
|
|
|
|
redirect?: string;
|
2024-04-07 08:11:20 +00:00
|
|
|
}
|
|
|
|
|
2024-02-09 08:33:27 +00:00
|
|
|
export interface LumeColumn {
|
2024-05-07 07:14:21 +00:00
|
|
|
label: string;
|
|
|
|
name: string;
|
|
|
|
content: URL | string;
|
|
|
|
description?: string;
|
|
|
|
author?: string;
|
|
|
|
logo?: string;
|
|
|
|
cover?: string;
|
|
|
|
coverRetina?: string;
|
|
|
|
featured?: boolean;
|
2023-12-29 06:12:37 +00:00
|
|
|
}
|
|
|
|
|
2024-06-19 07:00:58 +00:00
|
|
|
export interface ColumnEvent {
|
2024-05-31 08:25:47 +00:00
|
|
|
type: "reset" | "add" | "remove" | "update" | "left" | "right" | "set_title";
|
2024-05-07 07:14:21 +00:00
|
|
|
label?: string;
|
|
|
|
title?: string;
|
|
|
|
column?: LumeColumn;
|
2024-03-19 08:36:20 +00:00
|
|
|
}
|
|
|
|
|
2024-05-11 05:28:07 +00:00
|
|
|
export interface Relays {
|
|
|
|
connected: string[];
|
|
|
|
read: string[];
|
|
|
|
write: string[];
|
|
|
|
both: string[];
|
|
|
|
}
|
2024-06-10 03:48:39 +00:00
|
|
|
|
|
|
|
export interface Relay {
|
|
|
|
url: string;
|
|
|
|
purpose: "read" | "write" | string;
|
|
|
|
}
|