@xyo-network/diviner-archivist 6.0.0 → 6.0.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/dist/neutral/Config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DivinerConfig } from '@xyo-network/diviner-model';
|
|
2
|
-
import { type Payload } from '@xyo-network/
|
|
2
|
+
import { type Payload } from '@xyo-network/sdk-protocol-js';
|
|
3
3
|
export declare const ArchivistPayloadDivinerConfigSchema: "network.xyo.diviner.payload.archivist.config" & {
|
|
4
4
|
readonly __schema: true;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAErE,eAAO,MAAM,mCAAmC;;CAAiE,CAAA;AACjH,MAAM,MAAM,mCAAmC,GAAG,OAAO,mCAAmC,CAAA;AAE5F,MAAM,MAAM,6BAA6B,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,IAAI,aAAa,CACpF,CAAC,GAAG;IACF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,mCAAmC,CAAA;CAC5C,CACF,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
|
2
2
|
import type { HuriPayload } from '@xyo-network/diviner-huri';
|
|
3
3
|
import type { DivinerInstance, DivinerModuleEventData, DivinerParams } from '@xyo-network/diviner-model';
|
|
4
4
|
import type { AnyConfigSchema } from '@xyo-network/module-model';
|
|
5
|
-
import type { Payload, Schema, WithStorageMeta } from '@xyo-network/
|
|
5
|
+
import type { Payload, Schema, WithStorageMeta } from '@xyo-network/sdk-protocol-js';
|
|
6
6
|
import type { ArchivistPayloadDivinerConfig } from './Config.ts';
|
|
7
7
|
export type ArchivistPayloadDivinerParams<TConfig extends AnyConfigSchema<ArchivistPayloadDivinerConfig> = AnyConfigSchema<ArchivistPayloadDivinerConfig>> = DivinerParams<TConfig>;
|
|
8
8
|
export declare class ArchivistPayloadDiviner<TParams extends ArchivistPayloadDivinerParams, TIn extends HuriPayload = HuriPayload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,OAAO,KAAK,EACV,eAAe,EAAE,sBAAsB,EAAE,aAAa,EACvD,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,OAAO,KAAK,EACV,eAAe,EAAE,sBAAsB,EAAE,aAAa,EACvD,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EACV,OAAO,EAAE,MAAM,EAAE,eAAe,EACjC,MAAM,8BAA8B,CAAA;AAGrC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAGhE,MAAM,MAAM,6BAA6B,CACvC,OAAO,SAAS,eAAe,CAAC,6BAA6B,CAAC,GAAG,eAAe,CAAC,6BAA6B,CAAC,IAC7G,aAAa,CAAC,OAAO,CAAC,CAAA;AAE1B,qBAAa,uBAAuB,CAClC,OAAO,SAAS,6BAA6B,EAC7C,GAAG,SAAS,WAAW,GAAG,WAAW,EACrC,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,UAAU,SAAS,sBAAsB,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,sBAAsB,CAChH,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EACnC,GAAG,EACH,IAAI,CACL,CACD,SAAQ,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC;IACvD,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAgE;IAChH,gBAAyB,mBAAmB,EAAE,MAAM,CAAsC;cAE1E,aAAa,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;CASlF"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// src/Config.ts
|
|
2
|
-
import { asSchema } from "@xyo-network/
|
|
2
|
+
import { asSchema } from "@xyo-network/sdk-protocol-js";
|
|
3
3
|
var ArchivistPayloadDivinerConfigSchema = asSchema("network.xyo.diviner.payload.archivist.config", true);
|
|
4
4
|
|
|
5
5
|
// src/Diviner.ts
|
|
6
6
|
import { assertEx } from "@xylabs/sdk-js";
|
|
7
7
|
import { AbstractDiviner } from "@xyo-network/diviner-abstract";
|
|
8
8
|
import { HuriSchema } from "@xyo-network/diviner-huri";
|
|
9
|
-
import { Huri } from "@xyo-network/
|
|
9
|
+
import { Huri } from "@xyo-network/sdk-protocol-js";
|
|
10
10
|
var ArchivistPayloadDiviner = class extends AbstractDiviner {
|
|
11
11
|
static configSchemas = [...super.configSchemas, ArchivistPayloadDivinerConfigSchema];
|
|
12
12
|
static defaultConfigSchema = ArchivistPayloadDivinerConfigSchema;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Config.ts", "../../src/Diviner.ts"],
|
|
4
|
-
"sourcesContent": ["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/
|
|
5
|
-
"mappings": ";AACA,SAAS,gBAA8B;AAEhC,IAAM,sCAAsC,SAAS,gDAAgD,IAAI;;;ACHhH,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAEhC,SAAS,kBAAkB;
|
|
4
|
+
"sourcesContent": ["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema, type Payload } from '@xyo-network/sdk-protocol-js'\n\nexport const ArchivistPayloadDivinerConfigSchema = asSchema('network.xyo.diviner.payload.archivist.config', true)\nexport type ArchivistPayloadDivinerConfigSchema = typeof ArchivistPayloadDivinerConfigSchema\n\nexport type ArchivistPayloadDivinerConfig<T extends Payload = Payload> = DivinerConfig<\n T & {\n archivist?: string\n schema: ArchivistPayloadDivinerConfigSchema\n }\n>\n", "import { assertEx } from '@xylabs/sdk-js'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { HuriPayload } from '@xyo-network/diviner-huri'\nimport { HuriSchema } from '@xyo-network/diviner-huri'\nimport type {\n DivinerInstance, DivinerModuleEventData, DivinerParams,\n} from '@xyo-network/diviner-model'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport type {\n Payload, Schema, WithStorageMeta,\n} from '@xyo-network/sdk-protocol-js'\nimport { Huri } from '@xyo-network/sdk-protocol-js'\n\nimport type { ArchivistPayloadDivinerConfig } from './Config.ts'\nimport { ArchivistPayloadDivinerConfigSchema } from './Config.ts'\n\nexport type ArchivistPayloadDivinerParams<\n TConfig extends AnyConfigSchema<ArchivistPayloadDivinerConfig> = AnyConfigSchema<ArchivistPayloadDivinerConfig>,\n> = DivinerParams<TConfig>\n\nexport class ArchivistPayloadDiviner<\n TParams extends ArchivistPayloadDivinerParams,\n TIn extends HuriPayload = HuriPayload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ArchivistPayloadDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = ArchivistPayloadDivinerConfigSchema\n\n protected async divineHandler(payloads?: TIn[]): Promise<WithStorageMeta<TOut>[]> {\n const huriPayloads = assertEx(\n payloads?.filter((payload): payload is TIn => payload?.schema === HuriSchema),\n () => `no huri payloads provided: ${JSON.stringify(payloads, null, 2)}`,\n )\n const hashes = huriPayloads.flatMap(huriPayload => huriPayload.huri.map(huri => new Huri(huri).hash))\n const activeArchivist = await this.archivistInstance()\n return ((await activeArchivist?.get(hashes)) as WithStorageMeta<TOut>[]) ?? []\n }\n}\n"],
|
|
5
|
+
"mappings": ";AACA,SAAS,gBAA8B;AAEhC,IAAM,sCAAsC,SAAS,gDAAgD,IAAI;;;ACHhH,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAEhC,SAAS,kBAAkB;AAQ3B,SAAS,YAAY;AASd,IAAM,0BAAN,cASG,gBAAgD;AAAA,EACxD,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,mCAAmC;AAAA,EAC/G,OAAyB,sBAA8B;AAAA,EAEvD,MAAgB,cAAc,UAAoD;AAChF,UAAM,eAAe;AAAA,MACnB,UAAU,OAAO,CAAC,YAA4B,SAAS,WAAW,UAAU;AAAA,MAC5E,MAAM,8BAA8B,KAAK,UAAU,UAAU,MAAM,CAAC,CAAC;AAAA,IACvE;AACA,UAAM,SAAS,aAAa,QAAQ,iBAAe,YAAY,KAAK,IAAI,UAAQ,IAAI,KAAK,IAAI,EAAE,IAAI,CAAC;AACpG,UAAM,kBAAkB,MAAM,KAAK,kBAAkB;AACrD,WAAS,MAAM,iBAAiB,IAAI,MAAM,KAAkC,CAAC;AAAA,EAC/E;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-archivist",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -34,77 +34,65 @@
|
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@xyo-network/diviner-
|
|
38
|
-
"@xyo-network/diviner-
|
|
39
|
-
"@xyo-network/diviner-
|
|
40
|
-
"@xyo-network/module-model": "~6.0.
|
|
37
|
+
"@xyo-network/diviner-model": "~6.0.2",
|
|
38
|
+
"@xyo-network/diviner-abstract": "~6.0.2",
|
|
39
|
+
"@xyo-network/diviner-huri": "~6.0.2",
|
|
40
|
+
"@xyo-network/module-model": "~6.0.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@bitauth/libauth": "~3.0.0",
|
|
44
|
+
"@metamask/providers": "^22.1.1",
|
|
45
|
+
"@noble/post-quantum": "~0.6.1",
|
|
44
46
|
"@opentelemetry/api": "^1.9.1",
|
|
45
47
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
46
48
|
"@scure/base": "~2.2.0",
|
|
47
|
-
"@
|
|
48
|
-
"@xylabs/
|
|
49
|
-
"@xylabs/
|
|
50
|
-
"@xylabs/
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@xyo-network/
|
|
54
|
-
"
|
|
55
|
-
"@xyo-network/boundwitness-wrapper": "~6.0",
|
|
56
|
-
"@xyo-network/config-payload-plugin": "~6.0",
|
|
57
|
-
"@xyo-network/huri": "~6.0",
|
|
58
|
-
"@xyo-network/manifest-model": "~6.0",
|
|
59
|
-
"@xyo-network/payload-builder": "~6.0.0",
|
|
60
|
-
"@xyo-network/payload-model": "~6.0.0",
|
|
61
|
-
"@xyo-network/query-payload-plugin": "~6.0",
|
|
62
|
-
"@xyo-network/wallet-model": "~6.0",
|
|
49
|
+
"@scure/bip39": "~2.2.0",
|
|
50
|
+
"@xylabs/geo": "^6.0.6",
|
|
51
|
+
"@xylabs/sdk-js": "^6.0.6",
|
|
52
|
+
"@xylabs/threads": "^6.0.6",
|
|
53
|
+
"@xylabs/toolchain": "~8.1.8",
|
|
54
|
+
"@xylabs/tsconfig": "~8.1.8",
|
|
55
|
+
"@xyo-network/sdk-protocol-js": "~6.0.7",
|
|
56
|
+
"ajv": "^8.20.0",
|
|
63
57
|
"async-mutex": "^0.5.0",
|
|
64
58
|
"bn.js": "^5.2.3",
|
|
65
59
|
"buffer": "^6.0.3",
|
|
66
|
-
"chalk": "^5.6.2",
|
|
67
60
|
"debug": "~4.4.3",
|
|
68
|
-
"eslint": "^10.4.
|
|
61
|
+
"eslint": "^10.4.1",
|
|
69
62
|
"ethers": "^6.16.0",
|
|
70
63
|
"hash-wasm": "~4.12.0",
|
|
71
|
-
"
|
|
64
|
+
"idb": "^8.0.3",
|
|
65
|
+
"lru-cache": "^11.5.1",
|
|
72
66
|
"observable-fns": "~0.6.1",
|
|
73
67
|
"pako": "~2.1.0",
|
|
74
68
|
"typescript": "~6.0.3",
|
|
75
|
-
"
|
|
69
|
+
"webextension-polyfill": "^0.12.0",
|
|
76
70
|
"zod": "^4.4.3"
|
|
77
71
|
},
|
|
78
72
|
"peerDependencies": {
|
|
79
73
|
"@bitauth/libauth": "~3.0",
|
|
74
|
+
"@metamask/providers": "^22.1",
|
|
75
|
+
"@noble/post-quantum": "~0.6.1",
|
|
80
76
|
"@opentelemetry/api": "^1.9",
|
|
81
77
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
82
78
|
"@scure/base": "~2.2",
|
|
79
|
+
"@scure/bip39": "~2.2",
|
|
80
|
+
"@xylabs/geo": "^6.0",
|
|
83
81
|
"@xylabs/sdk-js": "^6.0",
|
|
84
|
-
"@xylabs/threads": "
|
|
85
|
-
"@xyo-network/
|
|
86
|
-
"
|
|
87
|
-
"@xyo-network/boundwitness-builder": "~6.0",
|
|
88
|
-
"@xyo-network/boundwitness-model": "~6.0",
|
|
89
|
-
"@xyo-network/boundwitness-wrapper": "~6.0",
|
|
90
|
-
"@xyo-network/config-payload-plugin": "~6.0",
|
|
91
|
-
"@xyo-network/huri": "~6.0",
|
|
92
|
-
"@xyo-network/manifest-model": "~6.0",
|
|
93
|
-
"@xyo-network/payload-builder": "~6.0",
|
|
94
|
-
"@xyo-network/payload-model": "~6.0",
|
|
95
|
-
"@xyo-network/query-payload-plugin": "~6.0",
|
|
96
|
-
"@xyo-network/wallet-model": "~6.0",
|
|
82
|
+
"@xylabs/threads": "^6.0",
|
|
83
|
+
"@xyo-network/sdk-protocol-js": "~6.0",
|
|
84
|
+
"ajv": "^8.20",
|
|
97
85
|
"async-mutex": "^0.5",
|
|
98
86
|
"bn.js": "^5.2",
|
|
99
87
|
"buffer": "^6.0",
|
|
100
|
-
"chalk": "^5.6",
|
|
101
88
|
"debug": "~4.4",
|
|
102
89
|
"ethers": "^6.16",
|
|
103
90
|
"hash-wasm": "~4.12",
|
|
91
|
+
"idb": "^8.0",
|
|
104
92
|
"lru-cache": "^11.3",
|
|
105
93
|
"observable-fns": "~0.6",
|
|
106
94
|
"pako": "~2.1",
|
|
107
|
-
"
|
|
95
|
+
"webextension-polyfill": "^0.12",
|
|
108
96
|
"zod": "^4.4"
|
|
109
97
|
},
|
|
110
98
|
"publishConfig": {
|