Managing Projects
Projects are created under accounts(teams)

ProjectID

Unique identifier for a Project. It is the Keccak256 hash of the Parent AccountID concatenated with the project name.

Generate ID Function

The generate ID function generates an ID for an account.
1
export function generateID(
2
parentID: ethers.BigNumberish,
3
name: string
4
): string
Copied!

Project Meta

The SDK exports the following class for metadata associated with a project.
1
export class ProjectMeta {
2
/** project image used for profile pic */
3
public image?: string;
4
/** main project image used for discovery */
5
public main_capsule?: string;
6
/** project friendly name */
7
public name?: string;
8
/** short description of the project. */
9
public short_description?: string;
10
/** extended description of the project. */
11
public description?: string;
12
/** link to the project website. */
13
public external_url?: string;
14
/** type used by clients to handle project */
15
public type?: string;
16
/** tags used for searching and categorization */
17
public tags?: string[];
18
/** videos and graphics of the project */
19
public gallery?: {
20
name: string,
21
src: string,
22
type: string,
23
preview?: string,
24
}[];
25
}
Copied!

Project Methods

createProject Method

Create a project under an account.
1
async createProject(
2
accountID: ethers.BigNumberish,
3
name: string,
4
meta: ProjectMeta,
5
members: string[]
6
): Promise<TransactionResponse>
Copied!
Parameter
Type
Description
accountID
BigNumber
Creates a project under the Input accountID​
name
string
Name of the project, used to create the ProjectID​
meta
​ProjectMeta​
Metadata associated with a project.
members
Array<string>
Array of addresses that can participate in a project.

projectExists Method ReadOnly

Checks if a project Exists.
1
async projectExists(
2
projectID: ethers.BigNumberish
3
): Promise<boolean>
Copied!
Parameters
Type
Description
ProjectID
BigNumber
​ID of the project​

getProjectMeta Method Readonly

This method returns the metadata associated with the project.
1
async getProjectMeta(
2
projectID: ethers.BigNumberish
3
): Promise<ProjectMeta>
Copied!
Parameter
Type
Description
ProjectID
BigNumber

setProjectMeta Method

Resets the metadata for an existing account.
1
async setProjectMeta(
2
projectID: ethers.BigNumberish,
3
meta: ProjectMeta
4
): Promise<TransactionResponse>
Copied!
Parameter
Type
Description
ProjectID
BigNumber
meta
​ProjectMeta​
Updated metadata for the project.

addProjectMember Method

Members of a project are addresses which are can participate in a project. This method adds a member to the project.
1
async addProjectMember(
2
projectID: ethers.BigNumberish,
3
address: string
4
): Promise<TransactionResponse>
Copied!
Parameter
Type
Description
projectID
BigNumber
address
string
Address to add.

removeProjectMember

Removes an address form the Project.
1
async removeProjectMember(
2
projectID: ethers.BigNumberish,
3
address: string
4
): Promise<TransactionResponse>
Copied!
Parameter
Type
Description
projectID
BigNumber
address
string
Address to remove.

getProjectMembers Method ReadOnly

Returns the list of members of the project.
1
async getProjectMembers(
2
projectID: ethers.BigNumberish
3
): Promise<string[]>
Copied!
Parameter
Type
Description
projectID
BigNumber

isProjectMember Method ReadOnly

Checks if a particular address is a member of a Project.
1
async isProjectMember(
2
projectID: ethers.BigNumberish,
3
address: string
4
): Promise<boolean>
Copied!
Parameter
Type
Description
projectID
BigNumber
address
string
Address of the member

getProjectAccountID Method ReadOnly

Returns the accountID that created the project.
1
async getProjectAccountID(
2
projectID: ethers.BigNumberish
3
): Promise<ethers.BigNumber>
Copied!
Parameter
Type
Description
projectID
BigNumber
​
Export as PDF
Copy link