feat: push checkout (#14)

Reviewed-on: https://git.reya.su/reya/signed/pulls/14
This commit was merged in pull request #14.
This commit is contained in:
2026-09-06 13:14:11 +00:00
parent 33cbe42551
commit 00167c6a8d
85 changed files with 6282 additions and 4487 deletions
-3
View File
@@ -5,9 +5,6 @@ edition.workspace = true
publish.workspace = true
[dependencies]
signed_core = { path = "../signed_core" }
nostr.workspace = true
nostr-sdk.workspace = true
nostr-connect.workspace = true
nostr-gossip-memory.workspace = true
+1 -6
View File
@@ -12,11 +12,6 @@ use nostr_sdk::prelude::*;
use crate::signer::UniversalSigner;
/// Open (or create) the LMDB database at `db_path` and build a client
/// configured for Signed, together with a fresh signer.
///
/// The SDK manages its own internal tokio runtime.
/// the returned client can be driven by GPUI's executors.
#[cfg(not(target_arch = "wasm32"))]
pub async fn new_backend(db_path: impl AsRef<Path>) -> Result<(Client, UniversalSigner)> {
let signer = UniversalSigner::new(Keys::generate());
@@ -26,7 +21,7 @@ pub async fn new_backend(db_path: impl AsRef<Path>) -> Result<(Client, Universal
Ok(with_database(signer, database))
}
/// In-memory database on wasm (no LMDB available).
/// In-memory database on wasm, LMDB is unavailable there.
#[cfg(target_arch = "wasm32")]
pub fn new_backend() -> Result<(Client, UniversalSigner)> {
let signer = UniversalSigner::new(Keys::generate());
+1 -2
View File
@@ -31,8 +31,7 @@ impl UniversalSignerError {
}
}
/// A type-erased signer whose inner signer can be swapped in-place
/// (e.g. after login/logout). All clones see the swap.
/// A type-erased signer whose inner signer can be swapped in-place.
#[derive(Clone, Debug)]
pub struct UniversalSigner {
inner: Arc<RwLock<Arc<dyn InnerSigner>>>,
+2 -6
View File
@@ -1,15 +1,12 @@
use nostr_sdk::prelude::*;
/// A lightweight "something changed" signal for the UI.
///
/// Heavy data stays in the database; consumers re-query on receipt.
/// A lightweight change notification for the UI.
#[derive(Debug, Clone)]
pub struct Update {
pub kind: Kind,
/// First `a` tag value of the event, if any (e.g. the repository coordinate).
/// First `a` tag value of the event, if any, for example the repository coordinate.
pub coordinate: Option<Coordinate>,
pub author: PublicKey,
pub event_id: EventId,
}
impl Update {
@@ -21,7 +18,6 @@ impl Update {
kind: event.kind,
coordinate,
author: event.pubkey,
event_id: event.id,
}
}
}