dave: include anonymous user identifier in api call

- don't include users pubkey

This could be used to associate requests with real users,
rendering the anonymized user_id pointless

TODO: Implement a new tool call that lets dave ask for your pubkey

Fixes: #834
Fixes: #836
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-05-01 18:42:45 -07:00
parent 093189b019
commit 6bbc20471a
4 changed files with 40 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
use enostr::Keypair;
use enostr::{Keypair, KeypairUnowned};
use tokenator::{ParseError, TokenParser, TokenSerializable};
use crate::wallet::ZapWallet;
@@ -13,6 +13,13 @@ impl UserAccount {
Self { key, wallet: None }
}
pub fn keypair(&self) -> KeypairUnowned {
KeypairUnowned {
pubkey: &self.key.pubkey,
secret_key: self.key.secret_key.as_ref(),
}
}
pub fn with_wallet(mut self, wallet: ZapWallet) -> Self {
self.wallet = Some(wallet);
self