@xyo-network/prometheus-node-plugin 2.73.4 → 2.74.1

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/index.d.mts CHANGED
@@ -1,96 +1,7 @@
1
- import * as _xyo_network_payloadset_plugin from '@xyo-network/payloadset-plugin';
2
- import * as _xyo_network_wallet_model from '@xyo-network/wallet-model';
3
- import * as _xyo_network_module_model from '@xyo-network/module-model';
4
- import * as _xyo_network_payload_model from '@xyo-network/payload-model';
5
- import { Payload } from '@xyo-network/payload-model';
6
- import * as _xyo_network_account_model from '@xyo-network/account-model';
7
- import * as _xyo_network_core from '@xyo-network/core';
8
- import * as _xyo_network_promise from '@xyo-network/promise';
9
- import { AnyConfigSchema } from '@xyo-network/module';
10
- import { WitnessConfig, WitnessParams, AbstractWitness } from '@xyo-network/witness';
11
- import { Server } from 'http';
12
- import { Registry, Aggregator, MetricType } from 'prom-client';
13
-
14
- type PrometheusNodeWitnessConfigSchema = 'network.xyo.prometheus.node.witness.config';
15
- declare const PrometheusNodeWitnessConfigSchema: PrometheusNodeWitnessConfigSchema;
16
- type PrometheusNodeWitnessConfig = WitnessConfig<{
17
- port?: number;
18
- schema: PrometheusNodeWitnessConfigSchema;
19
- }>;
20
- type PrometheusNodeWitnessParams = WitnessParams<AnyConfigSchema<PrometheusNodeWitnessConfig>>;
21
- declare class PrometheusNodeWitness<TParams extends PrometheusNodeWitnessParams = PrometheusNodeWitnessParams> extends AbstractWitness<TParams> {
22
- static configSchemas: "network.xyo.prometheus.node.witness.config"[];
23
- protected _registry: Registry;
24
- protected server?: Server;
25
- get registry(): Registry;
26
- protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
27
- protected startHandler(): Promise<boolean>;
28
- protected stopHandler(): _xyo_network_promise.Promisable<boolean>;
29
- private generateMetricValues;
30
- }
31
-
32
- declare const PrometheusNodePlugin: () => _xyo_network_payloadset_plugin.PayloadSetWitnessPlugin<PrometheusNodeWitness<_xyo_network_core.BaseParamsFields & {
33
- account?: _xyo_network_account_model.AccountInstance | "random" | undefined;
34
- config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & {
35
- accountDerivationPath?: string | undefined;
36
- readonly archivist?: _xyo_network_module_model.ArchivistModuleConfig | undefined;
37
- readonly name?: string | undefined;
38
- readonly paging?: Record<string, {
39
- size?: number | undefined;
40
- }> | undefined;
41
- readonly schema: string;
42
- readonly security?: {
43
- readonly allowAnonymous?: boolean | undefined;
44
- readonly allowed?: Record<string, (string | _xyo_network_module_model.CosigningAddressSet)[]> | undefined;
45
- readonly disallowed?: Record<string, string[]> | undefined;
46
- } | undefined;
47
- readonly sign?: boolean | undefined;
48
- readonly storeQueries?: boolean | undefined;
49
- readonly timestamp?: boolean | undefined;
50
- } & Omit<Omit<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & {
51
- accountDerivationPath?: string | undefined;
52
- readonly archivist?: _xyo_network_module_model.ArchivistModuleConfig | undefined;
53
- readonly name?: string | undefined;
54
- readonly paging?: Record<string, {
55
- size?: number | undefined;
56
- }> | undefined;
57
- readonly schema: "network.xyo.prometheus.node.witness.config";
58
- readonly security?: {
59
- readonly allowAnonymous?: boolean | undefined;
60
- readonly allowed?: Record<string, (string | _xyo_network_module_model.CosigningAddressSet)[]> | undefined;
61
- readonly disallowed?: Record<string, string[]> | undefined;
62
- } | undefined;
63
- readonly sign?: boolean | undefined;
64
- readonly storeQueries?: boolean | undefined;
65
- readonly timestamp?: boolean | undefined;
66
- } & Omit<{
67
- archivist?: string | undefined;
68
- schema: "network.xyo.prometheus.node.witness.config";
69
- targetSet?: (_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & _xyo_network_payload_model.PayloadSet & {
70
- schema: "network.xyo.payload.set";
71
- }) | undefined;
72
- } & {
73
- port?: number | undefined;
74
- schema: "network.xyo.prometheus.node.witness.config";
75
- }, "schema"> & {
76
- schema: "network.xyo.prometheus.node.witness.config";
77
- }, "schema"> & {
78
- schema: string;
79
- }, "schema"> & {
80
- schema: string;
81
- };
82
- ephemeralQueryAccountEnabled?: boolean | undefined;
83
- wallet?: _xyo_network_wallet_model.WalletInstance | undefined;
84
- }>>;
85
-
86
- type PrometheusMetricValueSchema = 'network.xyo.prometheus.metric.value';
87
- declare const PrometheusMetricValueSchema: PrometheusMetricValueSchema;
88
-
89
- type PrometheusMetricValuePayload = Payload<{
90
- aggregator: Aggregator;
91
- name: string;
92
- type: MetricType;
93
- values: (number | string | object)[];
94
- }, PrometheusMetricValueSchema>;
95
-
96
- export { PrometheusMetricValuePayload, PrometheusMetricValueSchema, PrometheusNodePlugin, PrometheusNodeWitness, PrometheusNodeWitnessConfig, PrometheusNodeWitnessConfigSchema, PrometheusNodeWitnessParams, PrometheusNodePlugin as default };
1
+ import { PrometheusNodePlugin } from './Plugin';
2
+ export * from './Payload';
3
+ export * from './Schema';
4
+ export * from './Witness';
5
+ export { PrometheusNodePlugin };
6
+ export default PrometheusNodePlugin;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,oBAAoB,EAAE,CAAA;AAG/B,eAAe,oBAAoB,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,96 +1,7 @@
1
- import * as _xyo_network_payloadset_plugin from '@xyo-network/payloadset-plugin';
2
- import * as _xyo_network_wallet_model from '@xyo-network/wallet-model';
3
- import * as _xyo_network_module_model from '@xyo-network/module-model';
4
- import * as _xyo_network_payload_model from '@xyo-network/payload-model';
5
- import { Payload } from '@xyo-network/payload-model';
6
- import * as _xyo_network_account_model from '@xyo-network/account-model';
7
- import * as _xyo_network_core from '@xyo-network/core';
8
- import * as _xyo_network_promise from '@xyo-network/promise';
9
- import { AnyConfigSchema } from '@xyo-network/module';
10
- import { WitnessConfig, WitnessParams, AbstractWitness } from '@xyo-network/witness';
11
- import { Server } from 'http';
12
- import { Registry, Aggregator, MetricType } from 'prom-client';
13
-
14
- type PrometheusNodeWitnessConfigSchema = 'network.xyo.prometheus.node.witness.config';
15
- declare const PrometheusNodeWitnessConfigSchema: PrometheusNodeWitnessConfigSchema;
16
- type PrometheusNodeWitnessConfig = WitnessConfig<{
17
- port?: number;
18
- schema: PrometheusNodeWitnessConfigSchema;
19
- }>;
20
- type PrometheusNodeWitnessParams = WitnessParams<AnyConfigSchema<PrometheusNodeWitnessConfig>>;
21
- declare class PrometheusNodeWitness<TParams extends PrometheusNodeWitnessParams = PrometheusNodeWitnessParams> extends AbstractWitness<TParams> {
22
- static configSchemas: "network.xyo.prometheus.node.witness.config"[];
23
- protected _registry: Registry;
24
- protected server?: Server;
25
- get registry(): Registry;
26
- protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
27
- protected startHandler(): Promise<boolean>;
28
- protected stopHandler(): _xyo_network_promise.Promisable<boolean>;
29
- private generateMetricValues;
30
- }
31
-
32
- declare const PrometheusNodePlugin: () => _xyo_network_payloadset_plugin.PayloadSetWitnessPlugin<PrometheusNodeWitness<_xyo_network_core.BaseParamsFields & {
33
- account?: _xyo_network_account_model.AccountInstance | "random" | undefined;
34
- config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & {
35
- accountDerivationPath?: string | undefined;
36
- readonly archivist?: _xyo_network_module_model.ArchivistModuleConfig | undefined;
37
- readonly name?: string | undefined;
38
- readonly paging?: Record<string, {
39
- size?: number | undefined;
40
- }> | undefined;
41
- readonly schema: string;
42
- readonly security?: {
43
- readonly allowAnonymous?: boolean | undefined;
44
- readonly allowed?: Record<string, (string | _xyo_network_module_model.CosigningAddressSet)[]> | undefined;
45
- readonly disallowed?: Record<string, string[]> | undefined;
46
- } | undefined;
47
- readonly sign?: boolean | undefined;
48
- readonly storeQueries?: boolean | undefined;
49
- readonly timestamp?: boolean | undefined;
50
- } & Omit<Omit<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & {
51
- accountDerivationPath?: string | undefined;
52
- readonly archivist?: _xyo_network_module_model.ArchivistModuleConfig | undefined;
53
- readonly name?: string | undefined;
54
- readonly paging?: Record<string, {
55
- size?: number | undefined;
56
- }> | undefined;
57
- readonly schema: "network.xyo.prometheus.node.witness.config";
58
- readonly security?: {
59
- readonly allowAnonymous?: boolean | undefined;
60
- readonly allowed?: Record<string, (string | _xyo_network_module_model.CosigningAddressSet)[]> | undefined;
61
- readonly disallowed?: Record<string, string[]> | undefined;
62
- } | undefined;
63
- readonly sign?: boolean | undefined;
64
- readonly storeQueries?: boolean | undefined;
65
- readonly timestamp?: boolean | undefined;
66
- } & Omit<{
67
- archivist?: string | undefined;
68
- schema: "network.xyo.prometheus.node.witness.config";
69
- targetSet?: (_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & _xyo_network_payload_model.PayloadSet & {
70
- schema: "network.xyo.payload.set";
71
- }) | undefined;
72
- } & {
73
- port?: number | undefined;
74
- schema: "network.xyo.prometheus.node.witness.config";
75
- }, "schema"> & {
76
- schema: "network.xyo.prometheus.node.witness.config";
77
- }, "schema"> & {
78
- schema: string;
79
- }, "schema"> & {
80
- schema: string;
81
- };
82
- ephemeralQueryAccountEnabled?: boolean | undefined;
83
- wallet?: _xyo_network_wallet_model.WalletInstance | undefined;
84
- }>>;
85
-
86
- type PrometheusMetricValueSchema = 'network.xyo.prometheus.metric.value';
87
- declare const PrometheusMetricValueSchema: PrometheusMetricValueSchema;
88
-
89
- type PrometheusMetricValuePayload = Payload<{
90
- aggregator: Aggregator;
91
- name: string;
92
- type: MetricType;
93
- values: (number | string | object)[];
94
- }, PrometheusMetricValueSchema>;
95
-
96
- export { PrometheusMetricValuePayload, PrometheusMetricValueSchema, PrometheusNodePlugin, PrometheusNodeWitness, PrometheusNodeWitnessConfig, PrometheusNodeWitnessConfigSchema, PrometheusNodeWitnessParams, PrometheusNodePlugin as default };
1
+ import { PrometheusNodePlugin } from './Plugin';
2
+ export * from './Payload';
3
+ export * from './Schema';
4
+ export * from './Witness';
5
+ export { PrometheusNodePlugin };
6
+ export default PrometheusNodePlugin;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,oBAAoB,EAAE,CAAA;AAG/B,eAAe,oBAAoB,CAAA"}
package/package.json CHANGED
@@ -10,24 +10,18 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/lodash": "^2.10.16",
14
- "@xyo-network/module": "~2.73.4",
15
- "@xyo-network/payload-model": "~2.73.4",
16
- "@xyo-network/payloadset-plugin": "~2.73.4",
17
- "@xyo-network/witness": "~2.73.4",
13
+ "@xylabs/lodash": "^2.11.6",
14
+ "@xyo-network/module": "~2.74.1",
15
+ "@xyo-network/payload-model": "~2.74.1",
16
+ "@xyo-network/payloadset-plugin": "~2.74.1",
17
+ "@xyo-network/witness": "~2.74.1",
18
18
  "prom-client": "^14.2.0"
19
19
  },
20
20
  "devDependencies": {
21
- "@xylabs/ts-scripts-yarn3": "^2.19.12",
22
- "@xylabs/tsconfig": "^2.19.12",
23
- "publint": "^0.2.2",
24
- "tsup": "^7.2.0",
21
+ "@xylabs/ts-scripts-yarn3": "^3.0.28",
22
+ "@xylabs/tsconfig": "^3.0.28",
25
23
  "typescript": "^5.2.2"
26
24
  },
27
- "scripts": {
28
- "package-compile": "tsup && publint",
29
- "package-recompile": "tsup && publint"
30
- },
31
25
  "description": "Primary SDK for using XYO Protocol 2.0",
32
26
  "docs": "dist/docs.json",
33
27
  "types": "dist/index.d.ts",
@@ -68,5 +62,5 @@
68
62
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
69
63
  },
70
64
  "sideEffects": false,
71
- "version": "2.73.4"
65
+ "version": "2.74.1"
72
66
  }
package/tsup.config.ts DELETED
@@ -1,16 +0,0 @@
1
- import { defineConfig } from 'tsup'
2
-
3
- // eslint-disable-next-line import/no-default-export
4
- export default defineConfig({
5
- bundle: true,
6
- cjsInterop: true,
7
- clean: false,
8
- dts: {
9
- entry: ['src/index.ts'],
10
- },
11
- entry: ['src/index.ts'],
12
- format: ['cjs', 'esm'],
13
- sourcemap: true,
14
- splitting: false,
15
- tsconfig: 'tsconfig.json',
16
- })