@xyo-network/etherchain-ethereum-gas-v2-plugin 2.99.3 → 2.99.5

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 (65) hide show
  1. package/dist/browser/Config.d.cts +1 -1
  2. package/dist/browser/Config.d.mts +1 -1
  3. package/dist/browser/Config.d.ts +1 -1
  4. package/dist/browser/Schema.d.cts.map +1 -1
  5. package/dist/browser/Schema.d.mts.map +1 -1
  6. package/dist/browser/Schema.d.ts.map +1 -1
  7. package/dist/browser/Witness.d.cts +1 -1
  8. package/dist/browser/Witness.d.mts +1 -1
  9. package/dist/browser/Witness.d.ts +1 -1
  10. package/dist/browser/index.cjs +23 -12
  11. package/dist/browser/index.cjs.map +1 -1
  12. package/dist/browser/index.d.cts +4 -4
  13. package/dist/browser/index.d.mts +4 -4
  14. package/dist/browser/index.d.ts +4 -4
  15. package/dist/browser/{index.js → index.mjs} +26 -13
  16. package/dist/{node/index.js.map → browser/index.mjs.map} +1 -1
  17. package/dist/browser/lib/index.d.cts +1 -1
  18. package/dist/browser/lib/index.d.mts +1 -1
  19. package/dist/browser/lib/index.d.ts +1 -1
  20. package/dist/neutral/Config.d.cts +1 -1
  21. package/dist/neutral/Config.d.mts +1 -1
  22. package/dist/neutral/Config.d.ts +1 -1
  23. package/dist/neutral/Schema.d.cts.map +1 -1
  24. package/dist/neutral/Schema.d.mts.map +1 -1
  25. package/dist/neutral/Schema.d.ts.map +1 -1
  26. package/dist/neutral/Witness.d.cts +1 -1
  27. package/dist/neutral/Witness.d.mts +1 -1
  28. package/dist/neutral/Witness.d.ts +1 -1
  29. package/dist/neutral/index.cjs +23 -12
  30. package/dist/neutral/index.cjs.map +1 -1
  31. package/dist/neutral/index.d.cts +4 -4
  32. package/dist/neutral/index.d.mts +4 -4
  33. package/dist/neutral/index.d.ts +4 -4
  34. package/dist/{node/index.js → neutral/index.mjs} +26 -13
  35. package/dist/{browser/index.js.map → neutral/index.mjs.map} +1 -1
  36. package/dist/neutral/lib/index.d.cts +1 -1
  37. package/dist/neutral/lib/index.d.mts +1 -1
  38. package/dist/neutral/lib/index.d.ts +1 -1
  39. package/dist/node/Config.d.cts +1 -1
  40. package/dist/node/Config.d.mts +1 -1
  41. package/dist/node/Config.d.ts +1 -1
  42. package/dist/node/Schema.d.cts.map +1 -1
  43. package/dist/node/Schema.d.mts.map +1 -1
  44. package/dist/node/Schema.d.ts.map +1 -1
  45. package/dist/node/Witness.d.cts +1 -1
  46. package/dist/node/Witness.d.mts +1 -1
  47. package/dist/node/Witness.d.ts +1 -1
  48. package/dist/node/index.cjs +29 -14
  49. package/dist/node/index.cjs.map +1 -1
  50. package/dist/node/index.d.cts +4 -4
  51. package/dist/node/index.d.mts +4 -4
  52. package/dist/node/index.d.ts +4 -4
  53. package/dist/node/index.mjs +66 -0
  54. package/dist/{neutral/index.js.map → node/index.mjs.map} +1 -1
  55. package/dist/node/lib/index.d.cts +1 -1
  56. package/dist/node/lib/index.d.mts +1 -1
  57. package/dist/node/lib/index.d.ts +1 -1
  58. package/package.json +15 -16
  59. package/src/Config.ts +1 -1
  60. package/src/Plugin.ts +1 -1
  61. package/src/Schema.ts +2 -2
  62. package/src/Witness.ts +3 -3
  63. package/src/index.ts +4 -4
  64. package/src/lib/index.ts +1 -1
  65. package/dist/neutral/index.js +0 -49
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
4
  schema: EthereumGasEtherchainV2WitnessConfigSchema;
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
4
  schema: EthereumGasEtherchainV2WitnessConfigSchema;
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
4
  schema: EthereumGasEtherchainV2WitnessConfigSchema;
5
5
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACW,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACW,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACW,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACa,CAAA"}
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { WitnessParams } from '@xyo-network/witness-model';
5
- import { EthereumGasEtherchainV2WitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
6
6
  export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
7
7
  export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
8
8
  static readonly configSchemas: Schema[];
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { WitnessParams } from '@xyo-network/witness-model';
5
- import { EthereumGasEtherchainV2WitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
6
6
  export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
7
7
  export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
8
8
  static readonly configSchemas: Schema[];
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { WitnessParams } from '@xyo-network/witness-model';
5
- import { EthereumGasEtherchainV2WitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
6
6
  export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
7
7
  export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
8
8
  static readonly configSchemas: Schema[];
@@ -3,6 +3,7 @@ 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 });
6
7
  var __export = (target, all) => {
7
8
  for (var name in all)
8
9
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -39,16 +40,22 @@ var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/eth
39
40
  // src/lib/getV2GasFromEtherchain.ts
40
41
  var import_axios = require("@xylabs/axios");
41
42
  var url = "https://beaconcha.in/api/v1/execution/gasnow";
42
- var getV2GasFromEtherchain = async () => {
43
+ var getV2GasFromEtherchain = /* @__PURE__ */ __name(async () => {
43
44
  return (await import_axios.axios.get(url)).data;
44
- };
45
+ }, "getV2GasFromEtherchain");
45
46
 
46
47
  // src/Schema.ts
47
48
  var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
48
49
 
49
50
  // src/Witness.ts
50
51
  var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
51
- static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
52
+ static {
53
+ __name(this, "EtherchainEthereumGasWitnessV2");
54
+ }
55
+ static configSchemas = [
56
+ ...super.configSchemas,
57
+ EthereumGasEtherchainV2WitnessConfigSchema
58
+ ];
52
59
  static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
53
60
  async observeHandler() {
54
61
  const payload = {
@@ -56,17 +63,21 @@ var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.Abstr
56
63
  schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
57
64
  timestamp: Date.now()
58
65
  };
59
- return [payload];
66
+ return [
67
+ payload
68
+ ];
60
69
  }
61
70
  };
62
71
 
63
72
  // src/Plugin.ts
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
- );
73
+ var EthereumGasEtherchainV2Plugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
74
+ required: {
75
+ [import_etherchain_ethereum_gas_v2_payload_plugin2.EthereumGasEtherchainV2Schema]: 1
76
+ },
77
+ schema: import_payload_model.PayloadSetSchema
78
+ }, {
79
+ witness: /* @__PURE__ */ __name(async (params) => {
80
+ return await EtherchainEthereumGasWitnessV2.create(params);
81
+ }, "witness")
82
+ }), "EthereumGasEtherchainV2Plugin");
72
83
  //# 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.js'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js'\nexport * from './Schema.js'\nexport * from './Witness.js'\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.js'\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.js'\nimport { getV2GasFromEtherchain } from './lib/index.js'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js'\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,6CACX;;;AFUK,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"]}
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;;;;;;;;;;ACAA,IAAAA,oDAA8C;AAC9C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,uDAA8E;;;ACD9E,mBAAsB;AAGtB,IAAMC,MAAM;AAEL,IAAMC,yBAAyB,mCAAA;AACpC,UAAQ,MAAMC,mBAAMC,IAAqCH,GAAAA,GAAMI;AACjE,GAFsC;;;ACJ/B,IAAMC,6CACT;;;AFUG,IAAMC,iCAAN,cAA6CC,wCAAAA;EAZpD,OAYoDA;;;EAClD,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,UAA0C;MAC9C,GAAI,MAAMC,uBAAAA;MACVC,QAAQC;MACRC,WAAWC,KAAKC,IAAG;IACrB;AACA,WAAO;MAACN;;EACV;AACF;;;ADlBO,IAAMO,gCAAgC,iCAC3CC,wDACE;EAAEC,UAAU;IAAE,CAACC,+EAAAA,GAAgC;EAAE;EAAGC,QAAQC;AAAiB,GAC7E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,+BAA+BC,OAAOF,MAAAA;EACtD,GAFS;AAGX,CAAA,GAPyC;","names":["import_etherchain_ethereum_gas_v2_payload_plugin","url","getV2GasFromEtherchain","axios","get","data","EthereumGasEtherchainV2WitnessConfigSchema","EtherchainEthereumGasWitnessV2","AbstractWitness","configSchemas","EthereumGasEtherchainV2WitnessConfigSchema","defaultConfigSchema","observeHandler","payload","getV2GasFromEtherchain","schema","EthereumGasEtherchainV2Schema","timestamp","Date","now","EthereumGasEtherchainV2Plugin","createPayloadSetWitnessPlugin","required","EthereumGasEtherchainV2Schema","schema","PayloadSetSchema","witness","params","EtherchainEthereumGasWitnessV2","create"]}
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,6 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
1
4
  // src/Plugin.ts
2
5
  import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
3
6
  import { PayloadSetSchema } from "@xyo-network/payload-model";
@@ -10,16 +13,22 @@ import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-
10
13
  // src/lib/getV2GasFromEtherchain.ts
11
14
  import { axios } from "@xylabs/axios";
12
15
  var url = "https://beaconcha.in/api/v1/execution/gasnow";
13
- var getV2GasFromEtherchain = async () => {
16
+ var getV2GasFromEtherchain = /* @__PURE__ */ __name(async () => {
14
17
  return (await axios.get(url)).data;
15
- };
18
+ }, "getV2GasFromEtherchain");
16
19
 
17
20
  // src/Schema.ts
18
21
  var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
19
22
 
20
23
  // src/Witness.ts
21
24
  var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
22
- static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
25
+ static {
26
+ __name(this, "EtherchainEthereumGasWitnessV2");
27
+ }
28
+ static configSchemas = [
29
+ ...super.configSchemas,
30
+ EthereumGasEtherchainV2WitnessConfigSchema
31
+ ];
23
32
  static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
24
33
  async observeHandler() {
25
34
  const payload = {
@@ -27,23 +36,27 @@ var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
27
36
  schema: EthereumGasEtherchainV2Schema,
28
37
  timestamp: Date.now()
29
38
  };
30
- return [payload];
39
+ return [
40
+ payload
41
+ ];
31
42
  }
32
43
  };
33
44
 
34
45
  // src/Plugin.ts
35
- var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
36
- { required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
37
- {
38
- witness: async (params) => {
39
- return await EtherchainEthereumGasWitnessV2.create(params);
40
- }
41
- }
42
- );
46
+ var EthereumGasEtherchainV2Plugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
47
+ required: {
48
+ [EthereumGasEtherchainV2Schema2]: 1
49
+ },
50
+ schema: PayloadSetSchema
51
+ }, {
52
+ witness: /* @__PURE__ */ __name(async (params) => {
53
+ return await EtherchainEthereumGasWitnessV2.create(params);
54
+ }, "witness")
55
+ }), "EthereumGasEtherchainV2Plugin");
43
56
  export {
44
57
  EtherchainEthereumGasWitnessV2,
45
58
  EthereumGasEtherchainV2Plugin,
46
59
  EthereumGasEtherchainV2WitnessConfigSchema,
47
60
  EthereumGasEtherchainV2Plugin as default
48
61
  };
49
- //# sourceMappingURL=index.js.map
62
+ //# sourceMappingURL=index.mjs.map
@@ -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.js'\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.js'\nimport { getV2GasFromEtherchain } from './lib/index.js'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js'\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,6CACX;;;AFUK,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
+ {"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,SAASA,iCAAAA,sCAAqC;AAC9C,SAASC,wBAAwB;AACjC,SAASC,qCAAqC;;;ACF9C,SAASC,uBAAuB;AAChC,SAAyCC,qCAAqC;;;ACD9E,SAASC,aAAa;AAGtB,IAAMC,MAAM;AAEL,IAAMC,yBAAyB,mCAAA;AACpC,UAAQ,MAAMC,MAAMC,IAAqCH,GAAAA,GAAMI;AACjE,GAFsC;;;ACJ/B,IAAMC,6CACT;;;AFUG,IAAMC,iCAAN,cAA6CC,gBAAAA;EAZpD,OAYoDA;;;EAClD,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,UAA0C;MAC9C,GAAI,MAAMC,uBAAAA;MACVC,QAAQC;MACRC,WAAWC,KAAKC,IAAG;IACrB;AACA,WAAO;MAACN;;EACV;AACF;;;ADlBO,IAAMO,gCAAgC,6BAC3CC,8BACE;EAAEC,UAAU;IAAE,CAACC,8BAAAA,GAAgC;EAAE;EAAGC,QAAQC;AAAiB,GAC7E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,+BAA+BC,OAAOF,MAAAA;EACtD,GAFS;AAGX,CAAA,GAPyC;","names":["EthereumGasEtherchainV2Schema","PayloadSetSchema","createPayloadSetWitnessPlugin","AbstractWitness","EthereumGasEtherchainV2Schema","axios","url","getV2GasFromEtherchain","axios","get","data","EthereumGasEtherchainV2WitnessConfigSchema","EtherchainEthereumGasWitnessV2","AbstractWitness","configSchemas","EthereumGasEtherchainV2WitnessConfigSchema","defaultConfigSchema","observeHandler","payload","getV2GasFromEtherchain","schema","EthereumGasEtherchainV2Schema","timestamp","Date","now","EthereumGasEtherchainV2Plugin","createPayloadSetWitnessPlugin","required","EthereumGasEtherchainV2Schema","schema","PayloadSetSchema","witness","params","EtherchainEthereumGasWitnessV2","create"]}
@@ -1,2 +1,2 @@
1
- export * from './getV2GasFromEtherchain.js';
1
+ export * from './getV2GasFromEtherchain.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getV2GasFromEtherchain.js';
1
+ export * from './getV2GasFromEtherchain.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getV2GasFromEtherchain.js';
1
+ export * from './getV2GasFromEtherchain.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
4
  schema: EthereumGasEtherchainV2WitnessConfigSchema;
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
4
  schema: EthereumGasEtherchainV2WitnessConfigSchema;
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
4
  schema: EthereumGasEtherchainV2WitnessConfigSchema;
5
5
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACW,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACW,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACW,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACa,CAAA"}
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { WitnessParams } from '@xyo-network/witness-model';
5
- import { EthereumGasEtherchainV2WitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
6
6
  export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
7
7
  export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
8
8
  static readonly configSchemas: Schema[];
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { WitnessParams } from '@xyo-network/witness-model';
5
- import { EthereumGasEtherchainV2WitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
6
6
  export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
7
7
  export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
8
8
  static readonly configSchemas: Schema[];
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { WitnessParams } from '@xyo-network/witness-model';
5
- import { EthereumGasEtherchainV2WitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
6
6
  export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
7
7
  export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
8
8
  static readonly configSchemas: Schema[];
@@ -3,6 +3,7 @@ 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 });
6
7
  var __export = (target, all) => {
7
8
  for (var name in all)
8
9
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -39,16 +40,22 @@ var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/eth
39
40
  // src/lib/getV2GasFromEtherchain.ts
40
41
  var import_axios = require("@xylabs/axios");
41
42
  var url = "https://beaconcha.in/api/v1/execution/gasnow";
42
- var getV2GasFromEtherchain = async () => {
43
+ var getV2GasFromEtherchain = /* @__PURE__ */ __name(async () => {
43
44
  return (await import_axios.axios.get(url)).data;
44
- };
45
+ }, "getV2GasFromEtherchain");
45
46
 
46
47
  // src/Schema.ts
47
48
  var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
48
49
 
49
50
  // src/Witness.ts
50
51
  var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
51
- static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
52
+ static {
53
+ __name(this, "EtherchainEthereumGasWitnessV2");
54
+ }
55
+ static configSchemas = [
56
+ ...super.configSchemas,
57
+ EthereumGasEtherchainV2WitnessConfigSchema
58
+ ];
52
59
  static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
53
60
  async observeHandler() {
54
61
  const payload = {
@@ -56,17 +63,21 @@ var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.Abstr
56
63
  schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
57
64
  timestamp: Date.now()
58
65
  };
59
- return [payload];
66
+ return [
67
+ payload
68
+ ];
60
69
  }
61
70
  };
62
71
 
63
72
  // src/Plugin.ts
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
- );
73
+ var EthereumGasEtherchainV2Plugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
74
+ required: {
75
+ [import_etherchain_ethereum_gas_v2_payload_plugin2.EthereumGasEtherchainV2Schema]: 1
76
+ },
77
+ schema: import_payload_model.PayloadSetSchema
78
+ }, {
79
+ witness: /* @__PURE__ */ __name(async (params) => {
80
+ return await EtherchainEthereumGasWitnessV2.create(params);
81
+ }, "witness")
82
+ }), "EthereumGasEtherchainV2Plugin");
72
83
  //# 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.js'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js'\nexport * from './Schema.js'\nexport * from './Witness.js'\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.js'\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.js'\nimport { getV2GasFromEtherchain } from './lib/index.js'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js'\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,6CACX;;;AFUK,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"]}
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;;;;;;;;;;ACAA,IAAAA,oDAA8C;AAC9C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,uDAA8E;;;ACD9E,mBAAsB;AAGtB,IAAMC,MAAM;AAEL,IAAMC,yBAAyB,mCAAA;AACpC,UAAQ,MAAMC,mBAAMC,IAAqCH,GAAAA,GAAMI;AACjE,GAFsC;;;ACJ/B,IAAMC,6CACT;;;AFUG,IAAMC,iCAAN,cAA6CC,wCAAAA;EAZpD,OAYoDA;;;EAClD,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,UAA0C;MAC9C,GAAI,MAAMC,uBAAAA;MACVC,QAAQC;MACRC,WAAWC,KAAKC,IAAG;IACrB;AACA,WAAO;MAACN;;EACV;AACF;;;ADlBO,IAAMO,gCAAgC,iCAC3CC,wDACE;EAAEC,UAAU;IAAE,CAACC,+EAAAA,GAAgC;EAAE;EAAGC,QAAQC;AAAiB,GAC7E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,+BAA+BC,OAAOF,MAAAA;EACtD,GAFS;AAGX,CAAA,GAPyC;","names":["import_etherchain_ethereum_gas_v2_payload_plugin","url","getV2GasFromEtherchain","axios","get","data","EthereumGasEtherchainV2WitnessConfigSchema","EtherchainEthereumGasWitnessV2","AbstractWitness","configSchemas","EthereumGasEtherchainV2WitnessConfigSchema","defaultConfigSchema","observeHandler","payload","getV2GasFromEtherchain","schema","EthereumGasEtherchainV2Schema","timestamp","Date","now","EthereumGasEtherchainV2Plugin","createPayloadSetWitnessPlugin","required","EthereumGasEtherchainV2Schema","schema","PayloadSetSchema","witness","params","EtherchainEthereumGasWitnessV2","create"]}
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,6 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
1
4
  // src/Plugin.ts
2
5
  import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
3
6
  import { PayloadSetSchema } from "@xyo-network/payload-model";
@@ -10,16 +13,22 @@ import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-
10
13
  // src/lib/getV2GasFromEtherchain.ts
11
14
  import { axios } from "@xylabs/axios";
12
15
  var url = "https://beaconcha.in/api/v1/execution/gasnow";
13
- var getV2GasFromEtherchain = async () => {
16
+ var getV2GasFromEtherchain = /* @__PURE__ */ __name(async () => {
14
17
  return (await axios.get(url)).data;
15
- };
18
+ }, "getV2GasFromEtherchain");
16
19
 
17
20
  // src/Schema.ts
18
21
  var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
19
22
 
20
23
  // src/Witness.ts
21
24
  var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
22
- static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
25
+ static {
26
+ __name(this, "EtherchainEthereumGasWitnessV2");
27
+ }
28
+ static configSchemas = [
29
+ ...super.configSchemas,
30
+ EthereumGasEtherchainV2WitnessConfigSchema
31
+ ];
23
32
  static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
24
33
  async observeHandler() {
25
34
  const payload = {
@@ -27,23 +36,27 @@ var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
27
36
  schema: EthereumGasEtherchainV2Schema,
28
37
  timestamp: Date.now()
29
38
  };
30
- return [payload];
39
+ return [
40
+ payload
41
+ ];
31
42
  }
32
43
  };
33
44
 
34
45
  // src/Plugin.ts
35
- var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
36
- { required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
37
- {
38
- witness: async (params) => {
39
- return await EtherchainEthereumGasWitnessV2.create(params);
40
- }
41
- }
42
- );
46
+ var EthereumGasEtherchainV2Plugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
47
+ required: {
48
+ [EthereumGasEtherchainV2Schema2]: 1
49
+ },
50
+ schema: PayloadSetSchema
51
+ }, {
52
+ witness: /* @__PURE__ */ __name(async (params) => {
53
+ return await EtherchainEthereumGasWitnessV2.create(params);
54
+ }, "witness")
55
+ }), "EthereumGasEtherchainV2Plugin");
43
56
  export {
44
57
  EtherchainEthereumGasWitnessV2,
45
58
  EthereumGasEtherchainV2Plugin,
46
59
  EthereumGasEtherchainV2WitnessConfigSchema,
47
60
  EthereumGasEtherchainV2Plugin as default
48
61
  };
49
- //# sourceMappingURL=index.js.map
62
+ //# sourceMappingURL=index.mjs.map
@@ -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.js'\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.js'\nimport { getV2GasFromEtherchain } from './lib/index.js'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js'\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,6CACX;;;AFUK,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
+ {"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,SAASA,iCAAAA,sCAAqC;AAC9C,SAASC,wBAAwB;AACjC,SAASC,qCAAqC;;;ACF9C,SAASC,uBAAuB;AAChC,SAAyCC,qCAAqC;;;ACD9E,SAASC,aAAa;AAGtB,IAAMC,MAAM;AAEL,IAAMC,yBAAyB,mCAAA;AACpC,UAAQ,MAAMC,MAAMC,IAAqCH,GAAAA,GAAMI;AACjE,GAFsC;;;ACJ/B,IAAMC,6CACT;;;AFUG,IAAMC,iCAAN,cAA6CC,gBAAAA;EAZpD,OAYoDA;;;EAClD,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,UAA0C;MAC9C,GAAI,MAAMC,uBAAAA;MACVC,QAAQC;MACRC,WAAWC,KAAKC,IAAG;IACrB;AACA,WAAO;MAACN;;EACV;AACF;;;ADlBO,IAAMO,gCAAgC,6BAC3CC,8BACE;EAAEC,UAAU;IAAE,CAACC,8BAAAA,GAAgC;EAAE;EAAGC,QAAQC;AAAiB,GAC7E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,+BAA+BC,OAAOF,MAAAA;EACtD,GAFS;AAGX,CAAA,GAPyC;","names":["EthereumGasEtherchainV2Schema","PayloadSetSchema","createPayloadSetWitnessPlugin","AbstractWitness","EthereumGasEtherchainV2Schema","axios","url","getV2GasFromEtherchain","axios","get","data","EthereumGasEtherchainV2WitnessConfigSchema","EtherchainEthereumGasWitnessV2","AbstractWitness","configSchemas","EthereumGasEtherchainV2WitnessConfigSchema","defaultConfigSchema","observeHandler","payload","getV2GasFromEtherchain","schema","EthereumGasEtherchainV2Schema","timestamp","Date","now","EthereumGasEtherchainV2Plugin","createPayloadSetWitnessPlugin","required","EthereumGasEtherchainV2Schema","schema","PayloadSetSchema","witness","params","EtherchainEthereumGasWitnessV2","create"]}
@@ -1,2 +1,2 @@
1
- export * from './getV2GasFromEtherchain.js';
1
+ export * from './getV2GasFromEtherchain.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getV2GasFromEtherchain.js';
1
+ export * from './getV2GasFromEtherchain.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getV2GasFromEtherchain.js';
1
+ export * from './getV2GasFromEtherchain.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
4
  schema: EthereumGasEtherchainV2WitnessConfigSchema;
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
4
  schema: EthereumGasEtherchainV2WitnessConfigSchema;
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
4
  schema: EthereumGasEtherchainV2WitnessConfigSchema;
5
5
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACW,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACW,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACW,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0CAA0C,GAAG,kEAAkE,CAAA;AAC3H,eAAO,MAAM,0CAA0C,EAAE,0CACa,CAAA"}
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { WitnessParams } from '@xyo-network/witness-model';
5
- import { EthereumGasEtherchainV2WitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
6
6
  export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
7
7
  export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
8
8
  static readonly configSchemas: Schema[];
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { WitnessParams } from '@xyo-network/witness-model';
5
- import { EthereumGasEtherchainV2WitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
6
6
  export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
7
7
  export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
8
8
  static readonly configSchemas: Schema[];
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { WitnessParams } from '@xyo-network/witness-model';
5
- import { EthereumGasEtherchainV2WitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
6
6
  export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
7
7
  export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
8
8
  static readonly configSchemas: Schema[];
@@ -2,7 +2,11 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
5
6
  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 });
6
10
  var __export = (target, all) => {
7
11
  for (var name in all)
8
12
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -16,6 +20,8 @@ var __copyProps = (to, from, except, desc) => {
16
20
  return to;
17
21
  };
18
22
  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);
19
25
 
20
26
  // src/index.ts
21
27
  var src_exports = {};
@@ -39,36 +45,45 @@ var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/eth
39
45
  // src/lib/getV2GasFromEtherchain.ts
40
46
  var import_axios = require("@xylabs/axios");
41
47
  var url = "https://beaconcha.in/api/v1/execution/gasnow";
42
- var getV2GasFromEtherchain = async () => {
48
+ var getV2GasFromEtherchain = /* @__PURE__ */ __name(async () => {
43
49
  return (await import_axios.axios.get(url)).data;
44
- };
50
+ }, "getV2GasFromEtherchain");
45
51
 
46
52
  // src/Schema.ts
47
53
  var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
48
54
 
49
55
  // src/Witness.ts
50
- var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
51
- static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
52
- static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
56
+ var _EtherchainEthereumGasWitnessV2 = class _EtherchainEthereumGasWitnessV2 extends import_abstract_witness.AbstractWitness {
53
57
  async observeHandler() {
54
58
  const payload = {
55
59
  ...await getV2GasFromEtherchain(),
56
60
  schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
57
61
  timestamp: Date.now()
58
62
  };
59
- return [payload];
63
+ return [
64
+ payload
65
+ ];
60
66
  }
61
67
  };
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;
62
75
 
63
76
  // src/Plugin.ts
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
- );
77
+ var EthereumGasEtherchainV2Plugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
78
+ required: {
79
+ [import_etherchain_ethereum_gas_v2_payload_plugin2.EthereumGasEtherchainV2Schema]: 1
80
+ },
81
+ schema: import_payload_model.PayloadSetSchema
82
+ }, {
83
+ witness: /* @__PURE__ */ __name(async (params) => {
84
+ return await EtherchainEthereumGasWitnessV2.create(params);
85
+ }, "witness")
86
+ }), "EthereumGasEtherchainV2Plugin");
72
87
  // Annotate the CommonJS export names for ESM import in node:
73
88
  0 && (module.exports = {
74
89
  EtherchainEthereumGasWitnessV2,
@@ -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.js'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js'\nexport * from './Schema.js'\nexport * from './Witness.js'\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.js'\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.js'\nimport { getV2GasFromEtherchain } from './lib/index.js'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js'\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,6CACX;;;AFUK,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"]}
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;;;;;;;;;;ACAA,IAAAA,oDAA8C;AAC9C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,uDAA8E;;;ACD9E,mBAAsB;AAGtB,IAAMC,MAAM;AAEL,IAAMC,yBAAyB,mCAAA;AACpC,UAAQ,MAAMC,mBAAMC,IAAqCH,GAAAA,GAAMI;AACjE,GAFsC;;;ACJ/B,IAAMC,6CACT;;;AFUG,IAAMC,kCAAN,MAAMA,wCAAuCC,wCAAAA;EAIlD,MAAyBC,iBAAqC;AAC5D,UAAMC,UAA0C;MAC9C,GAAI,MAAMC,uBAAAA;MACVC,QAAQC;MACRC,WAAWC,KAAKC,IAAG;IACrB;AACA,WAAO;MAACN;;EACV;AACF;AAZoDF;AAClD,cADWD,iCACcU,iBAA0B;KAAI,6EAAMA;EAAeC;;AAC5E,cAFWX,iCAEcY,uBAA8BD;AAFlD,IAAMX,iCAAN;;;ADNA,IAAMa,gCAAgC,iCAC3CC,wDACE;EAAEC,UAAU;IAAE,CAACC,+EAAAA,GAAgC;EAAE;EAAGC,QAAQC;AAAiB,GAC7E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,+BAA+BC,OAAOF,MAAAA;EACtD,GAFS;AAGX,CAAA,GAPyC;","names":["import_etherchain_ethereum_gas_v2_payload_plugin","url","getV2GasFromEtherchain","axios","get","data","EthereumGasEtherchainV2WitnessConfigSchema","EtherchainEthereumGasWitnessV2","AbstractWitness","observeHandler","payload","getV2GasFromEtherchain","schema","EthereumGasEtherchainV2Schema","timestamp","Date","now","configSchemas","EthereumGasEtherchainV2WitnessConfigSchema","defaultConfigSchema","EthereumGasEtherchainV2Plugin","createPayloadSetWitnessPlugin","required","EthereumGasEtherchainV2Schema","schema","PayloadSetSchema","witness","params","EtherchainEthereumGasWitnessV2","create"]}
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,66 @@
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
+ // src/Plugin.ts
10
+ import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
11
+ import { PayloadSetSchema } from "@xyo-network/payload-model";
12
+ import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
13
+
14
+ // src/Witness.ts
15
+ import { AbstractWitness } from "@xyo-network/abstract-witness";
16
+ import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
17
+
18
+ // src/lib/getV2GasFromEtherchain.ts
19
+ import { axios } from "@xylabs/axios";
20
+ var url = "https://beaconcha.in/api/v1/execution/gasnow";
21
+ var getV2GasFromEtherchain = /* @__PURE__ */ __name(async () => {
22
+ return (await axios.get(url)).data;
23
+ }, "getV2GasFromEtherchain");
24
+
25
+ // src/Schema.ts
26
+ var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
27
+
28
+ // src/Witness.ts
29
+ var _EtherchainEthereumGasWitnessV2 = class _EtherchainEthereumGasWitnessV2 extends AbstractWitness {
30
+ async observeHandler() {
31
+ const payload = {
32
+ ...await getV2GasFromEtherchain(),
33
+ schema: EthereumGasEtherchainV2Schema,
34
+ timestamp: Date.now()
35
+ };
36
+ return [
37
+ payload
38
+ ];
39
+ }
40
+ };
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
+
49
+ // src/Plugin.ts
50
+ var EthereumGasEtherchainV2Plugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
51
+ required: {
52
+ [EthereumGasEtherchainV2Schema2]: 1
53
+ },
54
+ schema: PayloadSetSchema
55
+ }, {
56
+ witness: /* @__PURE__ */ __name(async (params) => {
57
+ return await EtherchainEthereumGasWitnessV2.create(params);
58
+ }, "witness")
59
+ }), "EthereumGasEtherchainV2Plugin");
60
+ export {
61
+ EtherchainEthereumGasWitnessV2,
62
+ EthereumGasEtherchainV2Plugin,
63
+ EthereumGasEtherchainV2WitnessConfigSchema,
64
+ EthereumGasEtherchainV2Plugin as default
65
+ };
66
+ //# sourceMappingURL=index.mjs.map
@@ -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.js'\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.js'\nimport { getV2GasFromEtherchain } from './lib/index.js'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js'\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,6CACX;;;AFUK,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
+ {"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,SAASA,iCAAAA,sCAAqC;AAC9C,SAASC,wBAAwB;AACjC,SAASC,qCAAqC;;;ACF9C,SAASC,uBAAuB;AAChC,SAAyCC,qCAAqC;;;ACD9E,SAASC,aAAa;AAGtB,IAAMC,MAAM;AAEL,IAAMC,yBAAyB,mCAAA;AACpC,UAAQ,MAAMC,MAAMC,IAAqCH,GAAAA,GAAMI;AACjE,GAFsC;;;ACJ/B,IAAMC,6CACT;;;AFUG,IAAMC,kCAAN,MAAMA,wCAAuCC,gBAAAA;EAIlD,MAAyBC,iBAAqC;AAC5D,UAAMC,UAA0C;MAC9C,GAAI,MAAMC,uBAAAA;MACVC,QAAQC;MACRC,WAAWC,KAAKC,IAAG;IACrB;AACA,WAAO;MAACN;;EACV;AACF;AAZoDF;AAClD,cADWD,iCACcU,iBAA0B;KAAI,6EAAMA;EAAeC;;AAC5E,cAFWX,iCAEcY,uBAA8BD;AAFlD,IAAMX,iCAAN;;;ADNA,IAAMa,gCAAgC,6BAC3CC,8BACE;EAAEC,UAAU;IAAE,CAACC,8BAAAA,GAAgC;EAAE;EAAGC,QAAQC;AAAiB,GAC7E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,+BAA+BC,OAAOF,MAAAA;EACtD,GAFS;AAGX,CAAA,GAPyC;","names":["EthereumGasEtherchainV2Schema","PayloadSetSchema","createPayloadSetWitnessPlugin","AbstractWitness","EthereumGasEtherchainV2Schema","axios","url","getV2GasFromEtherchain","axios","get","data","EthereumGasEtherchainV2WitnessConfigSchema","EtherchainEthereumGasWitnessV2","AbstractWitness","observeHandler","payload","getV2GasFromEtherchain","schema","EthereumGasEtherchainV2Schema","timestamp","Date","now","configSchemas","EthereumGasEtherchainV2WitnessConfigSchema","defaultConfigSchema","EthereumGasEtherchainV2Plugin","createPayloadSetWitnessPlugin","required","EthereumGasEtherchainV2Schema","schema","PayloadSetSchema","witness","params","EtherchainEthereumGasWitnessV2","create"]}
@@ -1,2 +1,2 @@
1
- export * from './getV2GasFromEtherchain.js';
1
+ export * from './getV2GasFromEtherchain.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getV2GasFromEtherchain.js';
1
+ export * from './getV2GasFromEtherchain.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getV2GasFromEtherchain.js';
1
+ export * from './getV2GasFromEtherchain.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -10,20 +10,19 @@
10
10
  "url": "https://github.com/XYOracleNetwork/plugins/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/axios": "^3.6.1",
14
- "@xyo-network/abstract-witness": "^2.110.6",
15
- "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin": "^2.99.3",
16
- "@xyo-network/module-model": "^2.110.6",
17
- "@xyo-network/payload-model": "^2.110.6",
18
- "@xyo-network/payloadset-plugin": "^2.110.6",
19
- "@xyo-network/witness-model": "^2.110.6"
13
+ "@xylabs/axios": "^3.6.8",
14
+ "@xyo-network/abstract-witness": "^2.111.2",
15
+ "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin": "^2.99.5",
16
+ "@xyo-network/module-model": "^2.111.2",
17
+ "@xyo-network/payload-model": "^2.111.2",
18
+ "@xyo-network/payloadset-plugin": "^2.111.2",
19
+ "@xyo-network/witness-model": "^2.111.2"
20
20
  },
21
21
  "devDependencies": {
22
- "@xylabs/ts-scripts-yarn3": "^3.12.2",
23
- "@xylabs/tsconfig": "^3.12.2",
24
- "@xyo-network/account": "^2.110.6",
25
- "@xyo-network/payload-wrapper": "^2.110.6",
26
- "typescript": "^5.5.3"
22
+ "@xylabs/ts-scripts-yarn3": "^3.15.13",
23
+ "@xylabs/tsconfig": "^3.15.13",
24
+ "@xyo-network/payload-wrapper": "^2.111.2",
25
+ "typescript": "^5.5.4"
27
26
  },
28
27
  "description": "Typescript/Javascript Plugins for XYO Platform",
29
28
  "types": "dist/node/index.d.ts",
@@ -36,7 +35,7 @@
36
35
  },
37
36
  "import": {
38
37
  "types": "./dist/browser/index.d.mts",
39
- "default": "./dist/browser/index.js"
38
+ "default": "./dist/browser/index.mjs"
40
39
  }
41
40
  },
42
41
  "node": {
@@ -46,14 +45,14 @@
46
45
  },
47
46
  "import": {
48
47
  "types": "./dist/node/index.d.mts",
49
- "default": "./dist/node/index.js"
48
+ "default": "./dist/node/index.mjs"
50
49
  }
51
50
  }
52
51
  },
53
52
  "./package.json": "./package.json"
54
53
  },
55
54
  "main": "dist/node/index.cjs",
56
- "module": "dist/node/index.js",
55
+ "module": "dist/node/index.mjs",
57
56
  "homepage": "https://xyo.network",
58
57
  "license": "LGPL-3.0-only",
59
58
  "publishConfig": {
@@ -64,6 +63,6 @@
64
63
  "url": "https://github.com/XYOracleNetwork/plugins.git"
65
64
  },
66
65
  "sideEffects": false,
67
- "version": "2.99.3",
66
+ "version": "2.99.5",
68
67
  "type": "module"
69
68
  }
package/src/Config.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model'
2
2
 
3
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js'
3
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'
4
4
 
5
5
  export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
6
6
  schema: EthereumGasEtherchainV2WitnessConfigSchema
package/src/Plugin.ts CHANGED
@@ -2,7 +2,7 @@ import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-
2
2
  import { PayloadSetSchema } from '@xyo-network/payload-model'
3
3
  import { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'
4
4
 
5
- import { EtherchainEthereumGasWitnessV2 } from './Witness.js'
5
+ import { EtherchainEthereumGasWitnessV2 } from './Witness.ts'
6
6
 
7
7
  export const EthereumGasEtherchainV2Plugin = () =>
8
8
  createPayloadSetWitnessPlugin(
package/src/Schema.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'
2
- export const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema =
3
- 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'
2
+ export const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema
3
+ = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'
package/src/Witness.ts CHANGED
@@ -4,9 +4,9 @@ import { AnyConfigSchema } from '@xyo-network/module-model'
4
4
  import { Payload, Schema } from '@xyo-network/payload-model'
5
5
  import { WitnessParams } from '@xyo-network/witness-model'
6
6
 
7
- import { EthereumGasEtherchainV2WitnessConfig } from './Config.js'
8
- import { getV2GasFromEtherchain } from './lib/index.js'
9
- import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.js'
7
+ import { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'
8
+ import { getV2GasFromEtherchain } from './lib/index.ts'
9
+ import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'
10
10
 
11
11
  export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>
12
12
 
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './Config.js'
1
+ export * from './Config.ts'
2
2
  // eslint-disable-next-line import/no-default-export
3
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.js'
4
- export * from './Schema.js'
5
- export * from './Witness.js'
3
+ export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts'
4
+ export * from './Schema.ts'
5
+ export * from './Witness.ts'
package/src/lib/index.ts CHANGED
@@ -1 +1 @@
1
- export * from './getV2GasFromEtherchain.js'
1
+ export * from './getV2GasFromEtherchain.ts'
@@ -1,49 +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 "@xylabs/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 = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
23
- static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
24
- async observeHandler() {
25
- const payload = {
26
- ...await getV2GasFromEtherchain(),
27
- schema: EthereumGasEtherchainV2Schema,
28
- timestamp: Date.now()
29
- };
30
- return [payload];
31
- }
32
- };
33
-
34
- // src/Plugin.ts
35
- var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
36
- { required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
37
- {
38
- witness: async (params) => {
39
- return await EtherchainEthereumGasWitnessV2.create(params);
40
- }
41
- }
42
- );
43
- export {
44
- EtherchainEthereumGasWitnessV2,
45
- EthereumGasEtherchainV2Plugin,
46
- EthereumGasEtherchainV2WitnessConfigSchema,
47
- EthereumGasEtherchainV2Plugin as default
48
- };
49
- //# sourceMappingURL=index.js.map