abridged / collabland-dev Goto Github PK
View Code? Open in Web Editor NEWDeveloper Documentation for Collab.Land 3rd Party Integrations
Home Page: https://docs.collab.land
Developer Documentation for Collab.Land 3rd Party Integrations
Home Page: https://docs.collab.land
netlify auto-build is running under Kenny's account still, need to reclaim control of it
Create Verifiable Credentials [Collab.Land](http://Collab.Land) Can VC Gate From
5000 USDC
Possible introduction to MetaCartel for further funding
[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
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
One winner will be chosen from all the submissions and will be announced 1 week after submissions close.
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;
}
}
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.
on https://docs.collab.land/dao/governance/contracts
use 1/100 for the contract default and 139/1000 for the additional factors
:::warning
Any server member who can view #collabland-config can change your TGRs. For security, make #collabland-config a private channel for your admins only.
:::
Consume Verifiable Credentials Created by [Collab.Land](http://Collab.Land)
5000 USDC
Possible introduction to MetaCartel for further funding
[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
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
One winner will be chosen from all the submissions and will be announced 1 week after submissions close.
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
linked to dev updates https://github.com/abridged/collabland-monorepo/issues/2314
change background check language to balance check
in the docs
balance check
section in https://docs.collab.land/help-docs/key-features/token-gate-communitieshttps://dev.collab.land/docs/downstream-integrations/api/token-gating
Remove bullets under Try it Out sections and make POST default black, same as under Sample Request syntax. There are three Try it Outs on that page that should be fixed.
https://docs.collab.land/help-docs/key-features/gm-pass
thread in slack, add NEAR info in 3 places
NEAR is non-evm, | NEAR | NEAR
-------
network)hi @kenny-io
https://dev.collab.land/tutorials/token-gating
As subject title, the full-screen mode seems disabled. However I can copy the url directly into the browser and then make it full screen.
Please report all suspicious accounts and potential scams in the #report-scam channel.
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.
URL
fieldNote: You will need to add the message link and the fake bot's discord ID
...
in the top right of the profile or tweet...
in the top right of the profile or tweet...
icon located next to the item or user's name that you want to report.For pfp:
contributing.md
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:
Technical Details:
Add search to devX docs site
https://docs.collab.land/help-docs/FAQ/collab-token
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.
join-flow.png
)Write the RaidGuild case study
new docs page erc7160 https://docs.collab.land/help-docs/command-center/create-a-tgr/evm/mainnet-erc1155
https://docs.collab.land/docs/upstream-integrations/#zero-to-hero-with-miniapps
medium post https://medium.com/collab-land/opensea-auth-is-now-live-on-collab-land-8494224fba7f
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
enable community to make issues/PRs in the repo to improve docs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.