Git Product home page Git Product logo

collabland-dev's People

Contributors

agnes512 avatar amandaolens avatar bhupesh-sf avatar c0mput3rxz avatar calebcgates avatar gitaalekhyapaul avatar ihordiachenko avatar ikaros-lucifer avatar ispeaknerd avatar kenny-io avatar omahs avatar raymondfeng avatar rdutra avatar scooby-devops avatar uniyalabhishek avatar vrajdesai78 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

collabland-dev's Issues

ETH Shanghai Hackathon: Bounty 1: Create Verifiable Credentials Collab.Land Can Consume

Prize Title

Create Verifiable Credentials [Collab.Land](http://Collab.Land) Can VC Gate From

Prize Bounty

5000 USDC

Possible introduction to MetaCartel for further funding

Challenge Description

[Collab.Land](http://Collab.Land) is a token gating platform that allows communities to restrict access to private communities based on NFT and Fungible token ownership. Verifiable Credentials (VCs) are a new category of signed off chain messages.
https://en.wikipedia.org/wiki/Verifiable_credentials

[Collab.Land](http://Collab.Land) will soon allow token gating based on 3rd party Verifiable Credentials. Some examples include token gating based on: “Your platforms most active users”, “different skill tiers in your online game as defined by VCs issued to users”, “Web2 memberships that come with VCs”. The possibilities are endless. What matters though is the value creation for your users and the Collab.Land ecosystem.

Your challenge is to generate VCs for users from a new or existing platform and propose how they could be used by a community admin to gate community specific chats or features.

For example, all United Airlines Platinum Members gain access to a VC gated customer support real time chat room... You get the idea.

Following the W3C Verifiable Credentials Standard. This proposal from Nuggets to [Collab.Land](http://Collab.Land) provides many useful links: https://github.com/orgs/abridged/discussions/64

Collab.Lands current VC schema: APPENDIX A

Submission Requirements

  1. a powerpoint/ google slides - still working on an example to share. these are the current slide titles
  • Executive Brief
  • Simple Summary
  • Abstract
  • Motivation
  • Specifics
  • Opportunity
  • User Impact
  1. a video explaining the proposal under 5 minutes (shows energy and personality)
  2. A video demoing the code and VC generation in under 5 minutes

Judging Criteria

A successful project will show a compelling use case for issuing VCs for use by Community Admins.

Criteria will include:
Value created for the end user
effort put in by the team/ maturity of POC
Feasibility of becoming a widely used product/ use case

Value add to the [Collab.Land](http://Collab.Land) ecosystem

Compelling story that users can understand

Ability to follow through and take the POC into an MVP and eventually production

Winner Announcement Date

One winner will be chosen from all the submissions and will be announced 1 week after submissions close.

Resources

Teams can ask questions in our Discord here:
https://discord.gg/thmcqDx3ys
Note: real time support is only available for hackathon related questions.
Our FAQ and all other questions should be directed to https://collabland.freshdesk.com/

Refer to the "Consume VCs" bounty for additional information: https://github.com/orgs/abridged/discussions/63

APPENDIX A

//=============================================================================
// Licensed Materials - Property of Abridged, Inc.
// (C) Copyright Abridged, Inc. 2022
//=============================================================================

import {auth} from '@collabland/api-security';
import {debugFactory, generateIdSync} from '@collabland/common';
import {userOnly} from '@collabland/component-authorization';
import {experimental} from '@collabland/component-platform';
import {VeramoService, VERAMO_SERVICE} from '@collabland/component-veramo';
import {BindingScope, inject, injectable} from '@loopback/core';
import {get, oas, post, requestBody} from '@loopback/rest';
import {SecurityBindings} from '@loopback/security';
import {DISCORD_SERVICE} from '../keys';
import type {DiscordService} from '../services/discord.service';
import {getDiscordGuildId} from '../services/discord.service';
import {VC} from '../types';

const debug = debugFactory('collabland:veramo-vc');

export interface UserInfo {
  provider?: string;
  alias: string;
  nickname: string;
  name: string;
  picture: string;
}

interface UserProfile {
  id: string;
  verifying: VerifyingRoles[];
}

interface VerifyingRoles {
  communityId: string;
  roleId: string;
  roleName: string;
}

interface DiscordUser {
  roles: string[];
  avatar: string;
  joined_at: string;
  user: {
    id: string;
    username: string;
    avatar: string;
    discriminator: string;
    public_flags: number;
  };
}

interface CredentialSubjectData {
  id: string;
  discordUserId: string;
  discordUserName: string; //`${user.username}#${user.discriminator}`,
  discordUserAvatar: string; //user.displayAvatarURL({ size: 512 }),
  discordGuildId: string; //
  discordGuildName: string;
  discordGuildAvatar: string; //guild.iconURL({ size: 512 }),
  discordRoleId: string;
  discordRoleName: string;
  description: string;
  exp?: number;
}
interface CredentialSubject {
  data: CredentialSubjectData | undefined;
  error?: string;
}

interface VCResponse {
  data: VC[];
  error?: string;
}

@experimental()
@auth()
@userOnly()
@injectable({scope: BindingScope.SINGLETON})
export class VeramoController {
  constructor(
    @inject(VERAMO_SERVICE)
    private veramoService: VeramoService,
    @inject(DISCORD_SERVICE) private discordService: DiscordService,
  ) {}

  /**
   * Get user VCs
   */
  @get('/veramo/did/{user}')
  @oas.response(200, {
    type: 'array',
    items: {
      type: 'object',
      properties: {
        chain_id: {type: 'string'},
        deployment_address: {type: 'string'},
      },
    },
  })
  async getUserVCs(@inject(SecurityBindings.USER) currentUser: UserProfile) {
    return [];
  }

  /**
   * Generate VCs for based on roles
   *
   * @example credentialSubject: {
        // user
        discordUserId: '412814486332899338',
        discordUserName: `Agnes | Collab.Land#2623`,
        discordUserAvatar: '14f020ef756a37284281ebbba8ea84a9',
        // community
        discordGuildId: '903656119656910908',
        discordGuildName: 'CL',
        discordGuildAvatar: '',
        // role
        discordRoleId: '907634262461784084',
        discordRoleName: 'BKA',
        description: 'user Agnes has role BKA in community CL',
      },
   *
   */
  @post('/veramo/identity')
  @oas.response(200, {
    type: 'object',
  })
  async generateVc(
    @inject(SecurityBindings.USER) currentUser: UserProfile,
    @requestBody()
    profile: {aeToken: string; verifying: VerifyingRoles[]},
  ): Promise<VCResponse> {
    debug('decode AE token', currentUser);
    debug('roles', profile.verifying);

    const builtCredentials: CredentialSubject[] = [];

    for (const role of profile.verifying) {
      const roleInfo = await this.buildRoleInfo(role, currentUser.id);
      builtCredentials.push(roleInfo);
    }
    debug('builtCredentials', builtCredentials);
    // TODO: enable other platforms
    const userId = `DIS#USER#${currentUser.id}`;
    return this.getIdentity(userId, builtCredentials);
  }

  async getIdentity(userId: string, verifying: CredentialSubject[]) {
    return this.getIdentityAndUpdateProfile(userId, verifying);
  }

  /**
   * Veramo agent generates VC
   * @param userId
   * @param verifying
   * @returns
   */
  async getIdentityAndUpdateProfile(
    userId: string,
    verifying: CredentialSubject[],
  ): Promise<VCResponse> {
    const issuer = await this.veramoService.agent.didManagerGetOrCreate({
      alias: 'CollabLand',
      // provider: userInfo.provider,
    });

    const vcs: VC[] = [];
    for (const credential of verifying) {
      if (credential.error) {
        return {error: `Invalid community id: ${credential.error}`, data: []};
      }
      const vc = (await this.veramoService.agent.createVerifiableCredential({
        save: true,
        proofFormat: 'jwt',
        credential: {
          id: generateIdSync(),
          '@context': ['https://www.w3.org/2018/credentials/v1'],
          type: ['VerifiableCredential', 'DiscordRole'],
          issuer: {id: issuer.did},
          issuanceDate: new Date().toISOString(),
          credentialSubject: credential.data,
        },
      })) as unknown as VC;
      debug('VC', vc);
      vcs.push(vc);
    }
    return {data: vcs};
  }

  /**
   * Build role information based on the given userId and communityId
   * @param role selected role
   * @param userId example: 412814486332899338
   * @returns
   */
  async buildRoleInfo(role: VerifyingRoles, userId: string, ttl = -1) {
    const guildId = getDiscordGuildId(role.communityId);
    if (!guildId)
      return {
        error: `Invalid CommunityPk ${role.communityId}`,
        data: undefined,
      } as CredentialSubject;
    const commInfo = await this.discordService.getGuildInfo(guildId);
    const userInfo = (await this.discordService.getMemberInfo(
      guildId,
      userId,
    )) as unknown as DiscordUser;
    debug('Community info', commInfo);
    debug('User info', userInfo);
    const data = {
      id: userId,
      // user
      discordUserId: userId,
      discordUserName: `${userInfo.user.username}#${userInfo.user.discriminator}`,
      discordUserAvatar: userInfo.user.avatar
        ? this.discordService.cdn.avatar(userId, userInfo.user.avatar)
        : '',
      // community
      discordGuildId: commInfo.id,
      discordGuildName: commInfo.name,
      discordGuildAvatar: commInfo.icon
        ? this.discordService.cdn.icon(commInfo.id, commInfo.icon)
        : '',
      // role
      discordRoleId: role.roleId,
      discordRoleName: role.roleName,
      description: `${userInfo.user.username}#${userInfo.user.discriminator} has role ${role.roleName} in Discord community ${commInfo.name}`,
    } as CredentialSubjectData;
    if (ttl !== -1) {
      data.exp = Date.now() / 1000 + ttl;
    }
    return {
      data,
    } as CredentialSubject;
  }
}

explain telefrens

https://docs.collab.land/telefrens/intro/#creator-pro-features

So, a crypto bonding curve is like a rollercoaster designed by a math nerd. It's this fancy graph that decides how much your passes are worth. The twist? The more people buy in, the higher its price climbs. But remember, this isn't your grandma's savings bond. The curve can go up or down, making it as unpredictable as Vin Diesel doing standup.

ETH Shanghai Hackathon: Bounty 2: Consume Verifiable Credentials Create By Collab.Land

Prize Title

Consume Verifiable Credentials Created by [Collab.Land](http://Collab.Land)

Prize Bounty

5000 USDC

Possible introduction to MetaCartel for further funding

Challenge Description

[Collab.Land](http://Collab.Land) is a token gating platform that allows communities to restrict access to private communities based on NFT and Fungible token ownership. Verifiable Credentials (VCs) are a new category of signed off chain messages.
https://en.wikipedia.org/wiki/Verifiable_credentials

[Collab.Land](http://Collab.Land) will soon issue users VCs based on their activity, contributions, and accomplishments. Some example VCs may include “joining a community”, “being a member of 10 or more communities”, or “being a community admin”.

Your challenge is to propose a useful VC for Collab.Land to create for it’s members and to integrate the Collab.Land VC into a new or existing platform.

For example, a Collab.Land community admin automatically gets moderator rights in a decentralized social network platform...

Mock those VCs and show how they can be used inside your platform.

Following the W3C Verifiable Credentials Standard. This proposal from Nuggets to [Collab.Land](http://Collab.Land) provides many useful links: https://github.com/orgs/abridged/discussions/64

Submission Requirements

  1. a powerpoint/ google slides - still working on an example to share. these are the current slide titles
  • Executive Brief
  • Simple Summary
  • Abstract
  • Motivation
  • Specifics
  • Opportunity
  • User Impact
  1. a video explaining the proposal under 5 minutes (shows energy and personality)
  2. A video demoing the code and VC consumption in under 5 minutes

Judging Criteria

A successful project will show a compelling use case for consuming [Collab.Land](http://Collab.Land) generated VCs. Criteria will include:
Value created for the end user
effort put in by the team
Feasibility of becoming a widely used product/ use case

Value add to the [Collab.Land](http://Collab.Land) ecosystem

Compelling story that users can understand

Ability to follow through and take the POC into an MVP and eventually production

Winner Announcement Date

One winner will be chosen from all the submissions and will be announced 1 week after submissions close.

Resources

Teams can ask questions in our Discord here:
https://discord.gg/thmcqDx3ys
Note: real time support is only available for hackathon related questions.
Our FAQ and all other questions should be directed to https://collabland.freshdesk.com/

Refer to the "Create VCs" Bounty for additional information: https://github.com/orgs/abridged/discussions/62

add NEAR integration/refactored wallet connection info

add "how to report" fake bots/CL sites page on documentation

💛 Report scams

Please report all suspicious accounts and potential scams in the #report-scam channel.

How to Report to Collab.Land

  1. Post a screenshot of the message.
  2. Include the user id of the sender.

How to get someone's discord user id.

You can also send your report via email to: [email protected]
Or submit a support ticket with the details of the scam.

How to Report to Google

  1. Visit https://safebrowsing.google.com/safebrowsing/report_phish/?hl=en
  2. Paste the scam link in URL field
  3. Click "submit report"

How to Report an account to Discord

  1. Start a discord report
  2. Select Developer Compliance
  3. Report an app/bot
  4. Scams, fraud or cracked accounts

Note: You will need to add the message link and the fake bot's discord ID

How to Report to Twitter (scam link)

  1. Click the ... in the top right of the profile or tweet
  2. Report tweet/account
  3. Everyone on Twitter
  4. Offered tips or currency ... or causes harm
  5. Tricking other people into sending tips, currency, or private financial info

How to Report to Twitter (impersonation)

  1. Click the ... in the top right of the profile or tweet
  2. Report tweet/account
  3. Everyone on Twitter
  4. They're being impersonated or shown a deceptive identity
  5. Pretending to be them
  6. Select account being impersonated

How to Report a collection to OpenSea

  1. Click on the ... icon located next to the item or user's name that you want to report.
  2. Select "Report this item" or "Report this user" from the drop-down menu.
  3. Choose the reason for your report from the available options.
  4. Provide any additional information about the spam that you have observed.
  5. Click "Submit" to send your report to OpenSea's support team.

add tf pfp directions

For pfp:

  • users need to edit their privacy setting so that the bot can see their photos
  • we have tg pfp cached. Telefrens will pick up the change in 24 hour

add tf faq page

  • How long does it take the bot to kick out someone who sold their pass?
  • how do i change my pfp in telefrens? -- change in tg
  • how do i change my name in telefrens? -- change in tg

DevX Website & Documentation

Objective:

Create v1 of DevX website and add documentation

User Story:

As a 2nd or 3rd party developer I need to have a clear idea of how I can get started with contributing to Collab.Land.

Acceptance Criteria:

  • Clearly defined documentation for getting started with Collab.Land

Technical Details:

Update video metadata for youtube

DevX website design & branding

Objective:
Provide design for the DevX website.

User Story:

For finishing the DevX website front-end work, we need the designs.

Acceptance Criteria:

Have a design compatible with Docusaurus & with our new branding.

Technical Details:

Charles will crate a wireframe after Micheal briefs him on the DevX website. Michael will also start a Document for Design.

token story update

Token Story

  • remove "Process for transferring locked tokens" section from token story
  • add "claim has ended as of " banner at top of the token claim FAQ token story

Wording clean up on Intro

Updated the wording on first paragraph to the following:

Collab.Land provides solutions for managing Web3 communities by token-gating the channels and groups. Besides token-gating, we support features such as Tipping(currently limited access), Verifiable Credentials, Decentralized Identities (DIDs), and more. Our goal is to bring web2 users to web3. Notably, for our web2 users we support platforms such as Discord, Telegram, and soon Reddit, Github, and Notion. For our web3 users, we support all the popular chains

specific suggested changes for FYI:
Besides token-gating
Our goal is to bring web2 users to web3
Notably for our web2 users
For our web3 users

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.