@xyo-network/abstract-witness 4.0.2 → 4.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/{dist/types → build/neutral}/AbstractWitness.d.ts +1 -1
- package/dist/neutral/index.d.ts +28 -0
- package/package.json +20 -20
- /package/{dist/types → build/neutral}/AbstractWitness.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/index.d.ts +0 -0
- /package/{dist/types → build/neutral}/index.d.ts.map +0 -0
|
@@ -12,7 +12,7 @@ export declare abstract class AbstractWitness<TParams extends WitnessParams = Wi
|
|
|
12
12
|
static readonly uniqueName: string;
|
|
13
13
|
private _archivistInstance;
|
|
14
14
|
get queries(): string[];
|
|
15
|
-
getArchivistInstance(): Promise<ArchivistInstance<import("@xyo-network/archivist-model").ArchivistParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/archivist-model").ArchivistConfig
|
|
15
|
+
getArchivistInstance(): Promise<ArchivistInstance<import("@xyo-network/archivist-model").ArchivistParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/archivist-model").ArchivistConfig<void, void>>>, import("@xyo-network/archivist-model").ArchivistModuleEventData, Payload> | undefined>;
|
|
16
16
|
/** @function observe The main entry point for a witness. Do not override this function. Implement/override observeHandler for custom functionality */
|
|
17
17
|
observe(inPayloads?: TIn[]): Promise<WithoutPrivateStorageMeta<TOut>[]>;
|
|
18
18
|
observeQuery(payloads?: TIn[], account?: AccountInstance): Promise<ModuleQueryResult<TOut>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as _xyo_network_module_model from '@xyo-network/module-model';
|
|
2
|
+
import { ModuleQueryResult, ModuleConfig, ModuleQueryHandlerResult } from '@xyo-network/module-model';
|
|
3
|
+
import * as _xyo_network_archivist_model from '@xyo-network/archivist-model';
|
|
4
|
+
import { ArchivistInstance } from '@xyo-network/archivist-model';
|
|
5
|
+
import { Promisable } from '@xylabs/promise';
|
|
6
|
+
import { AccountInstance } from '@xyo-network/account-model';
|
|
7
|
+
import { QueryBoundWitness } from '@xyo-network/boundwitness-model';
|
|
8
|
+
import { AbstractModuleInstance } from '@xyo-network/module-abstract';
|
|
9
|
+
import { Payload, Schema, WithoutPrivateStorageMeta } from '@xyo-network/payload-model';
|
|
10
|
+
import { WitnessParams, WitnessModuleEventData, WitnessInstance, CustomWitnessInstance } from '@xyo-network/witness-model';
|
|
11
|
+
|
|
12
|
+
declare abstract class AbstractWitness<TParams extends WitnessParams = WitnessParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends WitnessModuleEventData<WitnessInstance<TParams, TIn, TOut>, TIn, TOut> = WitnessModuleEventData<WitnessInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractModuleInstance<TParams, TEventData> implements CustomWitnessInstance<TParams, TIn, TOut, TEventData> {
|
|
13
|
+
static readonly configSchemas: Schema[];
|
|
14
|
+
static readonly defaultConfigSchema: Schema;
|
|
15
|
+
static readonly uniqueName: string;
|
|
16
|
+
private _archivistInstance;
|
|
17
|
+
get queries(): string[];
|
|
18
|
+
getArchivistInstance(): Promise<ArchivistInstance<_xyo_network_archivist_model.ArchivistParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_archivist_model.ArchivistConfig<void, void>>>, _xyo_network_archivist_model.ArchivistModuleEventData, Payload> | undefined>;
|
|
19
|
+
/** @function observe The main entry point for a witness. Do not override this function. Implement/override observeHandler for custom functionality */
|
|
20
|
+
observe(inPayloads?: TIn[]): Promise<WithoutPrivateStorageMeta<TOut>[]>;
|
|
21
|
+
observeQuery(payloads?: TIn[], account?: AccountInstance): Promise<ModuleQueryResult<TOut>>;
|
|
22
|
+
/** @function queryHandler Calls observe for an observe query. Override to support additional queries. */
|
|
23
|
+
protected queryHandler<T extends QueryBoundWitness = QueryBoundWitness, TConfig extends ModuleConfig = ModuleConfig>(query: T, payloads?: Payload[], queryConfig?: TConfig): Promise<ModuleQueryHandlerResult>;
|
|
24
|
+
/** @function observeHandler Implement or override to add custom functionality to a witness */
|
|
25
|
+
protected abstract observeHandler(payloads?: TIn[]): Promisable<TOut[]>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { AbstractWitness };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/abstract-witness",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -21,33 +21,33 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/neutral/index.d.ts",
|
|
25
25
|
"default": "./dist/neutral/index.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
|
-
"types": "dist/
|
|
30
|
+
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/assert": "^4.
|
|
33
|
-
"@xylabs/base": "^4.
|
|
34
|
-
"@xylabs/hex": "^4.
|
|
35
|
-
"@xylabs/promise": "^4.
|
|
36
|
-
"@xylabs/telemetry": "^4.
|
|
37
|
-
"@xyo-network/account-model": "^4.0
|
|
38
|
-
"@xyo-network/archivist-model": "^4.0
|
|
39
|
-
"@xyo-network/boundwitness-model": "^4.0
|
|
40
|
-
"@xyo-network/boundwitness-wrapper": "^4.0
|
|
41
|
-
"@xyo-network/module-abstract": "^4.0
|
|
42
|
-
"@xyo-network/module-model": "^4.0
|
|
43
|
-
"@xyo-network/payload-builder": "^4.0
|
|
44
|
-
"@xyo-network/payload-model": "^4.0
|
|
45
|
-
"@xyo-network/witness-model": "^4.0
|
|
32
|
+
"@xylabs/assert": "^4.13.15",
|
|
33
|
+
"@xylabs/base": "^4.13.15",
|
|
34
|
+
"@xylabs/hex": "^4.13.15",
|
|
35
|
+
"@xylabs/promise": "^4.13.15",
|
|
36
|
+
"@xylabs/telemetry": "^4.13.15",
|
|
37
|
+
"@xyo-network/account-model": "^4.1.0",
|
|
38
|
+
"@xyo-network/archivist-model": "^4.1.0",
|
|
39
|
+
"@xyo-network/boundwitness-model": "^4.1.0",
|
|
40
|
+
"@xyo-network/boundwitness-wrapper": "^4.1.0",
|
|
41
|
+
"@xyo-network/module-abstract": "^4.1.0",
|
|
42
|
+
"@xyo-network/module-model": "^4.1.0",
|
|
43
|
+
"@xyo-network/payload-builder": "^4.1.0",
|
|
44
|
+
"@xyo-network/payload-model": "^4.1.0",
|
|
45
|
+
"@xyo-network/witness-model": "^4.1.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
49
|
-
"@xylabs/tsconfig": "^
|
|
50
|
-
"@xylabs/vitest-extended": "^4.
|
|
48
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
|
|
49
|
+
"@xylabs/tsconfig": "^7.0.0-rc.20",
|
|
50
|
+
"@xylabs/vitest-extended": "^4.13.15",
|
|
51
51
|
"typescript": "^5.8.3",
|
|
52
52
|
"vitest": "^3.2.4"
|
|
53
53
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|