@xyo-network/blocknative-ethereum-gas-plugin 2.83.0 → 2.84.1

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.
@@ -54,7 +54,7 @@ var EthereumGasBlocknativeWitness = class extends import_abstract_witness.Abstra
54
54
  static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
55
55
  async observeHandler() {
56
56
  const fields = await getGasFromBlocknative();
57
- const payload = new import_payload_builder.PayloadBuilder({
57
+ const payload = await new import_payload_builder.PayloadBuilder({
58
58
  schema: import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema
59
59
  }).fields(fields).build();
60
60
  return [payload];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n","import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,mBAAsB;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,mBAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,wCAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,sCAA8C;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,UAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,4EAA4B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;;;ADLF,IAAO,cAAQ;","names":["import_blocknative_ethereum_gas_payload_plugin"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n","import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,mBAAsB;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,mBAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,wCAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,sCAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,UAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,4EAA4B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;;;ADLF,IAAO,cAAQ;","names":["import_blocknative_ethereum_gas_payload_plugin"]}
@@ -25,7 +25,7 @@ var EthereumGasBlocknativeWitness = class extends AbstractWitness {
25
25
  static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
26
26
  async observeHandler() {
27
27
  const fields = await getGasFromBlocknative();
28
- const payload = new PayloadBuilder({
28
+ const payload = await new PayloadBuilder({
29
29
  schema: EthereumGasBlocknativeSchema
30
30
  }).fields(fields).build();
31
31
  return [payload];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts","../../src/index.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n","import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,eAA8C;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;;;AILF,IAAO,cAAQ;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts","../../src/index.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n","import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,eAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;;;AILF,IAAO,cAAQ;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ EthereumGasBlocknativePlugin: () => EthereumGasBlocknativePlugin,
24
+ EthereumGasBlocknativeWitness: () => EthereumGasBlocknativeWitness,
25
+ EthereumGasBlocknativeWitnessConfigSchema: () => EthereumGasBlocknativeWitnessConfigSchema,
26
+ default: () => src_default
27
+ });
28
+ module.exports = __toCommonJS(src_exports);
29
+
30
+ // src/Plugin.ts
31
+ var import_blocknative_ethereum_gas_payload_plugin2 = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
32
+ var import_payload_model = require("@xyo-network/payload-model");
33
+ var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
34
+
35
+ // src/Witness.ts
36
+ var import_abstract_witness = require("@xyo-network/abstract-witness");
37
+ var import_blocknative_ethereum_gas_payload_plugin = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
38
+ var import_payload_builder = require("@xyo-network/payload-builder");
39
+
40
+ // src/lib/getGasFromBlocknative.ts
41
+ var import_axios = require("@xylabs/axios");
42
+ var url = "https://api.blocknative.com/gasprices/blockprices";
43
+ var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
44
+ var config = { headers: { Authorization } };
45
+ var getGasFromBlocknative = async () => {
46
+ return (await import_axios.axios.get(url, config)).data;
47
+ };
48
+
49
+ // src/Schema.ts
50
+ var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
51
+
52
+ // src/Witness.ts
53
+ var EthereumGasBlocknativeWitness = class extends import_abstract_witness.AbstractWitness {
54
+ static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
55
+ async observeHandler() {
56
+ const fields = await getGasFromBlocknative();
57
+ const payload = await new import_payload_builder.PayloadBuilder({
58
+ schema: import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema
59
+ }).fields(fields).build();
60
+ return [payload];
61
+ }
62
+ };
63
+
64
+ // src/Plugin.ts
65
+ var EthereumGasBlocknativePlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
66
+ { required: { [import_blocknative_ethereum_gas_payload_plugin2.EthereumGasBlocknativeSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
67
+ {
68
+ witness: async (params) => {
69
+ return await EthereumGasBlocknativeWitness.create(params);
70
+ }
71
+ }
72
+ );
73
+
74
+ // src/index.ts
75
+ var src_default = EthereumGasBlocknativePlugin;
76
+ // Annotate the CommonJS export names for ESM import in node:
77
+ 0 && (module.exports = {
78
+ EthereumGasBlocknativePlugin,
79
+ EthereumGasBlocknativeWitness,
80
+ EthereumGasBlocknativeWitnessConfigSchema
81
+ });
82
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n","import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,mBAAsB;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,mBAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,wCAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,sCAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,UAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,4EAA4B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;;;ADLF,IAAO,cAAQ;","names":["import_blocknative_ethereum_gas_payload_plugin"]}
@@ -1,69 +1,40 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- EthereumGasBlocknativePlugin: () => EthereumGasBlocknativePlugin,
24
- EthereumGasBlocknativeWitness: () => EthereumGasBlocknativeWitness,
25
- EthereumGasBlocknativeWitnessConfigSchema: () => EthereumGasBlocknativeWitnessConfigSchema,
26
- default: () => src_default
27
- });
28
- module.exports = __toCommonJS(src_exports);
29
-
30
1
  // src/Plugin.ts
31
- var import_blocknative_ethereum_gas_payload_plugin2 = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
32
- var import_payload_model = require("@xyo-network/payload-model");
33
- var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
2
+ import { EthereumGasBlocknativeSchema as EthereumGasBlocknativeSchema2 } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
3
+ import { PayloadSetSchema } from "@xyo-network/payload-model";
4
+ import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
34
5
 
35
6
  // src/Witness.ts
36
- var import_abstract_witness = require("@xyo-network/abstract-witness");
37
- var import_blocknative_ethereum_gas_payload_plugin = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
38
- var import_payload_builder = require("@xyo-network/payload-builder");
7
+ import { AbstractWitness } from "@xyo-network/abstract-witness";
8
+ import { EthereumGasBlocknativeSchema } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
9
+ import { PayloadBuilder } from "@xyo-network/payload-builder";
39
10
 
40
11
  // src/lib/getGasFromBlocknative.ts
41
- var import_axios = require("@xylabs/axios");
12
+ import { axios } from "@xylabs/axios";
42
13
  var url = "https://api.blocknative.com/gasprices/blockprices";
43
14
  var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
44
15
  var config = { headers: { Authorization } };
45
16
  var getGasFromBlocknative = async () => {
46
- return (await import_axios.axios.get(url, config)).data;
17
+ return (await axios.get(url, config)).data;
47
18
  };
48
19
 
49
20
  // src/Schema.ts
50
21
  var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
51
22
 
52
23
  // src/Witness.ts
53
- var EthereumGasBlocknativeWitness = class extends import_abstract_witness.AbstractWitness {
24
+ var EthereumGasBlocknativeWitness = class extends AbstractWitness {
54
25
  static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
55
26
  async observeHandler() {
56
27
  const fields = await getGasFromBlocknative();
57
- const payload = new import_payload_builder.PayloadBuilder({
58
- schema: import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema
28
+ const payload = await new PayloadBuilder({
29
+ schema: EthereumGasBlocknativeSchema
59
30
  }).fields(fields).build();
60
31
  return [payload];
61
32
  }
62
33
  };
63
34
 
64
35
  // src/Plugin.ts
65
- var EthereumGasBlocknativePlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
66
- { required: { [import_blocknative_ethereum_gas_payload_plugin2.EthereumGasBlocknativeSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
36
+ var EthereumGasBlocknativePlugin = () => createPayloadSetWitnessPlugin(
37
+ { required: { [EthereumGasBlocknativeSchema2]: 1 }, schema: PayloadSetSchema },
67
38
  {
68
39
  witness: async (params) => {
69
40
  return await EthereumGasBlocknativeWitness.create(params);
@@ -73,10 +44,10 @@ var EthereumGasBlocknativePlugin = () => (0, import_payloadset_plugin.createPayl
73
44
 
74
45
  // src/index.ts
75
46
  var src_default = EthereumGasBlocknativePlugin;
76
- // Annotate the CommonJS export names for ESM import in node:
77
- 0 && (module.exports = {
47
+ export {
78
48
  EthereumGasBlocknativePlugin,
79
49
  EthereumGasBlocknativeWitness,
80
- EthereumGasBlocknativeWitnessConfigSchema
81
- });
50
+ EthereumGasBlocknativeWitnessConfigSchema,
51
+ src_default as default
52
+ };
82
53
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n","import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,mBAAsB;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,mBAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,wCAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,sCAA8C;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,UAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,4EAA4B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;;;ADLF,IAAO,cAAQ;","names":["import_blocknative_ethereum_gas_payload_plugin"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts","../../src/index.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n","import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,eAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;;;AILF,IAAO,cAAQ;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
package/package.json CHANGED
@@ -11,23 +11,22 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@xylabs/axios": "^2.13.20",
14
- "@xyo-network/abstract-witness": "^2.83.2",
15
- "@xyo-network/blocknative-ethereum-gas-payload-plugin": "~2.83.0",
16
- "@xyo-network/module-model": "^2.83.2",
17
- "@xyo-network/payload-builder": "^2.83.2",
18
- "@xyo-network/payload-model": "^2.83.2",
19
- "@xyo-network/payloadset-plugin": "^2.83.2",
20
- "@xyo-network/witness-timestamp": "^2.83.2"
14
+ "@xyo-network/abstract-witness": "^2.84.3",
15
+ "@xyo-network/blocknative-ethereum-gas-payload-plugin": "~2.84.1",
16
+ "@xyo-network/module-model": "^2.84.3",
17
+ "@xyo-network/payload-builder": "^2.84.3",
18
+ "@xyo-network/payload-model": "^2.84.3",
19
+ "@xyo-network/payloadset-plugin": "^2.84.3",
20
+ "@xyo-network/witness-timestamp": "^2.84.3"
21
21
  },
22
22
  "devDependencies": {
23
- "@xylabs/ts-scripts-yarn3": "^3.2.10",
24
- "@xylabs/tsconfig": "^3.2.10",
25
- "@xyo-network/account": "^2.83.2",
26
- "@xyo-network/payload-wrapper": "^2.83.2",
23
+ "@xylabs/ts-scripts-yarn3": "^3.2.19",
24
+ "@xylabs/tsconfig": "^3.2.19",
25
+ "@xyo-network/account": "^2.84.3",
26
+ "@xyo-network/payload-wrapper": "^2.84.3",
27
27
  "typescript": "^5.3.3"
28
28
  },
29
29
  "description": "Typescript/Javascript Plugins for XYO Platform",
30
- "docs": "dist/docs.json",
31
30
  "types": "dist/node/index.d.ts",
32
31
  "exports": {
33
32
  ".": {
@@ -43,19 +42,19 @@
43
42
  },
44
43
  "node": {
45
44
  "require": {
46
- "types": "./dist/node/index.d.ts",
47
- "default": "./dist/node/index.js"
45
+ "types": "./dist/node/index.d.cts",
46
+ "default": "./dist/node/index.cjs"
48
47
  },
49
48
  "import": {
50
49
  "types": "./dist/node/index.d.mts",
51
- "default": "./dist/node/index.mjs"
50
+ "default": "./dist/node/index.js"
52
51
  }
53
52
  }
54
53
  },
55
54
  "./package.json": "./package.json"
56
55
  },
57
- "main": "dist/node/index.js",
58
- "module": "dist/node/index.mjs",
56
+ "main": "dist/node/index.cjs",
57
+ "module": "dist/node/index.js",
59
58
  "homepage": "https://xyo.network",
60
59
  "license": "LGPL-3.0-only",
61
60
  "publishConfig": {
@@ -66,5 +65,6 @@
66
65
  "url": "https://github.com/XYOracleNetwork/plugins.git"
67
66
  },
68
67
  "sideEffects": false,
69
- "version": "2.83.0"
68
+ "version": "2.84.1",
69
+ "type": "module"
70
70
  }
package/src/Witness.ts CHANGED
@@ -15,7 +15,7 @@ export class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBl
15
15
 
16
16
  protected override async observeHandler(): Promise<Payload[]> {
17
17
  const fields = await getGasFromBlocknative()
18
- const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({
18
+ const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({
19
19
  schema: EthereumGasBlocknativeSchema,
20
20
  })
21
21
  .fields(fields)
@@ -1,53 +0,0 @@
1
- // src/Plugin.ts
2
- import { EthereumGasBlocknativeSchema as EthereumGasBlocknativeSchema2 } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
3
- import { PayloadSetSchema } from "@xyo-network/payload-model";
4
- import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
5
-
6
- // src/Witness.ts
7
- import { AbstractWitness } from "@xyo-network/abstract-witness";
8
- import { EthereumGasBlocknativeSchema } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
9
- import { PayloadBuilder } from "@xyo-network/payload-builder";
10
-
11
- // src/lib/getGasFromBlocknative.ts
12
- import { axios } from "@xylabs/axios";
13
- var url = "https://api.blocknative.com/gasprices/blockprices";
14
- var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
15
- var config = { headers: { Authorization } };
16
- var getGasFromBlocknative = async () => {
17
- return (await axios.get(url, config)).data;
18
- };
19
-
20
- // src/Schema.ts
21
- var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
22
-
23
- // src/Witness.ts
24
- var EthereumGasBlocknativeWitness = class extends AbstractWitness {
25
- static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
26
- async observeHandler() {
27
- const fields = await getGasFromBlocknative();
28
- const payload = new PayloadBuilder({
29
- schema: EthereumGasBlocknativeSchema
30
- }).fields(fields).build();
31
- return [payload];
32
- }
33
- };
34
-
35
- // src/Plugin.ts
36
- var EthereumGasBlocknativePlugin = () => createPayloadSetWitnessPlugin(
37
- { required: { [EthereumGasBlocknativeSchema2]: 1 }, schema: PayloadSetSchema },
38
- {
39
- witness: async (params) => {
40
- return await EthereumGasBlocknativeWitness.create(params);
41
- }
42
- }
43
- );
44
-
45
- // src/index.ts
46
- var src_default = EthereumGasBlocknativePlugin;
47
- export {
48
- EthereumGasBlocknativePlugin,
49
- EthereumGasBlocknativeWitness,
50
- EthereumGasBlocknativeWitnessConfigSchema,
51
- src_default as default
52
- };
53
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts","../../src/index.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n","import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,eAA8C;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;;;AILF,IAAO,cAAQ;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}