@xyo-network/diviner-archivist 5.3.22 → 5.3.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-archivist",
3
- "version": "5.3.22",
3
+ "version": "5.3.25",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,43 +30,39 @@
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
33
- "src",
34
33
  "!**/*.bench.*",
35
34
  "!**/*.spec.*",
36
35
  "!**/*.test.*",
37
36
  "README.md"
38
37
  ],
39
38
  "dependencies": {
40
- "@xyo-network/diviner-abstract": "~5.3.22",
41
- "@xyo-network/diviner-huri": "~5.3.22",
42
- "@xyo-network/diviner-model": "~5.3.22",
43
- "@xyo-network/huri": "~5.3.22",
44
- "@xyo-network/module-model": "~5.3.22",
45
- "@xyo-network/payload-model": "~5.3.22"
39
+ "@xyo-network/diviner-abstract": "~5.3.25",
40
+ "@xyo-network/diviner-huri": "~5.3.25",
41
+ "@xyo-network/diviner-model": "~5.3.25",
42
+ "@xyo-network/huri": "~5.3.25",
43
+ "@xyo-network/payload-model": "~5.3.25",
44
+ "@xyo-network/module-model": "~5.3.25"
46
45
  },
47
46
  "devDependencies": {
48
47
  "@opentelemetry/api": "^1.9.1",
49
48
  "@types/node": "^25.5.0",
50
- "@xylabs/sdk-js": "^5.0.91",
51
- "@xylabs/ts-scripts-common": "~7.6.8",
52
- "@xylabs/ts-scripts-yarn3": "~7.6.8",
53
- "@xylabs/tsconfig": "~7.6.8",
54
- "@xyo-network/diviner-abstract": "~5.3.22",
55
- "@xyo-network/diviner-huri": "~5.3.22",
56
- "@xyo-network/diviner-model": "~5.3.22",
57
- "@xyo-network/huri": "~5.3.22",
58
- "@xyo-network/module-model": "~5.3.22",
59
- "@xyo-network/payload-model": "~5.3.22",
49
+ "@xylabs/sdk-js": "^5.0.93",
50
+ "@xylabs/ts-scripts-common": "~7.6.16",
51
+ "@xylabs/ts-scripts-pnpm": "~7.6.16",
52
+ "@xylabs/tsconfig": "~7.6.16",
60
53
  "acorn": "^8.16.0",
61
54
  "axios": "^1.14.0",
62
- "cosmiconfig": "^9.0.1",
63
- "esbuild": "^0.27.4",
64
- "eslint": "^10.1.0",
55
+ "esbuild": "^0.28.0",
65
56
  "ethers": "^6.16.0",
66
- "rollup": "^4.60.1",
67
57
  "tslib": "^2.8.1",
68
58
  "typescript": "~5.9.3",
69
- "zod": "^4.3.6"
59
+ "zod": "^4.3.6",
60
+ "@xyo-network/huri": "~5.3.25",
61
+ "@xyo-network/diviner-abstract": "~5.3.25",
62
+ "@xyo-network/diviner-huri": "~5.3.25",
63
+ "@xyo-network/module-model": "~5.3.25",
64
+ "@xyo-network/payload-model": "~5.3.25",
65
+ "@xyo-network/diviner-model": "~5.3.25"
70
66
  },
71
67
  "peerDependencies": {
72
68
  "@xylabs/sdk-js": "^5",
@@ -77,4 +73,4 @@
77
73
  "publishConfig": {
78
74
  "access": "public"
79
75
  }
80
- }
76
+ }
package/src/Config.ts DELETED
@@ -1,12 +0,0 @@
1
- import type { DivinerConfig } from '@xyo-network/diviner-model'
2
- import { asSchema, type Payload } from '@xyo-network/payload-model'
3
-
4
- export const ArchivistPayloadDivinerConfigSchema = asSchema('network.xyo.diviner.payload.archivist.config', true)
5
- export type ArchivistPayloadDivinerConfigSchema = typeof ArchivistPayloadDivinerConfigSchema
6
-
7
- export type ArchivistPayloadDivinerConfig<T extends Payload = Payload> = DivinerConfig<
8
- T & {
9
- archivist?: string
10
- schema: ArchivistPayloadDivinerConfigSchema
11
- }
12
- >
package/src/Diviner.ts DELETED
@@ -1,43 +0,0 @@
1
- import { assertEx } from '@xylabs/sdk-js'
2
- import { AbstractDiviner } from '@xyo-network/diviner-abstract'
3
- import type { HuriPayload } from '@xyo-network/diviner-huri'
4
- import { HuriSchema } from '@xyo-network/diviner-huri'
5
- import type {
6
- DivinerInstance, DivinerModuleEventData, DivinerParams,
7
- } from '@xyo-network/diviner-model'
8
- import { Huri } from '@xyo-network/huri'
9
- import type { AnyConfigSchema } from '@xyo-network/module-model'
10
- import type {
11
- Payload, Schema, WithStorageMeta,
12
- } from '@xyo-network/payload-model'
13
-
14
- import type { ArchivistPayloadDivinerConfig } from './Config.ts'
15
- import { ArchivistPayloadDivinerConfigSchema } from './Config.ts'
16
-
17
- export type ArchivistPayloadDivinerParams<
18
- TConfig extends AnyConfigSchema<ArchivistPayloadDivinerConfig> = AnyConfigSchema<ArchivistPayloadDivinerConfig>,
19
- > = DivinerParams<TConfig>
20
-
21
- export class ArchivistPayloadDiviner<
22
- TParams extends ArchivistPayloadDivinerParams,
23
- TIn extends HuriPayload = HuriPayload,
24
- TOut extends Payload = Payload,
25
- TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<
26
- DivinerInstance<TParams, TIn, TOut>,
27
- TIn,
28
- TOut
29
- >,
30
- > extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
31
- static override readonly configSchemas: Schema[] = [...super.configSchemas, ArchivistPayloadDivinerConfigSchema]
32
- static override readonly defaultConfigSchema: Schema = ArchivistPayloadDivinerConfigSchema
33
-
34
- protected async divineHandler(payloads?: TIn[]): Promise<WithStorageMeta<TOut>[]> {
35
- const huriPayloads = assertEx(
36
- payloads?.filter((payload): payload is TIn => payload?.schema === HuriSchema),
37
- () => `no huri payloads provided: ${JSON.stringify(payloads, null, 2)}`,
38
- )
39
- const hashes = huriPayloads.flatMap(huriPayload => huriPayload.huri.map(huri => new Huri(huri).hash))
40
- const activeArchivist = await this.archivistInstance()
41
- return ((await activeArchivist?.get(hashes)) as WithStorageMeta<TOut>[]) ?? []
42
- }
43
- }
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './Config.ts'
2
- export * from './Diviner.ts'