Add pomade signer

This commit is contained in:
Jon Staab
2025-12-23 16:28:10 -08:00
parent e9b1172d15
commit 282b20c460
8 changed files with 361 additions and 21 deletions
+4
View File
@@ -32,6 +32,8 @@ export type RelayProfile = {
// Utils related to bare urls
export const LOCAL_RELAY_URL = "local://welshman.relay/"
export const isRelayUrl = (url: string) => {
if (!url.includes("://")) {
url = "wss://" + url
@@ -65,6 +67,8 @@ export const isIPAddress = (url: string) => Boolean(url.match(/\d+\.\d+\.\d+\.\d
export const isShareableRelayUrl = (url: string) => Boolean(isRelayUrl(url) && !isLocalUrl(url))
export const normalizeRelayUrl = (url: string) => {
if (url === LOCAL_RELAY_URL) return url
const prefix = url.match(/^wss?:\/\//)?.[0] || (isOnionUrl(url) ? "ws://" : "wss://")
// Use our library to normalize