@daohost/host 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +39 -0
- package/out/activity.d.ts +16 -0
- package/out/activity.d.ts.map +1 -0
- package/out/activity.js +25 -0
- package/out/activity.js.map +1 -0
- package/out/agents.d.ts +15 -0
- package/out/agents.d.ts.map +1 -0
- package/out/agents.js +14 -0
- package/out/agents.js.map +1 -0
- package/out/api.d.ts +115 -0
- package/out/api.d.ts.map +1 -0
- package/out/api.js +3 -0
- package/out/api.js.map +1 -0
- package/out/assets.d.ts +46 -0
- package/out/assets.d.ts.map +1 -0
- package/out/assets.js +1645 -0
- package/out/assets.js.map +1 -0
- package/out/chains.d.ts +106 -0
- package/out/chains.d.ts.map +1 -0
- package/out/chains.js +605 -0
- package/out/chains.js.map +1 -0
- package/out/deployments.d.ts +9 -0
- package/out/deployments.d.ts.map +1 -0
- package/out/deployments.js +18 -0
- package/out/deployments.js.map +1 -0
- package/out/host/types.d.ts +59 -0
- package/out/host/types.d.ts.map +1 -0
- package/out/host/types.js +35 -0
- package/out/host/types.js.map +1 -0
- package/out/host.d.ts +387 -0
- package/out/host.d.ts.map +1 -0
- package/out/host.js +948 -0
- package/out/host.js.map +1 -0
- package/out/index.d.ts +15 -0
- package/out/index.d.ts.map +1 -0
- package/out/index.js +45 -0
- package/out/index.js.map +1 -0
- package/out/storage/daos.d.ts +3 -0
- package/out/storage/daos.d.ts.map +1 -0
- package/out/storage/daos.js +374 -0
- package/out/storage/daos.js.map +1 -0
- package/out/storage/metaData.d.ts +5 -0
- package/out/storage/metaData.d.ts.map +1 -0
- package/out/storage/metaData.js +44 -0
- package/out/storage/metaData.js.map +1 -0
- package/out/tokenlist.json +2098 -0
- package/out/unit.d.ts +75 -0
- package/out/unit.d.ts.map +1 -0
- package/out/unit.js +3 -0
- package/out/unit.js.map +1 -0
- package/out/validation.d.ts +15 -0
- package/out/validation.d.ts.map +1 -0
- package/out/validation.js +105 -0
- package/out/validation.js.map +1 -0
- package/package.json +37 -0
package/out/unit.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { UnitStatus, UnitType } from "./host/types";
|
|
2
|
+
/**
|
|
3
|
+
Revenue generating unit owned by a DAO.
|
|
4
|
+
@interface
|
|
5
|
+
*/
|
|
6
|
+
export interface IUnit {
|
|
7
|
+
/** Unique unit string id. For DeFi protocol its defiOrg:protocolKey. */
|
|
8
|
+
unitId: string;
|
|
9
|
+
/** Blockchains where Unit deployed. Filled only for initial DAO chain Host instance. */
|
|
10
|
+
chainIds?: string[];
|
|
11
|
+
/** DAO UID of Unit Developer (Pool tasks solver) */
|
|
12
|
+
developerUid?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Unit data that emitted, indexed and saved, translated by Host API later. */
|
|
15
|
+
export interface IUnitEmitData {
|
|
16
|
+
/** Short name of the unit */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Description of the unit */
|
|
19
|
+
description?: string;
|
|
20
|
+
/** Status of unit changes appear when unit starting to work and starting earning revenue */
|
|
21
|
+
status: UnitStatus;
|
|
22
|
+
/** Supported type of the Unit */
|
|
23
|
+
type: UnitType;
|
|
24
|
+
/** The share of a Unit's profit received by the DAO to which it belongs. 100 - 100%. */
|
|
25
|
+
revenueShare: number;
|
|
26
|
+
/** A unique emoji for the shortest possible representation of a Unit. */
|
|
27
|
+
emoji?: string;
|
|
28
|
+
/** Custom image location for Unit. When not used then DAO image used. */
|
|
29
|
+
image?: string;
|
|
30
|
+
/** Frontend endpoints of Unit */
|
|
31
|
+
ui?: IUnitUILink[];
|
|
32
|
+
/** Links to API of the Unit */
|
|
33
|
+
api?: string[];
|
|
34
|
+
/** Components of the Unit. */
|
|
35
|
+
pool?: IUnitPool;
|
|
36
|
+
}
|
|
37
|
+
export interface IUnitUILink {
|
|
38
|
+
href: `https://${string}`;
|
|
39
|
+
title: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Pool of development tasks for Unit. A set of open GitHub issues.
|
|
43
|
+
* @interface
|
|
44
|
+
*/
|
|
45
|
+
export interface IUnitPool {
|
|
46
|
+
repos: string[];
|
|
47
|
+
/** Label on github repositories identifying relation to the pool. */
|
|
48
|
+
label: IGithubLabel;
|
|
49
|
+
contractorSymbol?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface IGithubLabel {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
color: string;
|
|
55
|
+
}
|
|
56
|
+
/** OFF-CHAIN only */
|
|
57
|
+
export interface IGithubUser {
|
|
58
|
+
username: string;
|
|
59
|
+
img: string;
|
|
60
|
+
}
|
|
61
|
+
/** OFF-CHAIN only */
|
|
62
|
+
export interface IGithubIssueV2 {
|
|
63
|
+
repo: string;
|
|
64
|
+
id: number;
|
|
65
|
+
title: string;
|
|
66
|
+
labels: IGithubLabel[];
|
|
67
|
+
assignees: IGithubUser[];
|
|
68
|
+
tasks?: {
|
|
69
|
+
done: boolean;
|
|
70
|
+
name: string;
|
|
71
|
+
category?: string;
|
|
72
|
+
}[];
|
|
73
|
+
body?: string;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=unit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../src/unit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+EAA+E;AAC/E,MAAM,WAAW,aAAa;IAC5B,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,WAAW,CA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B,EAAE,CAAC;IACJ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
package/out/unit.js
ADDED
package/out/unit.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit.js","sourceRoot":"","sources":["../src/unit.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Activity } from "./activity";
|
|
2
|
+
import { IFunding, IVesting, LifecyclePhase } from "./host";
|
|
3
|
+
import { IHostSettings } from "./host/types";
|
|
4
|
+
export declare class Validation {
|
|
5
|
+
/**
|
|
6
|
+
* Ensure that the activity array does not contain duplicate activities
|
|
7
|
+
* and if builder activity exist one more other activity should exist too
|
|
8
|
+
* @param activity
|
|
9
|
+
*/
|
|
10
|
+
static validateActivity(activity: Activity[]): void;
|
|
11
|
+
static validateFunding(daoPhase: LifecyclePhase, fundings: IFunding[], settings: IHostSettings): void;
|
|
12
|
+
static validateVesting(daoPhase: LifecyclePhase, vestings: IVesting[], settings: IHostSettings, tge?: IFunding): void;
|
|
13
|
+
private static _validateVesting;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAe,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,qBAAa,UAAU;IACrB;;;;OAIG;WACW,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE;WAgBrC,eAAe,CAC3B,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,QAAQ,EAAE,EACpB,QAAQ,EAAE,aAAa;WAiDX,eAAe,CAC3B,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,QAAQ,EAAE,EACpB,QAAQ,EAAE,aAAa,EACvB,GAAG,CAAC,EAAE,QAAQ;IA8BhB,OAAO,CAAC,MAAM,CAAC,gBAAgB;CA4BhC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Validation = void 0;
|
|
4
|
+
const host_1 = require("./host");
|
|
5
|
+
class Validation {
|
|
6
|
+
/**
|
|
7
|
+
* Ensure that the activity array does not contain duplicate activities
|
|
8
|
+
* and if builder activity exist one more other activity should exist too
|
|
9
|
+
* @param activity
|
|
10
|
+
*/
|
|
11
|
+
static validateActivity(activity) {
|
|
12
|
+
// ensure that the activity array does not contain duplicate activities
|
|
13
|
+
let set = new Set();
|
|
14
|
+
for (let a of activity) {
|
|
15
|
+
if (set.has(a)) {
|
|
16
|
+
throw new Error("InvalidActivityCombination");
|
|
17
|
+
}
|
|
18
|
+
set.add(a);
|
|
19
|
+
}
|
|
20
|
+
// if builder activity exist one more other activity should exist too
|
|
21
|
+
if (activity.length === 0) {
|
|
22
|
+
throw new Error("ZeroActivityNotAllowed");
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
static validateFunding(daoPhase, fundings, settings) {
|
|
26
|
+
const set = new Set();
|
|
27
|
+
for (const funding of fundings) {
|
|
28
|
+
// ----------------------- Check phase
|
|
29
|
+
if (funding.type === host_1.FundingType.SEED &&
|
|
30
|
+
daoPhase !== host_1.LifecyclePhase.DRAFT) {
|
|
31
|
+
throw new Error("TooLateToUpdateSuchFunding");
|
|
32
|
+
}
|
|
33
|
+
if (funding.type === host_1.FundingType.TGE &&
|
|
34
|
+
![
|
|
35
|
+
host_1.LifecyclePhase.DRAFT,
|
|
36
|
+
host_1.LifecyclePhase.SEED,
|
|
37
|
+
host_1.LifecyclePhase.DEVELOPMENT,
|
|
38
|
+
].includes(daoPhase)) {
|
|
39
|
+
throw new Error("TooLateToUpdateSuchFunding");
|
|
40
|
+
}
|
|
41
|
+
// ----------------------- Check duplicate funding types
|
|
42
|
+
if (set.has(funding.type)) {
|
|
43
|
+
throw new Error("InvalidFundingArray");
|
|
44
|
+
}
|
|
45
|
+
set.add(funding.type);
|
|
46
|
+
// ----------------------- Min/max round duration
|
|
47
|
+
const duration = funding.end - funding.start;
|
|
48
|
+
if (duration < settings.minFundingDuration * 24 * 3600 ||
|
|
49
|
+
duration > settings.maxFundingDuration * 24 * 3600) {
|
|
50
|
+
throw new Error("InvalidFundingPeriod");
|
|
51
|
+
}
|
|
52
|
+
// ----------------------- Min/max raise
|
|
53
|
+
if (funding.minRaise >= funding.maxRaise ||
|
|
54
|
+
funding.minRaise < settings.minFundingRaise ||
|
|
55
|
+
funding.maxRaise > settings.maxFundingRaise) {
|
|
56
|
+
throw new Error("InvalidFundingRaise");
|
|
57
|
+
}
|
|
58
|
+
// start date delay is not checked
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
static validateVesting(daoPhase, vestings, settings, tge) {
|
|
62
|
+
if ([
|
|
63
|
+
host_1.LifecyclePhase.LIVE_CLIFF,
|
|
64
|
+
host_1.LifecyclePhase.LIVE_VESTING,
|
|
65
|
+
host_1.LifecyclePhase.LIVE,
|
|
66
|
+
].includes(daoPhase)) {
|
|
67
|
+
throw new Error("TooLateToUpdateVesting");
|
|
68
|
+
}
|
|
69
|
+
if (!tge?.claim) {
|
|
70
|
+
if (vestings.length !== 0) {
|
|
71
|
+
throw new Error("VestingNotAllowed");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
let totalAllocation = 0;
|
|
76
|
+
for (const vesting of vestings) {
|
|
77
|
+
// check vesting consistency
|
|
78
|
+
this._validateVesting(vesting, settings, tge);
|
|
79
|
+
totalAllocation += vesting.allocation;
|
|
80
|
+
}
|
|
81
|
+
if (totalAllocation >= 100) {
|
|
82
|
+
throw new Error("TotalAllocationTooHigh");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
static _validateVesting(vesting, settings, tge) {
|
|
87
|
+
if (vesting.name.length < settings.minVestingNameLen ||
|
|
88
|
+
vesting.name.length > settings.maxVestingNameLen) {
|
|
89
|
+
throw new Error(`NameLength(${vesting.name.length})`);
|
|
90
|
+
}
|
|
91
|
+
if (vesting.allocation === 0) {
|
|
92
|
+
throw new Error("ZeroValueNotAllowed");
|
|
93
|
+
}
|
|
94
|
+
if (vesting.start < (tge.claim ?? 0) + settings.minCliff * 24 * 3600) {
|
|
95
|
+
throw new Error("IncorrectVestingStart");
|
|
96
|
+
}
|
|
97
|
+
const duration = vesting.end - vesting.start;
|
|
98
|
+
if (duration < settings.minVestingDuration * 24 * 3600 ||
|
|
99
|
+
duration > settings.maxVestingDuration * 24 * 3600) {
|
|
100
|
+
throw new Error("InvalidVestingPeriod");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.Validation = Validation;
|
|
105
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":";;;AACA,iCAAyE;AAGzE,MAAa,UAAU;IACrB;;;;OAIG;IACI,MAAM,CAAC,gBAAgB,CAAC,QAAoB;QACjD,uEAAuE;QACvE,IAAI,GAAG,GAAkB,IAAI,GAAG,EAAE,CAAC;QACnC,KAAK,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC;YACvB,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAChD,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACb,CAAC;QAED,qEAAqE;QACrE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC5C,C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D,MAAM,IAAI,KAAK,CAAC,cAAc,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACxD,CAAC;QAED,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACzC,CAAC;QAED,IAAI,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YACrE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC;QAC7C,IACE,QAAQ,GAAG,QAAQ,CAAC,kBAAkB,GAAG,EAAE,GAAG,IAAI;YAClD,QAAQ,GAAG,QAAQ,CAAC,kBAAkB,GAAG,EAAE,GAAG,IAAI,EAClD,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;CACF;AAxID,gCAwIC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@daohost/host",
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Host library",
|
|
5
|
+
"main": "out/index.js",
|
|
6
|
+
"types": "out/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"out",
|
|
9
|
+
"LICENSE",
|
|
10
|
+
"README.md",
|
|
11
|
+
"package.json"
|
|
12
|
+
],
|
|
13
|
+
"repository": "https://github.com/daohost/host.git",
|
|
14
|
+
"author": "Host Dev",
|
|
15
|
+
"license": "GPL-3.0",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"host": "ts-node tools/overview.ts",
|
|
18
|
+
"overview": "ts-node tools/overview.ts",
|
|
19
|
+
"draw:dao": "ts-node tools/draw-dao-images.ts",
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"test": "jest",
|
|
22
|
+
"coverage": "jest --collect-coverage",
|
|
23
|
+
"postbuild": "shx cp src/tokenlist.json out/",
|
|
24
|
+
"format": "prettier --write .",
|
|
25
|
+
"format:check": "prettier --check ."
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/jest": "^30.0.0",
|
|
29
|
+
"canvas": "^3.2.1",
|
|
30
|
+
"jest": "^30.2.0",
|
|
31
|
+
"prettier": "^3.7.4",
|
|
32
|
+
"shx": "^0.4.0",
|
|
33
|
+
"ts-jest": "^29.4.6",
|
|
34
|
+
"ts-node": "^10.9.2",
|
|
35
|
+
"typescript": "^5.9.3"
|
|
36
|
+
}
|
|
37
|
+
}
|