mirror of
https://github.com/aljazceru/notedeck.git
synced 2026-01-21 17:24:21 +01:00
From PR description:
See the test_basic() test in linux_key_storage.rs. I ran it successfully
on my MacOS machine and a linux VM. The BasicFileStorage impl just
stores each Keypair as a SerializableKeypair json object with the file
name as the public key hex in ~/.notedeck_credentials. The
SerializableKeypair uses the nip49 EncryptedSecretKey, but we just use
an empty string as the password for now.
The BasicFileStorage impl works in MacOS, but it only conditionally
compiles to linux for simplicity.
pub enum KeyStorageResponse<R> {
Waiting,
ReceivedResult(Result<R, KeyStorageError>),
}
This is used as a response so that it's possible for the storage impl to
be async, since secret_service is async. It seems that secret_service
would allow for a more robust linux key storage impl so I went ahead and
made the API compatible with an async impl.
* kernelkind (1):
impl linux credential storage
24 lines
552 B
Rust
24 lines
552 B
Rust
mod client;
|
|
mod error;
|
|
mod filter;
|
|
mod keypair;
|
|
mod note;
|
|
mod profile;
|
|
mod pubkey;
|
|
mod relay;
|
|
|
|
pub use client::ClientMessage;
|
|
pub use error::Error;
|
|
pub use ewebsock;
|
|
pub use filter::Filter;
|
|
pub use keypair::{FullKeypair, Keypair, SerializableKeypair};
|
|
pub use nostr::SecretKey;
|
|
pub use note::{Note, NoteId};
|
|
pub use profile::Profile;
|
|
pub use pubkey::Pubkey;
|
|
pub use relay::message::{RelayEvent, RelayMessage};
|
|
pub use relay::pool::{PoolEvent, RelayPool};
|
|
pub use relay::{Relay, RelayStatus};
|
|
|
|
pub type Result<T> = std::result::Result<T, error::Error>;
|