@stabilitydao/host 0.2.1 → 0.2.3
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/out/activity/builder.d.ts +135 -0
- package/out/activity/builder.d.ts.map +1 -0
- package/out/activity/builder.js +17 -0
- package/out/activity/builder.js.map +1 -0
- package/out/activity/index.d.ts +18 -0
- package/out/activity/index.d.ts.map +1 -0
- package/out/activity/index.js +31 -0
- package/out/activity/index.js.map +1 -0
- package/out/agents.d.ts +21 -0
- package/out/agents.d.ts.map +1 -0
- package/out/agents.js +16 -0
- package/out/agents.js.map +1 -0
- package/out/api.d.ts +47 -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 +13 -0
- package/out/assets.d.ts.map +1 -0
- package/out/assets.js +1515 -0
- package/out/assets.js.map +1 -0
- package/out/chains.d.ts +105 -0
- package/out/chains.d.ts.map +1 -0
- package/out/chains.js +591 -0
- package/out/chains.js.map +1 -0
- package/out/host.d.ts +407 -0
- package/out/host.d.ts.map +1 -0
- package/out/host.js +765 -0
- package/out/host.js.map +1 -0
- package/out/index.d.ts +10 -0
- package/out/index.d.ts.map +1 -0
- package/out/index.js.map +1 -0
- package/out/storage/daoMetaData.d.ts +5 -0
- package/out/storage/daoMetaData.d.ts.map +1 -0
- package/out/storage/daoMetaData.js +311 -0
- package/out/storage/daoMetaData.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 +303 -0
- package/out/storage/daos.js.map +1 -0
- package/package.json +7 -1
- package/.github/workflows/npm.yml +0 -19
- package/.github/workflows/prettier.yml +0 -25
- package/.github/workflows/test.yml +0 -29
- package/.prettierignore +0 -4
- package/.prettierrc +0 -1
- package/jest.config.js +0 -9
- package/logo.png +0 -0
- package/src/activity/builder.ts +0 -141
- package/src/activity/index.ts +0 -34
- package/src/agents.ts +0 -31
- package/src/api.ts +0 -51
- package/src/assets.ts +0 -1579
- package/src/chains.ts +0 -604
- package/src/host.ts +0 -1212
- package/src/index.ts +0 -36
- package/src/storage/daoMetaData.ts +0 -312
- package/src/storage/daos.ts +0 -306
- package/tests/assets.test.ts +0 -61
- package/tests/chains.test.ts +0 -22
- package/tests/host.test.ts +0 -811
- package/tsconfig.json +0 -18
- /package/{src → out}/tokenlist.json +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
BUILDER activity.
|
|
3
|
+
BUILDER is a team of engineers managed by DAOs.
|
|
4
|
+
*/
|
|
5
|
+
import { UnitComponentCategory } from "../host";
|
|
6
|
+
/**
|
|
7
|
+
BUILDER data.
|
|
8
|
+
|
|
9
|
+
@alpha
|
|
10
|
+
@interface
|
|
11
|
+
*/
|
|
12
|
+
export interface IBuilderActivity {
|
|
13
|
+
/** Safe multisig account of dev team */
|
|
14
|
+
multisig: string[];
|
|
15
|
+
/** Tracked Github repositories where development going on */
|
|
16
|
+
repo: string[];
|
|
17
|
+
/** Engineers */
|
|
18
|
+
workers: IWorker[];
|
|
19
|
+
/** Conveyors of unit components. */
|
|
20
|
+
conveyors: IConveyor[];
|
|
21
|
+
/** Pools of development tasks. */
|
|
22
|
+
pools: IPool[];
|
|
23
|
+
/** Total salaries paid */
|
|
24
|
+
burnRate: {
|
|
25
|
+
/** Period of burning. Can be 1 month or any other. */
|
|
26
|
+
period: string;
|
|
27
|
+
/** How much USD was spent during period. */
|
|
28
|
+
usdAmount: number;
|
|
29
|
+
}[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
Engineer hired by a DAO. Can be human or machine (AI agent).
|
|
33
|
+
|
|
34
|
+
@alpha
|
|
35
|
+
@interface
|
|
36
|
+
*/
|
|
37
|
+
export interface IWorker {
|
|
38
|
+
/** Github username */
|
|
39
|
+
github: string;
|
|
40
|
+
/** USD hourly rate */
|
|
41
|
+
rate?: number;
|
|
42
|
+
/** USD xTOKEN hourly rate */
|
|
43
|
+
xRate?: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Pool of development tasks. A set of open github issues.
|
|
47
|
+
* @interface
|
|
48
|
+
*/
|
|
49
|
+
export interface IPool {
|
|
50
|
+
/** Pool is always linked to a set of units. */
|
|
51
|
+
unitIds: string[];
|
|
52
|
+
/** Short name of the pool. */
|
|
53
|
+
name: string;
|
|
54
|
+
/** Label on github repositories identifying relation to the pool. */
|
|
55
|
+
label: IGithubLabel;
|
|
56
|
+
/** What need to be done by the pool? */
|
|
57
|
+
description?: string;
|
|
58
|
+
/** Each solved task in the pool must have an artifact of specified type. */
|
|
59
|
+
artifacts?: ArtifactType[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Conveyor belt for building a components for units.
|
|
63
|
+
* @interface
|
|
64
|
+
*/
|
|
65
|
+
export interface IConveyor {
|
|
66
|
+
/** Linked unit */
|
|
67
|
+
unitId: string;
|
|
68
|
+
componentCategory: UnitComponentCategory;
|
|
69
|
+
name: string;
|
|
70
|
+
symbol: string;
|
|
71
|
+
type: string;
|
|
72
|
+
label: IGithubLabel;
|
|
73
|
+
description: string;
|
|
74
|
+
issueTitleTemplate: string;
|
|
75
|
+
taskIdIs: string;
|
|
76
|
+
steps: IConveyorStep[];
|
|
77
|
+
}
|
|
78
|
+
export interface IGithubLabel {
|
|
79
|
+
name: string;
|
|
80
|
+
description: string;
|
|
81
|
+
color: string;
|
|
82
|
+
}
|
|
83
|
+
export interface IGithubUser {
|
|
84
|
+
username: string;
|
|
85
|
+
img: string;
|
|
86
|
+
}
|
|
87
|
+
export interface IGithubIssue {
|
|
88
|
+
repo: string;
|
|
89
|
+
id: number;
|
|
90
|
+
title: string;
|
|
91
|
+
labels: IGithubLabel[];
|
|
92
|
+
assignees: IGithubUser;
|
|
93
|
+
body?: string;
|
|
94
|
+
}
|
|
95
|
+
export declare const enum ArtifactType {
|
|
96
|
+
URL_UI = "URL to UI page",
|
|
97
|
+
URL_RELEASE = "Github package release link",
|
|
98
|
+
DEPLOYMENT_ADDRESSES = "Deployment addresses",
|
|
99
|
+
URL_API = "API endpoint",
|
|
100
|
+
URL_STATIC = "Static content URL",
|
|
101
|
+
CONTRACT_ADDRESS = "Address of deployed contract"
|
|
102
|
+
}
|
|
103
|
+
export interface IConveyorStep {
|
|
104
|
+
name: string;
|
|
105
|
+
issues: {
|
|
106
|
+
repo: string;
|
|
107
|
+
taskList?: string[];
|
|
108
|
+
issueTemplate?: string;
|
|
109
|
+
body?: string;
|
|
110
|
+
generator?: string;
|
|
111
|
+
}[];
|
|
112
|
+
artifacts?: ArtifactType[];
|
|
113
|
+
result?: string;
|
|
114
|
+
guide?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface IBuildersMemory {
|
|
117
|
+
[tokenSymbol: string]: {
|
|
118
|
+
openIssues: {
|
|
119
|
+
total: {
|
|
120
|
+
[repo: string]: number;
|
|
121
|
+
};
|
|
122
|
+
pools: {
|
|
123
|
+
[poolName: string]: IGithubIssue[];
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
conveyors: {
|
|
127
|
+
[conveyorName: string]: {
|
|
128
|
+
[taskId: string]: {
|
|
129
|
+
[stepName: string]: IGithubIssue[];
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/activity/builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,6DAA6D;IAC7D,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,gBAAgB;IAChB,OAAO,EAAE,OAAO,EAAE,CAAC;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AC;iBACpC,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;CACH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
BUILDER activity.
|
|
4
|
+
BUILDER is a team of engineers managed by DAOs.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.ArtifactType = void 0;
|
|
8
|
+
var ArtifactType;
|
|
9
|
+
(function (ArtifactType) {
|
|
10
|
+
ArtifactType["URL_UI"] = "URL to UI page";
|
|
11
|
+
ArtifactType["URL_RELEASE"] = "Github package release link";
|
|
12
|
+
ArtifactType["DEPLOYMENT_ADDRESSES"] = "Deployment addresses";
|
|
13
|
+
ArtifactType["URL_API"] = "API endpoint";
|
|
14
|
+
ArtifactType["URL_STATIC"] = "Static content URL";
|
|
15
|
+
ArtifactType["CONTRACT_ADDRESS"] = "Address of deployed contract";
|
|
16
|
+
})(ArtifactType || (exports.ArtifactType = ArtifactType = {}));
|
|
17
|
+
//# sourceMappingURL=builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/activity/builder.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAoGH,IAAkB,YAOjB;AAPD,WAAkB,YAAY;IAC5B,yCAAyB,CAAA;IACzB,2DAA2C,CAAA;IAC3C,6DAA6C,CAAA;IAC7C,wCAAwB,CAAA;IACxB,iDAAiC,CAAA;IACjC,iEAAiD,CAAA;AACnD,CAAC,EAPiB,YAAY,4BAAZ,YAAY,QAO7B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UnitType } from "../host";
|
|
2
|
+
/** Organization activities supported by OS. */
|
|
3
|
+
export declare enum Activity {
|
|
4
|
+
/** Owner of Decentralized Finance protocols */
|
|
5
|
+
DEFI = "DEFI",
|
|
6
|
+
/** Owner of Maximum Extractable Value tools */
|
|
7
|
+
MEV = "MEV",
|
|
8
|
+
/** BUILDER is a team of engineers managed by DAOs. */
|
|
9
|
+
BUILDER = "BUILDER"
|
|
10
|
+
}
|
|
11
|
+
export declare const activities: {
|
|
12
|
+
[activity in Activity]: {
|
|
13
|
+
title: string;
|
|
14
|
+
unitTypes: UnitType[];
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/activity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,+CAA+C;AAC/C,oBAAY,QAAQ;IAClB,+CAA+C;IAC/C,IAAI,SAAS;IACb,+CAA+C;IAC/C,GAAG,QAAQ;IACX,sDAAsD;IACtD,OAAO,YAAY;CAGpB;AAED,eAAO,MAAM,UAAU,EAAE;KACtB,QAAQ,IAAI,QAAQ,GAAG;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,QAAQ,EAAE,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CAcF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.activities = exports.Activity = void 0;
|
|
4
|
+
const host_1 = require("../host");
|
|
5
|
+
/** Organization activities supported by OS. */
|
|
6
|
+
var Activity;
|
|
7
|
+
(function (Activity) {
|
|
8
|
+
/** Owner of Decentralized Finance protocols */
|
|
9
|
+
Activity["DEFI"] = "DEFI";
|
|
10
|
+
/** Owner of Maximum Extractable Value tools */
|
|
11
|
+
Activity["MEV"] = "MEV";
|
|
12
|
+
/** BUILDER is a team of engineers managed by DAOs. */
|
|
13
|
+
Activity["BUILDER"] = "BUILDER";
|
|
14
|
+
/** Owner of Software as a Service business */
|
|
15
|
+
//SAAS_OPERATOR = "SAAS_OPERATOR",
|
|
16
|
+
})(Activity || (exports.Activity = Activity = {}));
|
|
17
|
+
exports.activities = {
|
|
18
|
+
[Activity.DEFI]: {
|
|
19
|
+
title: "Decentralized Finance Protocol Operator",
|
|
20
|
+
unitTypes: [host_1.UnitType.DEFI_PROTOCOL],
|
|
21
|
+
},
|
|
22
|
+
[Activity.MEV]: {
|
|
23
|
+
title: "Maximum Extractable Value tools",
|
|
24
|
+
unitTypes: [host_1.UnitType.MEV_SEARCHER],
|
|
25
|
+
},
|
|
26
|
+
[Activity.BUILDER]: {
|
|
27
|
+
title: "Team of engineers with multisig wallet.",
|
|
28
|
+
unitTypes: [],
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/activity/index.ts"],"names":[],"mappings":";;;AAAA,kCAAmC;AAEnC,+CAA+C;AAC/C,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,+CAA+C;IAC/C,yBAAa,CAAA;IACb,+CAA+C;IAC/C,uBAAW,CAAA;IACX,sDAAsD;IACtD,+BAAmB,CAAA;IACnB,8CAA8C;IAC9C,kCAAkC;AACpC,CAAC,EATW,QAAQ,wBAAR,QAAQ,QASnB;AAEY,QAAA,UAAU,GAMnB;IACF,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACf,KAAK,EAAE,yCAAyC;QAChD,SAAS,EAAE,CAAC,eAAQ,CAAC,aAAa,CAAC;KACpC;IACD,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACd,KAAK,EAAE,iCAAiC;QACxC,SAAS,EAAE,CAAC,eAAQ,CAAC,YAAY,CAAC;KACnC;IACD,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QAClB,KAAK,EAAE,yCAAyC;QAChD,SAAS,EAAE,EAAE;KACd;CACF,CAAC"}
|
package/out/agents.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface IAgent {
|
|
2
|
+
api: string[];
|
|
3
|
+
roles: AgentRole[];
|
|
4
|
+
name: string;
|
|
5
|
+
directives?: string[];
|
|
6
|
+
image?: string;
|
|
7
|
+
telegram?: `@${string}`;
|
|
8
|
+
}
|
|
9
|
+
export declare const enum AgentRole {
|
|
10
|
+
OPERATOR = "OPERATOR"
|
|
11
|
+
}
|
|
12
|
+
export interface IAgentRuntime {
|
|
13
|
+
machineIDs: string[];
|
|
14
|
+
providers: {
|
|
15
|
+
name: string;
|
|
16
|
+
image: string;
|
|
17
|
+
queries: number;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
export declare const emptyRuntime: IAgentRuntime;
|
|
21
|
+
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,IAAI,MAAM,EAAE,CAAC;CACzB;AAED,0BAAkB,SAAS;IACzB,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL;AAED,eAAO,MAAM,YAAY,EAAE,aAG1B,CAAC"}
|
package/out/agents.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Agent is highly abstract and high-level entity that follow role directives.
|
|
4
|
+
* Agents are owned by DAOs built on Host.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.emptyRuntime = exports.AgentRole = void 0;
|
|
8
|
+
var AgentRole;
|
|
9
|
+
(function (AgentRole) {
|
|
10
|
+
AgentRole["OPERATOR"] = "OPERATOR";
|
|
11
|
+
})(AgentRole || (exports.AgentRole = AgentRole = {}));
|
|
12
|
+
exports.emptyRuntime = {
|
|
13
|
+
machineIDs: [],
|
|
14
|
+
providers: [],
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAWH,IAAkB,SAEjB;AAFD,WAAkB,SAAS;IACzB,kCAAqB,CAAA;AACvB,CAAC,EAFiB,SAAS,yBAAT,SAAS,QAE1B;AAWY,QAAA,YAAY,GAAkB;IACzC,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,EAAE;CACd,CAAC"}
|
package/out/api.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IBuildersMemory } from "./activity/builder";
|
|
2
|
+
/**
|
|
3
|
+
Hot memory with indexed and aggregated data. OS API reply.
|
|
4
|
+
@interface
|
|
5
|
+
*/
|
|
6
|
+
export interface IOSMemory {
|
|
7
|
+
/** Prices of assets */
|
|
8
|
+
prices: Prices;
|
|
9
|
+
/** Total Value Locked in blockchains */
|
|
10
|
+
chainTvl: {
|
|
11
|
+
[chainId: string]: number;
|
|
12
|
+
};
|
|
13
|
+
/** DAO runtime data. Updates each minute or faster. */
|
|
14
|
+
daos: {
|
|
15
|
+
[symbol: string]: IDAOAPIData;
|
|
16
|
+
};
|
|
17
|
+
/** Instant Updates by subscribing to github application webhooks */
|
|
18
|
+
builders: IBuildersMemory;
|
|
19
|
+
}
|
|
20
|
+
export interface IDAOAPIData {
|
|
21
|
+
/** Price from Stability interchain oracle */
|
|
22
|
+
oraclePrice: string;
|
|
23
|
+
/** Coingecko price */
|
|
24
|
+
coingeckoPrice?: string;
|
|
25
|
+
/** Data for total revenue chart */
|
|
26
|
+
revenueChart: RevenueChart;
|
|
27
|
+
/** Extracted on-chain data */
|
|
28
|
+
onChainData: {
|
|
29
|
+
[chainId: string]: {
|
|
30
|
+
stakingAPR: number;
|
|
31
|
+
staked: number;
|
|
32
|
+
units: {
|
|
33
|
+
[unitId: string]: {
|
|
34
|
+
pendingRevenue: number;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export type Prices = {
|
|
41
|
+
[symbol: string]: {
|
|
42
|
+
price: string;
|
|
43
|
+
priceChange: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export type RevenueChart = Record<number, string>;
|
|
47
|
+
//# sourceMappingURL=api.d.ts.map
|
package/out/api.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IAEf,wCAAwC;IACxC,QAAQ,EAAE;QAAE,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAExC,uDAAuD;IACvD,IAAI,EAAE;QACJ,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC;KAC/B,CAAC;IAEF,oEAAoE;IACpE,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,YAAY,EAAE,YAAY,CAAC;IAC3B,8BAA8B;IAC9B,WAAW,EAAE;QACX,CAAC,OAAO,EAAE,MAAM,GAAG;YACjB,UAAU,EAAE,MAAM,CAAC;YACnB,MAAM,EAAE,MAAM,CAAC;YACf,KAAK,EAAE;gBACL,CAAC,MAAM,EAAE,MAAM,GAAG;oBAChB,cAAc,EAAE,MAAM,CAAC;iBACxB,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,MAAM,MAAM,MAAM,GAAG;IACnB,CAAC,MAAM,EAAE,MAAM,GAAG;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
package/out/api.js
ADDED
package/out/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":""}
|
package/out/assets.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type Asset = {
|
|
2
|
+
addresses: {
|
|
3
|
+
[chainId: string]: `0x${string}` | `0x${string}`[];
|
|
4
|
+
};
|
|
5
|
+
symbol: string;
|
|
6
|
+
description: string;
|
|
7
|
+
website: string;
|
|
8
|
+
color: string;
|
|
9
|
+
mintApp?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const assets: Asset[];
|
|
12
|
+
export declare const getAsset: (chainId: string, tokenAddress: `0x${string}`) => Asset | undefined;
|
|
13
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG;IAClB,SAAS,EAAE;QAAE,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,GAAG,KAAK,MAAM,EAAE,EAAE,CAAA;KAAE,CAAC;IAClE,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,EAggDzB,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,SAAS,MAAM,EACf,cAAc,KAAK,MAAM,EAAE,KAC1B,KAAK,GAAG,SAkBV,CAAC"}
|