initial refactor in preparation for routing
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -8,7 +8,7 @@ pub struct Keypair {
|
||||
}
|
||||
|
||||
impl Keypair {
|
||||
pub fn new(secret_key: SecretKey) -> Self {
|
||||
pub fn from_secret(secret_key: SecretKey) -> Self {
|
||||
let cloned_secret_key = secret_key.clone();
|
||||
let nostr_keys = nostr::Keys::new(secret_key);
|
||||
Keypair {
|
||||
@@ -17,6 +17,10 @@ impl Keypair {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(pubkey: Pubkey, secret_key: Option<SecretKey>) -> Self {
|
||||
Keypair { pubkey, secret_key }
|
||||
}
|
||||
|
||||
pub fn only_pubkey(pubkey: Pubkey) -> Self {
|
||||
Keypair {
|
||||
pubkey,
|
||||
|
||||
Reference in New Issue
Block a user