Renamed nsigner module to signer: unified naming, added native-tls to tokio-tungstenite, libc dep for signer transports
This commit is contained in:
Generated
+16
-12
@@ -380,12 +380,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "event-signer"
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
dependencies = [
|
||||
"nostr-core",
|
||||
"nostr-nips",
|
||||
@@ -868,7 +868,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "integration-tests"
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
dependencies = [
|
||||
"nostr-core",
|
||||
"nostr-nips",
|
||||
@@ -910,7 +910,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "keypair-generator"
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
dependencies = [
|
||||
"nostr-core",
|
||||
]
|
||||
@@ -1041,7 +1041,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-core"
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"base64",
|
||||
@@ -1063,7 +1063,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-core-umbrella"
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
dependencies = [
|
||||
"nostr-core",
|
||||
"nostr-nips",
|
||||
@@ -1074,7 +1074,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-nips"
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"block-modes",
|
||||
@@ -1096,7 +1096,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-relay"
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"nostr-core",
|
||||
@@ -1114,7 +1114,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-services"
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
dependencies = [
|
||||
"nostr-core",
|
||||
"nostr-relay",
|
||||
@@ -1129,11 +1129,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nostr-signer"
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"cbc",
|
||||
"hex",
|
||||
"libc",
|
||||
"nostr-core",
|
||||
"rand",
|
||||
"serde",
|
||||
@@ -1448,7 +1449,7 @@ dependencies = [
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1798,7 +1799,7 @@ dependencies = [
|
||||
"getrandom 0.4.3",
|
||||
"once_cell",
|
||||
"rustix",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1907,7 +1908,9 @@ checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"log",
|
||||
"native-tls",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tungstenite",
|
||||
]
|
||||
|
||||
@@ -2019,6 +2022,7 @@ dependencies = [
|
||||
"http",
|
||||
"httparse",
|
||||
"log",
|
||||
"native-tls",
|
||||
"rand",
|
||||
"sha1",
|
||||
"thiserror 1.0.69",
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ serde_json = "1"
|
||||
|
||||
# Networking
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio-tungstenite = "0.24"
|
||||
tokio-tungstenite = { version = "0.24", features = ["native-tls"] }
|
||||
tungstenite = "0.24"
|
||||
reqwest = { version = "0.12", features = ["json", "native-tls"] }
|
||||
url = "2"
|
||||
|
||||
@@ -104,7 +104,7 @@ nostr_core_lib_rust/
|
||||
├── core/ # Core types, errors, crypto, utilities
|
||||
├── relay/ # WebSocket, HTTP, relay pool
|
||||
├── nips/ # All NIP implementations
|
||||
├── signer/ # Signer trait, local + nsigner remote
|
||||
├── signer/ # Signer trait, local + signer remote
|
||||
├── services/ # Request validator, Blossom, Cashu
|
||||
├── nostr-core/ # Umbrella re-export crate
|
||||
├── examples/ # Example programs
|
||||
@@ -156,7 +156,7 @@ nostr-core = { git = "ssh://git@laantungir.net:2222/laantungir/nostr_core_lib_ru
|
||||
| `nostr-core` | 34 | Types, errors, crypto, utilities |
|
||||
| `nostr-nips` | 68 | All 14 NIP implementations |
|
||||
| `nostr-relay` | 8 | WebSocket, HTTP, relay pool |
|
||||
| `nostr-signer` | 23 | Signer trait, local + nsigner |
|
||||
| `nostr-signer` | 23 | Signer trait, local + signer |
|
||||
| `nostr-services` | 31 | Validator, Blossom, Cashu |
|
||||
| `integration-tests` | 38 | Ported from C test suite |
|
||||
| **Total** | **202** | |
|
||||
|
||||
+9
-9
@@ -191,11 +191,11 @@ pub enum NostrError {
|
||||
#[error("NIP-03: invalid event id")]
|
||||
Nip03InvalidEventId,
|
||||
|
||||
// ── Nsigner ─────────────────────────────────────────────────────
|
||||
#[error("nsigner: policy denied")]
|
||||
NsignerPolicyDenied,
|
||||
#[error("nsigner: index not allowed")]
|
||||
NsignerIndexNotAllowed,
|
||||
// ── Signer ──────────────────────────────────────────────────────
|
||||
#[error("signer: policy denied")]
|
||||
SignerPolicyDenied,
|
||||
#[error("signer: index not allowed")]
|
||||
SignerIndexNotAllowed,
|
||||
|
||||
// ── Internal / catch-all ────────────────────────────────────────
|
||||
#[error("unknown error code: {0}")]
|
||||
@@ -283,8 +283,8 @@ impl From<i32> for NostrError {
|
||||
-425 => NostrError::CashuProofsSpent,
|
||||
-426 => NostrError::CashuCryptoFailed,
|
||||
-427 => NostrError::CashuInvalidKeyset,
|
||||
-2001 => NostrError::NsignerPolicyDenied,
|
||||
-2002 => NostrError::NsignerIndexNotAllowed,
|
||||
-2001 => NostrError::SignerPolicyDenied,
|
||||
-2002 => NostrError::SignerIndexNotAllowed,
|
||||
-6 => NostrError::Nip03InvalidOtsFormat,
|
||||
-7 => NostrError::Nip03InvalidEventId,
|
||||
other => NostrError::Unknown(other),
|
||||
@@ -375,8 +375,8 @@ impl From<NostrError> for i32 {
|
||||
NostrError::CashuInvalidKeyset => -427,
|
||||
NostrError::Nip03InvalidOtsFormat => -6,
|
||||
NostrError::Nip03InvalidEventId => -7,
|
||||
NostrError::NsignerPolicyDenied => -2001,
|
||||
NostrError::NsignerIndexNotAllowed => -2002,
|
||||
NostrError::SignerPolicyDenied => -2001,
|
||||
NostrError::SignerIndexNotAllowed => -2002,
|
||||
NostrError::Unknown(code) => code,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,3 +17,4 @@ sha2.workspace = true
|
||||
hex.workspace = true
|
||||
rand.workspace = true
|
||||
serialport.workspace = true
|
||||
libc = "0.2"
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
//! Signer abstraction: local and remote (nsigner) implementations.
|
||||
//! Signer abstraction: local and remote (signer) implementations.
|
||||
|
||||
pub mod traits;
|
||||
pub mod local;
|
||||
pub mod nsigner;
|
||||
pub mod signer;
|
||||
|
||||
pub use traits::NostrSigner;
|
||||
pub use local::LocalSigner;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
//! NostrSigner trait — abstract interface for signing operations.
|
||||
//!
|
||||
//! Both local (in-memory private key) and remote (nsigner) signers
|
||||
//! Both local (in-memory private key) and remote (signer) signers
|
||||
//! implement this trait, matching the C `nostr_signer_t` abstraction.
|
||||
|
||||
use nostr_core::types::{Event, PublicKey};
|
||||
|
||||
Reference in New Issue
Block a user