Add docs for blossom, add nip 86 and 98 support
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user