bandada-infra / bandada

A system for managing privacy-preserving groups.
https://bandada.pse.dev
MIT License
67 stars 60 forks source link

Add on-chain group invites #584

Closed waddaboo closed 3 weeks ago

waddaboo commented 1 month ago

Description

This PR introduces multiple new features to api, dashboard, and api-sdk.

New features included:

Related Issue

Does this introduce a breaking change?

Other information

Associated off-chain group flow:

  1. Upon create an on-chain group, dashboard will auto create an associated off-chain group with the values below:
    const groupId = onchainGroup.id
    {
    name: groupId,
    description: `This group is associated to the on-chain group ${groupId}`,
    type: "on-chain"
    treeDepth: 16,
    fingerprintDuration: 3600
    }
  2. Users can then get the associated group by querying the group with type="on-chain" && name="groupId".
  3. In dashboard, users can use getGroupByName(name, type) .
  4. In api-sdk, users can use getAssociatedGroups(name).
vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bandada-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 8:57am
bandada-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 8:57am
vplasencia commented 3 weeks ago

Since the associated groups will only be used for the invite codes, we should make sure that people can't add members to those off-chain groups. What do you think?

If you try to use an invite code with the client app, you can see that the new member is added to the associated off-chain group.

waddaboo commented 3 weeks ago

Right, so the associated group will be used solely to generate invite codes and will not store any other information. I'll update it.

waddaboo commented 3 weeks ago

What about checking here if there is no other group with the same name when creating a group? This way, future issues can be avoided.

For this unique name check, do you want it to be unique for the whole database or just unique to admin?

vplasencia commented 3 weeks ago

For this unique name check, do you want it to be unique for the whole database or just unique to admin?

Unique per admin.

waddaboo commented 3 weeks ago

I have implemented the requested changes and new features. Feel free to continue your review. Thanks!