@sage-protocol/sdk 0.0.8 → 0.1.2
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/README.md +79 -0
- package/dist/browser/index.mjs +6355 -0
- package/dist/index.cjs +232 -14
- package/dist/index.mjs +234 -16
- package/dist/node/index.cjs +8240 -0
- package/dist/node/index.mjs +8251 -0
- package/package.json +21 -3
- package/types/index.d.ts +20 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sage-protocol/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Backend-agnostic SDK for interacting with the Sage Protocol (governance, SubDAOs, tokens).",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -10,9 +10,21 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./types/index.d.ts",
|
|
13
|
-
"
|
|
13
|
+
"browser": "./dist/browser/index.mjs",
|
|
14
14
|
"import": "./dist/index.mjs",
|
|
15
|
-
"
|
|
15
|
+
"require": "./dist/index.cjs",
|
|
16
|
+
"default": "./dist/index.mjs"
|
|
17
|
+
},
|
|
18
|
+
"./browser": {
|
|
19
|
+
"types": "./types/index.d.ts",
|
|
20
|
+
"import": "./dist/browser/index.mjs",
|
|
21
|
+
"default": "./dist/browser/index.mjs"
|
|
22
|
+
},
|
|
23
|
+
"./node": {
|
|
24
|
+
"types": "./types/index.d.ts",
|
|
25
|
+
"import": "./dist/node/index.mjs",
|
|
26
|
+
"require": "./dist/node/index.cjs",
|
|
27
|
+
"default": "./dist/node/index.mjs"
|
|
16
28
|
},
|
|
17
29
|
"./package.json": "./package.json",
|
|
18
30
|
"./types/*": "./types/*"
|
|
@@ -23,6 +35,12 @@
|
|
|
23
35
|
"README.md"
|
|
24
36
|
],
|
|
25
37
|
"sideEffects": false,
|
|
38
|
+
"browser": {
|
|
39
|
+
"fs": false,
|
|
40
|
+
"path": false,
|
|
41
|
+
"os": false,
|
|
42
|
+
"child_process": false
|
|
43
|
+
},
|
|
26
44
|
"repository": {
|
|
27
45
|
"type": "git",
|
|
28
46
|
"url": "git+https://github.com/sage-protocol/sdk.git"
|
package/types/index.d.ts
CHANGED
|
@@ -177,6 +177,15 @@ export interface IpfsClient {
|
|
|
177
177
|
warmGateways(cid: string, options?: { gateways?: string[] | string; timeoutMs?: number; concurrency?: number }): Promise<{ warmed: string[] }>;
|
|
178
178
|
buildGatewayUrls(cid: string, extra?: string[] | string): string[];
|
|
179
179
|
pin(args: { cids: string | string[]; warm?: boolean; gateways?: string[] | string }): Promise<any>;
|
|
180
|
+
recordDiscoveryEvent(event: { promptId: string; type: string; weight?: number; metadata?: Record<string, unknown>; source?: string; createdAt?: string; actor?: string }): Promise<any>;
|
|
181
|
+
recordMcpUsage(args: { promptId: string; metadata?: Record<string, unknown>; address?: string }): Promise<any>;
|
|
182
|
+
recordLaunchEvent(args: { promptId: string; metadata?: Record<string, unknown>; address?: string }): Promise<any>;
|
|
183
|
+
submitGovernanceReport(args: { promptId: string; reason?: string; note?: string; weight?: number; address?: string }): Promise<any>;
|
|
184
|
+
listGovernanceReports(args?: { status?: string; limit?: number; cursor?: number }): Promise<any>;
|
|
185
|
+
reviewGovernanceReport(args: { id: string; status: string; note?: string; action?: string }): Promise<any>;
|
|
186
|
+
batchGovernanceReports(args: { ids: string[]; action: string; note?: string }): Promise<any>;
|
|
187
|
+
fetchDiscovery(args?: { filter?: string; limit?: number }): Promise<any>;
|
|
188
|
+
fetchDiscoveryMetrics(): Promise<any>;
|
|
180
189
|
generateCid(payload: any): string;
|
|
181
190
|
}
|
|
182
191
|
|
|
@@ -195,6 +204,17 @@ export interface IpfsModule {
|
|
|
195
204
|
pinataJwt?: string;
|
|
196
205
|
workerUploadUrl?: string;
|
|
197
206
|
workerUploadToken?: string;
|
|
207
|
+
workerBaseUrl?: string;
|
|
208
|
+
workerAddress?: string;
|
|
209
|
+
workerDiscoveryEventsPath?: string;
|
|
210
|
+
workerDiscoveryMcpPath?: string;
|
|
211
|
+
workerDiscoveryLaunchPath?: string;
|
|
212
|
+
workerDiscoveryFeedPath?: string;
|
|
213
|
+
workerDiscoveryMetricsPath?: string;
|
|
214
|
+
workerGovernanceReportPath?: string;
|
|
215
|
+
workerGovernanceReportsPath?: string;
|
|
216
|
+
workerGovernanceReviewPath?: string;
|
|
217
|
+
workerGovernanceBatchPath?: string;
|
|
198
218
|
web3Token?: string;
|
|
199
219
|
env?: Record<string, string | undefined>;
|
|
200
220
|
} & Record<string, any>): IpfsClient;
|