feat: nip96

This commit is contained in:
2023-11-20 15:36:01 +00:00
parent 38277c3252
commit 5942d92923
7 changed files with 84 additions and 10 deletions

View File

@ -7,8 +7,9 @@ import NostrBuild from "Upload/NostrBuild";
import VoidCat from "Upload/VoidCat";
import NostrImg from "Upload/NostrImg";
import { KieranPubKey } from "Const";
import { bech32ToHex } from "SnortUtils";
import { bech32ToHex, unwrap } from "SnortUtils";
import useEventPublisher from "Hooks/useEventPublisher";
import { Nip96Uploader } from "./Nip96";
export interface UploadResult {
url?: string;
@ -74,6 +75,9 @@ export default function useFileUpload(): Uploader {
progress: [],
} as Uploader;
}
case "void.cat-NIP96": {
return new Nip96Uploader("https://void.cat/nostr", unwrap(publisher));
}
case "nostrimg.com": {
return {
upload: NostrImg,