mjp0 / datagram-node

📡 Datagram is an open-source data platform that you can use to build secured & shareable p2p databases with anyone.

Home Page:https://datagramjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor for multi-user usage

mjp0 opened this issue · comments

commented

At the moment Datagram requires you to have the right user credentials. If these are not provided, it won't initialize. And if it would initialize, it wouldn't open any data because the data would fail verification due to the missing user id. This is fine for the use cases where the user sends data between their own devices, but it prohibits sharing datagram with others.

To make multi-user work, verification needs to made optional, and datagram needs to have a built-in user registry where the user can save read keys from other users for data verification.


Deliverables

  • Implement user registry
  • Refactor data fetch code to optionalize verification & decryption
  • Implement addUser({ name, read_key, encryption_password }) method