@xyo-network/etherchain-ethereum-gas-v2-plugin 2.75.15 → 2.75.17

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.
Files changed (50) hide show
  1. package/dist/docs.json +53 -53
  2. package/package.json +12 -12
  3. package/dist/browser/Config.cjs +0 -19
  4. package/dist/browser/Config.cjs.map +0 -1
  5. package/dist/browser/Config.js +0 -1
  6. package/dist/browser/Config.js.map +0 -1
  7. package/dist/browser/Plugin.cjs +0 -66
  8. package/dist/browser/Plugin.cjs.map +0 -1
  9. package/dist/browser/Plugin.js +0 -45
  10. package/dist/browser/Plugin.js.map +0 -1
  11. package/dist/browser/Schema.cjs +0 -27
  12. package/dist/browser/Schema.cjs.map +0 -1
  13. package/dist/browser/Schema.js +0 -6
  14. package/dist/browser/Schema.js.map +0 -1
  15. package/dist/browser/Witness.cjs +0 -51
  16. package/dist/browser/Witness.cjs.map +0 -1
  17. package/dist/browser/Witness.js +0 -30
  18. package/dist/browser/Witness.js.map +0 -1
  19. package/dist/browser/lib/getV2GasFromEtherchain.cjs +0 -31
  20. package/dist/browser/lib/getV2GasFromEtherchain.cjs.map +0 -1
  21. package/dist/browser/lib/getV2GasFromEtherchain.js +0 -10
  22. package/dist/browser/lib/getV2GasFromEtherchain.js.map +0 -1
  23. package/dist/browser/lib/index.cjs +0 -33
  24. package/dist/browser/lib/index.cjs.map +0 -1
  25. package/dist/browser/lib/index.js +0 -10
  26. package/dist/browser/lib/index.js.map +0 -1
  27. package/dist/node/Config.js +0 -19
  28. package/dist/node/Config.js.map +0 -1
  29. package/dist/node/Config.mjs +0 -1
  30. package/dist/node/Config.mjs.map +0 -1
  31. package/dist/node/Plugin.js +0 -70
  32. package/dist/node/Plugin.js.map +0 -1
  33. package/dist/node/Plugin.mjs +0 -45
  34. package/dist/node/Plugin.mjs.map +0 -1
  35. package/dist/node/Schema.js +0 -31
  36. package/dist/node/Schema.js.map +0 -1
  37. package/dist/node/Schema.mjs +0 -6
  38. package/dist/node/Schema.mjs.map +0 -1
  39. package/dist/node/Witness.js +0 -55
  40. package/dist/node/Witness.js.map +0 -1
  41. package/dist/node/Witness.mjs +0 -30
  42. package/dist/node/Witness.mjs.map +0 -1
  43. package/dist/node/lib/getV2GasFromEtherchain.js +0 -35
  44. package/dist/node/lib/getV2GasFromEtherchain.js.map +0 -1
  45. package/dist/node/lib/getV2GasFromEtherchain.mjs +0 -10
  46. package/dist/node/lib/getV2GasFromEtherchain.mjs.map +0 -1
  47. package/dist/node/lib/index.js +0 -37
  48. package/dist/node/lib/index.js.map +0 -1
  49. package/dist/node/lib/index.mjs +0 -10
  50. package/dist/node/lib/index.mjs.map +0 -1
@@ -1,66 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/Plugin.ts
21
- var Plugin_exports = {};
22
- __export(Plugin_exports, {
23
- EthereumGasEtherchainV2Plugin: () => EthereumGasEtherchainV2Plugin
24
- });
25
- module.exports = __toCommonJS(Plugin_exports);
26
- var import_etherchain_ethereum_gas_v2_payload_plugin2 = require("@xyo-network/etherchain-ethereum-gas-v2-payload-plugin");
27
- var import_payload_model = require("@xyo-network/payload-model");
28
- var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
29
-
30
- // src/Witness.ts
31
- var import_abstract_witness = require("@xyo-network/abstract-witness");
32
- var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/etherchain-ethereum-gas-v2-payload-plugin");
33
-
34
- // src/lib/getV2GasFromEtherchain.ts
35
- var import_axios = require("@xyo-network/axios");
36
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
37
- var getV2GasFromEtherchain = async () => {
38
- return (await import_axios.axios.get(url)).data;
39
- };
40
-
41
- // src/Schema.ts
42
- var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
43
-
44
- // src/Witness.ts
45
- var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
46
- static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
47
- async observeHandler() {
48
- const payload = {
49
- ...await getV2GasFromEtherchain(),
50
- schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
51
- timestamp: Date.now()
52
- };
53
- return [payload];
54
- }
55
- };
56
-
57
- // src/Plugin.ts
58
- var EthereumGasEtherchainV2Plugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
59
- { required: { [import_etherchain_ethereum_gas_v2_payload_plugin2.EthereumGasEtherchainV2Schema]: 1 }, schema: import_payload_model.PayloadSetSchema },
60
- {
61
- witness: async (params) => {
62
- return await EtherchainEthereumGasWitnessV2.create(params);
63
- }
64
- }
65
- );
66
- //# sourceMappingURL=Plugin.cjs.map
@@ -1 +0,0 @@
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'\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 } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [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 '@xyo-network/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,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,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,wCAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,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;;;ADjBO,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"]}
@@ -1,45 +0,0 @@
1
- // src/Plugin.ts
2
- import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
3
- import { PayloadSetSchema } from "@xyo-network/payload-model";
4
- import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
5
-
6
- // src/Witness.ts
7
- import { AbstractWitness } from "@xyo-network/abstract-witness";
8
- import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
9
-
10
- // src/lib/getV2GasFromEtherchain.ts
11
- import { axios } from "@xyo-network/axios";
12
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
13
- var getV2GasFromEtherchain = async () => {
14
- return (await axios.get(url)).data;
15
- };
16
-
17
- // src/Schema.ts
18
- var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
19
-
20
- // src/Witness.ts
21
- var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
22
- static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
23
- async observeHandler() {
24
- const payload = {
25
- ...await getV2GasFromEtherchain(),
26
- schema: EthereumGasEtherchainV2Schema,
27
- timestamp: Date.now()
28
- };
29
- return [payload];
30
- }
31
- };
32
-
33
- // src/Plugin.ts
34
- var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
35
- { required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
36
- {
37
- witness: async (params) => {
38
- return await EtherchainEthereumGasWitnessV2.create(params);
39
- }
40
- }
41
- );
42
- export {
43
- EthereumGasEtherchainV2Plugin
44
- };
45
- //# sourceMappingURL=Plugin.js.map
@@ -1 +0,0 @@
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'\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 } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [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 '@xyo-network/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,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,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;;;ADjBO,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,27 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/Schema.ts
21
- var Schema_exports = {};
22
- __export(Schema_exports, {
23
- EthereumGasEtherchainV2WitnessConfigSchema: () => EthereumGasEtherchainV2WitnessConfigSchema
24
- });
25
- module.exports = __toCommonJS(Schema_exports);
26
- var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
27
- //# sourceMappingURL=Schema.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["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;AACO,IAAM,6CACX;","names":[]}
@@ -1,6 +0,0 @@
1
- // src/Schema.ts
2
- var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
3
- export {
4
- EthereumGasEtherchainV2WitnessConfigSchema
5
- };
6
- //# sourceMappingURL=Schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["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":";AACO,IAAM,6CACX;","names":[]}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/Witness.ts
21
- var Witness_exports = {};
22
- __export(Witness_exports, {
23
- EtherchainEthereumGasWitnessV2: () => EtherchainEthereumGasWitnessV2
24
- });
25
- module.exports = __toCommonJS(Witness_exports);
26
- var import_abstract_witness = require("@xyo-network/abstract-witness");
27
- var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/etherchain-ethereum-gas-v2-payload-plugin");
28
-
29
- // src/lib/getV2GasFromEtherchain.ts
30
- var import_axios = require("@xyo-network/axios");
31
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
32
- var getV2GasFromEtherchain = async () => {
33
- return (await import_axios.axios.get(url)).data;
34
- };
35
-
36
- // src/Schema.ts
37
- var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
38
-
39
- // src/Witness.ts
40
- var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
41
- static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
42
- async observeHandler() {
43
- const payload = {
44
- ...await getV2GasFromEtherchain(),
45
- schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
46
- timestamp: Date.now()
47
- };
48
- return [payload];
49
- }
50
- };
51
- //# sourceMappingURL=Witness.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["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 } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [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 '@xyo-network/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,8BAAgC;AAChC,uDAA8E;;;ACD9E,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,wCAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,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;","names":[]}
@@ -1,30 +0,0 @@
1
- // src/Witness.ts
2
- import { AbstractWitness } from "@xyo-network/abstract-witness";
3
- import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
4
-
5
- // src/lib/getV2GasFromEtherchain.ts
6
- import { axios } from "@xyo-network/axios";
7
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
8
- var getV2GasFromEtherchain = async () => {
9
- return (await axios.get(url)).data;
10
- };
11
-
12
- // src/Schema.ts
13
- var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
14
-
15
- // src/Witness.ts
16
- var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
17
- static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
18
- async observeHandler() {
19
- const payload = {
20
- ...await getV2GasFromEtherchain(),
21
- schema: EthereumGasEtherchainV2Schema,
22
- timestamp: Date.now()
23
- };
24
- return [payload];
25
- }
26
- };
27
- export {
28
- EtherchainEthereumGasWitnessV2
29
- };
30
- //# sourceMappingURL=Witness.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["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 } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [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 '@xyo-network/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,uBAAuB;AAChC,SAAyC,qCAAqC;;;ACD9E,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,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;","names":[]}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/lib/getV2GasFromEtherchain.ts
21
- var getV2GasFromEtherchain_exports = {};
22
- __export(getV2GasFromEtherchain_exports, {
23
- getV2GasFromEtherchain: () => getV2GasFromEtherchain
24
- });
25
- module.exports = __toCommonJS(getV2GasFromEtherchain_exports);
26
- var import_axios = require("@xyo-network/axios");
27
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
28
- var getV2GasFromEtherchain = async () => {
29
- return (await import_axios.axios.get(url)).data;
30
- };
31
- //# sourceMappingURL=getV2GasFromEtherchain.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/getV2GasFromEtherchain.ts"],"sourcesContent":["import { axios } from '@xyo-network/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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;","names":[]}
@@ -1,10 +0,0 @@
1
- // src/lib/getV2GasFromEtherchain.ts
2
- import { axios } from "@xyo-network/axios";
3
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
4
- var getV2GasFromEtherchain = async () => {
5
- return (await axios.get(url)).data;
6
- };
7
- export {
8
- getV2GasFromEtherchain
9
- };
10
- //# sourceMappingURL=getV2GasFromEtherchain.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/getV2GasFromEtherchain.ts"],"sourcesContent":["import { axios } from '@xyo-network/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"],"mappings":";AAAA,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;","names":[]}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/lib/index.ts
21
- var lib_exports = {};
22
- __export(lib_exports, {
23
- getV2GasFromEtherchain: () => getV2GasFromEtherchain
24
- });
25
- module.exports = __toCommonJS(lib_exports);
26
-
27
- // src/lib/getV2GasFromEtherchain.ts
28
- var import_axios = require("@xyo-network/axios");
29
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
30
- var getV2GasFromEtherchain = async () => {
31
- return (await import_axios.axios.get(url)).data;
32
- };
33
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/index.ts","../../../src/lib/getV2GasFromEtherchain.ts"],"sourcesContent":["export * from './getV2GasFromEtherchain'\n","import { axios } from '@xyo-network/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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;","names":[]}
@@ -1,10 +0,0 @@
1
- // src/lib/getV2GasFromEtherchain.ts
2
- import { axios } from "@xyo-network/axios";
3
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
4
- var getV2GasFromEtherchain = async () => {
5
- return (await axios.get(url)).data;
6
- };
7
- export {
8
- getV2GasFromEtherchain
9
- };
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/getV2GasFromEtherchain.ts"],"sourcesContent":["import { axios } from '@xyo-network/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"],"mappings":";AAAA,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;","names":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/Config.ts
17
- var Config_exports = {};
18
- module.exports = __toCommonJS(Config_exports);
19
- //# sourceMappingURL=Config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Config.ts"],"sourcesContent":["import { WitnessConfig } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{\n schema: EthereumGasEtherchainV2WitnessConfigSchema\n}>\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=Config.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,70 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/Plugin.ts
21
- var Plugin_exports = {};
22
- __export(Plugin_exports, {
23
- EthereumGasEtherchainV2Plugin: () => EthereumGasEtherchainV2Plugin
24
- });
25
- module.exports = __toCommonJS(Plugin_exports);
26
- var import_etherchain_ethereum_gas_v2_payload_plugin2 = require("@xyo-network/etherchain-ethereum-gas-v2-payload-plugin");
27
- var import_payload_model = require("@xyo-network/payload-model");
28
- var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
29
-
30
- // src/Witness.ts
31
- var import_abstract_witness = require("@xyo-network/abstract-witness");
32
- var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/etherchain-ethereum-gas-v2-payload-plugin");
33
-
34
- // src/lib/getV2GasFromEtherchain.ts
35
- var import_axios = require("@xyo-network/axios");
36
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
37
- var getV2GasFromEtherchain = async () => {
38
- return (await import_axios.axios.get(url)).data;
39
- };
40
-
41
- // src/Schema.ts
42
- var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
43
-
44
- // src/Witness.ts
45
- var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
46
- static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
47
- async observeHandler() {
48
- const payload = {
49
- ...await getV2GasFromEtherchain(),
50
- schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
51
- timestamp: Date.now()
52
- };
53
- return [payload];
54
- }
55
- };
56
-
57
- // src/Plugin.ts
58
- var EthereumGasEtherchainV2Plugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
59
- { required: { [import_etherchain_ethereum_gas_v2_payload_plugin2.EthereumGasEtherchainV2Schema]: 1 }, schema: import_payload_model.PayloadSetSchema },
60
- {
61
- witness: async (params) => {
62
- return await EtherchainEthereumGasWitnessV2.create(params);
63
- }
64
- }
65
- );
66
- // Annotate the CommonJS export names for ESM import in node:
67
- 0 && (module.exports = {
68
- EthereumGasEtherchainV2Plugin
69
- });
70
- //# sourceMappingURL=Plugin.js.map
@@ -1 +0,0 @@
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'\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 } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [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 '@xyo-network/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,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,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,wCAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,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;;;ADjBO,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"]}
@@ -1,45 +0,0 @@
1
- // src/Plugin.ts
2
- import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
3
- import { PayloadSetSchema } from "@xyo-network/payload-model";
4
- import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
5
-
6
- // src/Witness.ts
7
- import { AbstractWitness } from "@xyo-network/abstract-witness";
8
- import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
9
-
10
- // src/lib/getV2GasFromEtherchain.ts
11
- import { axios } from "@xyo-network/axios";
12
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
13
- var getV2GasFromEtherchain = async () => {
14
- return (await axios.get(url)).data;
15
- };
16
-
17
- // src/Schema.ts
18
- var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
19
-
20
- // src/Witness.ts
21
- var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
22
- static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
23
- async observeHandler() {
24
- const payload = {
25
- ...await getV2GasFromEtherchain(),
26
- schema: EthereumGasEtherchainV2Schema,
27
- timestamp: Date.now()
28
- };
29
- return [payload];
30
- }
31
- };
32
-
33
- // src/Plugin.ts
34
- var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
35
- { required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
36
- {
37
- witness: async (params) => {
38
- return await EtherchainEthereumGasWitnessV2.create(params);
39
- }
40
- }
41
- );
42
- export {
43
- EthereumGasEtherchainV2Plugin
44
- };
45
- //# sourceMappingURL=Plugin.mjs.map
@@ -1 +0,0 @@
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'\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 } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [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 '@xyo-network/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,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,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;;;ADjBO,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,31 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/Schema.ts
21
- var Schema_exports = {};
22
- __export(Schema_exports, {
23
- EthereumGasEtherchainV2WitnessConfigSchema: () => EthereumGasEtherchainV2WitnessConfigSchema
24
- });
25
- module.exports = __toCommonJS(Schema_exports);
26
- var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
27
- // Annotate the CommonJS export names for ESM import in node:
28
- 0 && (module.exports = {
29
- EthereumGasEtherchainV2WitnessConfigSchema
30
- });
31
- //# sourceMappingURL=Schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["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;AACO,IAAM,6CACX;","names":[]}
@@ -1,6 +0,0 @@
1
- // src/Schema.ts
2
- var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
3
- export {
4
- EthereumGasEtherchainV2WitnessConfigSchema
5
- };
6
- //# sourceMappingURL=Schema.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["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":";AACO,IAAM,6CACX;","names":[]}