feat: NIP-24
This commit is contained in:
@ -2,7 +2,7 @@ import Dexie, { Table } from "dexie";
|
||||
import { HexKey, NostrEvent, u256 } from "@snort/system";
|
||||
|
||||
export const NAME = "snortDB";
|
||||
export const VERSION = 11;
|
||||
export const VERSION = 12;
|
||||
|
||||
export interface SubCache {
|
||||
id: string;
|
||||
@ -27,10 +27,19 @@ export interface Payment {
|
||||
macaroon: string;
|
||||
}
|
||||
|
||||
export interface UnwrappedGift {
|
||||
id: string;
|
||||
to: string;
|
||||
created_at: number;
|
||||
inner: NostrEvent;
|
||||
tags?: Array<Array<string>>; // some tags extracted
|
||||
}
|
||||
|
||||
const STORES = {
|
||||
chats: "++id",
|
||||
eventInteraction: "++id",
|
||||
payments: "++url",
|
||||
gifts: "++id",
|
||||
};
|
||||
|
||||
export class SnortDB extends Dexie {
|
||||
@ -38,6 +47,7 @@ export class SnortDB extends Dexie {
|
||||
chats!: Table<NostrEvent>;
|
||||
eventInteraction!: Table<EventInteraction>;
|
||||
payments!: Table<Payment>;
|
||||
gifts!: Table<UnwrappedGift>;
|
||||
|
||||
constructor() {
|
||||
super(NAME);
|
||||
|
Reference in New Issue
Block a user