Skip to content

Commit

Permalink
Merge pull request #1 from Hugo-SEQUIER/alpha.2
Browse files Browse the repository at this point in the history
Orchestrator architecture V1
  • Loading branch information
Hugo-SEQUIER authored Jan 10, 2025
2 parents 6008e0d + 8c80de5 commit 826e3b7
Show file tree
Hide file tree
Showing 11 changed files with 452 additions and 289 deletions.
30 changes: 27 additions & 3 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,7 @@ export interface UploadIrysResult {
success: boolean;
url?: string;
error?: string;
data?: any;
}

export interface DataIrysFetchedFromGQL {
Expand All @@ -1273,10 +1274,33 @@ export interface DataIrysFetchedFromGQL {
error?: string;
}

export interface GraphQLTag {
name: string;
values: any[];
}

export const enum IrysMessageType {
REQUEST = "REQUEST",
DATA_STORAGE = "DATA_STORAGE",
REQUEST_RESPONSE = "REQUEST_RESPONSE",
}

export const enum IrysDataType {
FILE = "FILE",
IMAGE = "IMAGE",
OTHER = "OTHER",
}

export interface IrysTimestamp {
from: number;
to: number;
}

export interface IIrysService extends Service {
uploadDataOnIrys(data: any): Promise<UploadIrysResult>;
getDataFromAnAgent(agentsWalletPublicKeys: string[]): Promise<DataIrysFetchedFromGQL>;
uploadFileOrImageOnIrys(data: string): Promise<UploadIrysResult>;
getDataFromAnAgent(agentsWalletPublicKeys: string[], tags: GraphQLTag[], timestamp: IrysTimestamp): Promise<DataIrysFetchedFromGQL>;
uploadFileOrImageOnIrys(data: string, tags: GraphQLTag[]): Promise<UploadIrysResult>;
workerUploadDataOnIrys(data: any, dataType: IrysDataType, messageType: IrysMessageType, serviceCategory: string[], protocol: string[], validationThreshold: number[], minimumProviders: number[], testProvider: boolean[], reputation: number[]): Promise<UploadIrysResult>;
providerUploadDataOnIrys(data: any, dataType: IrysDataType, serviceCategory: string[], protocol: string[]): Promise<UploadIrysResult>;
}

export type SearchImage = {
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/plugin-irys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ To install this plugin, run the following command:
pnpm add @elizaos/plugin-irys
```


## Features

- **Decentralized Data Storage**: Store data permanently on the Irys network
Expand Down Expand Up @@ -66,6 +65,7 @@ To retrieve data from the Irys network, you can use the `getDataFromAnAgent` fun

- For files and images: Returns the URL of the stored content
- For other data types: Returns a JSON object with the following structure:

```typescript
{
data: string, // The stored data
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-irys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"scripts": {
"build": "tsup --format esm --dts",
"dev": "tsup --format esm --dts --watch",
"lint": "eslint --fix --cache ."
"lint": "eslint --fix --cache .",
"test": "vitest run"
}
}
44 changes: 0 additions & 44 deletions packages/plugin-irys/src/agent-test/actions/retrieveData.ts

This file was deleted.

47 changes: 0 additions & 47 deletions packages/plugin-irys/src/agent-test/actions/storeData.ts

This file was deleted.

165 changes: 0 additions & 165 deletions packages/plugin-irys/src/agent-test/services/irysService.ts

This file was deleted.

Loading

0 comments on commit 826e3b7

Please sign in to comment.