@xyo-network/etherscan-ethereum-gas-plugin 2.99.4 → 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 (74) 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/Plugin.d.cts +1 -1
  5. package/dist/browser/Plugin.d.mts +1 -1
  6. package/dist/browser/Plugin.d.ts +1 -1
  7. package/dist/browser/Schema.d.cts.map +1 -1
  8. package/dist/browser/Schema.d.mts.map +1 -1
  9. package/dist/browser/Schema.d.ts.map +1 -1
  10. package/dist/browser/Witness.d.cts +1 -1
  11. package/dist/browser/Witness.d.mts +1 -1
  12. package/dist/browser/Witness.d.ts +1 -1
  13. package/dist/browser/index.cjs +27 -14
  14. package/dist/browser/index.cjs.map +1 -1
  15. package/dist/browser/index.d.cts +4 -4
  16. package/dist/browser/index.d.mts +4 -4
  17. package/dist/browser/index.d.ts +4 -4
  18. package/dist/browser/{index.js → index.mjs} +30 -15
  19. package/dist/{node/index.js.map → browser/index.mjs.map} +1 -1
  20. package/dist/browser/lib/index.d.cts +1 -1
  21. package/dist/browser/lib/index.d.mts +1 -1
  22. package/dist/browser/lib/index.d.ts +1 -1
  23. package/dist/neutral/Config.d.cts +1 -1
  24. package/dist/neutral/Config.d.mts +1 -1
  25. package/dist/neutral/Config.d.ts +1 -1
  26. package/dist/neutral/Plugin.d.cts +1 -1
  27. package/dist/neutral/Plugin.d.mts +1 -1
  28. package/dist/neutral/Plugin.d.ts +1 -1
  29. package/dist/neutral/Schema.d.cts.map +1 -1
  30. package/dist/neutral/Schema.d.mts.map +1 -1
  31. package/dist/neutral/Schema.d.ts.map +1 -1
  32. package/dist/neutral/Witness.d.cts +1 -1
  33. package/dist/neutral/Witness.d.mts +1 -1
  34. package/dist/neutral/Witness.d.ts +1 -1
  35. package/dist/neutral/index.cjs +27 -14
  36. package/dist/neutral/index.cjs.map +1 -1
  37. package/dist/neutral/index.d.cts +4 -4
  38. package/dist/neutral/index.d.mts +4 -4
  39. package/dist/neutral/index.d.ts +4 -4
  40. package/dist/neutral/{index.js → index.mjs} +30 -15
  41. package/dist/{browser/index.js.map → neutral/index.mjs.map} +1 -1
  42. package/dist/neutral/lib/index.d.cts +1 -1
  43. package/dist/neutral/lib/index.d.mts +1 -1
  44. package/dist/neutral/lib/index.d.ts +1 -1
  45. package/dist/node/Config.d.cts +1 -1
  46. package/dist/node/Config.d.mts +1 -1
  47. package/dist/node/Config.d.ts +1 -1
  48. package/dist/node/Plugin.d.cts +1 -1
  49. package/dist/node/Plugin.d.mts +1 -1
  50. package/dist/node/Plugin.d.ts +1 -1
  51. package/dist/node/Schema.d.cts.map +1 -1
  52. package/dist/node/Schema.d.mts.map +1 -1
  53. package/dist/node/Schema.d.ts.map +1 -1
  54. package/dist/node/Witness.d.cts +1 -1
  55. package/dist/node/Witness.d.mts +1 -1
  56. package/dist/node/Witness.d.ts +1 -1
  57. package/dist/node/index.cjs +33 -16
  58. package/dist/node/index.cjs.map +1 -1
  59. package/dist/node/index.d.cts +4 -4
  60. package/dist/node/index.d.mts +4 -4
  61. package/dist/node/index.d.ts +4 -4
  62. package/dist/node/index.mjs +69 -0
  63. package/dist/{neutral/index.js.map → node/index.mjs.map} +1 -1
  64. package/dist/node/lib/index.d.cts +1 -1
  65. package/dist/node/lib/index.d.mts +1 -1
  66. package/dist/node/lib/index.d.ts +1 -1
  67. package/package.json +18 -18
  68. package/src/Config.ts +1 -1
  69. package/src/Plugin.ts +1 -1
  70. package/src/Schema.ts +2 -2
  71. package/src/Witness.ts +3 -3
  72. package/src/index.ts +4 -4
  73. package/src/lib/index.ts +1 -1
  74. package/dist/node/index.js +0 -50
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherscanWitnessConfig = WitnessConfig<{
4
4
  apiKey: string;
5
5
  schema: EthereumGasEtherscanWitnessConfigSchema;
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherscanWitnessConfig = WitnessConfig<{
4
4
  apiKey: string;
5
5
  schema: EthereumGasEtherscanWitnessConfigSchema;
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherscanWitnessConfig = WitnessConfig<{
4
4
  apiKey: string;
5
5
  schema: EthereumGasEtherscanWitnessConfigSchema;
@@ -1,3 +1,3 @@
1
- import { EthereumGasEtherscanWitness } from './Witness.js';
1
+ import { EthereumGasEtherscanWitness } from './Witness.ts';
2
2
  export declare const EthereumGasEtherscanPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEtherscanWitness>;
3
3
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1,3 +1,3 @@
1
- import { EthereumGasEtherscanWitness } from './Witness.js';
1
+ import { EthereumGasEtherscanWitness } from './Witness.ts';
2
2
  export declare const EthereumGasEtherscanPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEtherscanWitness>;
3
3
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1,3 +1,3 @@
1
- import { EthereumGasEtherscanWitness } from './Witness.js';
1
+ import { EthereumGasEtherscanWitness } from './Witness.ts';
2
2
  export declare const EthereumGasEtherscanPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEtherscanWitness>;
3
3
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACU,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACU,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACU,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACY,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 { EthereumGasEtherscanWitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherscanWitnessConfig } from './Config.ts';
6
6
  export declare class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {
7
7
  static readonly configSchemas: Schema[];
8
8
  static readonly defaultConfigSchema: 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 { EthereumGasEtherscanWitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherscanWitnessConfig } from './Config.ts';
6
6
  export declare class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {
7
7
  static readonly configSchemas: Schema[];
8
8
  static readonly defaultConfigSchema: 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 { EthereumGasEtherscanWitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherscanWitnessConfig } from './Config.ts';
6
6
  export declare class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {
7
7
  static readonly configSchemas: Schema[];
8
8
  static readonly defaultConfigSchema: 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 });
@@ -40,33 +41,45 @@ var import_payload_builder = require("@xyo-network/payload-builder");
40
41
 
41
42
  // src/lib/getGasFromEtherscan.ts
42
43
  var import_axios = require("@xylabs/axios");
43
- var getGasFromEtherscan = async (apiKey) => {
44
+ var getGasFromEtherscan = /* @__PURE__ */ __name(async (apiKey) => {
44
45
  const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`;
45
46
  return (await import_axios.axios.get(url)).data;
46
- };
47
+ }, "getGasFromEtherscan");
47
48
 
48
49
  // src/Schema.ts
49
50
  var EthereumGasEtherscanWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherscan.witness.config";
50
51
 
51
52
  // src/Witness.ts
52
53
  var EthereumGasEtherscanWitness = class extends import_abstract_witness.AbstractWitness {
53
- static configSchemas = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema];
54
+ static {
55
+ __name(this, "EthereumGasEtherscanWitness");
56
+ }
57
+ static configSchemas = [
58
+ ...super.configSchemas,
59
+ EthereumGasEtherscanWitnessConfigSchema
60
+ ];
54
61
  static defaultConfigSchema = EthereumGasEtherscanWitnessConfigSchema;
55
62
  async observeHandler() {
56
63
  const apiKey = (0, import_assert.assertEx)(this.config?.apiKey, () => "apiKey is required");
57
- const payload = await new import_payload_builder.PayloadBuilder({ schema: import_etherscan_ethereum_gas_payload_plugin.EthereumGasEtherscanSchema }).fields(await getGasFromEtherscan(apiKey)).build();
58
- return [payload];
64
+ const payload = await new import_payload_builder.PayloadBuilder({
65
+ schema: import_etherscan_ethereum_gas_payload_plugin.EthereumGasEtherscanSchema
66
+ }).fields(await getGasFromEtherscan(apiKey)).build();
67
+ return [
68
+ payload
69
+ ];
59
70
  }
60
71
  };
61
72
 
62
73
  // src/Plugin.ts
63
- var EthereumGasEtherscanPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
64
- { required: { [import_etherscan_ethereum_gas_payload_plugin2.EthereumGasEtherscanSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
65
- {
66
- witness: async (params) => {
67
- const result = await EthereumGasEtherscanWitness.create(params);
68
- return result;
69
- }
70
- }
71
- );
74
+ var EthereumGasEtherscanPlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
75
+ required: {
76
+ [import_etherscan_ethereum_gas_payload_plugin2.EthereumGasEtherscanSchema]: 1
77
+ },
78
+ schema: import_payload_model.PayloadSetSchema
79
+ }, {
80
+ witness: /* @__PURE__ */ __name(async (params) => {
81
+ const result = await EthereumGasEtherscanWitness.create(params);
82
+ return result;
83
+ }, "witness")
84
+ }), "EthereumGasEtherscanPlugin");
72
85
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEtherscan.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.js'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.js'\nexport * from './Schema.js'\nexport * from './Witness.js'\n","import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEtherscanWitness } from './Witness.js'\n\nexport const EthereumGasEtherscanPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEtherscanWitness>(\n { required: { [EthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await EthereumGasEtherscanWitness.create(params)\n return result as EthereumGasEtherscanWitness\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherscanWitnessConfig } from './Config.js'\nimport { getGasFromEtherscan } from './lib/index.js'\nimport { EthereumGasEtherscanWitnessConfigSchema } from './Schema.js'\n\nexport class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherscanWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const apiKey = assertEx(this.config?.apiKey, () => 'apiKey is required')\n const payload = await new PayloadBuilder<EthereumGasEtherscanPayload>({ schema: EthereumGasEtherscanSchema })\n .fields(await getGasFromEtherscan(apiKey))\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherscanResponse } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const getGasFromEtherscan = async (apiKey: string): Promise<EthereumGasEtherscanResponse> => {\n const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`\n return (await axios.get<EthereumGasEtherscanResponse>(url)).data\n}\n","export type EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\nexport const EthereumGasEtherscanWitnessConfigSchema: EthereumGasEtherscanWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gDAA2C;AAC3C,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,mDAAwE;AAExE,6BAA+B;;;ACJ/B,mBAAsB;AAGf,IAAM,sBAAsB,OAAO,WAA0D;AAClG,QAAM,MAAM,0EAA0E,MAAM;AAC5F,UAAQ,MAAM,mBAAM,IAAkC,GAAG,GAAG;AAC9D;;;ACLO,IAAM,0CACX;;;AFUK,IAAM,8BAAN,cAA0C,wCAAmF;AAAA,EAClI,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,uCAAuC;AAAA,EACnH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,aAAS,wBAAS,KAAK,QAAQ,QAAQ,MAAM,oBAAoB;AACvE,UAAM,UAAU,MAAM,IAAI,sCAA4C,EAAE,QAAQ,wEAA2B,CAAC,EACzG,OAAO,MAAM,oBAAoB,MAAM,CAAC,EACxC,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,6BAA6B,UACxC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,wEAA0B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC1E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,4BAA4B,OAAO,MAAM;AAC9D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["import_etherscan_ethereum_gas_payload_plugin"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEtherscan.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEtherscanWitness } from './Witness.ts'\n\nexport const EthereumGasEtherscanPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEtherscanWitness>(\n { required: { [EthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await EthereumGasEtherscanWitness.create(params)\n return result as EthereumGasEtherscanWitness\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherscanWitnessConfig } from './Config.ts'\nimport { getGasFromEtherscan } from './lib/index.ts'\nimport { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts'\n\nexport class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherscanWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const apiKey = assertEx(this.config?.apiKey, () => 'apiKey is required')\n const payload = await new PayloadBuilder<EthereumGasEtherscanPayload>({ schema: EthereumGasEtherscanSchema })\n .fields(await getGasFromEtherscan(apiKey))\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherscanResponse } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const getGasFromEtherscan = async (apiKey: string): Promise<EthereumGasEtherscanResponse> => {\n const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`\n return (await axios.get<EthereumGasEtherscanResponse>(url)).data\n}\n","export type EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\nexport const EthereumGasEtherscanWitnessConfigSchema: EthereumGasEtherscanWitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA,IAAAA,gDAA2C;AAC3C,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,mDAAwE;AAExE,6BAA+B;;;ACJ/B,mBAAsB;AAGf,IAAMC,sBAAsB,8BAAOC,WAAAA;AACxC,QAAMC,MAAM,0EAA0ED,MAAAA;AACtF,UAAQ,MAAME,mBAAMC,IAAkCF,GAAAA,GAAMG;AAC9D,GAHmC;;;ACF5B,IAAMC,0CACT;;;AFUG,IAAMC,8BAAN,cAA0CC,wCAAAA;EAZjD,OAYiDA;;;EAC/C,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,aAASC,wBAAS,KAAKC,QAAQF,QAAQ,MAAM,oBAAA;AACnD,UAAMG,UAAU,MAAM,IAAIC,sCAA4C;MAAEC,QAAQC;IAA2B,CAAA,EACxGC,OAAO,MAAMC,oBAAoBR,MAAAA,CAAAA,EACjCS,MAAK;AACR,WAAO;MAACN;;EACV;AACF;;;ADjBO,IAAMO,6BAA6B,iCACxCC,wDACE;EAAEC,UAAU;IAAE,CAACC,wEAAAA,GAA6B;EAAE;EAAGC,QAAQC;AAAiB,GAC1E;EACEC,SAAS,8BAAOC,WAAAA;AACd,UAAMC,SAAS,MAAMC,4BAA4BC,OAAOH,MAAAA;AACxD,WAAOC;EACT,GAHS;AAIX,CAAA,GARsC;","names":["import_etherscan_ethereum_gas_payload_plugin","getGasFromEtherscan","apiKey","url","axios","get","data","EthereumGasEtherscanWitnessConfigSchema","EthereumGasEtherscanWitness","AbstractWitness","configSchemas","EthereumGasEtherscanWitnessConfigSchema","defaultConfigSchema","observeHandler","apiKey","assertEx","config","payload","PayloadBuilder","schema","EthereumGasEtherscanSchema","fields","getGasFromEtherscan","build","EthereumGasEtherscanPlugin","createPayloadSetWitnessPlugin","required","EthereumGasEtherscanSchema","schema","PayloadSetSchema","witness","params","result","EthereumGasEtherscanWitness","create"]}
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } 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 { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } 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 { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } 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 { EthereumGasEtherscanSchema as EthereumGasEtherscanSchema2 } from "@xyo-network/etherscan-ethereum-gas-payload-plugin";
3
6
  import { PayloadSetSchema } from "@xyo-network/payload-model";
@@ -11,39 +14,51 @@ import { PayloadBuilder } from "@xyo-network/payload-builder";
11
14
 
12
15
  // src/lib/getGasFromEtherscan.ts
13
16
  import { axios } from "@xylabs/axios";
14
- var getGasFromEtherscan = async (apiKey) => {
17
+ var getGasFromEtherscan = /* @__PURE__ */ __name(async (apiKey) => {
15
18
  const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`;
16
19
  return (await axios.get(url)).data;
17
- };
20
+ }, "getGasFromEtherscan");
18
21
 
19
22
  // src/Schema.ts
20
23
  var EthereumGasEtherscanWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherscan.witness.config";
21
24
 
22
25
  // src/Witness.ts
23
26
  var EthereumGasEtherscanWitness = class extends AbstractWitness {
24
- static configSchemas = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema];
27
+ static {
28
+ __name(this, "EthereumGasEtherscanWitness");
29
+ }
30
+ static configSchemas = [
31
+ ...super.configSchemas,
32
+ EthereumGasEtherscanWitnessConfigSchema
33
+ ];
25
34
  static defaultConfigSchema = EthereumGasEtherscanWitnessConfigSchema;
26
35
  async observeHandler() {
27
36
  const apiKey = assertEx(this.config?.apiKey, () => "apiKey is required");
28
- const payload = await new PayloadBuilder({ schema: EthereumGasEtherscanSchema }).fields(await getGasFromEtherscan(apiKey)).build();
29
- return [payload];
37
+ const payload = await new PayloadBuilder({
38
+ schema: EthereumGasEtherscanSchema
39
+ }).fields(await getGasFromEtherscan(apiKey)).build();
40
+ return [
41
+ payload
42
+ ];
30
43
  }
31
44
  };
32
45
 
33
46
  // src/Plugin.ts
34
- var EthereumGasEtherscanPlugin = () => createPayloadSetWitnessPlugin(
35
- { required: { [EthereumGasEtherscanSchema2]: 1 }, schema: PayloadSetSchema },
36
- {
37
- witness: async (params) => {
38
- const result = await EthereumGasEtherscanWitness.create(params);
39
- return result;
40
- }
41
- }
42
- );
47
+ var EthereumGasEtherscanPlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
48
+ required: {
49
+ [EthereumGasEtherscanSchema2]: 1
50
+ },
51
+ schema: PayloadSetSchema
52
+ }, {
53
+ witness: /* @__PURE__ */ __name(async (params) => {
54
+ const result = await EthereumGasEtherscanWitness.create(params);
55
+ return result;
56
+ }, "witness")
57
+ }), "EthereumGasEtherscanPlugin");
43
58
  export {
44
59
  EthereumGasEtherscanPlugin,
45
60
  EthereumGasEtherscanWitness,
46
61
  EthereumGasEtherscanWitnessConfigSchema,
47
62
  EthereumGasEtherscanPlugin as default
48
63
  };
49
- //# sourceMappingURL=index.js.map
64
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEtherscan.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEtherscanWitness } from './Witness.js'\n\nexport const EthereumGasEtherscanPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEtherscanWitness>(\n { required: { [EthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await EthereumGasEtherscanWitness.create(params)\n return result as EthereumGasEtherscanWitness\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherscanWitnessConfig } from './Config.js'\nimport { getGasFromEtherscan } from './lib/index.js'\nimport { EthereumGasEtherscanWitnessConfigSchema } from './Schema.js'\n\nexport class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherscanWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const apiKey = assertEx(this.config?.apiKey, () => 'apiKey is required')\n const payload = await new PayloadBuilder<EthereumGasEtherscanPayload>({ schema: EthereumGasEtherscanSchema })\n .fields(await getGasFromEtherscan(apiKey))\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherscanResponse } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const getGasFromEtherscan = async (apiKey: string): Promise<EthereumGasEtherscanResponse> => {\n const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`\n return (await axios.get<EthereumGasEtherscanResponse>(url)).data\n}\n","export type EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\nexport const EthereumGasEtherscanWitnessConfigSchema: EthereumGasEtherscanWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\n"],"mappings":";AAAA,SAAS,8BAAAA,mCAAkC;AAC3C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAsC,kCAAkC;AAExE,SAAS,sBAAsB;;;ACJ/B,SAAS,aAAa;AAGf,IAAM,sBAAsB,OAAO,WAA0D;AAClG,QAAM,MAAM,0EAA0E,MAAM;AAC5F,UAAQ,MAAM,MAAM,IAAkC,GAAG,GAAG;AAC9D;;;ACLO,IAAM,0CACX;;;AFUK,IAAM,8BAAN,cAA0C,gBAAmF;AAAA,EAClI,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,uCAAuC;AAAA,EACnH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAhBhE;AAiBI,UAAM,SAAS,UAAS,UAAK,WAAL,mBAAa,QAAQ,MAAM,oBAAoB;AACvE,UAAM,UAAU,MAAM,IAAI,eAA4C,EAAE,QAAQ,2BAA2B,CAAC,EACzG,OAAO,MAAM,oBAAoB,MAAM,CAAC,EACxC,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,6BAA6B,MACxC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,2BAA0B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC1E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,4BAA4B,OAAO,MAAM;AAC9D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["EthereumGasEtherscanSchema","EthereumGasEtherscanSchema"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEtherscan.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEtherscanWitness } from './Witness.ts'\n\nexport const EthereumGasEtherscanPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEtherscanWitness>(\n { required: { [EthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await EthereumGasEtherscanWitness.create(params)\n return result as EthereumGasEtherscanWitness\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherscanWitnessConfig } from './Config.ts'\nimport { getGasFromEtherscan } from './lib/index.ts'\nimport { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts'\n\nexport class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherscanWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const apiKey = assertEx(this.config?.apiKey, () => 'apiKey is required')\n const payload = await new PayloadBuilder<EthereumGasEtherscanPayload>({ schema: EthereumGasEtherscanSchema })\n .fields(await getGasFromEtherscan(apiKey))\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherscanResponse } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const getGasFromEtherscan = async (apiKey: string): Promise<EthereumGasEtherscanResponse> => {\n const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`\n return (await axios.get<EthereumGasEtherscanResponse>(url)).data\n}\n","export type EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\nexport const EthereumGasEtherscanWitnessConfigSchema: EthereumGasEtherscanWitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\n"],"mappings":";;;;AAAA,SAASA,8BAAAA,mCAAkC;AAC3C,SAASC,wBAAwB;AACjC,SAASC,qCAAqC;;;ACF9C,SAASC,gBAAgB;AACzB,SAASC,uBAAuB;AAChC,SAAsCC,kCAAkC;AAExE,SAASC,sBAAsB;;;ACJ/B,SAASC,aAAa;AAGf,IAAMC,sBAAsB,8BAAOC,WAAAA;AACxC,QAAMC,MAAM,0EAA0ED,MAAAA;AACtF,UAAQ,MAAME,MAAMC,IAAkCF,GAAAA,GAAMG;AAC9D,GAHmC;;;ACF5B,IAAMC,0CACT;;;AFUG,IAAMC,8BAAN,cAA0CC,gBAAAA;EAZjD,OAYiDA;;;EAC/C,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,SAASC,SAAS,KAAKC,QAAQF,QAAQ,MAAM,oBAAA;AACnD,UAAMG,UAAU,MAAM,IAAIC,eAA4C;MAAEC,QAAQC;IAA2B,CAAA,EACxGC,OAAO,MAAMC,oBAAoBR,MAAAA,CAAAA,EACjCS,MAAK;AACR,WAAO;MAACN;;EACV;AACF;;;ADjBO,IAAMO,6BAA6B,6BACxCC,8BACE;EAAEC,UAAU;IAAE,CAACC,2BAAAA,GAA6B;EAAE;EAAGC,QAAQC;AAAiB,GAC1E;EACEC,SAAS,8BAAOC,WAAAA;AACd,UAAMC,SAAS,MAAMC,4BAA4BC,OAAOH,MAAAA;AACxD,WAAOC;EACT,GAHS;AAIX,CAAA,GARsC;","names":["EthereumGasEtherscanSchema","PayloadSetSchema","createPayloadSetWitnessPlugin","assertEx","AbstractWitness","EthereumGasEtherscanSchema","PayloadBuilder","axios","getGasFromEtherscan","apiKey","url","axios","get","data","EthereumGasEtherscanWitnessConfigSchema","EthereumGasEtherscanWitness","AbstractWitness","configSchemas","EthereumGasEtherscanWitnessConfigSchema","defaultConfigSchema","observeHandler","apiKey","assertEx","config","payload","PayloadBuilder","schema","EthereumGasEtherscanSchema","fields","getGasFromEtherscan","build","EthereumGasEtherscanPlugin","createPayloadSetWitnessPlugin","required","EthereumGasEtherscanSchema","schema","PayloadSetSchema","witness","params","result","EthereumGasEtherscanWitness","create"]}
@@ -1,2 +1,2 @@
1
- export * from './getGasFromEtherscan.js';
1
+ export * from './getGasFromEtherscan.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getGasFromEtherscan.js';
1
+ export * from './getGasFromEtherscan.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getGasFromEtherscan.js';
1
+ export * from './getGasFromEtherscan.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherscanWitnessConfig = WitnessConfig<{
4
4
  apiKey: string;
5
5
  schema: EthereumGasEtherscanWitnessConfigSchema;
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherscanWitnessConfig = WitnessConfig<{
4
4
  apiKey: string;
5
5
  schema: EthereumGasEtherscanWitnessConfigSchema;
@@ -1,5 +1,5 @@
1
1
  import { WitnessConfig } from '@xyo-network/witness-model';
2
- import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasEtherscanWitnessConfig = WitnessConfig<{
4
4
  apiKey: string;
5
5
  schema: EthereumGasEtherscanWitnessConfigSchema;
@@ -1,3 +1,3 @@
1
- import { EthereumGasEtherscanWitness } from './Witness.js';
1
+ import { EthereumGasEtherscanWitness } from './Witness.ts';
2
2
  export declare const EthereumGasEtherscanPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEtherscanWitness>;
3
3
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1,3 +1,3 @@
1
- import { EthereumGasEtherscanWitness } from './Witness.js';
1
+ import { EthereumGasEtherscanWitness } from './Witness.ts';
2
2
  export declare const EthereumGasEtherscanPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEtherscanWitness>;
3
3
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1,3 +1,3 @@
1
- import { EthereumGasEtherscanWitness } from './Witness.js';
1
+ import { EthereumGasEtherscanWitness } from './Witness.ts';
2
2
  export declare const EthereumGasEtherscanPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEtherscanWitness>;
3
3
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACU,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACU,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACU,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACY,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 { EthereumGasEtherscanWitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherscanWitnessConfig } from './Config.ts';
6
6
  export declare class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {
7
7
  static readonly configSchemas: Schema[];
8
8
  static readonly defaultConfigSchema: 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 { EthereumGasEtherscanWitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherscanWitnessConfig } from './Config.ts';
6
6
  export declare class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {
7
7
  static readonly configSchemas: Schema[];
8
8
  static readonly defaultConfigSchema: 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 { EthereumGasEtherscanWitnessConfig } from './Config.js';
5
+ import { EthereumGasEtherscanWitnessConfig } from './Config.ts';
6
6
  export declare class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {
7
7
  static readonly configSchemas: Schema[];
8
8
  static readonly defaultConfigSchema: 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 });
@@ -40,33 +41,45 @@ var import_payload_builder = require("@xyo-network/payload-builder");
40
41
 
41
42
  // src/lib/getGasFromEtherscan.ts
42
43
  var import_axios = require("@xylabs/axios");
43
- var getGasFromEtherscan = async (apiKey) => {
44
+ var getGasFromEtherscan = /* @__PURE__ */ __name(async (apiKey) => {
44
45
  const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`;
45
46
  return (await import_axios.axios.get(url)).data;
46
- };
47
+ }, "getGasFromEtherscan");
47
48
 
48
49
  // src/Schema.ts
49
50
  var EthereumGasEtherscanWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherscan.witness.config";
50
51
 
51
52
  // src/Witness.ts
52
53
  var EthereumGasEtherscanWitness = class extends import_abstract_witness.AbstractWitness {
53
- static configSchemas = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema];
54
+ static {
55
+ __name(this, "EthereumGasEtherscanWitness");
56
+ }
57
+ static configSchemas = [
58
+ ...super.configSchemas,
59
+ EthereumGasEtherscanWitnessConfigSchema
60
+ ];
54
61
  static defaultConfigSchema = EthereumGasEtherscanWitnessConfigSchema;
55
62
  async observeHandler() {
56
63
  const apiKey = (0, import_assert.assertEx)(this.config?.apiKey, () => "apiKey is required");
57
- const payload = await new import_payload_builder.PayloadBuilder({ schema: import_etherscan_ethereum_gas_payload_plugin.EthereumGasEtherscanSchema }).fields(await getGasFromEtherscan(apiKey)).build();
58
- return [payload];
64
+ const payload = await new import_payload_builder.PayloadBuilder({
65
+ schema: import_etherscan_ethereum_gas_payload_plugin.EthereumGasEtherscanSchema
66
+ }).fields(await getGasFromEtherscan(apiKey)).build();
67
+ return [
68
+ payload
69
+ ];
59
70
  }
60
71
  };
61
72
 
62
73
  // src/Plugin.ts
63
- var EthereumGasEtherscanPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
64
- { required: { [import_etherscan_ethereum_gas_payload_plugin2.EthereumGasEtherscanSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
65
- {
66
- witness: async (params) => {
67
- const result = await EthereumGasEtherscanWitness.create(params);
68
- return result;
69
- }
70
- }
71
- );
74
+ var EthereumGasEtherscanPlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
75
+ required: {
76
+ [import_etherscan_ethereum_gas_payload_plugin2.EthereumGasEtherscanSchema]: 1
77
+ },
78
+ schema: import_payload_model.PayloadSetSchema
79
+ }, {
80
+ witness: /* @__PURE__ */ __name(async (params) => {
81
+ const result = await EthereumGasEtherscanWitness.create(params);
82
+ return result;
83
+ }, "witness")
84
+ }), "EthereumGasEtherscanPlugin");
72
85
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEtherscan.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.js'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.js'\nexport * from './Schema.js'\nexport * from './Witness.js'\n","import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEtherscanWitness } from './Witness.js'\n\nexport const EthereumGasEtherscanPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEtherscanWitness>(\n { required: { [EthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await EthereumGasEtherscanWitness.create(params)\n return result as EthereumGasEtherscanWitness\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherscanWitnessConfig } from './Config.js'\nimport { getGasFromEtherscan } from './lib/index.js'\nimport { EthereumGasEtherscanWitnessConfigSchema } from './Schema.js'\n\nexport class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherscanWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const apiKey = assertEx(this.config?.apiKey, () => 'apiKey is required')\n const payload = await new PayloadBuilder<EthereumGasEtherscanPayload>({ schema: EthereumGasEtherscanSchema })\n .fields(await getGasFromEtherscan(apiKey))\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherscanResponse } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const getGasFromEtherscan = async (apiKey: string): Promise<EthereumGasEtherscanResponse> => {\n const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`\n return (await axios.get<EthereumGasEtherscanResponse>(url)).data\n}\n","export type EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\nexport const EthereumGasEtherscanWitnessConfigSchema: EthereumGasEtherscanWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gDAA2C;AAC3C,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,mDAAwE;AAExE,6BAA+B;;;ACJ/B,mBAAsB;AAGf,IAAM,sBAAsB,OAAO,WAA0D;AAClG,QAAM,MAAM,0EAA0E,MAAM;AAC5F,UAAQ,MAAM,mBAAM,IAAkC,GAAG,GAAG;AAC9D;;;ACLO,IAAM,0CACX;;;AFUK,IAAM,8BAAN,cAA0C,wCAAmF;AAAA,EAClI,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,uCAAuC;AAAA,EACnH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,aAAS,wBAAS,KAAK,QAAQ,QAAQ,MAAM,oBAAoB;AACvE,UAAM,UAAU,MAAM,IAAI,sCAA4C,EAAE,QAAQ,wEAA2B,CAAC,EACzG,OAAO,MAAM,oBAAoB,MAAM,CAAC,EACxC,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,6BAA6B,UACxC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,wEAA0B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC1E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,4BAA4B,OAAO,MAAM;AAC9D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["import_etherscan_ethereum_gas_payload_plugin"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEtherscan.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEtherscanWitness } from './Witness.ts'\n\nexport const EthereumGasEtherscanPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEtherscanWitness>(\n { required: { [EthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await EthereumGasEtherscanWitness.create(params)\n return result as EthereumGasEtherscanWitness\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherscanWitnessConfig } from './Config.ts'\nimport { getGasFromEtherscan } from './lib/index.ts'\nimport { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts'\n\nexport class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherscanWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const apiKey = assertEx(this.config?.apiKey, () => 'apiKey is required')\n const payload = await new PayloadBuilder<EthereumGasEtherscanPayload>({ schema: EthereumGasEtherscanSchema })\n .fields(await getGasFromEtherscan(apiKey))\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasEtherscanResponse } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const getGasFromEtherscan = async (apiKey: string): Promise<EthereumGasEtherscanResponse> => {\n const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`\n return (await axios.get<EthereumGasEtherscanResponse>(url)).data\n}\n","export type EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\nexport const EthereumGasEtherscanWitnessConfigSchema: EthereumGasEtherscanWitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA,IAAAA,gDAA2C;AAC3C,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,mDAAwE;AAExE,6BAA+B;;;ACJ/B,mBAAsB;AAGf,IAAMC,sBAAsB,8BAAOC,WAAAA;AACxC,QAAMC,MAAM,0EAA0ED,MAAAA;AACtF,UAAQ,MAAME,mBAAMC,IAAkCF,GAAAA,GAAMG;AAC9D,GAHmC;;;ACF5B,IAAMC,0CACT;;;AFUG,IAAMC,8BAAN,cAA0CC,wCAAAA;EAZjD,OAYiDA;;;EAC/C,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,aAASC,wBAAS,KAAKC,QAAQF,QAAQ,MAAM,oBAAA;AACnD,UAAMG,UAAU,MAAM,IAAIC,sCAA4C;MAAEC,QAAQC;IAA2B,CAAA,EACxGC,OAAO,MAAMC,oBAAoBR,MAAAA,CAAAA,EACjCS,MAAK;AACR,WAAO;MAACN;;EACV;AACF;;;ADjBO,IAAMO,6BAA6B,iCACxCC,wDACE;EAAEC,UAAU;IAAE,CAACC,wEAAAA,GAA6B;EAAE;EAAGC,QAAQC;AAAiB,GAC1E;EACEC,SAAS,8BAAOC,WAAAA;AACd,UAAMC,SAAS,MAAMC,4BAA4BC,OAAOH,MAAAA;AACxD,WAAOC;EACT,GAHS;AAIX,CAAA,GARsC;","names":["import_etherscan_ethereum_gas_payload_plugin","getGasFromEtherscan","apiKey","url","axios","get","data","EthereumGasEtherscanWitnessConfigSchema","EthereumGasEtherscanWitness","AbstractWitness","configSchemas","EthereumGasEtherscanWitnessConfigSchema","defaultConfigSchema","observeHandler","apiKey","assertEx","config","payload","PayloadBuilder","schema","EthereumGasEtherscanSchema","fields","getGasFromEtherscan","build","EthereumGasEtherscanPlugin","createPayloadSetWitnessPlugin","required","EthereumGasEtherscanSchema","schema","PayloadSetSchema","witness","params","result","EthereumGasEtherscanWitness","create"]}
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } 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 { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } 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 { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map