@xyo-network/archivist-view 6.0.4 → 6.1.0
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
CHANGED
|
@@ -38,10 +38,12 @@ bun add {{name}}
|
|
|
38
38
|
|
|
39
39
|
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
40
40
|
|
|
41
|
+
## Credits
|
|
41
42
|
|
|
43
|
+
[Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
|
|
42
44
|
|
|
43
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
44
45
|
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/archivist-view.svg
|
|
45
46
|
[npm-link]: https://www.npmjs.com/package/@xyo-network/archivist-view
|
|
46
47
|
[license-badge]: https://img.shields.io/npm/l/@xyo-network/archivist-view.svg
|
|
47
48
|
[license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
|
|
49
|
+
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
@@ -3,7 +3,7 @@ import { AbstractArchivist } from '@xyo-network/archivist-abstract';
|
|
|
3
3
|
import type { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions, ArchivistParams } from '@xyo-network/archivist-model';
|
|
4
4
|
import type { AnyConfigSchema, ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
|
|
5
5
|
import type { Payload, Schema, WithStorageMeta } from '@xyo-network/sdk-protocol-js';
|
|
6
|
-
export declare const ViewArchivistConfigSchema:
|
|
6
|
+
export declare const ViewArchivistConfigSchema: 'network.xyo.archivist.view.config' & {
|
|
7
7
|
readonly __schema: true;
|
|
8
8
|
};
|
|
9
9
|
export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
|
|
@@ -15,8 +15,8 @@ export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfig
|
|
|
15
15
|
static readonly configSchemas: Schema[];
|
|
16
16
|
static readonly defaultConfigSchema: Schema;
|
|
17
17
|
static readonly labels: {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
'ModuleLimitationLabelName': string;
|
|
19
|
+
'network.xyo.storage.class': string;
|
|
20
20
|
};
|
|
21
21
|
private _originArchivistInstance?;
|
|
22
22
|
get originArchivist(): string | (Lowercase<string> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEtD,OAAO,EAAE,iBAAiB,EAAqB,MAAM,iCAAiC,CAAA;AACtF,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EAChB,MAAM,8BAA8B,CAAA;AAOrC,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,2BAA2B,CAAA;AAKlC,OAAO,KAAK,EACV,OAAO,EAAE,MAAM,EAAE,eAAe,EACjC,MAAM,8BAA8B,CAAA;AAGrC,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEtD,OAAO,EAAE,iBAAiB,EAAqB,MAAM,iCAAiC,CAAA;AACtF,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EAChB,MAAM,8BAA8B,CAAA;AAOrC,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,2BAA2B,CAAA;AAKlC,OAAO,KAAK,EACV,OAAO,EAAE,MAAM,EAAE,eAAe,EACjC,MAAM,8BAA8B,CAAA;AA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,mCAAmC;cAChB,UAAU,IAAI,UAAU,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;cAI9C,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;cAI/D,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;CAG1G"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ViewArchivist.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Hash, Promisable } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport { AbstractArchivist, StorageClassLabel } from '@xyo-network/archivist-abstract'\nimport type {\n ArchivistConfig,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistParams,\n} from '@xyo-network/archivist-model'\nimport {\n ArchivistAllQuerySchema,\n ArchivistGetQuerySchema,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport type {\n AnyConfigSchema,\n ModuleIdentifier,\n ModuleInstance,\n} from '@xyo-network/module-model'\nimport {\n labeledCreatableModule,\n ModuleLimitationViewLabel,\n} from '@xyo-network/module-model'\nimport type {\n Payload, Schema, WithStorageMeta,\n} from '@xyo-network/sdk-protocol-js'\nimport { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const ViewArchivistConfigSchema = asSchema('network.xyo.archivist.view.config', true)\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ArchivistParams<TConfig>\n\n@labeledCreatableModule()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n>\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel, [StorageClassLabel]: 'proxy' }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistGetQuerySchema, ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance\n = this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n /** @deprecated use next instead */\n protected override allHandler(): Promisable<WithStorageMeta<Payload>[]> {\n throw new Error('allHandler is deprecated, use nextHandler instead')\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<WithStorageMeta<Payload>[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<WithStorageMeta<Payload>[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AACA,SAAS,gBAAgB;AACzB,SAAS,mBAAmB,yBAAyB;AAQrD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAIP,SAAS,gBAAgB;AAElB,IAAM,
|
|
4
|
+
"sourcesContent": ["import type { Hash, Promisable } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport { AbstractArchivist, StorageClassLabel } from '@xyo-network/archivist-abstract'\nimport type {\n ArchivistConfig,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistParams,\n} from '@xyo-network/archivist-model'\nimport {\n ArchivistAllQuerySchema,\n ArchivistGetQuerySchema,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport type {\n AnyConfigSchema,\n ModuleIdentifier,\n ModuleInstance,\n} from '@xyo-network/module-model'\nimport {\n labeledCreatableModule,\n ModuleLimitationViewLabel,\n} from '@xyo-network/module-model'\nimport type {\n Payload, Schema, WithStorageMeta,\n} from '@xyo-network/sdk-protocol-js'\nimport { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const ViewArchivistConfigSchema: 'network.xyo.archivist.view.config' & {\n readonly __schema: true\n} = asSchema('network.xyo.archivist.view.config', true)\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ArchivistParams<TConfig>\n\n@labeledCreatableModule()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n>\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels: {\n 'ModuleLimitationLabelName': string\n 'network.xyo.storage.class': string\n } = { ...ModuleLimitationViewLabel, [StorageClassLabel]: 'proxy' }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist(): string|(Lowercase<string> & {\n readonly __hex: true\n } & {\n readonly __address: true\n }) {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries(): Schema[] {\n return [ArchivistGetQuerySchema, ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance(): Promise<ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>> {\n this._originArchivistInstance\n = this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n /** @deprecated use next instead */\n protected override allHandler(): Promisable<WithStorageMeta<Payload>[]> {\n throw new Error('allHandler is deprecated, use nextHandler instead')\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<WithStorageMeta<Payload>[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<WithStorageMeta<Payload>[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AACA,SAAS,gBAAgB;AACzB,SAAS,mBAAmB,yBAAyB;AAQrD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAIP,SAAS,gBAAgB;AAElB,IAAM,4BAET,SAAS,qCAAqC,IAAI;AAa/C,IAAM,gBAAN,cAIG,kBACqC;AAAA,EAQrC;AAAA,EAER,IAAI,kBAID;AACD,WAAO,SAAS,KAAK,OAAO,iBAAiB,MAAM,gCAAgC;AAAA,EACrF;AAAA,EAEA,IAAa,UAAoB;AAC/B,WAAO,CAAC,yBAAyB,yBAAyB,0BAA0B,GAAG,MAAM,OAAO;AAAA,EACtG;AAAA,EAEA,MAAM,0BAA4I;AAChJ,SAAK,2BACD,KAAK,4BAA4B,SAAS,MAAM,KAAK,QAAQ,KAAK,iBAAiB,EAAE,UAAU,qBAAqB,UAAU,KAAK,CAAC,CAAC;AACzI,WAAO,KAAK;AAAA,EACd;AAAA;AAAA,EAGmB,aAAqD;AACtE,UAAM,IAAI,MAAM,mDAAmD;AAAA,EACrE;AAAA,EAEA,MAAyB,WAAW,QAAqD;AACvF,WAAO,OAAO,MAAM,KAAK,wBAAwB,GAAG,IAAI,MAAM;AAAA,EAChE;AAAA,EAEA,MAAyB,YAAY,SAAqE;AACxG,WAAQ,OAAO,MAAM,KAAK,wBAAwB,GAAG,OAAO,OAAO,KAAM,CAAC;AAAA,EAC5E;AACF;AAvCE,cANW,eAMc,iBAA0B,CAAC,GAAG,yCAAM,kBAAe,yBAAyB;AACrG,cAPW,eAOc,uBAA8B;AACvD,cARW,eAQc,UAGrB,EAAE,GAAG,2BAA2B,CAAC,iBAAiB,GAAG,QAAQ;AAXtD,gBAAN;AAAA,EADN,uBAAuB;AAAA,GACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/archivist-view",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@xyo-network/archivist-abstract": "~6.0
|
|
38
|
-
"@xyo-network/
|
|
39
|
-
"@xyo-network/
|
|
37
|
+
"@xyo-network/archivist-abstract": "~6.1.0",
|
|
38
|
+
"@xyo-network/archivist-model": "~6.1.0",
|
|
39
|
+
"@xyo-network/module-model": "~6.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@bitauth/libauth": "~3.0.0",
|
|
@@ -46,16 +46,14 @@
|
|
|
46
46
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
47
47
|
"@scure/base": "~2.2.0",
|
|
48
48
|
"@scure/bip39": "~2.2.0",
|
|
49
|
-
"@xylabs/geo": "^6.0
|
|
50
|
-
"@xylabs/sdk-js": "^6.0
|
|
51
|
-
"@xylabs/threads": "^6.0
|
|
52
|
-
"@xylabs/toolchain": "
|
|
53
|
-
"@xylabs/tsconfig": "
|
|
54
|
-
"@xyo-network/sdk-protocol-js": "
|
|
49
|
+
"@xylabs/geo": "^6.1.0",
|
|
50
|
+
"@xylabs/sdk-js": "^6.1.0",
|
|
51
|
+
"@xylabs/threads": "^6.1.0",
|
|
52
|
+
"@xylabs/toolchain": "^8.1.20",
|
|
53
|
+
"@xylabs/tsconfig": "^8.1.20",
|
|
54
|
+
"@xyo-network/sdk-protocol-js": "^6.1.0",
|
|
55
55
|
"ajv": "^8.20.0",
|
|
56
56
|
"async-mutex": "^0.5.0",
|
|
57
|
-
"bn.js": "^5.2.3",
|
|
58
|
-
"buffer": "^6.0.3",
|
|
59
57
|
"debug": "~4.4.3",
|
|
60
58
|
"eslint": "^10.4.1",
|
|
61
59
|
"ethers": "^6.16.0",
|
|
@@ -69,8 +67,8 @@
|
|
|
69
67
|
"vitest": "~4.1.8",
|
|
70
68
|
"webextension-polyfill": "^0.12.0",
|
|
71
69
|
"zod": "^4.4.3",
|
|
72
|
-
"@xyo-network/
|
|
73
|
-
"@xyo-network/
|
|
70
|
+
"@xyo-network/archivist-memory": "~6.1.0",
|
|
71
|
+
"@xyo-network/node-memory": "~6.1.0"
|
|
74
72
|
},
|
|
75
73
|
"peerDependencies": {
|
|
76
74
|
"@bitauth/libauth": "~3.0",
|
|
@@ -83,11 +81,9 @@
|
|
|
83
81
|
"@xylabs/geo": "^6.0",
|
|
84
82
|
"@xylabs/sdk-js": "^6.0",
|
|
85
83
|
"@xylabs/threads": "^6.0",
|
|
86
|
-
"@xyo-network/sdk-protocol-js": "
|
|
84
|
+
"@xyo-network/sdk-protocol-js": "^6.1",
|
|
87
85
|
"ajv": "^8.20",
|
|
88
86
|
"async-mutex": "^0.5",
|
|
89
|
-
"bn.js": "^5.2",
|
|
90
|
-
"buffer": "^6.0",
|
|
91
87
|
"debug": "~4.4",
|
|
92
88
|
"ethers": "^6.16",
|
|
93
89
|
"hash-wasm": "~4.12",
|
|
@@ -97,6 +93,9 @@
|
|
|
97
93
|
"webextension-polyfill": "^0.12",
|
|
98
94
|
"zod": "^4.4"
|
|
99
95
|
},
|
|
96
|
+
"engines": {
|
|
97
|
+
"node": "^24"
|
|
98
|
+
},
|
|
100
99
|
"publishConfig": {
|
|
101
100
|
"access": "public"
|
|
102
101
|
}
|