@xyo-network/diviner-forecasting-model 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/neutral/index.d.ts +59 -0
- package/package.json +10 -10
- /package/{dist/types → build/neutral}/Config/Config.d.ts +0 -0
- /package/{dist/types → build/neutral}/Config/Config.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Config/ForecastingSettings.d.ts +0 -0
- /package/{dist/types → build/neutral}/Config/ForecastingSettings.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Config/TransformerSettings.d.ts +0 -0
- /package/{dist/types → build/neutral}/Config/TransformerSettings.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Config/index.d.ts +0 -0
- /package/{dist/types → build/neutral}/Config/index.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/ForecastingMethod.d.ts +0 -0
- /package/{dist/types → build/neutral}/ForecastingMethod.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Payload/Forecast.d.ts +0 -0
- /package/{dist/types → build/neutral}/Payload/Forecast.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Payload/Payload.d.ts +0 -0
- /package/{dist/types → build/neutral}/Payload/Payload.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Payload/index.d.ts +0 -0
- /package/{dist/types → build/neutral}/Payload/index.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/PayloadValueTransformer.d.ts +0 -0
- /package/{dist/types → build/neutral}/PayloadValueTransformer.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Query.d.ts +0 -0
- /package/{dist/types → build/neutral}/Query.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Schema.d.ts +0 -0
- /package/{dist/types → build/neutral}/Schema.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
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { DivinerConfig } from '@xyo-network/diviner-model';
|
|
2
|
+
import { ModuleIdentifier } from '@xyo-network/module-model';
|
|
3
|
+
import { Address } from '@xylabs/hex';
|
|
4
|
+
import { Schema, Payload, Query } from '@xyo-network/payload-model';
|
|
5
|
+
import { Promisable } from '@xylabs/promise';
|
|
6
|
+
|
|
7
|
+
declare const ForecastingDivinerSchema: "network.xyo.diviner.forecasting";
|
|
8
|
+
type ForecastingDivinerSchema = typeof ForecastingDivinerSchema;
|
|
9
|
+
|
|
10
|
+
interface ForecastingSettings {
|
|
11
|
+
batchLimit?: number;
|
|
12
|
+
forecastingMethod?: string;
|
|
13
|
+
forecastingSteps?: number;
|
|
14
|
+
maxTrainingLength?: number;
|
|
15
|
+
timestamp?: number;
|
|
16
|
+
windowSize?: number;
|
|
17
|
+
witnessAddresses?: Address[];
|
|
18
|
+
witnessSchema?: Schema;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface TransformerSettings {
|
|
22
|
+
jsonPathExpression?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type ForecastingDivinerConfigSchema = `${ForecastingDivinerSchema}.config`;
|
|
26
|
+
declare const ForecastingDivinerConfigSchema: ForecastingDivinerConfigSchema;
|
|
27
|
+
type ForecastingDivinerConfig = DivinerConfig<{
|
|
28
|
+
boundWitnessDiviner?: ModuleIdentifier;
|
|
29
|
+
schema: ForecastingDivinerConfigSchema;
|
|
30
|
+
} & ForecastingSettings & TransformerSettings>;
|
|
31
|
+
|
|
32
|
+
interface Forecast {
|
|
33
|
+
error?: number;
|
|
34
|
+
timestamp?: number;
|
|
35
|
+
value: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type ForecastPayloadSchema = `${ForecastingDivinerSchema}.forecast`;
|
|
39
|
+
declare const ForecastPayloadSchema: ForecastPayloadSchema;
|
|
40
|
+
type ForecastPayload = Payload<{
|
|
41
|
+
schema: ForecastPayloadSchema;
|
|
42
|
+
sources: string[];
|
|
43
|
+
values: Forecast[];
|
|
44
|
+
}>;
|
|
45
|
+
declare const isForecastPayload: (x?: Payload | null) => x is ForecastPayload;
|
|
46
|
+
|
|
47
|
+
type PayloadValueTransformer = (payload: Payload) => number;
|
|
48
|
+
|
|
49
|
+
type ForecastingMethod = (payloads: Payload[], transformers: PayloadValueTransformer) => Promisable<Forecast[]>;
|
|
50
|
+
|
|
51
|
+
type ForecastingDivinerQuerySchema = `${ForecastingDivinerSchema}.query`;
|
|
52
|
+
declare const ForecastingDivinerQuerySchema: ForecastingDivinerQuerySchema;
|
|
53
|
+
type ForecastingDivinerQueryPayload = Query<{
|
|
54
|
+
schema: ForecastingDivinerQuerySchema;
|
|
55
|
+
} & Partial<ForecastingSettings>>;
|
|
56
|
+
declare const isForecastingDivinerQueryPayload: (x?: Payload | null) => x is ForecastingDivinerQueryPayload;
|
|
57
|
+
|
|
58
|
+
export { ForecastPayloadSchema, ForecastingDivinerConfigSchema, ForecastingDivinerQuerySchema, ForecastingDivinerSchema, isForecastPayload, isForecastingDivinerQueryPayload };
|
|
59
|
+
export type { Forecast, ForecastPayload, ForecastingDivinerConfig, ForecastingDivinerQueryPayload, ForecastingMethod, ForecastingSettings, PayloadValueTransformer, TransformerSettings };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-forecasting-model",
|
|
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,23 +21,23 @@
|
|
|
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/hex": "^4.
|
|
33
|
-
"@xylabs/promise": "^4.
|
|
34
|
-
"@xyo-network/diviner-model": "^4.0
|
|
35
|
-
"@xyo-network/module-model": "^4.0
|
|
36
|
-
"@xyo-network/payload-model": "^4.0
|
|
32
|
+
"@xylabs/hex": "^4.13.15",
|
|
33
|
+
"@xylabs/promise": "^4.13.15",
|
|
34
|
+
"@xyo-network/diviner-model": "^4.1.0",
|
|
35
|
+
"@xyo-network/module-model": "^4.1.0",
|
|
36
|
+
"@xyo-network/payload-model": "^4.1.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
40
|
-
"@xylabs/tsconfig": "^
|
|
39
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
|
|
40
|
+
"@xylabs/tsconfig": "^7.0.0-rc.20",
|
|
41
41
|
"typescript": "^5.8.3"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|