Add docs for blossom, add nip 86 and 98 support

This commit is contained in:
Jon Staab
2025-06-10 13:18:03 -07:00
parent 90b2ab2974
commit 4cabf53c2f
13 changed files with 314 additions and 17 deletions
+12
View File
@@ -1,9 +1,12 @@
import {get} from "svelte/store"
import {uniq, nthNe, removeNil, nthEq} from "@welshman/lib"
import {
sendManagementRequest,
ManagementRequest,
addToListPublicly,
EventTemplate,
removeFromList,
makeHttpAuth,
getListTags,
getRelayTags,
makeList,
@@ -141,3 +144,12 @@ export const sendWrapped = async ({template, pubkeys, ...options}: SendWrappedOp
),
)
}
export const manageRelay = async (url: string, request: ManagementRequest) => {
url = url.replace(/^ws/, "http")
const authTemplate = await makeHttpAuth(url, "POST", JSON.stringify(request))
const authEvent = await signer.get()!.sign(authTemplate)
return sendManagementRequest(url, request, authEvent)
}