feat: add relay group creation (#62)

Reviewed-on: #62
This commit was merged in pull request #62.
This commit is contained in:
2026-10-10 14:11:18 +00:00
parent 4b6f4b3797
commit f83922df2e
9 changed files with 1179 additions and 149 deletions
+20
View File
@@ -59,6 +59,26 @@ impl UniversalSigner {
{
*self.inner.write().expect("RwLock poisoned") = Arc::new(InnerSignerImpl(new_signer));
}
/// Encrypt a payload to the given key with NIP-44.
pub async fn nip44_encrypt(
&self,
public_key: &PublicKey,
content: &str,
) -> Result<String, UniversalSignerError> {
let inner = self.inner.read().expect("RwLock poisoned").clone();
inner.nip44_encrypt_async(public_key, content).await
}
/// Decrypt a NIP-44 payload from the given key.
pub async fn nip44_decrypt(
&self,
public_key: &PublicKey,
payload: &str,
) -> Result<String, UniversalSignerError> {
let inner = self.inner.read().expect("RwLock poisoned").clone();
inner.nip44_decrypt_async(public_key, payload).await
}
}
trait InnerSigner: fmt::Debug + Send + Sync + 'static {