notedeck icon indicating copy to clipboard operation
notedeck copied to clipboard

Conceive user account

Open kernelkind opened this issue 10 months ago • 8 comments

There should be a conception to represent a user's account to be able to save(#110)/load(#112) to/from disk. This should allow for easy access to multiple accounts in notedeck and android.

I propose:

struct SerializableUserAccount {
    key: nostr_sdk::secp256k1::SecretKey,
    relays: Vec<String>,
    // TODO: variable for bookmarks
}

and

struct UserAccount {
    key: nostr_sdk::Keys,
    pool: RelayPool,
}

Then in app.rs Damus would hold a variable accounts: Vec<UserAccount>. When a column needs to access a user account's pub/priv key or relays, it would access the respective Damus::accounts

kernelkind avatar Apr 11 '24 19:04 kernelkind