mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 08:23:35 +00:00
Add Blossom server list to app config (kind 10063)
Blossom servers now live in AppConfig alongside the NIP-65 relay list: - blossomServerMetadata (BUD-03 server list) and useAppBlossomServers flag - src/lib/appBlossom.ts provides APP_BLOSSOM_SERVERS defaults (blossom.ditto.pub, blossom.dreamith.to, blossom.primal.net), parseBlossomServerList, and getEffectiveBlossomServers - NostrSync hydrates the user's kind 10063 event on login - useUploadFile reads effective servers from config
This commit is contained in:
7 files changed
+171
-7
No files matched your search
@@ -9,11 +9,27 @@ export interface RelayMetadata {
|
||||
updatedAt: number;
|
||||
}
|
||||
|
||||
/** Blossom server list metadata (BUD-03 / kind 10063), mirroring RelayMetadata for parity. */
|
||||
export interface BlossomServerMetadata {
|
||||
/** Ordered list of Blossom server URLs (most trusted/reliable first per BUD-03). */
|
||||
servers: string[];
|
||||
/** Unix timestamp of when the server list was last updated (from kind 10063 created_at). */
|
||||
updatedAt: number;
|
||||
}
|
||||
|
||||
export interface AppConfig {
|
||||
/** Current theme */
|
||||
theme: Theme;
|
||||
/** NIP-65 relay list metadata */
|
||||
relayMetadata: RelayMetadata;
|
||||
/** User's kind 10063 Blossom server list. */
|
||||
blossomServerMetadata: BlossomServerMetadata;
|
||||
/**
|
||||
* When true, the app's default Blossom servers are merged with the user's
|
||||
* servers (app servers first, deduped). When false, only the user's servers
|
||||
* are used.
|
||||
*/
|
||||
useAppBlossomServers: boolean;
|
||||
}
|
||||
|
||||
export interface AppContextType {
|
||||
|
||||
Reference in new issue
Block a user