VESS
Search
K

Overview

WIP
VESS SDK is the js library that makes it easy to work with data sets that build work identities, such as work credentials, membership credentials, and event attendance credentials.
VESS content is stored in a decentralized data network called Ceramic. This means that data shared by users is open and available to the public.

Install

yarn add vess-sdk

Getting started

Initialize

import { getVESS } from "vess-sdk"
const vess = getVESS()

Connect Ceramic

import { ExternalProvider } from "@ethersproject/providers";
import { getVESS } from "vess-sdk"
const vess = getVESS()
const provider:any // any ethereum provider that is already connected
const {session} = await vess.connect(provider)

Retrieve Membership Credential

import { ExternalProvider } from "@ethersproject/providers";
import { getVESS } from "vess-sdk"
const did = "did:pkh:eip155:1:0x........."
const vess = getVESS()
const heldMemberships = vess.getHeldMembershipSubjects(did) // return did's memberships.

Issue Membership Credential

At this time, only early adopters can create organizations and membership types. Please submit an Early Adopter application.
import { ExternalProvider } from "@ethersproject/providers";
import { getVESS } from "vess-sdk"
const vess = getVESS()
const provider:ExternalProvider = // any ExternalProvider
const session = await vess.connect(provider)
const issuerDid = session.did.parent
const subjectDid = "did:pkh:eip155:1:0x........."
// In order to issue membership verifiable credential,
// you need to prepare organization and membership type subject.
const org:Organization = await vess.getCreatedOrganization(issuerDid)
const membershipType: Membership = await vess.getCreatedMemberships(issuerDid)
const content: VerifiableMembershipSubject = {
id: subjectDid,
organizationName: org.name,
organizationIcon: org.icon || "",
organizationId: org.ceramicId,
membershipName: membershipType.name,
membershipIcon: membershipType.icon || "",
membershipId: membershipType.ceramicId,
};
await vess.issueMembershipSubject(content);

Next steps:

For more infomation, please check below.
Please visit here for an example of VESS-SDK usage.