@xyo-network/etherchain-ethereum-gas-v2-plugin 2.99.5 → 2.99.6
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/browser/Plugin.d.cts +4 -4
- package/dist/browser/Plugin.d.mts +4 -4
- package/dist/browser/Plugin.d.ts +4 -4
- package/dist/browser/index.cjs +12 -23
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.mjs +12 -25
- package/dist/browser/index.mjs.map +1 -1
- package/dist/neutral/Plugin.d.cts +4 -4
- package/dist/neutral/Plugin.d.mts +4 -4
- package/dist/neutral/Plugin.d.ts +4 -4
- package/dist/neutral/index.cjs +12 -23
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.mjs +12 -25
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/node/Plugin.d.cts +4 -4
- package/dist/node/Plugin.d.mts +4 -4
- package/dist/node/Plugin.d.ts +4 -4
- package/dist/node/index.cjs +14 -29
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +14 -31
- package/dist/node/index.mjs.map +1 -1
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import("
|
|
1
|
+
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
2
2
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
3
3
|
addToResolvers?: boolean;
|
|
4
4
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
@@ -12,10 +12,10 @@ export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/p
|
|
|
12
12
|
};
|
|
13
13
|
ephemeralQueryAccountEnabled?: boolean;
|
|
14
14
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
15
|
-
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("
|
|
16
|
-
account?: import("
|
|
15
|
+
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
16
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
17
17
|
addToResolvers?: boolean;
|
|
18
|
-
additionalSigners?: import("
|
|
18
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
19
19
|
allowNameResolution?: boolean;
|
|
20
20
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
21
21
|
schema: "network.xyo.module.config";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import("
|
|
1
|
+
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
2
2
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
3
3
|
addToResolvers?: boolean;
|
|
4
4
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
@@ -12,10 +12,10 @@ export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/p
|
|
|
12
12
|
};
|
|
13
13
|
ephemeralQueryAccountEnabled?: boolean;
|
|
14
14
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
15
|
-
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("
|
|
16
|
-
account?: import("
|
|
15
|
+
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
16
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
17
17
|
addToResolvers?: boolean;
|
|
18
|
-
additionalSigners?: import("
|
|
18
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
19
19
|
allowNameResolution?: boolean;
|
|
20
20
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
21
21
|
schema: "network.xyo.module.config";
|
package/dist/browser/Plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import("
|
|
1
|
+
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
2
2
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
3
3
|
addToResolvers?: boolean;
|
|
4
4
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
@@ -12,10 +12,10 @@ export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/p
|
|
|
12
12
|
};
|
|
13
13
|
ephemeralQueryAccountEnabled?: boolean;
|
|
14
14
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
15
|
-
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("
|
|
16
|
-
account?: import("
|
|
15
|
+
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
16
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
17
17
|
addToResolvers?: boolean;
|
|
18
|
-
additionalSigners?: import("
|
|
18
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
19
19
|
allowNameResolution?: boolean;
|
|
20
20
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
21
21
|
schema: "network.xyo.module.config";
|
package/dist/browser/index.cjs
CHANGED
|
@@ -3,7 +3,6 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
6
|
var __export = (target, all) => {
|
|
8
7
|
for (var name in all)
|
|
9
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -40,22 +39,16 @@ var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/eth
|
|
|
40
39
|
// src/lib/getV2GasFromEtherchain.ts
|
|
41
40
|
var import_axios = require("@xylabs/axios");
|
|
42
41
|
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
43
|
-
var getV2GasFromEtherchain =
|
|
42
|
+
var getV2GasFromEtherchain = async () => {
|
|
44
43
|
return (await import_axios.axios.get(url)).data;
|
|
45
|
-
}
|
|
44
|
+
};
|
|
46
45
|
|
|
47
46
|
// src/Schema.ts
|
|
48
47
|
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
49
48
|
|
|
50
49
|
// src/Witness.ts
|
|
51
50
|
var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
|
|
52
|
-
static
|
|
53
|
-
__name(this, "EtherchainEthereumGasWitnessV2");
|
|
54
|
-
}
|
|
55
|
-
static configSchemas = [
|
|
56
|
-
...super.configSchemas,
|
|
57
|
-
EthereumGasEtherchainV2WitnessConfigSchema
|
|
58
|
-
];
|
|
51
|
+
static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
|
|
59
52
|
static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
|
|
60
53
|
async observeHandler() {
|
|
61
54
|
const payload = {
|
|
@@ -63,21 +56,17 @@ var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.Abstr
|
|
|
63
56
|
schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
|
|
64
57
|
timestamp: Date.now()
|
|
65
58
|
};
|
|
66
|
-
return [
|
|
67
|
-
payload
|
|
68
|
-
];
|
|
59
|
+
return [payload];
|
|
69
60
|
}
|
|
70
61
|
};
|
|
71
62
|
|
|
72
63
|
// src/Plugin.ts
|
|
73
|
-
var EthereumGasEtherchainV2Plugin =
|
|
74
|
-
required: {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}, "witness")
|
|
82
|
-
}), "EthereumGasEtherchainV2Plugin");
|
|
64
|
+
var EthereumGasEtherchainV2Plugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
65
|
+
{ required: { [import_etherchain_ethereum_gas_v2_payload_plugin2.EthereumGasEtherchainV2Schema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
66
|
+
{
|
|
67
|
+
witness: async (params) => {
|
|
68
|
+
return await EtherchainEthereumGasWitnessV2.create(params);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
);
|
|
83
72
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,oDAA8C;AAC9C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,uDAA8E;;;ACD9E,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACT;;;AFUG,IAAM,iCAAN,cAA6C,wCAAsD;AAAA,EACxG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0CAA0C;AAAA,EACtH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,gCAAgC,UAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,+EAA6B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;","names":["import_etherchain_ethereum_gas_v2_payload_plugin"]}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/Plugin.ts
|
|
5
2
|
import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
|
|
6
3
|
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
@@ -13,22 +10,16 @@ import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-
|
|
|
13
10
|
// src/lib/getV2GasFromEtherchain.ts
|
|
14
11
|
import { axios } from "@xylabs/axios";
|
|
15
12
|
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
16
|
-
var getV2GasFromEtherchain =
|
|
13
|
+
var getV2GasFromEtherchain = async () => {
|
|
17
14
|
return (await axios.get(url)).data;
|
|
18
|
-
}
|
|
15
|
+
};
|
|
19
16
|
|
|
20
17
|
// src/Schema.ts
|
|
21
18
|
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
22
19
|
|
|
23
20
|
// src/Witness.ts
|
|
24
21
|
var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
|
|
25
|
-
static
|
|
26
|
-
__name(this, "EtherchainEthereumGasWitnessV2");
|
|
27
|
-
}
|
|
28
|
-
static configSchemas = [
|
|
29
|
-
...super.configSchemas,
|
|
30
|
-
EthereumGasEtherchainV2WitnessConfigSchema
|
|
31
|
-
];
|
|
22
|
+
static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
|
|
32
23
|
static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
|
|
33
24
|
async observeHandler() {
|
|
34
25
|
const payload = {
|
|
@@ -36,23 +27,19 @@ var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
|
|
|
36
27
|
schema: EthereumGasEtherchainV2Schema,
|
|
37
28
|
timestamp: Date.now()
|
|
38
29
|
};
|
|
39
|
-
return [
|
|
40
|
-
payload
|
|
41
|
-
];
|
|
30
|
+
return [payload];
|
|
42
31
|
}
|
|
43
32
|
};
|
|
44
33
|
|
|
45
34
|
// src/Plugin.ts
|
|
46
|
-
var EthereumGasEtherchainV2Plugin =
|
|
47
|
-
required: {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}, "witness")
|
|
55
|
-
}), "EthereumGasEtherchainV2Plugin");
|
|
35
|
+
var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
|
|
36
|
+
{ required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
|
|
37
|
+
{
|
|
38
|
+
witness: async (params) => {
|
|
39
|
+
return await EtherchainEthereumGasWitnessV2.create(params);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
);
|
|
56
43
|
export {
|
|
57
44
|
EtherchainEthereumGasWitnessV2,
|
|
58
45
|
EthereumGasEtherchainV2Plugin,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";AAAA,SAAS,iCAAAA,sCAAqC;AAC9C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAyC,qCAAqC;;;ACD9E,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACT;;;AFUG,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0CAA0C;AAAA,EACtH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,gCAAgC,MAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,8BAA6B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;","names":["EthereumGasEtherchainV2Schema","EthereumGasEtherchainV2Schema"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import("
|
|
1
|
+
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
2
2
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
3
3
|
addToResolvers?: boolean;
|
|
4
4
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
@@ -12,10 +12,10 @@ export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/p
|
|
|
12
12
|
};
|
|
13
13
|
ephemeralQueryAccountEnabled?: boolean;
|
|
14
14
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
15
|
-
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("
|
|
16
|
-
account?: import("
|
|
15
|
+
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
16
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
17
17
|
addToResolvers?: boolean;
|
|
18
|
-
additionalSigners?: import("
|
|
18
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
19
19
|
allowNameResolution?: boolean;
|
|
20
20
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
21
21
|
schema: "network.xyo.module.config";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import("
|
|
1
|
+
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
2
2
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
3
3
|
addToResolvers?: boolean;
|
|
4
4
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
@@ -12,10 +12,10 @@ export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/p
|
|
|
12
12
|
};
|
|
13
13
|
ephemeralQueryAccountEnabled?: boolean;
|
|
14
14
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
15
|
-
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("
|
|
16
|
-
account?: import("
|
|
15
|
+
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
16
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
17
17
|
addToResolvers?: boolean;
|
|
18
|
-
additionalSigners?: import("
|
|
18
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
19
19
|
allowNameResolution?: boolean;
|
|
20
20
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
21
21
|
schema: "network.xyo.module.config";
|
package/dist/neutral/Plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import("
|
|
1
|
+
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
2
2
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
3
3
|
addToResolvers?: boolean;
|
|
4
4
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
@@ -12,10 +12,10 @@ export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/p
|
|
|
12
12
|
};
|
|
13
13
|
ephemeralQueryAccountEnabled?: boolean;
|
|
14
14
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
15
|
-
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("
|
|
16
|
-
account?: import("
|
|
15
|
+
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
16
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
17
17
|
addToResolvers?: boolean;
|
|
18
|
-
additionalSigners?: import("
|
|
18
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
19
19
|
allowNameResolution?: boolean;
|
|
20
20
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
21
21
|
schema: "network.xyo.module.config";
|
package/dist/neutral/index.cjs
CHANGED
|
@@ -3,7 +3,6 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
6
|
var __export = (target, all) => {
|
|
8
7
|
for (var name in all)
|
|
9
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -40,22 +39,16 @@ var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/eth
|
|
|
40
39
|
// src/lib/getV2GasFromEtherchain.ts
|
|
41
40
|
var import_axios = require("@xylabs/axios");
|
|
42
41
|
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
43
|
-
var getV2GasFromEtherchain =
|
|
42
|
+
var getV2GasFromEtherchain = async () => {
|
|
44
43
|
return (await import_axios.axios.get(url)).data;
|
|
45
|
-
}
|
|
44
|
+
};
|
|
46
45
|
|
|
47
46
|
// src/Schema.ts
|
|
48
47
|
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
49
48
|
|
|
50
49
|
// src/Witness.ts
|
|
51
50
|
var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
|
|
52
|
-
static
|
|
53
|
-
__name(this, "EtherchainEthereumGasWitnessV2");
|
|
54
|
-
}
|
|
55
|
-
static configSchemas = [
|
|
56
|
-
...super.configSchemas,
|
|
57
|
-
EthereumGasEtherchainV2WitnessConfigSchema
|
|
58
|
-
];
|
|
51
|
+
static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
|
|
59
52
|
static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
|
|
60
53
|
async observeHandler() {
|
|
61
54
|
const payload = {
|
|
@@ -63,21 +56,17 @@ var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.Abstr
|
|
|
63
56
|
schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
|
|
64
57
|
timestamp: Date.now()
|
|
65
58
|
};
|
|
66
|
-
return [
|
|
67
|
-
payload
|
|
68
|
-
];
|
|
59
|
+
return [payload];
|
|
69
60
|
}
|
|
70
61
|
};
|
|
71
62
|
|
|
72
63
|
// src/Plugin.ts
|
|
73
|
-
var EthereumGasEtherchainV2Plugin =
|
|
74
|
-
required: {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}, "witness")
|
|
82
|
-
}), "EthereumGasEtherchainV2Plugin");
|
|
64
|
+
var EthereumGasEtherchainV2Plugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
65
|
+
{ required: { [import_etherchain_ethereum_gas_v2_payload_plugin2.EthereumGasEtherchainV2Schema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
66
|
+
{
|
|
67
|
+
witness: async (params) => {
|
|
68
|
+
return await EtherchainEthereumGasWitnessV2.create(params);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
);
|
|
83
72
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,oDAA8C;AAC9C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,uDAA8E;;;ACD9E,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACT;;;AFUG,IAAM,iCAAN,cAA6C,wCAAsD;AAAA,EACxG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0CAA0C;AAAA,EACtH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,gCAAgC,UAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,+EAA6B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;","names":["import_etherchain_ethereum_gas_v2_payload_plugin"]}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/Plugin.ts
|
|
5
2
|
import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
|
|
6
3
|
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
@@ -13,22 +10,16 @@ import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-
|
|
|
13
10
|
// src/lib/getV2GasFromEtherchain.ts
|
|
14
11
|
import { axios } from "@xylabs/axios";
|
|
15
12
|
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
16
|
-
var getV2GasFromEtherchain =
|
|
13
|
+
var getV2GasFromEtherchain = async () => {
|
|
17
14
|
return (await axios.get(url)).data;
|
|
18
|
-
}
|
|
15
|
+
};
|
|
19
16
|
|
|
20
17
|
// src/Schema.ts
|
|
21
18
|
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
22
19
|
|
|
23
20
|
// src/Witness.ts
|
|
24
21
|
var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
|
|
25
|
-
static
|
|
26
|
-
__name(this, "EtherchainEthereumGasWitnessV2");
|
|
27
|
-
}
|
|
28
|
-
static configSchemas = [
|
|
29
|
-
...super.configSchemas,
|
|
30
|
-
EthereumGasEtherchainV2WitnessConfigSchema
|
|
31
|
-
];
|
|
22
|
+
static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
|
|
32
23
|
static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
|
|
33
24
|
async observeHandler() {
|
|
34
25
|
const payload = {
|
|
@@ -36,23 +27,19 @@ var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
|
|
|
36
27
|
schema: EthereumGasEtherchainV2Schema,
|
|
37
28
|
timestamp: Date.now()
|
|
38
29
|
};
|
|
39
|
-
return [
|
|
40
|
-
payload
|
|
41
|
-
];
|
|
30
|
+
return [payload];
|
|
42
31
|
}
|
|
43
32
|
};
|
|
44
33
|
|
|
45
34
|
// src/Plugin.ts
|
|
46
|
-
var EthereumGasEtherchainV2Plugin =
|
|
47
|
-
required: {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}, "witness")
|
|
55
|
-
}), "EthereumGasEtherchainV2Plugin");
|
|
35
|
+
var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
|
|
36
|
+
{ required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
|
|
37
|
+
{
|
|
38
|
+
witness: async (params) => {
|
|
39
|
+
return await EtherchainEthereumGasWitnessV2.create(params);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
);
|
|
56
43
|
export {
|
|
57
44
|
EtherchainEthereumGasWitnessV2,
|
|
58
45
|
EthereumGasEtherchainV2Plugin,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";AAAA,SAAS,iCAAAA,sCAAqC;AAC9C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAyC,qCAAqC;;;ACD9E,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACT;;;AFUG,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0CAA0C;AAAA,EACtH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,gCAAgC,MAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,8BAA6B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;","names":["EthereumGasEtherchainV2Schema","EthereumGasEtherchainV2Schema"]}
|
package/dist/node/Plugin.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import("
|
|
1
|
+
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
2
2
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
3
3
|
addToResolvers?: boolean;
|
|
4
4
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
@@ -12,10 +12,10 @@ export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/p
|
|
|
12
12
|
};
|
|
13
13
|
ephemeralQueryAccountEnabled?: boolean;
|
|
14
14
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
15
|
-
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("
|
|
16
|
-
account?: import("
|
|
15
|
+
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
16
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
17
17
|
addToResolvers?: boolean;
|
|
18
|
-
additionalSigners?: import("
|
|
18
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
19
19
|
allowNameResolution?: boolean;
|
|
20
20
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
21
21
|
schema: "network.xyo.module.config";
|
package/dist/node/Plugin.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import("
|
|
1
|
+
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
2
2
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
3
3
|
addToResolvers?: boolean;
|
|
4
4
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
@@ -12,10 +12,10 @@ export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/p
|
|
|
12
12
|
};
|
|
13
13
|
ephemeralQueryAccountEnabled?: boolean;
|
|
14
14
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
15
|
-
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("
|
|
16
|
-
account?: import("
|
|
15
|
+
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
16
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
17
17
|
addToResolvers?: boolean;
|
|
18
|
-
additionalSigners?: import("
|
|
18
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
19
19
|
allowNameResolution?: boolean;
|
|
20
20
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
21
21
|
schema: "network.xyo.module.config";
|
package/dist/node/Plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import("
|
|
1
|
+
export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<import("@xyo-network/witness-model").WitnessModule<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
2
2
|
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
3
3
|
addToResolvers?: boolean;
|
|
4
4
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
@@ -12,10 +12,10 @@ export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/p
|
|
|
12
12
|
};
|
|
13
13
|
ephemeralQueryAccountEnabled?: boolean;
|
|
14
14
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
15
|
-
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("
|
|
16
|
-
account?: import("
|
|
15
|
+
}, import("@xyo-network/witness-model").WitnessModuleEventData<import("@xyo-network/module-model").ModuleInstance<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
16
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
17
17
|
addToResolvers?: boolean;
|
|
18
|
-
additionalSigners?: import("
|
|
18
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
19
19
|
allowNameResolution?: boolean;
|
|
20
20
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
21
21
|
schema: "network.xyo.module.config";
|
package/dist/node/index.cjs
CHANGED
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __reflectGet = Reflect.get;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
6
|
var __export = (target, all) => {
|
|
11
7
|
for (var name in all)
|
|
12
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -20,8 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
20
16
|
return to;
|
|
21
17
|
};
|
|
22
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24
|
-
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
25
19
|
|
|
26
20
|
// src/index.ts
|
|
27
21
|
var src_exports = {};
|
|
@@ -45,45 +39,36 @@ var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/eth
|
|
|
45
39
|
// src/lib/getV2GasFromEtherchain.ts
|
|
46
40
|
var import_axios = require("@xylabs/axios");
|
|
47
41
|
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
48
|
-
var getV2GasFromEtherchain =
|
|
42
|
+
var getV2GasFromEtherchain = async () => {
|
|
49
43
|
return (await import_axios.axios.get(url)).data;
|
|
50
|
-
}
|
|
44
|
+
};
|
|
51
45
|
|
|
52
46
|
// src/Schema.ts
|
|
53
47
|
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
54
48
|
|
|
55
49
|
// src/Witness.ts
|
|
56
|
-
var
|
|
50
|
+
var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
|
|
51
|
+
static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
|
|
52
|
+
static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
|
|
57
53
|
async observeHandler() {
|
|
58
54
|
const payload = {
|
|
59
55
|
...await getV2GasFromEtherchain(),
|
|
60
56
|
schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
|
|
61
57
|
timestamp: Date.now()
|
|
62
58
|
};
|
|
63
|
-
return [
|
|
64
|
-
payload
|
|
65
|
-
];
|
|
59
|
+
return [payload];
|
|
66
60
|
}
|
|
67
61
|
};
|
|
68
|
-
__name(_EtherchainEthereumGasWitnessV2, "EtherchainEthereumGasWitnessV2");
|
|
69
|
-
__publicField(_EtherchainEthereumGasWitnessV2, "configSchemas", [
|
|
70
|
-
...__superGet(_EtherchainEthereumGasWitnessV2, _EtherchainEthereumGasWitnessV2, "configSchemas"),
|
|
71
|
-
EthereumGasEtherchainV2WitnessConfigSchema
|
|
72
|
-
]);
|
|
73
|
-
__publicField(_EtherchainEthereumGasWitnessV2, "defaultConfigSchema", EthereumGasEtherchainV2WitnessConfigSchema);
|
|
74
|
-
var EtherchainEthereumGasWitnessV2 = _EtherchainEthereumGasWitnessV2;
|
|
75
62
|
|
|
76
63
|
// src/Plugin.ts
|
|
77
|
-
var EthereumGasEtherchainV2Plugin =
|
|
78
|
-
required: {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, "witness")
|
|
86
|
-
}), "EthereumGasEtherchainV2Plugin");
|
|
64
|
+
var EthereumGasEtherchainV2Plugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
65
|
+
{ required: { [import_etherchain_ethereum_gas_v2_payload_plugin2.EthereumGasEtherchainV2Schema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
66
|
+
{
|
|
67
|
+
witness: async (params) => {
|
|
68
|
+
return await EtherchainEthereumGasWitnessV2.create(params);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
);
|
|
87
72
|
// Annotate the CommonJS export names for ESM import in node:
|
|
88
73
|
0 && (module.exports = {
|
|
89
74
|
EtherchainEthereumGasWitnessV2,
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,oDAA8C;AAC9C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,uDAA8E;;;ACD9E,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACT;;;AFUG,IAAM,iCAAN,cAA6C,wCAAsD;AAAA,EACxG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0CAA0C;AAAA,EACtH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,gCAAgC,UAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,+EAA6B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;","names":["import_etherchain_ethereum_gas_v2_payload_plugin"]}
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
-
var __reflectGet = Reflect.get;
|
|
4
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
|
-
var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
|
|
8
|
-
|
|
9
1
|
// src/Plugin.ts
|
|
10
2
|
import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
|
|
11
3
|
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
@@ -18,45 +10,36 @@ import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-
|
|
|
18
10
|
// src/lib/getV2GasFromEtherchain.ts
|
|
19
11
|
import { axios } from "@xylabs/axios";
|
|
20
12
|
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
21
|
-
var getV2GasFromEtherchain =
|
|
13
|
+
var getV2GasFromEtherchain = async () => {
|
|
22
14
|
return (await axios.get(url)).data;
|
|
23
|
-
}
|
|
15
|
+
};
|
|
24
16
|
|
|
25
17
|
// src/Schema.ts
|
|
26
18
|
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
27
19
|
|
|
28
20
|
// src/Witness.ts
|
|
29
|
-
var
|
|
21
|
+
var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
|
|
22
|
+
static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
|
|
23
|
+
static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
|
|
30
24
|
async observeHandler() {
|
|
31
25
|
const payload = {
|
|
32
26
|
...await getV2GasFromEtherchain(),
|
|
33
27
|
schema: EthereumGasEtherchainV2Schema,
|
|
34
28
|
timestamp: Date.now()
|
|
35
29
|
};
|
|
36
|
-
return [
|
|
37
|
-
payload
|
|
38
|
-
];
|
|
30
|
+
return [payload];
|
|
39
31
|
}
|
|
40
32
|
};
|
|
41
|
-
__name(_EtherchainEthereumGasWitnessV2, "EtherchainEthereumGasWitnessV2");
|
|
42
|
-
__publicField(_EtherchainEthereumGasWitnessV2, "configSchemas", [
|
|
43
|
-
...__superGet(_EtherchainEthereumGasWitnessV2, _EtherchainEthereumGasWitnessV2, "configSchemas"),
|
|
44
|
-
EthereumGasEtherchainV2WitnessConfigSchema
|
|
45
|
-
]);
|
|
46
|
-
__publicField(_EtherchainEthereumGasWitnessV2, "defaultConfigSchema", EthereumGasEtherchainV2WitnessConfigSchema);
|
|
47
|
-
var EtherchainEthereumGasWitnessV2 = _EtherchainEthereumGasWitnessV2;
|
|
48
33
|
|
|
49
34
|
// src/Plugin.ts
|
|
50
|
-
var EthereumGasEtherchainV2Plugin =
|
|
51
|
-
required: {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, "witness")
|
|
59
|
-
}), "EthereumGasEtherchainV2Plugin");
|
|
35
|
+
var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
|
|
36
|
+
{ required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
|
|
37
|
+
{
|
|
38
|
+
witness: async (params) => {
|
|
39
|
+
return await EtherchainEthereumGasWitnessV2.create(params);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
);
|
|
60
43
|
export {
|
|
61
44
|
EtherchainEthereumGasWitnessV2,
|
|
62
45
|
EthereumGasEtherchainV2Plugin,
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";AAAA,SAAS,iCAAAA,sCAAqC;AAC9C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAyC,qCAAqC;;;ACD9E,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACT;;;AFUG,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0CAA0C;AAAA,EACtH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,gCAAgC,MAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,8BAA6B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;","names":["EthereumGasEtherchainV2Schema","EthereumGasEtherchainV2Schema"]}
|
package/package.json
CHANGED
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/plugins/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/axios": "^3.6.
|
|
14
|
-
"@xyo-network/abstract-witness": "^2.111.
|
|
15
|
-
"@xyo-network/etherchain-ethereum-gas-v2-payload-plugin": "^2.99.
|
|
16
|
-
"@xyo-network/module-model": "^2.111.
|
|
17
|
-
"@xyo-network/payload-model": "^2.111.
|
|
18
|
-
"@xyo-network/payloadset-plugin": "^2.111.
|
|
19
|
-
"@xyo-network/witness-model": "^2.111.
|
|
13
|
+
"@xylabs/axios": "^3.6.12",
|
|
14
|
+
"@xyo-network/abstract-witness": "^2.111.3",
|
|
15
|
+
"@xyo-network/etherchain-ethereum-gas-v2-payload-plugin": "^2.99.6",
|
|
16
|
+
"@xyo-network/module-model": "^2.111.3",
|
|
17
|
+
"@xyo-network/payload-model": "^2.111.3",
|
|
18
|
+
"@xyo-network/payloadset-plugin": "^2.111.3",
|
|
19
|
+
"@xyo-network/witness-model": "^2.111.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@xylabs/ts-scripts-yarn3": "^3.15.
|
|
23
|
-
"@xylabs/tsconfig": "^3.15.
|
|
24
|
-
"@xyo-network/payload-wrapper": "^2.111.
|
|
22
|
+
"@xylabs/ts-scripts-yarn3": "^3.15.14",
|
|
23
|
+
"@xylabs/tsconfig": "^3.15.14",
|
|
24
|
+
"@xyo-network/payload-wrapper": "^2.111.3",
|
|
25
25
|
"typescript": "^5.5.4"
|
|
26
26
|
},
|
|
27
27
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
@@ -63,6 +63,6 @@
|
|
|
63
63
|
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
64
64
|
},
|
|
65
65
|
"sideEffects": false,
|
|
66
|
-
"version": "2.99.
|
|
66
|
+
"version": "2.99.6",
|
|
67
67
|
"type": "module"
|
|
68
68
|
}
|