@xyo-network/blocknative-ethereum-gas-plugin 2.99.4 → 2.99.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/browser/Config.d.cts +1 -1
  2. package/dist/browser/Config.d.mts +1 -1
  3. package/dist/browser/Config.d.ts +1 -1
  4. package/dist/browser/Plugin.d.cts +1 -1
  5. package/dist/browser/Plugin.d.mts +1 -1
  6. package/dist/browser/Plugin.d.ts +1 -1
  7. package/dist/browser/Schema.d.cts.map +1 -1
  8. package/dist/browser/Schema.d.mts.map +1 -1
  9. package/dist/browser/Schema.d.ts.map +1 -1
  10. package/dist/browser/Witness.d.cts +1 -1
  11. package/dist/browser/Witness.d.mts +1 -1
  12. package/dist/browser/Witness.d.ts +1 -1
  13. package/dist/browser/index.cjs +28 -13
  14. package/dist/browser/index.cjs.map +1 -1
  15. package/dist/browser/index.d.cts +4 -4
  16. package/dist/browser/index.d.mts +4 -4
  17. package/dist/browser/index.d.ts +4 -4
  18. package/dist/browser/{index.js → index.mjs} +31 -14
  19. package/dist/{node/index.js.map → browser/index.mjs.map} +1 -1
  20. package/dist/browser/lib/index.d.cts +1 -1
  21. package/dist/browser/lib/index.d.mts +1 -1
  22. package/dist/browser/lib/index.d.ts +1 -1
  23. package/dist/neutral/Config.d.cts +1 -1
  24. package/dist/neutral/Config.d.mts +1 -1
  25. package/dist/neutral/Config.d.ts +1 -1
  26. package/dist/neutral/Plugin.d.cts +1 -1
  27. package/dist/neutral/Plugin.d.mts +1 -1
  28. package/dist/neutral/Plugin.d.ts +1 -1
  29. package/dist/neutral/Schema.d.cts.map +1 -1
  30. package/dist/neutral/Schema.d.mts.map +1 -1
  31. package/dist/neutral/Schema.d.ts.map +1 -1
  32. package/dist/neutral/Witness.d.cts +1 -1
  33. package/dist/neutral/Witness.d.mts +1 -1
  34. package/dist/neutral/Witness.d.ts +1 -1
  35. package/dist/neutral/index.cjs +28 -13
  36. package/dist/neutral/index.cjs.map +1 -1
  37. package/dist/neutral/index.d.cts +4 -4
  38. package/dist/neutral/index.d.mts +4 -4
  39. package/dist/neutral/index.d.ts +4 -4
  40. package/dist/{node/index.js → neutral/index.mjs} +31 -14
  41. package/dist/{browser/index.js.map → neutral/index.mjs.map} +1 -1
  42. package/dist/neutral/lib/index.d.cts +1 -1
  43. package/dist/neutral/lib/index.d.mts +1 -1
  44. package/dist/neutral/lib/index.d.ts +1 -1
  45. package/dist/node/Config.d.cts +1 -1
  46. package/dist/node/Config.d.mts +1 -1
  47. package/dist/node/Config.d.ts +1 -1
  48. package/dist/node/Plugin.d.cts +1 -1
  49. package/dist/node/Plugin.d.mts +1 -1
  50. package/dist/node/Plugin.d.ts +1 -1
  51. package/dist/node/Schema.d.cts.map +1 -1
  52. package/dist/node/Schema.d.mts.map +1 -1
  53. package/dist/node/Schema.d.ts.map +1 -1
  54. package/dist/node/Witness.d.cts +1 -1
  55. package/dist/node/Witness.d.mts +1 -1
  56. package/dist/node/Witness.d.ts +1 -1
  57. package/dist/node/index.cjs +34 -15
  58. package/dist/node/index.cjs.map +1 -1
  59. package/dist/node/index.d.cts +4 -4
  60. package/dist/node/index.d.mts +4 -4
  61. package/dist/node/index.d.ts +4 -4
  62. package/dist/node/index.mjs +72 -0
  63. package/dist/{neutral/index.js.map → node/index.mjs.map} +1 -1
  64. package/dist/node/lib/index.d.cts +1 -1
  65. package/dist/node/lib/index.d.mts +1 -1
  66. package/dist/node/lib/index.d.ts +1 -1
  67. package/package.json +16 -16
  68. package/src/Config.ts +1 -1
  69. package/src/Plugin.ts +1 -1
  70. package/src/Schema.ts +2 -2
  71. package/src/Witness.ts +3 -3
  72. package/src/index.ts +4 -4
  73. package/src/lib/index.ts +1 -1
  74. package/dist/neutral/index.js +0 -51
@@ -1,3 +1,6 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
1
4
  // src/Plugin.ts
2
5
  import { EthereumGasBlocknativeSchema as EthereumGasBlocknativeSchema2 } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
3
6
  import { PayloadSetSchema } from "@xyo-network/payload-model";
@@ -12,40 +15,54 @@ import { PayloadBuilder } from "@xyo-network/payload-builder";
12
15
  import { axios } from "@xylabs/axios";
13
16
  var url = "https://api.blocknative.com/gasprices/blockprices";
14
17
  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
+ var config = {
19
+ headers: {
20
+ Authorization
21
+ }
18
22
  };
23
+ var getGasFromBlocknative = /* @__PURE__ */ __name(async () => {
24
+ return (await axios.get(url, config)).data;
25
+ }, "getGasFromBlocknative");
19
26
 
20
27
  // src/Schema.ts
21
28
  var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
22
29
 
23
30
  // src/Witness.ts
24
31
  var EthereumGasBlocknativeWitness = class extends AbstractWitness {
25
- static configSchemas = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema];
32
+ static {
33
+ __name(this, "EthereumGasBlocknativeWitness");
34
+ }
35
+ static configSchemas = [
36
+ ...super.configSchemas,
37
+ EthereumGasBlocknativeWitnessConfigSchema
38
+ ];
26
39
  static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
27
40
  async observeHandler() {
28
41
  const fields = await getGasFromBlocknative();
29
42
  const payload = await new PayloadBuilder({
30
43
  schema: EthereumGasBlocknativeSchema
31
44
  }).fields(fields).build();
32
- return [payload];
45
+ return [
46
+ payload
47
+ ];
33
48
  }
34
49
  };
35
50
 
36
51
  // src/Plugin.ts
37
- var EthereumGasBlocknativePlugin = () => createPayloadSetWitnessPlugin(
38
- { required: { [EthereumGasBlocknativeSchema2]: 1 }, schema: PayloadSetSchema },
39
- {
40
- witness: async (params) => {
41
- return await EthereumGasBlocknativeWitness.create(params);
42
- }
43
- }
44
- );
52
+ var EthereumGasBlocknativePlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
53
+ required: {
54
+ [EthereumGasBlocknativeSchema2]: 1
55
+ },
56
+ schema: PayloadSetSchema
57
+ }, {
58
+ witness: /* @__PURE__ */ __name(async (params) => {
59
+ return await EthereumGasBlocknativeWitness.create(params);
60
+ }, "witness")
61
+ }), "EthereumGasBlocknativePlugin");
45
62
  export {
46
63
  EthereumGasBlocknativePlugin,
47
64
  EthereumGasBlocknativeWitness,
48
65
  EthereumGasBlocknativeWitnessConfigSchema,
49
66
  EthereumGasBlocknativePlugin as default
50
67
  };
51
- //# sourceMappingURL=index.js.map
68
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.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.js'\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, Schema } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config.js'\nimport { getGasFromBlocknative } from './lib/index.js'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.js'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = 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,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,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EACrH,OAAyB,sBAA8B;AAAA,EAEvD,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;;;ADnBO,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;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.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.ts'\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, Schema } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config.ts'\nimport { getGasFromBlocknative } from './lib/index.ts'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = 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,SAASA,gCAAAA,qCAAoC;AAC7C,SAASC,wBAAwB;AACjC,SAASC,qCAAqC;;;ACF9C,SAASC,uBAAuB;AAChC,SAAwCC,oCAAoC;AAE5E,SAASC,sBAAsB;;;ACH/B,SAASC,aAAa;AAGtB,IAAMC,MAAM;AAEZ,IAAMC,gBAAgB;AACtB,IAAMC,SAAS;EAAEC,SAAS;IAAEF;EAAc;AAAE;AAErC,IAAMG,wBAAwB,mCAAA;AACnC,UAAQ,MAAMC,MAAMC,IAAoCN,KAAKE,MAAAA,GAASK;AACxE,GAFqC;;;ACP9B,IAAMC,4CACT;;;AFUG,IAAMC,gCAAN,cAA4CC,gBAAAA;EAZnD,OAYmDA;;;EACjD,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,SAAS,MAAMC,sBAAAA;AACrB,UAAMC,UAAU,MAAM,IAAIC,eAA8C;MACtEC,QAAQC;IACV,CAAA,EACGL,OAAOA,MAAAA,EACPM,MAAK;AACR,WAAO;MAACJ;;EACV;AACF;;;ADnBO,IAAMK,+BAA+B,6BAC1CC,8BACE;EAAEC,UAAU;IAAE,CAACC,6BAAAA,GAA+B;EAAE;EAAGC,QAAQC;AAAiB,GAC5E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,8BAA8BC,OAAOF,MAAAA;EACrD,GAFS;AAGX,CAAA,GAPwC;","names":["EthereumGasBlocknativeSchema","PayloadSetSchema","createPayloadSetWitnessPlugin","AbstractWitness","EthereumGasBlocknativeSchema","PayloadBuilder","axios","url","Authorization","config","headers","getGasFromBlocknative","axios","get","data","EthereumGasBlocknativeWitnessConfigSchema","EthereumGasBlocknativeWitness","AbstractWitness","configSchemas","EthereumGasBlocknativeWitnessConfigSchema","defaultConfigSchema","observeHandler","fields","getGasFromBlocknative","payload","PayloadBuilder","schema","EthereumGasBlocknativeSchema","build","EthereumGasBlocknativePlugin","createPayloadSetWitnessPlugin","required","EthereumGasBlocknativeSchema","schema","PayloadSetSchema","witness","params","EthereumGasBlocknativeWitness","create"]}
@@ -1,2 +1,2 @@
1
- export * from './getGasFromBlocknative.js';
1
+ export * from './getGasFromBlocknative.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getGasFromBlocknative.js';
1
+ export * from './getGasFromBlocknative.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getGasFromBlocknative.js';
1
+ export * from './getGasFromBlocknative.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
2
- import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
4
4
  schema: EthereumGasBlocknativeWitnessConfigSchema;
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
2
- import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
4
4
  schema: EthereumGasBlocknativeWitnessConfigSchema;
5
5
  }>;
@@ -1,5 +1,5 @@
1
1
  import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
2
- import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.js';
2
+ import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
3
3
  export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
4
4
  schema: EthereumGasBlocknativeWitnessConfigSchema;
5
5
  }>;
@@ -1,3 +1,3 @@
1
- import { EthereumGasBlocknativeWitness } from './Witness.js';
1
+ import { EthereumGasBlocknativeWitness } from './Witness.ts';
2
2
  export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
3
3
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1,3 +1,3 @@
1
- import { EthereumGasBlocknativeWitness } from './Witness.js';
1
+ import { EthereumGasBlocknativeWitness } from './Witness.ts';
2
2
  export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
3
3
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1,3 +1,3 @@
1
- import { EthereumGasBlocknativeWitness } from './Witness.js';
1
+ import { EthereumGasBlocknativeWitness } from './Witness.ts';
2
2
  export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
3
3
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yCAAyC,GAAG,gEAAgE,CAAA;AACxH,eAAO,MAAM,yCAAyC,EAAE,yCACU,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yCAAyC,GAAG,gEAAgE,CAAA;AACxH,eAAO,MAAM,yCAAyC,EAAE,yCACY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yCAAyC,GAAG,gEAAgE,CAAA;AACxH,eAAO,MAAM,yCAAyC,EAAE,yCACU,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yCAAyC,GAAG,gEAAgE,CAAA;AACxH,eAAO,MAAM,yCAAyC,EAAE,yCACY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yCAAyC,GAAG,gEAAgE,CAAA;AACxH,eAAO,MAAM,yCAAyC,EAAE,yCACU,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yCAAyC,GAAG,gEAAgE,CAAA;AACxH,eAAO,MAAM,yCAAyC,EAAE,yCACY,CAAA"}
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
5
- import { EthereumGasBlocknativeWitnessConfig } from './Config.js';
5
+ import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
6
6
  export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
7
7
  export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
8
8
  static readonly configSchemas: Schema[];
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
5
- import { EthereumGasBlocknativeWitnessConfig } from './Config.js';
5
+ import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
6
6
  export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
7
7
  export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
8
8
  static readonly configSchemas: Schema[];
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
2
2
  import { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import { Payload, Schema } from '@xyo-network/payload-model';
4
4
  import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
5
- import { EthereumGasBlocknativeWitnessConfig } from './Config.js';
5
+ import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
6
6
  export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
7
7
  export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
8
8
  static readonly configSchemas: Schema[];
@@ -2,7 +2,11 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __reflectGet = Reflect.get;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
10
  var __export = (target, all) => {
7
11
  for (var name in all)
8
12
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -16,6 +20,8 @@ var __copyProps = (to, from, except, desc) => {
16
20
  return to;
17
21
  };
18
22
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
24
+ var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
19
25
 
20
26
  // src/index.ts
21
27
  var src_exports = {};
@@ -41,36 +47,49 @@ var import_payload_builder = require("@xyo-network/payload-builder");
41
47
  var import_axios = require("@xylabs/axios");
42
48
  var url = "https://api.blocknative.com/gasprices/blockprices";
43
49
  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;
50
+ var config = {
51
+ headers: {
52
+ Authorization
53
+ }
47
54
  };
55
+ var getGasFromBlocknative = /* @__PURE__ */ __name(async () => {
56
+ return (await import_axios.axios.get(url, config)).data;
57
+ }, "getGasFromBlocknative");
48
58
 
49
59
  // src/Schema.ts
50
60
  var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
51
61
 
52
62
  // src/Witness.ts
53
- var EthereumGasBlocknativeWitness = class extends import_abstract_witness.AbstractWitness {
54
- static configSchemas = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema];
55
- static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
63
+ var _EthereumGasBlocknativeWitness = class _EthereumGasBlocknativeWitness extends import_abstract_witness.AbstractWitness {
56
64
  async observeHandler() {
57
65
  const fields = await getGasFromBlocknative();
58
66
  const payload = await new import_payload_builder.PayloadBuilder({
59
67
  schema: import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema
60
68
  }).fields(fields).build();
61
- return [payload];
69
+ return [
70
+ payload
71
+ ];
62
72
  }
63
73
  };
74
+ __name(_EthereumGasBlocknativeWitness, "EthereumGasBlocknativeWitness");
75
+ __publicField(_EthereumGasBlocknativeWitness, "configSchemas", [
76
+ ...__superGet(_EthereumGasBlocknativeWitness, _EthereumGasBlocknativeWitness, "configSchemas"),
77
+ EthereumGasBlocknativeWitnessConfigSchema
78
+ ]);
79
+ __publicField(_EthereumGasBlocknativeWitness, "defaultConfigSchema", EthereumGasBlocknativeWitnessConfigSchema);
80
+ var EthereumGasBlocknativeWitness = _EthereumGasBlocknativeWitness;
64
81
 
65
82
  // src/Plugin.ts
66
- var EthereumGasBlocknativePlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
67
- { required: { [import_blocknative_ethereum_gas_payload_plugin2.EthereumGasBlocknativeSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
68
- {
69
- witness: async (params) => {
70
- return await EthereumGasBlocknativeWitness.create(params);
71
- }
72
- }
73
- );
83
+ var EthereumGasBlocknativePlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
84
+ required: {
85
+ [import_blocknative_ethereum_gas_payload_plugin2.EthereumGasBlocknativeSchema]: 1
86
+ },
87
+ schema: import_payload_model.PayloadSetSchema
88
+ }, {
89
+ witness: /* @__PURE__ */ __name(async (params) => {
90
+ return await EthereumGasBlocknativeWitness.create(params);
91
+ }, "witness")
92
+ }), "EthereumGasBlocknativePlugin");
74
93
  // Annotate the CommonJS export names for ESM import in node:
75
94
  0 && (module.exports = {
76
95
  EthereumGasBlocknativePlugin,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.js'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.js'\nexport * from './Schema.js'\nexport * from './Witness.js'\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.js'\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, Schema } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config.js'\nimport { getGasFromBlocknative } from './lib/index.js'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.js'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = 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,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EACrH,OAAyB,sBAA8B;AAAA,EAEvD,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;;;ADnBO,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;","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":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\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.ts'\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, Schema } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config.ts'\nimport { getGasFromBlocknative } from './lib/index.ts'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = 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;;;;;;;;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,mBAAsB;AAGtB,IAAMC,MAAM;AAEZ,IAAMC,gBAAgB;AACtB,IAAMC,SAAS;EAAEC,SAAS;IAAEF;EAAc;AAAE;AAErC,IAAMG,wBAAwB,mCAAA;AACnC,UAAQ,MAAMC,mBAAMC,IAAoCN,KAAKE,MAAAA,GAASK;AACxE,GAFqC;;;ACP9B,IAAMC,4CACT;;;AFUG,IAAMC,iCAAN,MAAMA,uCAAsCC,wCAAAA;EAIjD,MAAyBC,iBAAqC;AAC5D,UAAMC,SAAS,MAAMC,sBAAAA;AACrB,UAAMC,UAAU,MAAM,IAAIC,sCAA8C;MACtEC,QAAQC;IACV,CAAA,EACGL,OAAOA,MAAAA,EACPM,MAAK;AACR,WAAO;MAACJ;;EACV;AACF;AAbmDJ;AACjD,cADWD,gCACcU,iBAA0B;KAAI,2EAAMA;EAAeC;;AAC5E,cAFWX,gCAEcY,uBAA8BD;AAFlD,IAAMX,gCAAN;;;ADNA,IAAMa,+BAA+B,iCAC1CC,wDACE;EAAEC,UAAU;IAAE,CAACC,4EAAAA,GAA+B;EAAE;EAAGC,QAAQC;AAAiB,GAC5E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,8BAA8BC,OAAOF,MAAAA;EACrD,GAFS;AAGX,CAAA,GAPwC;","names":["import_blocknative_ethereum_gas_payload_plugin","url","Authorization","config","headers","getGasFromBlocknative","axios","get","data","EthereumGasBlocknativeWitnessConfigSchema","EthereumGasBlocknativeWitness","AbstractWitness","observeHandler","fields","getGasFromBlocknative","payload","PayloadBuilder","schema","EthereumGasBlocknativeSchema","build","configSchemas","EthereumGasBlocknativeWitnessConfigSchema","defaultConfigSchema","EthereumGasBlocknativePlugin","createPayloadSetWitnessPlugin","required","EthereumGasBlocknativeSchema","schema","PayloadSetSchema","witness","params","EthereumGasBlocknativeWitness","create"]}
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export * from './Config.js';
2
- export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.js';
3
- export * from './Schema.js';
4
- export * from './Witness.js';
1
+ export * from './Config.ts';
2
+ export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts';
3
+ export * from './Schema.ts';
4
+ export * from './Witness.ts';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,72 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getProtoOf = Object.getPrototypeOf;
3
+ var __reflectGet = Reflect.get;
4
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
+ var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
8
+
9
+ // src/Plugin.ts
10
+ import { EthereumGasBlocknativeSchema as EthereumGasBlocknativeSchema2 } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
11
+ import { PayloadSetSchema } from "@xyo-network/payload-model";
12
+ import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
13
+
14
+ // src/Witness.ts
15
+ import { AbstractWitness } from "@xyo-network/abstract-witness";
16
+ import { EthereumGasBlocknativeSchema } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
17
+ import { PayloadBuilder } from "@xyo-network/payload-builder";
18
+
19
+ // src/lib/getGasFromBlocknative.ts
20
+ import { axios } from "@xylabs/axios";
21
+ var url = "https://api.blocknative.com/gasprices/blockprices";
22
+ var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
23
+ var config = {
24
+ headers: {
25
+ Authorization
26
+ }
27
+ };
28
+ var getGasFromBlocknative = /* @__PURE__ */ __name(async () => {
29
+ return (await axios.get(url, config)).data;
30
+ }, "getGasFromBlocknative");
31
+
32
+ // src/Schema.ts
33
+ var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
34
+
35
+ // src/Witness.ts
36
+ var _EthereumGasBlocknativeWitness = class _EthereumGasBlocknativeWitness extends AbstractWitness {
37
+ async observeHandler() {
38
+ const fields = await getGasFromBlocknative();
39
+ const payload = await new PayloadBuilder({
40
+ schema: EthereumGasBlocknativeSchema
41
+ }).fields(fields).build();
42
+ return [
43
+ payload
44
+ ];
45
+ }
46
+ };
47
+ __name(_EthereumGasBlocknativeWitness, "EthereumGasBlocknativeWitness");
48
+ __publicField(_EthereumGasBlocknativeWitness, "configSchemas", [
49
+ ...__superGet(_EthereumGasBlocknativeWitness, _EthereumGasBlocknativeWitness, "configSchemas"),
50
+ EthereumGasBlocknativeWitnessConfigSchema
51
+ ]);
52
+ __publicField(_EthereumGasBlocknativeWitness, "defaultConfigSchema", EthereumGasBlocknativeWitnessConfigSchema);
53
+ var EthereumGasBlocknativeWitness = _EthereumGasBlocknativeWitness;
54
+
55
+ // src/Plugin.ts
56
+ var EthereumGasBlocknativePlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
57
+ required: {
58
+ [EthereumGasBlocknativeSchema2]: 1
59
+ },
60
+ schema: PayloadSetSchema
61
+ }, {
62
+ witness: /* @__PURE__ */ __name(async (params) => {
63
+ return await EthereumGasBlocknativeWitness.create(params);
64
+ }, "witness")
65
+ }), "EthereumGasBlocknativePlugin");
66
+ export {
67
+ EthereumGasBlocknativePlugin,
68
+ EthereumGasBlocknativeWitness,
69
+ EthereumGasBlocknativeWitnessConfigSchema,
70
+ EthereumGasBlocknativePlugin as default
71
+ };
72
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.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.js'\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, Schema } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config.js'\nimport { getGasFromBlocknative } from './lib/index.js'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.js'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = 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,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,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EACrH,OAAyB,sBAA8B;AAAA,EAEvD,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;;;ADnBO,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;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.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.ts'\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, Schema } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config.ts'\nimport { getGasFromBlocknative } from './lib/index.ts'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = 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,SAASA,gCAAAA,qCAAoC;AAC7C,SAASC,wBAAwB;AACjC,SAASC,qCAAqC;;;ACF9C,SAASC,uBAAuB;AAChC,SAAwCC,oCAAoC;AAE5E,SAASC,sBAAsB;;;ACH/B,SAASC,aAAa;AAGtB,IAAMC,MAAM;AAEZ,IAAMC,gBAAgB;AACtB,IAAMC,SAAS;EAAEC,SAAS;IAAEF;EAAc;AAAE;AAErC,IAAMG,wBAAwB,mCAAA;AACnC,UAAQ,MAAMC,MAAMC,IAAoCN,KAAKE,MAAAA,GAASK;AACxE,GAFqC;;;ACP9B,IAAMC,4CACT;;;AFUG,IAAMC,iCAAN,MAAMA,uCAAsCC,gBAAAA;EAIjD,MAAyBC,iBAAqC;AAC5D,UAAMC,SAAS,MAAMC,sBAAAA;AACrB,UAAMC,UAAU,MAAM,IAAIC,eAA8C;MACtEC,QAAQC;IACV,CAAA,EACGL,OAAOA,MAAAA,EACPM,MAAK;AACR,WAAO;MAACJ;;EACV;AACF;AAbmDJ;AACjD,cADWD,gCACcU,iBAA0B;KAAI,2EAAMA;EAAeC;;AAC5E,cAFWX,gCAEcY,uBAA8BD;AAFlD,IAAMX,gCAAN;;;ADNA,IAAMa,+BAA+B,6BAC1CC,8BACE;EAAEC,UAAU;IAAE,CAACC,6BAAAA,GAA+B;EAAE;EAAGC,QAAQC;AAAiB,GAC5E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,8BAA8BC,OAAOF,MAAAA;EACrD,GAFS;AAGX,CAAA,GAPwC;","names":["EthereumGasBlocknativeSchema","PayloadSetSchema","createPayloadSetWitnessPlugin","AbstractWitness","EthereumGasBlocknativeSchema","PayloadBuilder","axios","url","Authorization","config","headers","getGasFromBlocknative","axios","get","data","EthereumGasBlocknativeWitnessConfigSchema","EthereumGasBlocknativeWitness","AbstractWitness","observeHandler","fields","getGasFromBlocknative","payload","PayloadBuilder","schema","EthereumGasBlocknativeSchema","build","configSchemas","EthereumGasBlocknativeWitnessConfigSchema","defaultConfigSchema","EthereumGasBlocknativePlugin","createPayloadSetWitnessPlugin","required","EthereumGasBlocknativeSchema","schema","PayloadSetSchema","witness","params","EthereumGasBlocknativeWitness","create"]}
@@ -1,2 +1,2 @@
1
- export * from './getGasFromBlocknative.js';
1
+ export * from './getGasFromBlocknative.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getGasFromBlocknative.js';
1
+ export * from './getGasFromBlocknative.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './getGasFromBlocknative.js';
1
+ export * from './getGasFromBlocknative.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -10,20 +10,20 @@
10
10
  "url": "https://github.com/XYOracleNetwork/plugins/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/axios": "^3.6.1",
14
- "@xyo-network/abstract-witness": "^2.110.6",
15
- "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.99.4",
16
- "@xyo-network/module-model": "^2.110.6",
17
- "@xyo-network/payload-builder": "^2.110.6",
18
- "@xyo-network/payload-model": "^2.110.6",
19
- "@xyo-network/payloadset-plugin": "^2.110.6",
20
- "@xyo-network/witness-timestamp": "^2.110.6"
13
+ "@xylabs/axios": "^3.6.8",
14
+ "@xyo-network/abstract-witness": "^2.111.2",
15
+ "@xyo-network/blocknative-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-timestamp": "^2.111.2"
21
21
  },
22
22
  "devDependencies": {
23
- "@xylabs/ts-scripts-yarn3": "^3.12.2",
24
- "@xylabs/tsconfig": "^3.12.2",
25
- "@xyo-network/payload-wrapper": "^2.110.6",
26
- "typescript": "^5.5.3"
23
+ "@xylabs/ts-scripts-yarn3": "^3.15.13",
24
+ "@xylabs/tsconfig": "^3.15.13",
25
+ "@xyo-network/payload-wrapper": "^2.111.2",
26
+ "typescript": "^5.5.4"
27
27
  },
28
28
  "description": "Typescript/Javascript Plugins for XYO Platform",
29
29
  "types": "dist/node/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "import": {
38
38
  "types": "./dist/browser/index.d.mts",
39
- "default": "./dist/browser/index.js"
39
+ "default": "./dist/browser/index.mjs"
40
40
  }
41
41
  },
42
42
  "node": {
@@ -46,14 +46,14 @@
46
46
  },
47
47
  "import": {
48
48
  "types": "./dist/node/index.d.mts",
49
- "default": "./dist/node/index.js"
49
+ "default": "./dist/node/index.mjs"
50
50
  }
51
51
  }
52
52
  },
53
53
  "./package.json": "./package.json"
54
54
  },
55
55
  "main": "dist/node/index.cjs",
56
- "module": "dist/node/index.js",
56
+ "module": "dist/node/index.mjs",
57
57
  "homepage": "https://xyo.network",
58
58
  "license": "LGPL-3.0-only",
59
59
  "publishConfig": {
@@ -64,6 +64,6 @@
64
64
  "url": "https://github.com/XYOracleNetwork/plugins.git"
65
65
  },
66
66
  "sideEffects": false,
67
- "version": "2.99.4",
67
+ "version": "2.99.5",
68
68
  "type": "module"
69
69
  }
package/src/Config.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp'
2
2
 
3
- import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.js'
3
+ import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'
4
4
 
5
5
  export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
6
6
  schema: EthereumGasBlocknativeWitnessConfigSchema
package/src/Plugin.ts CHANGED
@@ -2,7 +2,7 @@ import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-
2
2
  import { PayloadSetSchema } from '@xyo-network/payload-model'
3
3
  import { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'
4
4
 
5
- import { EthereumGasBlocknativeWitness } from './Witness.js'
5
+ import { EthereumGasBlocknativeWitness } from './Witness.ts'
6
6
 
7
7
  export const EthereumGasBlocknativePlugin = () =>
8
8
  createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(
package/src/Schema.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'
2
- export const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =
3
- 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'
2
+ export const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema
3
+ = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'
package/src/Witness.ts CHANGED
@@ -5,9 +5,9 @@ import { PayloadBuilder } from '@xyo-network/payload-builder'
5
5
  import { Payload, Schema } from '@xyo-network/payload-model'
6
6
  import { TimestampWitnessParams } from '@xyo-network/witness-timestamp'
7
7
 
8
- import { EthereumGasBlocknativeWitnessConfig } from './Config.js'
9
- import { getGasFromBlocknative } from './lib/index.js'
10
- import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.js'
8
+ import { EthereumGasBlocknativeWitnessConfig } from './Config.ts'
9
+ import { getGasFromBlocknative } from './lib/index.ts'
10
+ import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'
11
11
 
12
12
  export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>
13
13
  export class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './Config.js'
1
+ export * from './Config.ts'
2
2
  // eslint-disable-next-line import/no-default-export
3
- export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.js'
4
- export * from './Schema.js'
5
- export * from './Witness.js'
3
+ export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts'
4
+ export * from './Schema.ts'
5
+ export * from './Witness.ts'
package/src/lib/index.ts CHANGED
@@ -1 +1 @@
1
- export * from './getGasFromBlocknative.js'
1
+ export * from './getGasFromBlocknative.ts'