@xyo-network/ethers-ethereum-gas-plugin 2.99.5 → 2.99.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { EthereumGasEthersWitness } from './Witness.ts';
2
- export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
2
+ export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
+ account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
5
+ additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
@@ -1,8 +1,8 @@
1
1
  import { EthereumGasEthersWitness } from './Witness.ts';
2
- export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
2
+ export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
+ account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
5
+ additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
@@ -1,8 +1,8 @@
1
1
  import { EthereumGasEthersWitness } from './Witness.ts';
2
- export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
2
+ export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
+ account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
5
+ additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
@@ -3,7 +3,6 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
6
  var __export = (target, all) => {
8
7
  for (var name in all)
9
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -40,10 +39,10 @@ var import_ethers_ethereum_gas_payload_plugin = require("@xyo-network/ethers-eth
40
39
  var import_payload_builder = require("@xyo-network/payload-builder");
41
40
 
42
41
  // src/lib/getGasFromEthers.ts
43
- var formatFeeDataValue = /* @__PURE__ */ __name((value) => {
42
+ var formatFeeDataValue = (value) => {
44
43
  return value ? Number(value) : null;
45
- }, "formatFeeDataValue");
46
- var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
44
+ };
45
+ var getGasFromEthers = async (provider) => {
47
46
  const feeData = await provider.getFeeData();
48
47
  const formattedFeeData = {
49
48
  gasPrice: formatFeeDataValue(feeData.gasPrice),
@@ -52,20 +51,14 @@ var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
52
51
  timestamp: Date.now()
53
52
  };
54
53
  return formattedFeeData;
55
- }, "getGasFromEthers");
54
+ };
56
55
 
57
56
  // src/Schema.ts
58
57
  var EthereumGasEthersWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
59
58
 
60
59
  // src/Witness.ts
61
60
  var EthereumGasEthersWitness = class extends import_abstract_witness.AbstractWitness {
62
- static {
63
- __name(this, "EthereumGasEthersWitness");
64
- }
65
- static configSchemas = [
66
- ...super.configSchemas,
67
- EthereumGasEthersWitnessConfigSchema
68
- ];
61
+ static configSchemas = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema];
69
62
  static defaultConfigSchema = EthereumGasEthersWitnessConfigSchema;
70
63
  _provider;
71
64
  get provider() {
@@ -73,24 +66,18 @@ var EthereumGasEthersWitness = class extends import_abstract_witness.AbstractWit
73
66
  return this._provider;
74
67
  }
75
68
  async observeHandler() {
76
- const payload = await new import_payload_builder.PayloadBuilder({
77
- schema: import_ethers_ethereum_gas_payload_plugin.EthereumGasEthersSchema
78
- }).fields(await getGasFromEthers((0, import_assert.assertEx)(this.provider, () => "Provider Required"))).build();
79
- return [
80
- payload
81
- ];
69
+ const payload = await new import_payload_builder.PayloadBuilder({ schema: import_ethers_ethereum_gas_payload_plugin.EthereumGasEthersSchema }).fields(await getGasFromEthers((0, import_assert.assertEx)(this.provider, () => "Provider Required"))).build();
70
+ return [payload];
82
71
  }
83
72
  };
84
73
 
85
74
  // src/Plugin.ts
86
- var EthereumGasEthersPlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
87
- required: {
88
- [import_ethers_ethereum_gas_payload_plugin2.EthereumGasEthersSchema]: 1
89
- },
90
- schema: import_payload_model.PayloadSetSchema
91
- }, {
92
- witness: /* @__PURE__ */ __name(async (params) => {
93
- return await EthereumGasEthersWitness.create(params);
94
- }, "witness")
95
- }), "EthereumGasEthersPlugin");
75
+ var EthereumGasEthersPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
76
+ { required: { [import_ethers_ethereum_gas_payload_plugin2.EthereumGasEthersSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
77
+ {
78
+ witness: async (params) => {
79
+ return await EthereumGasEthersWitness.create(params);
80
+ }
81
+ }
82
+ );
96
83
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA,IAAAA,6CAAwC;AACxC,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,gDAAkE;AAElE,6BAA+B;;;ACD/B,IAAMC,qBAAqB,wBAACC,UAAAA;AAC1B,SAAOA,QAAQC,OAAOD,KAAAA,IAAS;AACjC,GAF2B;AAIpB,IAAME,mBAAmB,8BAAOC,aAAAA;AAErC,QAAMC,UAAU,MAAMD,SAASE,WAAU;AACzC,QAAMC,mBAA8C;IAClDC,UAAUR,mBAAmBK,QAAQG,QAAQ;IAC7CC,cAAcT,mBAAmBK,QAAQI,YAAY;IACrDC,sBAAsBV,mBAAmBK,QAAQK,oBAAoB;IACrEC,WAAWC,KAAKC,IAAG;EACrB;AACA,SAAON;AACT,GAVgC;;;ACNzB,IAAMO,uCAA6E;;;AFmBnF,IAAMC,2BAAN,cAEGC,wCAAAA;EAtBV,OAsBUA;;;EACR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAE/CE;EAER,IAAcC,WAAW;AACvB,SAAKD,YAAY,KAAKA,aAAa,KAAKE,QAAQD;AAChD,WAAO,KAAKD;EACd;EAEA,MAAyBG,iBAAqC;AAC5D,UAAMC,UAAU,MAAM,IAAIC,sCAAyC;MAAEC,QAAQC;IAAwB,CAAA,EAClGC,OAAO,MAAMC,qBAAiBC,wBAAS,KAAKT,UAAU,MAAM,mBAAA,CAAA,CAAA,EAC5DU,MAAK;AACR,WAAO;MAACP;;EACV;AACF;;;ADjCO,IAAMQ,0BAA0B,iCACrCC,wDACE;EAAEC,UAAU;IAAE,CAACC,kEAAAA,GAA0B;EAAE;EAAGC,QAAQC;AAAiB,GACvE;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAO,MAAMC,yBAAyBC,OAAOF,MAAAA;EAC/C,GAFS;AAGX,CAAA,GAPmC;","names":["import_ethers_ethereum_gas_payload_plugin","formatFeeDataValue","value","Number","getGasFromEthers","provider","feeData","getFeeData","formattedFeeData","gasPrice","maxFeePerGas","maxPriorityFeePerGas","timestamp","Date","now","EthereumGasEthersWitnessConfigSchema","EthereumGasEthersWitness","AbstractWitness","configSchemas","EthereumGasEthersWitnessConfigSchema","defaultConfigSchema","_provider","provider","params","observeHandler","payload","PayloadBuilder","schema","EthereumGasEthersSchema","fields","getGasFromEthers","assertEx","build","EthereumGasEthersPlugin","createPayloadSetWitnessPlugin","required","EthereumGasEthersSchema","schema","PayloadSetSchema","witness","params","EthereumGasEthersWitness","create"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,6CAAwC;AACxC,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,gDAAkE;AAElE,6BAA+B;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AACvB,SAAK,YAAY,KAAK,aAAa,KAAK,QAAQ;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,sCAAyC,EAAE,QAAQ,kEAAwB,CAAC,EACnG,OAAO,MAAM,qBAAiB,wBAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,UACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,kEAAuB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["import_ethers_ethereum_gas_payload_plugin"]}
@@ -1,6 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/Plugin.ts
5
2
  import { EthereumGasEthersSchema as EthereumGasEthersSchema2 } from "@xyo-network/ethers-ethereum-gas-payload-plugin";
6
3
  import { PayloadSetSchema } from "@xyo-network/payload-model";
@@ -13,10 +10,10 @@ import { EthereumGasEthersSchema } from "@xyo-network/ethers-ethereum-gas-payloa
13
10
  import { PayloadBuilder } from "@xyo-network/payload-builder";
14
11
 
15
12
  // src/lib/getGasFromEthers.ts
16
- var formatFeeDataValue = /* @__PURE__ */ __name((value) => {
13
+ var formatFeeDataValue = (value) => {
17
14
  return value ? Number(value) : null;
18
- }, "formatFeeDataValue");
19
- var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
15
+ };
16
+ var getGasFromEthers = async (provider) => {
20
17
  const feeData = await provider.getFeeData();
21
18
  const formattedFeeData = {
22
19
  gasPrice: formatFeeDataValue(feeData.gasPrice),
@@ -25,20 +22,14 @@ var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
25
22
  timestamp: Date.now()
26
23
  };
27
24
  return formattedFeeData;
28
- }, "getGasFromEthers");
25
+ };
29
26
 
30
27
  // src/Schema.ts
31
28
  var EthereumGasEthersWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
32
29
 
33
30
  // src/Witness.ts
34
31
  var EthereumGasEthersWitness = class extends AbstractWitness {
35
- static {
36
- __name(this, "EthereumGasEthersWitness");
37
- }
38
- static configSchemas = [
39
- ...super.configSchemas,
40
- EthereumGasEthersWitnessConfigSchema
41
- ];
32
+ static configSchemas = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema];
42
33
  static defaultConfigSchema = EthereumGasEthersWitnessConfigSchema;
43
34
  _provider;
44
35
  get provider() {
@@ -46,26 +37,20 @@ var EthereumGasEthersWitness = class extends AbstractWitness {
46
37
  return this._provider;
47
38
  }
48
39
  async observeHandler() {
49
- const payload = await new PayloadBuilder({
50
- schema: EthereumGasEthersSchema
51
- }).fields(await getGasFromEthers(assertEx(this.provider, () => "Provider Required"))).build();
52
- return [
53
- payload
54
- ];
40
+ const payload = await new PayloadBuilder({ schema: EthereumGasEthersSchema }).fields(await getGasFromEthers(assertEx(this.provider, () => "Provider Required"))).build();
41
+ return [payload];
55
42
  }
56
43
  };
57
44
 
58
45
  // src/Plugin.ts
59
- var EthereumGasEthersPlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
60
- required: {
61
- [EthereumGasEthersSchema2]: 1
62
- },
63
- schema: PayloadSetSchema
64
- }, {
65
- witness: /* @__PURE__ */ __name(async (params) => {
66
- return await EthereumGasEthersWitness.create(params);
67
- }, "witness")
68
- }), "EthereumGasEthersPlugin");
46
+ var EthereumGasEthersPlugin = () => createPayloadSetWitnessPlugin(
47
+ { required: { [EthereumGasEthersSchema2]: 1 }, schema: PayloadSetSchema },
48
+ {
49
+ witness: async (params) => {
50
+ return await EthereumGasEthersWitness.create(params);
51
+ }
52
+ }
53
+ );
69
54
  export {
70
55
  EthereumGasEthersPlugin,
71
56
  EthereumGasEthersWitness,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;AAAA,SAASA,2BAAAA,gCAA+B;AACxC,SAASC,wBAAwB;AACjC,SAASC,qCAAqC;;;ACF9C,SAASC,gBAAgB;AACzB,SAASC,uBAAuB;AAChC,SAAmCC,+BAA+B;AAElE,SAASC,sBAAsB;;;ACD/B,IAAMC,qBAAqB,wBAACC,UAAAA;AAC1B,SAAOA,QAAQC,OAAOD,KAAAA,IAAS;AACjC,GAF2B;AAIpB,IAAME,mBAAmB,8BAAOC,aAAAA;AAErC,QAAMC,UAAU,MAAMD,SAASE,WAAU;AACzC,QAAMC,mBAA8C;IAClDC,UAAUR,mBAAmBK,QAAQG,QAAQ;IAC7CC,cAAcT,mBAAmBK,QAAQI,YAAY;IACrDC,sBAAsBV,mBAAmBK,QAAQK,oBAAoB;IACrEC,WAAWC,KAAKC,IAAG;EACrB;AACA,SAAON;AACT,GAVgC;;;ACNzB,IAAMO,uCAA6E;;;AFmBnF,IAAMC,2BAAN,cAEGC,gBAAAA;EAtBV,OAsBUA;;;EACR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAE/CE;EAER,IAAcC,WAAW;AACvB,SAAKD,YAAY,KAAKA,aAAa,KAAKE,QAAQD;AAChD,WAAO,KAAKD;EACd;EAEA,MAAyBG,iBAAqC;AAC5D,UAAMC,UAAU,MAAM,IAAIC,eAAyC;MAAEC,QAAQC;IAAwB,CAAA,EAClGC,OAAO,MAAMC,iBAAiBC,SAAS,KAAKT,UAAU,MAAM,mBAAA,CAAA,CAAA,EAC5DU,MAAK;AACR,WAAO;MAACP;;EACV;AACF;;;ADjCO,IAAMQ,0BAA0B,6BACrCC,8BACE;EAAEC,UAAU;IAAE,CAACC,wBAAAA,GAA0B;EAAE;EAAGC,QAAQC;AAAiB,GACvE;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAO,MAAMC,yBAAyBC,OAAOF,MAAAA;EAC/C,GAFS;AAGX,CAAA,GAPmC;","names":["EthereumGasEthersSchema","PayloadSetSchema","createPayloadSetWitnessPlugin","assertEx","AbstractWitness","EthereumGasEthersSchema","PayloadBuilder","formatFeeDataValue","value","Number","getGasFromEthers","provider","feeData","getFeeData","formattedFeeData","gasPrice","maxFeePerGas","maxPriorityFeePerGas","timestamp","Date","now","EthereumGasEthersWitnessConfigSchema","EthereumGasEthersWitness","AbstractWitness","configSchemas","EthereumGasEthersWitnessConfigSchema","defaultConfigSchema","_provider","provider","params","observeHandler","payload","PayloadBuilder","schema","EthereumGasEthersSchema","fields","getGasFromEthers","assertEx","build","EthereumGasEthersPlugin","createPayloadSetWitnessPlugin","required","EthereumGasEthersSchema","schema","PayloadSetSchema","witness","params","EthereumGasEthersWitness","create"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";AAAA,SAAS,2BAAAA,gCAA+B;AACxC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAmC,+BAA+B;AAElE,SAAS,sBAAsB;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AACvB,SAAK,YAAY,KAAK,aAAa,KAAK,QAAQ;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,eAAyC,EAAE,QAAQ,wBAAwB,CAAC,EACnG,OAAO,MAAM,iBAAiB,SAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,MACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,wBAAuB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["EthereumGasEthersSchema","EthereumGasEthersSchema"]}
@@ -1,8 +1,8 @@
1
1
  import { EthereumGasEthersWitness } from './Witness.ts';
2
- export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
2
+ export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
+ account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
5
+ additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
@@ -1,8 +1,8 @@
1
1
  import { EthereumGasEthersWitness } from './Witness.ts';
2
- export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
2
+ export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
+ account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
5
+ additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
@@ -1,8 +1,8 @@
1
1
  import { EthereumGasEthersWitness } from './Witness.ts';
2
- export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
2
+ export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
+ account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
5
+ additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
@@ -3,7 +3,6 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
6
  var __export = (target, all) => {
8
7
  for (var name in all)
9
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -40,10 +39,10 @@ var import_ethers_ethereum_gas_payload_plugin = require("@xyo-network/ethers-eth
40
39
  var import_payload_builder = require("@xyo-network/payload-builder");
41
40
 
42
41
  // src/lib/getGasFromEthers.ts
43
- var formatFeeDataValue = /* @__PURE__ */ __name((value) => {
42
+ var formatFeeDataValue = (value) => {
44
43
  return value ? Number(value) : null;
45
- }, "formatFeeDataValue");
46
- var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
44
+ };
45
+ var getGasFromEthers = async (provider) => {
47
46
  const feeData = await provider.getFeeData();
48
47
  const formattedFeeData = {
49
48
  gasPrice: formatFeeDataValue(feeData.gasPrice),
@@ -52,20 +51,14 @@ var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
52
51
  timestamp: Date.now()
53
52
  };
54
53
  return formattedFeeData;
55
- }, "getGasFromEthers");
54
+ };
56
55
 
57
56
  // src/Schema.ts
58
57
  var EthereumGasEthersWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
59
58
 
60
59
  // src/Witness.ts
61
60
  var EthereumGasEthersWitness = class extends import_abstract_witness.AbstractWitness {
62
- static {
63
- __name(this, "EthereumGasEthersWitness");
64
- }
65
- static configSchemas = [
66
- ...super.configSchemas,
67
- EthereumGasEthersWitnessConfigSchema
68
- ];
61
+ static configSchemas = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema];
69
62
  static defaultConfigSchema = EthereumGasEthersWitnessConfigSchema;
70
63
  _provider;
71
64
  get provider() {
@@ -73,24 +66,18 @@ var EthereumGasEthersWitness = class extends import_abstract_witness.AbstractWit
73
66
  return this._provider;
74
67
  }
75
68
  async observeHandler() {
76
- const payload = await new import_payload_builder.PayloadBuilder({
77
- schema: import_ethers_ethereum_gas_payload_plugin.EthereumGasEthersSchema
78
- }).fields(await getGasFromEthers((0, import_assert.assertEx)(this.provider, () => "Provider Required"))).build();
79
- return [
80
- payload
81
- ];
69
+ const payload = await new import_payload_builder.PayloadBuilder({ schema: import_ethers_ethereum_gas_payload_plugin.EthereumGasEthersSchema }).fields(await getGasFromEthers((0, import_assert.assertEx)(this.provider, () => "Provider Required"))).build();
70
+ return [payload];
82
71
  }
83
72
  };
84
73
 
85
74
  // src/Plugin.ts
86
- var EthereumGasEthersPlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
87
- required: {
88
- [import_ethers_ethereum_gas_payload_plugin2.EthereumGasEthersSchema]: 1
89
- },
90
- schema: import_payload_model.PayloadSetSchema
91
- }, {
92
- witness: /* @__PURE__ */ __name(async (params) => {
93
- return await EthereumGasEthersWitness.create(params);
94
- }, "witness")
95
- }), "EthereumGasEthersPlugin");
75
+ var EthereumGasEthersPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
76
+ { required: { [import_ethers_ethereum_gas_payload_plugin2.EthereumGasEthersSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
77
+ {
78
+ witness: async (params) => {
79
+ return await EthereumGasEthersWitness.create(params);
80
+ }
81
+ }
82
+ );
96
83
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA,IAAAA,6CAAwC;AACxC,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,gDAAkE;AAElE,6BAA+B;;;ACD/B,IAAMC,qBAAqB,wBAACC,UAAAA;AAC1B,SAAOA,QAAQC,OAAOD,KAAAA,IAAS;AACjC,GAF2B;AAIpB,IAAME,mBAAmB,8BAAOC,aAAAA;AAErC,QAAMC,UAAU,MAAMD,SAASE,WAAU;AACzC,QAAMC,mBAA8C;IAClDC,UAAUR,mBAAmBK,QAAQG,QAAQ;IAC7CC,cAAcT,mBAAmBK,QAAQI,YAAY;IACrDC,sBAAsBV,mBAAmBK,QAAQK,oBAAoB;IACrEC,WAAWC,KAAKC,IAAG;EACrB;AACA,SAAON;AACT,GAVgC;;;ACNzB,IAAMO,uCAA6E;;;AFmBnF,IAAMC,2BAAN,cAEGC,wCAAAA;EAtBV,OAsBUA;;;EACR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAE/CE;EAER,IAAcC,WAAW;AACvB,SAAKD,YAAY,KAAKA,aAAa,KAAKE,QAAQD;AAChD,WAAO,KAAKD;EACd;EAEA,MAAyBG,iBAAqC;AAC5D,UAAMC,UAAU,MAAM,IAAIC,sCAAyC;MAAEC,QAAQC;IAAwB,CAAA,EAClGC,OAAO,MAAMC,qBAAiBC,wBAAS,KAAKT,UAAU,MAAM,mBAAA,CAAA,CAAA,EAC5DU,MAAK;AACR,WAAO;MAACP;;EACV;AACF;;;ADjCO,IAAMQ,0BAA0B,iCACrCC,wDACE;EAAEC,UAAU;IAAE,CAACC,kEAAAA,GAA0B;EAAE;EAAGC,QAAQC;AAAiB,GACvE;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAO,MAAMC,yBAAyBC,OAAOF,MAAAA;EAC/C,GAFS;AAGX,CAAA,GAPmC;","names":["import_ethers_ethereum_gas_payload_plugin","formatFeeDataValue","value","Number","getGasFromEthers","provider","feeData","getFeeData","formattedFeeData","gasPrice","maxFeePerGas","maxPriorityFeePerGas","timestamp","Date","now","EthereumGasEthersWitnessConfigSchema","EthereumGasEthersWitness","AbstractWitness","configSchemas","EthereumGasEthersWitnessConfigSchema","defaultConfigSchema","_provider","provider","params","observeHandler","payload","PayloadBuilder","schema","EthereumGasEthersSchema","fields","getGasFromEthers","assertEx","build","EthereumGasEthersPlugin","createPayloadSetWitnessPlugin","required","EthereumGasEthersSchema","schema","PayloadSetSchema","witness","params","EthereumGasEthersWitness","create"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,6CAAwC;AACxC,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,gDAAkE;AAElE,6BAA+B;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AACvB,SAAK,YAAY,KAAK,aAAa,KAAK,QAAQ;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,sCAAyC,EAAE,QAAQ,kEAAwB,CAAC,EACnG,OAAO,MAAM,qBAAiB,wBAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,UACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,kEAAuB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["import_ethers_ethereum_gas_payload_plugin"]}
@@ -1,6 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/Plugin.ts
5
2
  import { EthereumGasEthersSchema as EthereumGasEthersSchema2 } from "@xyo-network/ethers-ethereum-gas-payload-plugin";
6
3
  import { PayloadSetSchema } from "@xyo-network/payload-model";
@@ -13,10 +10,10 @@ import { EthereumGasEthersSchema } from "@xyo-network/ethers-ethereum-gas-payloa
13
10
  import { PayloadBuilder } from "@xyo-network/payload-builder";
14
11
 
15
12
  // src/lib/getGasFromEthers.ts
16
- var formatFeeDataValue = /* @__PURE__ */ __name((value) => {
13
+ var formatFeeDataValue = (value) => {
17
14
  return value ? Number(value) : null;
18
- }, "formatFeeDataValue");
19
- var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
15
+ };
16
+ var getGasFromEthers = async (provider) => {
20
17
  const feeData = await provider.getFeeData();
21
18
  const formattedFeeData = {
22
19
  gasPrice: formatFeeDataValue(feeData.gasPrice),
@@ -25,20 +22,14 @@ var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
25
22
  timestamp: Date.now()
26
23
  };
27
24
  return formattedFeeData;
28
- }, "getGasFromEthers");
25
+ };
29
26
 
30
27
  // src/Schema.ts
31
28
  var EthereumGasEthersWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
32
29
 
33
30
  // src/Witness.ts
34
31
  var EthereumGasEthersWitness = class extends AbstractWitness {
35
- static {
36
- __name(this, "EthereumGasEthersWitness");
37
- }
38
- static configSchemas = [
39
- ...super.configSchemas,
40
- EthereumGasEthersWitnessConfigSchema
41
- ];
32
+ static configSchemas = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema];
42
33
  static defaultConfigSchema = EthereumGasEthersWitnessConfigSchema;
43
34
  _provider;
44
35
  get provider() {
@@ -46,26 +37,20 @@ var EthereumGasEthersWitness = class extends AbstractWitness {
46
37
  return this._provider;
47
38
  }
48
39
  async observeHandler() {
49
- const payload = await new PayloadBuilder({
50
- schema: EthereumGasEthersSchema
51
- }).fields(await getGasFromEthers(assertEx(this.provider, () => "Provider Required"))).build();
52
- return [
53
- payload
54
- ];
40
+ const payload = await new PayloadBuilder({ schema: EthereumGasEthersSchema }).fields(await getGasFromEthers(assertEx(this.provider, () => "Provider Required"))).build();
41
+ return [payload];
55
42
  }
56
43
  };
57
44
 
58
45
  // src/Plugin.ts
59
- var EthereumGasEthersPlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
60
- required: {
61
- [EthereumGasEthersSchema2]: 1
62
- },
63
- schema: PayloadSetSchema
64
- }, {
65
- witness: /* @__PURE__ */ __name(async (params) => {
66
- return await EthereumGasEthersWitness.create(params);
67
- }, "witness")
68
- }), "EthereumGasEthersPlugin");
46
+ var EthereumGasEthersPlugin = () => createPayloadSetWitnessPlugin(
47
+ { required: { [EthereumGasEthersSchema2]: 1 }, schema: PayloadSetSchema },
48
+ {
49
+ witness: async (params) => {
50
+ return await EthereumGasEthersWitness.create(params);
51
+ }
52
+ }
53
+ );
69
54
  export {
70
55
  EthereumGasEthersPlugin,
71
56
  EthereumGasEthersWitness,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;AAAA,SAASA,2BAAAA,gCAA+B;AACxC,SAASC,wBAAwB;AACjC,SAASC,qCAAqC;;;ACF9C,SAASC,gBAAgB;AACzB,SAASC,uBAAuB;AAChC,SAAmCC,+BAA+B;AAElE,SAASC,sBAAsB;;;ACD/B,IAAMC,qBAAqB,wBAACC,UAAAA;AAC1B,SAAOA,QAAQC,OAAOD,KAAAA,IAAS;AACjC,GAF2B;AAIpB,IAAME,mBAAmB,8BAAOC,aAAAA;AAErC,QAAMC,UAAU,MAAMD,SAASE,WAAU;AACzC,QAAMC,mBAA8C;IAClDC,UAAUR,mBAAmBK,QAAQG,QAAQ;IAC7CC,cAAcT,mBAAmBK,QAAQI,YAAY;IACrDC,sBAAsBV,mBAAmBK,QAAQK,oBAAoB;IACrEC,WAAWC,KAAKC,IAAG;EACrB;AACA,SAAON;AACT,GAVgC;;;ACNzB,IAAMO,uCAA6E;;;AFmBnF,IAAMC,2BAAN,cAEGC,gBAAAA;EAtBV,OAsBUA;;;EACR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAE/CE;EAER,IAAcC,WAAW;AACvB,SAAKD,YAAY,KAAKA,aAAa,KAAKE,QAAQD;AAChD,WAAO,KAAKD;EACd;EAEA,MAAyBG,iBAAqC;AAC5D,UAAMC,UAAU,MAAM,IAAIC,eAAyC;MAAEC,QAAQC;IAAwB,CAAA,EAClGC,OAAO,MAAMC,iBAAiBC,SAAS,KAAKT,UAAU,MAAM,mBAAA,CAAA,CAAA,EAC5DU,MAAK;AACR,WAAO;MAACP;;EACV;AACF;;;ADjCO,IAAMQ,0BAA0B,6BACrCC,8BACE;EAAEC,UAAU;IAAE,CAACC,wBAAAA,GAA0B;EAAE;EAAGC,QAAQC;AAAiB,GACvE;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAO,MAAMC,yBAAyBC,OAAOF,MAAAA;EAC/C,GAFS;AAGX,CAAA,GAPmC;","names":["EthereumGasEthersSchema","PayloadSetSchema","createPayloadSetWitnessPlugin","assertEx","AbstractWitness","EthereumGasEthersSchema","PayloadBuilder","formatFeeDataValue","value","Number","getGasFromEthers","provider","feeData","getFeeData","formattedFeeData","gasPrice","maxFeePerGas","maxPriorityFeePerGas","timestamp","Date","now","EthereumGasEthersWitnessConfigSchema","EthereumGasEthersWitness","AbstractWitness","configSchemas","EthereumGasEthersWitnessConfigSchema","defaultConfigSchema","_provider","provider","params","observeHandler","payload","PayloadBuilder","schema","EthereumGasEthersSchema","fields","getGasFromEthers","assertEx","build","EthereumGasEthersPlugin","createPayloadSetWitnessPlugin","required","EthereumGasEthersSchema","schema","PayloadSetSchema","witness","params","EthereumGasEthersWitness","create"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";AAAA,SAAS,2BAAAA,gCAA+B;AACxC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAmC,+BAA+B;AAElE,SAAS,sBAAsB;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AACvB,SAAK,YAAY,KAAK,aAAa,KAAK,QAAQ;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,eAAyC,EAAE,QAAQ,wBAAwB,CAAC,EACnG,OAAO,MAAM,iBAAiB,SAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,MACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,wBAAuB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["EthereumGasEthersSchema","EthereumGasEthersSchema"]}
@@ -1,8 +1,8 @@
1
1
  import { EthereumGasEthersWitness } from './Witness.ts';
2
- export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
2
+ export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
+ account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
5
+ additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
@@ -1,8 +1,8 @@
1
1
  import { EthereumGasEthersWitness } from './Witness.ts';
2
- export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
2
+ export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
+ account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
5
+ additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
@@ -1,8 +1,8 @@
1
1
  import { EthereumGasEthersWitness } from './Witness.ts';
2
- export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("@xylabs/object").BaseParamsFields & {
3
- account?: import("@xyo-network/account-model").AccountInstance | "random";
2
+ export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
+ account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
4
  addToResolvers?: boolean;
5
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
5
+ additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
6
  allowNameResolution?: boolean;
7
7
  config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
8
  schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
@@ -2,11 +2,7 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __reflectGet = Reflect.get;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
6
  var __export = (target, all) => {
11
7
  for (var name in all)
12
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -20,8 +16,6 @@ var __copyProps = (to, from, except, desc) => {
20
16
  return to;
21
17
  };
22
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
24
- var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
25
19
 
26
20
  // src/index.ts
27
21
  var src_exports = {};
@@ -45,10 +39,10 @@ var import_ethers_ethereum_gas_payload_plugin = require("@xyo-network/ethers-eth
45
39
  var import_payload_builder = require("@xyo-network/payload-builder");
46
40
 
47
41
  // src/lib/getGasFromEthers.ts
48
- var formatFeeDataValue = /* @__PURE__ */ __name((value) => {
42
+ var formatFeeDataValue = (value) => {
49
43
  return value ? Number(value) : null;
50
- }, "formatFeeDataValue");
51
- var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
44
+ };
45
+ var getGasFromEthers = async (provider) => {
52
46
  const feeData = await provider.getFeeData();
53
47
  const formattedFeeData = {
54
48
  gasPrice: formatFeeDataValue(feeData.gasPrice),
@@ -57,13 +51,15 @@ var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
57
51
  timestamp: Date.now()
58
52
  };
59
53
  return formattedFeeData;
60
- }, "getGasFromEthers");
54
+ };
61
55
 
62
56
  // src/Schema.ts
63
57
  var EthereumGasEthersWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
64
58
 
65
59
  // src/Witness.ts
66
- var _EthereumGasEthersWitness = class _EthereumGasEthersWitness extends import_abstract_witness.AbstractWitness {
60
+ var EthereumGasEthersWitness = class extends import_abstract_witness.AbstractWitness {
61
+ static configSchemas = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema];
62
+ static defaultConfigSchema = EthereumGasEthersWitnessConfigSchema;
67
63
  _provider;
68
64
  get provider() {
69
65
  var _a;
@@ -71,33 +67,20 @@ var _EthereumGasEthersWitness = class _EthereumGasEthersWitness extends import_a
71
67
  return this._provider;
72
68
  }
73
69
  async observeHandler() {
74
- const payload = await new import_payload_builder.PayloadBuilder({
75
- schema: import_ethers_ethereum_gas_payload_plugin.EthereumGasEthersSchema
76
- }).fields(await getGasFromEthers((0, import_assert.assertEx)(this.provider, () => "Provider Required"))).build();
77
- return [
78
- payload
79
- ];
70
+ const payload = await new import_payload_builder.PayloadBuilder({ schema: import_ethers_ethereum_gas_payload_plugin.EthereumGasEthersSchema }).fields(await getGasFromEthers((0, import_assert.assertEx)(this.provider, () => "Provider Required"))).build();
71
+ return [payload];
80
72
  }
81
73
  };
82
- __name(_EthereumGasEthersWitness, "EthereumGasEthersWitness");
83
- __publicField(_EthereumGasEthersWitness, "configSchemas", [
84
- ...__superGet(_EthereumGasEthersWitness, _EthereumGasEthersWitness, "configSchemas"),
85
- EthereumGasEthersWitnessConfigSchema
86
- ]);
87
- __publicField(_EthereumGasEthersWitness, "defaultConfigSchema", EthereumGasEthersWitnessConfigSchema);
88
- var EthereumGasEthersWitness = _EthereumGasEthersWitness;
89
74
 
90
75
  // src/Plugin.ts
91
- var EthereumGasEthersPlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
92
- required: {
93
- [import_ethers_ethereum_gas_payload_plugin2.EthereumGasEthersSchema]: 1
94
- },
95
- schema: import_payload_model.PayloadSetSchema
96
- }, {
97
- witness: /* @__PURE__ */ __name(async (params) => {
98
- return await EthereumGasEthersWitness.create(params);
99
- }, "witness")
100
- }), "EthereumGasEthersPlugin");
76
+ var EthereumGasEthersPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
77
+ { required: { [import_ethers_ethereum_gas_payload_plugin2.EthereumGasEthersSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
78
+ {
79
+ witness: async (params) => {
80
+ return await EthereumGasEthersWitness.create(params);
81
+ }
82
+ }
83
+ );
101
84
  // Annotate the CommonJS export names for ESM import in node:
102
85
  0 && (module.exports = {
103
86
  EthereumGasEthersPlugin,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA,IAAAA,6CAAwC;AACxC,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,gDAAkE;AAElE,6BAA+B;;;ACD/B,IAAMC,qBAAqB,wBAACC,UAAAA;AAC1B,SAAOA,QAAQC,OAAOD,KAAAA,IAAS;AACjC,GAF2B;AAIpB,IAAME,mBAAmB,8BAAOC,aAAAA;AAErC,QAAMC,UAAU,MAAMD,SAASE,WAAU;AACzC,QAAMC,mBAA8C;IAClDC,UAAUR,mBAAmBK,QAAQG,QAAQ;IAC7CC,cAAcT,mBAAmBK,QAAQI,YAAY;IACrDC,sBAAsBV,mBAAmBK,QAAQK,oBAAoB;IACrEC,WAAWC,KAAKC,IAAG;EACrB;AACA,SAAON;AACT,GAVgC;;;ACNzB,IAAMO,uCAA6E;;;AFmBnF,IAAMC,4BAAN,MAAMA,kCAEHC,wCAAAA;EAIAC;EAER,IAAcC,WAAW;AA5B3B;AA6BI,SAAKD,YAAY,KAAKA,eAAa,UAAKE,WAAL,mBAAaD;AAChD,WAAO,KAAKD;EACd;EAEA,MAAyBG,iBAAqC;AAC5D,UAAMC,UAAU,MAAM,IAAIC,sCAAyC;MAAEC,QAAQC;IAAwB,CAAA,EAClGC,OAAO,MAAMC,qBAAiBC,wBAAS,KAAKT,UAAU,MAAM,mBAAA,CAAA,CAAA,EAC5DU,MAAK;AACR,WAAO;MAACP;;EACV;AACF;AAjBUL;AACR,cAHWD,2BAGcc,iBAA0B;KAAI,iEAAMA;EAAeC;;AAC5E,cAJWf,2BAIcgB,uBAA8BD;AAJlD,IAAMf,2BAAN;;;ADdA,IAAMiB,0BAA0B,iCACrCC,wDACE;EAAEC,UAAU;IAAE,CAACC,kEAAAA,GAA0B;EAAE;EAAGC,QAAQC;AAAiB,GACvE;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAO,MAAMC,yBAAyBC,OAAOF,MAAAA;EAC/C,GAFS;AAGX,CAAA,GAPmC;","names":["import_ethers_ethereum_gas_payload_plugin","formatFeeDataValue","value","Number","getGasFromEthers","provider","feeData","getFeeData","formattedFeeData","gasPrice","maxFeePerGas","maxPriorityFeePerGas","timestamp","Date","now","EthereumGasEthersWitnessConfigSchema","EthereumGasEthersWitness","AbstractWitness","_provider","provider","params","observeHandler","payload","PayloadBuilder","schema","EthereumGasEthersSchema","fields","getGasFromEthers","assertEx","build","configSchemas","EthereumGasEthersWitnessConfigSchema","defaultConfigSchema","EthereumGasEthersPlugin","createPayloadSetWitnessPlugin","required","EthereumGasEthersSchema","schema","PayloadSetSchema","witness","params","EthereumGasEthersWitness","create"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,6CAAwC;AACxC,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,gDAAkE;AAElE,6BAA+B;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AA5B3B;AA6BI,SAAK,YAAY,KAAK,eAAa,UAAK,WAAL,mBAAa;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,sCAAyC,EAAE,QAAQ,kEAAwB,CAAC,EACnG,OAAO,MAAM,qBAAiB,wBAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,UACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,kEAAuB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["import_ethers_ethereum_gas_payload_plugin"]}
@@ -1,11 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __getProtoOf = Object.getPrototypeOf;
3
- var __reflectGet = Reflect.get;
4
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
- var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
8
-
9
1
  // src/Plugin.ts
10
2
  import { EthereumGasEthersSchema as EthereumGasEthersSchema2 } from "@xyo-network/ethers-ethereum-gas-payload-plugin";
11
3
  import { PayloadSetSchema } from "@xyo-network/payload-model";
@@ -18,10 +10,10 @@ import { EthereumGasEthersSchema } from "@xyo-network/ethers-ethereum-gas-payloa
18
10
  import { PayloadBuilder } from "@xyo-network/payload-builder";
19
11
 
20
12
  // src/lib/getGasFromEthers.ts
21
- var formatFeeDataValue = /* @__PURE__ */ __name((value) => {
13
+ var formatFeeDataValue = (value) => {
22
14
  return value ? Number(value) : null;
23
- }, "formatFeeDataValue");
24
- var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
15
+ };
16
+ var getGasFromEthers = async (provider) => {
25
17
  const feeData = await provider.getFeeData();
26
18
  const formattedFeeData = {
27
19
  gasPrice: formatFeeDataValue(feeData.gasPrice),
@@ -30,13 +22,15 @@ var getGasFromEthers = /* @__PURE__ */ __name(async (provider) => {
30
22
  timestamp: Date.now()
31
23
  };
32
24
  return formattedFeeData;
33
- }, "getGasFromEthers");
25
+ };
34
26
 
35
27
  // src/Schema.ts
36
28
  var EthereumGasEthersWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
37
29
 
38
30
  // src/Witness.ts
39
- var _EthereumGasEthersWitness = class _EthereumGasEthersWitness extends AbstractWitness {
31
+ var EthereumGasEthersWitness = class extends AbstractWitness {
32
+ static configSchemas = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema];
33
+ static defaultConfigSchema = EthereumGasEthersWitnessConfigSchema;
40
34
  _provider;
41
35
  get provider() {
42
36
  var _a;
@@ -44,33 +38,20 @@ var _EthereumGasEthersWitness = class _EthereumGasEthersWitness extends Abstract
44
38
  return this._provider;
45
39
  }
46
40
  async observeHandler() {
47
- const payload = await new PayloadBuilder({
48
- schema: EthereumGasEthersSchema
49
- }).fields(await getGasFromEthers(assertEx(this.provider, () => "Provider Required"))).build();
50
- return [
51
- payload
52
- ];
41
+ const payload = await new PayloadBuilder({ schema: EthereumGasEthersSchema }).fields(await getGasFromEthers(assertEx(this.provider, () => "Provider Required"))).build();
42
+ return [payload];
53
43
  }
54
44
  };
55
- __name(_EthereumGasEthersWitness, "EthereumGasEthersWitness");
56
- __publicField(_EthereumGasEthersWitness, "configSchemas", [
57
- ...__superGet(_EthereumGasEthersWitness, _EthereumGasEthersWitness, "configSchemas"),
58
- EthereumGasEthersWitnessConfigSchema
59
- ]);
60
- __publicField(_EthereumGasEthersWitness, "defaultConfigSchema", EthereumGasEthersWitnessConfigSchema);
61
- var EthereumGasEthersWitness = _EthereumGasEthersWitness;
62
45
 
63
46
  // src/Plugin.ts
64
- var EthereumGasEthersPlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
65
- required: {
66
- [EthereumGasEthersSchema2]: 1
67
- },
68
- schema: PayloadSetSchema
69
- }, {
70
- witness: /* @__PURE__ */ __name(async (params) => {
71
- return await EthereumGasEthersWitness.create(params);
72
- }, "witness")
73
- }), "EthereumGasEthersPlugin");
47
+ var EthereumGasEthersPlugin = () => createPayloadSetWitnessPlugin(
48
+ { required: { [EthereumGasEthersSchema2]: 1 }, schema: PayloadSetSchema },
49
+ {
50
+ witness: async (params) => {
51
+ return await EthereumGasEthersWitness.create(params);
52
+ }
53
+ }
54
+ );
74
55
  export {
75
56
  EthereumGasEthersPlugin,
76
57
  EthereumGasEthersWitness,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;;;;;;AAAA,SAASA,2BAAAA,gCAA+B;AACxC,SAASC,wBAAwB;AACjC,SAASC,qCAAqC;;;ACF9C,SAASC,gBAAgB;AACzB,SAASC,uBAAuB;AAChC,SAAmCC,+BAA+B;AAElE,SAASC,sBAAsB;;;ACD/B,IAAMC,qBAAqB,wBAACC,UAAAA;AAC1B,SAAOA,QAAQC,OAAOD,KAAAA,IAAS;AACjC,GAF2B;AAIpB,IAAME,mBAAmB,8BAAOC,aAAAA;AAErC,QAAMC,UAAU,MAAMD,SAASE,WAAU;AACzC,QAAMC,mBAA8C;IAClDC,UAAUR,mBAAmBK,QAAQG,QAAQ;IAC7CC,cAAcT,mBAAmBK,QAAQI,YAAY;IACrDC,sBAAsBV,mBAAmBK,QAAQK,oBAAoB;IACrEC,WAAWC,KAAKC,IAAG;EACrB;AACA,SAAON;AACT,GAVgC;;;ACNzB,IAAMO,uCAA6E;;;AFmBnF,IAAMC,4BAAN,MAAMA,kCAEHC,gBAAAA;EAIAC;EAER,IAAcC,WAAW;AA5B3B;AA6BI,SAAKD,YAAY,KAAKA,eAAa,UAAKE,WAAL,mBAAaD;AAChD,WAAO,KAAKD;EACd;EAEA,MAAyBG,iBAAqC;AAC5D,UAAMC,UAAU,MAAM,IAAIC,eAAyC;MAAEC,QAAQC;IAAwB,CAAA,EAClGC,OAAO,MAAMC,iBAAiBC,SAAS,KAAKT,UAAU,MAAM,mBAAA,CAAA,CAAA,EAC5DU,MAAK;AACR,WAAO;MAACP;;EACV;AACF;AAjBUL;AACR,cAHWD,2BAGcc,iBAA0B;KAAI,iEAAMA;EAAeC;;AAC5E,cAJWf,2BAIcgB,uBAA8BD;AAJlD,IAAMf,2BAAN;;;ADdA,IAAMiB,0BAA0B,6BACrCC,8BACE;EAAEC,UAAU;IAAE,CAACC,wBAAAA,GAA0B;EAAE;EAAGC,QAAQC;AAAiB,GACvE;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAO,MAAMC,yBAAyBC,OAAOF,MAAAA;EAC/C,GAFS;AAGX,CAAA,GAPmC;","names":["EthereumGasEthersSchema","PayloadSetSchema","createPayloadSetWitnessPlugin","assertEx","AbstractWitness","EthereumGasEthersSchema","PayloadBuilder","formatFeeDataValue","value","Number","getGasFromEthers","provider","feeData","getFeeData","formattedFeeData","gasPrice","maxFeePerGas","maxPriorityFeePerGas","timestamp","Date","now","EthereumGasEthersWitnessConfigSchema","EthereumGasEthersWitness","AbstractWitness","_provider","provider","params","observeHandler","payload","PayloadBuilder","schema","EthereumGasEthersSchema","fields","getGasFromEthers","assertEx","build","configSchemas","EthereumGasEthersWitnessConfigSchema","defaultConfigSchema","EthereumGasEthersPlugin","createPayloadSetWitnessPlugin","required","EthereumGasEthersSchema","schema","PayloadSetSchema","witness","params","EthereumGasEthersWitness","create"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-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'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";AAAA,SAAS,2BAAAA,gCAA+B;AACxC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAmC,+BAA+B;AAElE,SAAS,sBAAsB;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AA5B3B;AA6BI,SAAK,YAAY,KAAK,eAAa,UAAK,WAAL,mBAAa;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,eAAyC,EAAE,QAAQ,wBAAwB,CAAC,EACnG,OAAO,MAAM,iBAAiB,SAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,MACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,wBAAuB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["EthereumGasEthersSchema","EthereumGasEthersSchema"]}
package/package.json CHANGED
@@ -10,22 +10,22 @@
10
10
  "url": "https://github.com/XYOracleNetwork/plugins/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/assert": "^3.6.8",
14
- "@xyo-network/abstract-witness": "^2.111.2",
15
- "@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.99.5",
16
- "@xyo-network/module-model": "^2.111.2",
17
- "@xyo-network/payload-builder": "^2.111.2",
18
- "@xyo-network/payload-model": "^2.111.2",
19
- "@xyo-network/payloadset-plugin": "^2.111.2",
20
- "@xyo-network/witness-model": "^2.111.2",
13
+ "@xylabs/assert": "^3.6.12",
14
+ "@xyo-network/abstract-witness": "^2.111.3",
15
+ "@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.99.6",
16
+ "@xyo-network/module-model": "^2.111.3",
17
+ "@xyo-network/payload-builder": "^2.111.3",
18
+ "@xyo-network/payload-model": "^2.111.3",
19
+ "@xyo-network/payloadset-plugin": "^2.111.3",
20
+ "@xyo-network/witness-model": "^2.111.3",
21
21
  "ethers": "^6.13.2"
22
22
  },
23
23
  "devDependencies": {
24
- "@xylabs/jest-helpers": "^3.6.8",
25
- "@xylabs/ts-scripts-yarn3": "^3.15.13",
26
- "@xylabs/tsconfig": "^3.15.13",
27
- "@xyo-network/payload-wrapper": "^2.111.2",
28
- "@xyo-network/witness-blockchain-abstract": "^2.111.2",
24
+ "@xylabs/jest-helpers": "^3.6.12",
25
+ "@xylabs/ts-scripts-yarn3": "^3.15.14",
26
+ "@xylabs/tsconfig": "^3.15.14",
27
+ "@xyo-network/payload-wrapper": "^2.111.3",
28
+ "@xyo-network/witness-blockchain-abstract": "^2.111.3",
29
29
  "jest": "^29.7.0",
30
30
  "typescript": "^5.5.4"
31
31
  },
@@ -68,6 +68,6 @@
68
68
  "url": "https://github.com/XYOracleNetwork/plugins.git"
69
69
  },
70
70
  "sideEffects": false,
71
- "version": "2.99.5",
71
+ "version": "2.99.6",
72
72
  "type": "module"
73
73
  }