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

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 (141) hide show
  1. package/dist/neutral/index.d.ts +23 -5
  2. package/dist/neutral/index.mjs +13 -30
  3. package/dist/neutral/index.mjs.map +1 -1
  4. package/package.json +16 -35
  5. package/src/index.ts +1 -1
  6. package/xy.config.ts +3 -5
  7. package/dist/browser/Config.d.cts +0 -6
  8. package/dist/browser/Config.d.cts.map +0 -1
  9. package/dist/browser/Config.d.mts +0 -6
  10. package/dist/browser/Config.d.mts.map +0 -1
  11. package/dist/browser/Config.d.ts +0 -6
  12. package/dist/browser/Config.d.ts.map +0 -1
  13. package/dist/browser/Plugin.d.cts +0 -3
  14. package/dist/browser/Plugin.d.cts.map +0 -1
  15. package/dist/browser/Plugin.d.mts +0 -3
  16. package/dist/browser/Plugin.d.mts.map +0 -1
  17. package/dist/browser/Plugin.d.ts +0 -3
  18. package/dist/browser/Plugin.d.ts.map +0 -1
  19. package/dist/browser/Schema.d.cts +0 -3
  20. package/dist/browser/Schema.d.cts.map +0 -1
  21. package/dist/browser/Schema.d.mts +0 -3
  22. package/dist/browser/Schema.d.mts.map +0 -1
  23. package/dist/browser/Schema.d.ts +0 -3
  24. package/dist/browser/Schema.d.ts.map +0 -1
  25. package/dist/browser/Witness.d.cts +0 -12
  26. package/dist/browser/Witness.d.cts.map +0 -1
  27. package/dist/browser/Witness.d.mts +0 -12
  28. package/dist/browser/Witness.d.mts.map +0 -1
  29. package/dist/browser/Witness.d.ts +0 -12
  30. package/dist/browser/Witness.d.ts.map +0 -1
  31. package/dist/browser/index.cjs +0 -89
  32. package/dist/browser/index.cjs.map +0 -1
  33. package/dist/browser/index.d.cts +0 -5
  34. package/dist/browser/index.d.cts.map +0 -1
  35. package/dist/browser/index.d.mts +0 -5
  36. package/dist/browser/index.d.mts.map +0 -1
  37. package/dist/browser/index.d.ts +0 -5
  38. package/dist/browser/index.d.ts.map +0 -1
  39. package/dist/browser/index.mjs +0 -68
  40. package/dist/browser/index.mjs.map +0 -1
  41. package/dist/browser/lib/getGasFromBlocknative.d.cts +0 -3
  42. package/dist/browser/lib/getGasFromBlocknative.d.cts.map +0 -1
  43. package/dist/browser/lib/getGasFromBlocknative.d.mts +0 -3
  44. package/dist/browser/lib/getGasFromBlocknative.d.mts.map +0 -1
  45. package/dist/browser/lib/getGasFromBlocknative.d.ts +0 -3
  46. package/dist/browser/lib/getGasFromBlocknative.d.ts.map +0 -1
  47. package/dist/browser/lib/index.d.cts +0 -2
  48. package/dist/browser/lib/index.d.cts.map +0 -1
  49. package/dist/browser/lib/index.d.mts +0 -2
  50. package/dist/browser/lib/index.d.mts.map +0 -1
  51. package/dist/browser/lib/index.d.ts +0 -2
  52. package/dist/browser/lib/index.d.ts.map +0 -1
  53. package/dist/neutral/Config.d.cts +0 -6
  54. package/dist/neutral/Config.d.cts.map +0 -1
  55. package/dist/neutral/Config.d.mts +0 -6
  56. package/dist/neutral/Config.d.mts.map +0 -1
  57. package/dist/neutral/Config.d.ts +0 -6
  58. package/dist/neutral/Config.d.ts.map +0 -1
  59. package/dist/neutral/Plugin.d.cts +0 -3
  60. package/dist/neutral/Plugin.d.cts.map +0 -1
  61. package/dist/neutral/Plugin.d.mts +0 -3
  62. package/dist/neutral/Plugin.d.mts.map +0 -1
  63. package/dist/neutral/Plugin.d.ts +0 -3
  64. package/dist/neutral/Plugin.d.ts.map +0 -1
  65. package/dist/neutral/Schema.d.cts +0 -3
  66. package/dist/neutral/Schema.d.cts.map +0 -1
  67. package/dist/neutral/Schema.d.mts +0 -3
  68. package/dist/neutral/Schema.d.mts.map +0 -1
  69. package/dist/neutral/Schema.d.ts +0 -3
  70. package/dist/neutral/Schema.d.ts.map +0 -1
  71. package/dist/neutral/Witness.d.cts +0 -12
  72. package/dist/neutral/Witness.d.cts.map +0 -1
  73. package/dist/neutral/Witness.d.mts +0 -12
  74. package/dist/neutral/Witness.d.mts.map +0 -1
  75. package/dist/neutral/Witness.d.ts +0 -12
  76. package/dist/neutral/Witness.d.ts.map +0 -1
  77. package/dist/neutral/index.cjs +0 -89
  78. package/dist/neutral/index.cjs.map +0 -1
  79. package/dist/neutral/index.d.cts +0 -5
  80. package/dist/neutral/index.d.cts.map +0 -1
  81. package/dist/neutral/index.d.mts +0 -5
  82. package/dist/neutral/index.d.mts.map +0 -1
  83. package/dist/neutral/index.d.ts.map +0 -1
  84. package/dist/neutral/lib/getGasFromBlocknative.d.cts +0 -3
  85. package/dist/neutral/lib/getGasFromBlocknative.d.cts.map +0 -1
  86. package/dist/neutral/lib/getGasFromBlocknative.d.mts +0 -3
  87. package/dist/neutral/lib/getGasFromBlocknative.d.mts.map +0 -1
  88. package/dist/neutral/lib/getGasFromBlocknative.d.ts +0 -3
  89. package/dist/neutral/lib/getGasFromBlocknative.d.ts.map +0 -1
  90. package/dist/neutral/lib/index.d.cts +0 -2
  91. package/dist/neutral/lib/index.d.cts.map +0 -1
  92. package/dist/neutral/lib/index.d.mts +0 -2
  93. package/dist/neutral/lib/index.d.mts.map +0 -1
  94. package/dist/neutral/lib/index.d.ts +0 -2
  95. package/dist/neutral/lib/index.d.ts.map +0 -1
  96. package/dist/node/Config.d.cts +0 -6
  97. package/dist/node/Config.d.cts.map +0 -1
  98. package/dist/node/Config.d.mts +0 -6
  99. package/dist/node/Config.d.mts.map +0 -1
  100. package/dist/node/Config.d.ts +0 -6
  101. package/dist/node/Config.d.ts.map +0 -1
  102. package/dist/node/Plugin.d.cts +0 -3
  103. package/dist/node/Plugin.d.cts.map +0 -1
  104. package/dist/node/Plugin.d.mts +0 -3
  105. package/dist/node/Plugin.d.mts.map +0 -1
  106. package/dist/node/Plugin.d.ts +0 -3
  107. package/dist/node/Plugin.d.ts.map +0 -1
  108. package/dist/node/Schema.d.cts +0 -3
  109. package/dist/node/Schema.d.cts.map +0 -1
  110. package/dist/node/Schema.d.mts +0 -3
  111. package/dist/node/Schema.d.mts.map +0 -1
  112. package/dist/node/Schema.d.ts +0 -3
  113. package/dist/node/Schema.d.ts.map +0 -1
  114. package/dist/node/Witness.d.cts +0 -12
  115. package/dist/node/Witness.d.cts.map +0 -1
  116. package/dist/node/Witness.d.mts +0 -12
  117. package/dist/node/Witness.d.mts.map +0 -1
  118. package/dist/node/Witness.d.ts +0 -12
  119. package/dist/node/Witness.d.ts.map +0 -1
  120. package/dist/node/index.cjs +0 -99
  121. package/dist/node/index.cjs.map +0 -1
  122. package/dist/node/index.d.cts +0 -5
  123. package/dist/node/index.d.cts.map +0 -1
  124. package/dist/node/index.d.mts +0 -5
  125. package/dist/node/index.d.mts.map +0 -1
  126. package/dist/node/index.d.ts +0 -5
  127. package/dist/node/index.d.ts.map +0 -1
  128. package/dist/node/index.mjs +0 -72
  129. package/dist/node/index.mjs.map +0 -1
  130. package/dist/node/lib/getGasFromBlocknative.d.cts +0 -3
  131. package/dist/node/lib/getGasFromBlocknative.d.cts.map +0 -1
  132. package/dist/node/lib/getGasFromBlocknative.d.mts +0 -3
  133. package/dist/node/lib/getGasFromBlocknative.d.mts.map +0 -1
  134. package/dist/node/lib/getGasFromBlocknative.d.ts +0 -3
  135. package/dist/node/lib/getGasFromBlocknative.d.ts.map +0 -1
  136. package/dist/node/lib/index.d.cts +0 -2
  137. package/dist/node/lib/index.d.cts.map +0 -1
  138. package/dist/node/lib/index.d.mts +0 -2
  139. package/dist/node/lib/index.d.mts.map +0 -1
  140. package/dist/node/lib/index.d.ts +0 -2
  141. package/dist/node/lib/index.d.ts.map +0 -1
@@ -1,5 +1,23 @@
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
- //# sourceMappingURL=index.d.ts.map
1
+ import { TimestampWitnessConfig, TimestampWitnessParams } from '@xyo-network/witness-timestamp';
2
+ import * as _xyo_network_payloadset_plugin from '@xyo-network/payloadset-plugin';
3
+ import { AbstractWitness } from '@xyo-network/abstract-witness';
4
+ import { AnyConfigSchema } from '@xyo-network/module-model';
5
+ import { Schema, Payload } from '@xyo-network/payload-model';
6
+
7
+ type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config';
8
+ declare const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema;
9
+
10
+ type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
11
+ schema: EthereumGasBlocknativeWitnessConfigSchema;
12
+ }>;
13
+
14
+ type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
15
+ declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
16
+ static readonly configSchemas: Schema[];
17
+ static readonly defaultConfigSchema: Schema;
18
+ protected observeHandler(): Promise<Payload[]>;
19
+ }
20
+
21
+ declare const EthereumGasBlocknativePlugin: () => _xyo_network_payloadset_plugin.PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
22
+
23
+ export { EthereumGasBlocknativePlugin, EthereumGasBlocknativeWitness, type EthereumGasBlocknativeWitnessConfig, EthereumGasBlocknativeWitnessConfigSchema, type EthereumGasBlocknativeWitnessParams, EthereumGasBlocknativePlugin as default };
@@ -1,6 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/Plugin.ts
5
2
  import { EthereumGasBlocknativeSchema as EthereumGasBlocknativeSchema2 } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
6
3
  import { PayloadSetSchema } from "@xyo-network/payload-model";
@@ -15,50 +12,36 @@ import { PayloadBuilder } from "@xyo-network/payload-builder";
15
12
  import { axios } from "@xylabs/axios";
16
13
  var url = "https://api.blocknative.com/gasprices/blockprices";
17
14
  var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
18
- var config = {
19
- headers: {
20
- Authorization
21
- }
22
- };
23
- var getGasFromBlocknative = /* @__PURE__ */ __name(async () => {
15
+ var config = { headers: { Authorization } };
16
+ var getGasFromBlocknative = async () => {
24
17
  return (await axios.get(url, config)).data;
25
- }, "getGasFromBlocknative");
18
+ };
26
19
 
27
20
  // src/Schema.ts
28
21
  var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
29
22
 
30
23
  // src/Witness.ts
31
24
  var EthereumGasBlocknativeWitness = class extends AbstractWitness {
32
- static {
33
- __name(this, "EthereumGasBlocknativeWitness");
34
- }
35
- static configSchemas = [
36
- ...super.configSchemas,
37
- EthereumGasBlocknativeWitnessConfigSchema
38
- ];
25
+ static configSchemas = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema];
39
26
  static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
40
27
  async observeHandler() {
41
28
  const fields = await getGasFromBlocknative();
42
29
  const payload = await new PayloadBuilder({
43
30
  schema: EthereumGasBlocknativeSchema
44
31
  }).fields(fields).build();
45
- return [
46
- payload
47
- ];
32
+ return [payload];
48
33
  }
49
34
  };
50
35
 
51
36
  // src/Plugin.ts
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");
37
+ var EthereumGasBlocknativePlugin = () => createPayloadSetWitnessPlugin(
38
+ { required: { [EthereumGasBlocknativeSchema2]: 1 }, schema: PayloadSetSchema },
39
+ {
40
+ witness: async (params) => {
41
+ return await EthereumGasBlocknativeWitness.create(params);
42
+ }
43
+ }
44
+ );
62
45
  export {
63
46
  EthereumGasBlocknativePlugin,
64
47
  EthereumGasBlocknativeWitness,
@@ -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.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
+ {"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,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,4CACT;;;AFUG,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"]}
package/package.json CHANGED
@@ -10,50 +10,31 @@
10
10
  "url": "https://github.com/XYOracleNetwork/plugins/issues"
11
11
  },
12
12
  "dependencies": {
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"
13
+ "@xylabs/axios": "^4.0.0",
14
+ "@xyo-network/abstract-witness": "^3.0.1",
15
+ "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.0.0",
16
+ "@xyo-network/module-model": "^3.0.1",
17
+ "@xyo-network/payload-builder": "^3.0.1",
18
+ "@xyo-network/payload-model": "^3.0.1",
19
+ "@xyo-network/payloadset-plugin": "^3.0.1",
20
+ "@xyo-network/witness-timestamp": "^3.0.1"
21
21
  },
22
22
  "devDependencies": {
23
- "@xylabs/ts-scripts-yarn3": "^3.15.13",
24
- "@xylabs/tsconfig": "^3.15.13",
25
- "@xyo-network/payload-wrapper": "^2.111.2",
23
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
24
+ "@xylabs/tsconfig": "^4.0.0-rc.15",
25
+ "@xyo-network/payload-wrapper": "^3.0.1",
26
26
  "typescript": "^5.5.4"
27
27
  },
28
28
  "description": "Typescript/Javascript Plugins for XYO Platform",
29
- "types": "dist/node/index.d.ts",
29
+ "types": "dist/neutral/index.d.ts",
30
30
  "exports": {
31
31
  ".": {
32
- "browser": {
33
- "require": {
34
- "types": "./dist/browser/index.d.cts",
35
- "default": "./dist/browser/index.cjs"
36
- },
37
- "import": {
38
- "types": "./dist/browser/index.d.mts",
39
- "default": "./dist/browser/index.mjs"
40
- }
41
- },
42
- "node": {
43
- "require": {
44
- "types": "./dist/node/index.d.cts",
45
- "default": "./dist/node/index.cjs"
46
- },
47
- "import": {
48
- "types": "./dist/node/index.d.mts",
49
- "default": "./dist/node/index.mjs"
50
- }
51
- }
32
+ "types": "./dist/neutral/index.d.ts",
33
+ "default": "./dist/neutral/index.mjs"
52
34
  },
53
35
  "./package.json": "./package.json"
54
36
  },
55
- "main": "dist/node/index.cjs",
56
- "module": "dist/node/index.mjs",
37
+ "module": "dist/neutral/index.mjs",
57
38
  "homepage": "https://xyo.network",
58
39
  "license": "LGPL-3.0-only",
59
40
  "publishConfig": {
@@ -64,6 +45,6 @@
64
45
  "url": "https://github.com/XYOracleNetwork/plugins.git"
65
46
  },
66
47
  "sideEffects": false,
67
- "version": "2.99.5",
48
+ "version": "3.0.0",
68
49
  "type": "module"
69
50
  }
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './Config.ts'
2
- // eslint-disable-next-line import/no-default-export
2
+ // eslint-disable-next-line import-x/no-default-export
3
3
  export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts'
4
4
  export * from './Schema.ts'
5
5
  export * from './Witness.ts'
package/xy.config.ts CHANGED
@@ -1,14 +1,12 @@
1
1
  import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
2
  const config: XyTsupConfig = {
3
3
  compile: {
4
- browser: {
5
- src: true,
6
- },
7
- node: {
4
+ browser: {},
5
+ neutral: {
8
6
  src: true,
9
7
  },
8
+ node: {},
10
9
  },
11
10
  }
12
11
 
13
- // eslint-disable-next-line import/no-default-export
14
12
  export default config
@@ -1,6 +0,0 @@
1
- import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
2
- import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
3
- export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
4
- schema: EthereumGasBlocknativeWitnessConfigSchema;
5
- }>;
6
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAA;AAEvE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;IACvE,MAAM,EAAE,yCAAyC,CAAA;CAClD,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
2
- import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
3
- export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
4
- schema: EthereumGasBlocknativeWitnessConfigSchema;
5
- }>;
6
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAA;AAEvE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;IACvE,MAAM,EAAE,yCAAyC,CAAA;CAClD,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
2
- import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
3
- export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
4
- schema: EthereumGasBlocknativeWitnessConfigSchema;
5
- }>;
6
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAA;AAEvE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;IACvE,MAAM,EAAE,yCAAyC,CAAA;CAClD,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { EthereumGasBlocknativeWitness } from './Witness.ts';
2
- export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
3
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAA;AAE5D,eAAO,MAAM,4BAA4B,uGAQtC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { EthereumGasBlocknativeWitness } from './Witness.ts';
2
- export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
3
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAA;AAE5D,eAAO,MAAM,4BAA4B,uGAQtC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { EthereumGasBlocknativeWitness } from './Witness.ts';
2
- export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
3
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAA;AAE5D,eAAO,MAAM,4BAA4B,uGAQtC,CAAA"}
@@ -1,3 +0,0 @@
1
- export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config';
2
- export declare const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema;
3
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config';
2
- export declare const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema;
3
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config';
2
- export declare const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema;
3
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
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,12 +0,0 @@
1
- import { AbstractWitness } from '@xyo-network/abstract-witness';
2
- import { AnyConfigSchema } from '@xyo-network/module-model';
3
- import { Payload, Schema } from '@xyo-network/payload-model';
4
- import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
5
- import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
6
- export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
7
- export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
8
- static readonly configSchemas: Schema[];
9
- static readonly defaultConfigSchema: Schema;
10
- protected observeHandler(): Promise<Payload[]>;
11
- }
12
- //# sourceMappingURL=Witness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAA;AAIjE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC,eAAe,CAAC,mCAAmC,CAAC,CAAC,CAAA;AAC9H,qBAAa,6BAA8B,SAAQ,eAAe,CAAC,mCAAmC,CAAC;IACrG,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsE;IACtH,gBAAyB,mBAAmB,EAAE,MAAM,CAA4C;cAEvE,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAS9D"}
@@ -1,12 +0,0 @@
1
- import { AbstractWitness } from '@xyo-network/abstract-witness';
2
- import { AnyConfigSchema } from '@xyo-network/module-model';
3
- import { Payload, Schema } from '@xyo-network/payload-model';
4
- import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
5
- import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
6
- export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
7
- export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
8
- static readonly configSchemas: Schema[];
9
- static readonly defaultConfigSchema: Schema;
10
- protected observeHandler(): Promise<Payload[]>;
11
- }
12
- //# sourceMappingURL=Witness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAA;AAIjE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC,eAAe,CAAC,mCAAmC,CAAC,CAAC,CAAA;AAC9H,qBAAa,6BAA8B,SAAQ,eAAe,CAAC,mCAAmC,CAAC;IACrG,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsE;IACtH,gBAAyB,mBAAmB,EAAE,MAAM,CAA4C;cAEvE,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAS9D"}
@@ -1,12 +0,0 @@
1
- import { AbstractWitness } from '@xyo-network/abstract-witness';
2
- import { AnyConfigSchema } from '@xyo-network/module-model';
3
- import { Payload, Schema } from '@xyo-network/payload-model';
4
- import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
5
- import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
6
- export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
7
- export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
8
- static readonly configSchemas: Schema[];
9
- static readonly defaultConfigSchema: Schema;
10
- protected observeHandler(): Promise<Payload[]>;
11
- }
12
- //# sourceMappingURL=Witness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAA;AAIjE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC,eAAe,CAAC,mCAAmC,CAAC,CAAC,CAAA;AAC9H,qBAAa,6BAA8B,SAAQ,eAAe,CAAC,mCAAmC,CAAC;IACrG,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsE;IACtH,gBAAyB,mBAAmB,EAAE,MAAM,CAA4C;cAEvE,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAS9D"}
@@ -1,89 +0,0 @@
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 __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- EthereumGasBlocknativePlugin: () => EthereumGasBlocknativePlugin,
25
- EthereumGasBlocknativeWitness: () => EthereumGasBlocknativeWitness,
26
- EthereumGasBlocknativeWitnessConfigSchema: () => EthereumGasBlocknativeWitnessConfigSchema,
27
- default: () => EthereumGasBlocknativePlugin
28
- });
29
- module.exports = __toCommonJS(src_exports);
30
-
31
- // src/Plugin.ts
32
- var import_blocknative_ethereum_gas_payload_plugin2 = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
33
- var import_payload_model = require("@xyo-network/payload-model");
34
- var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
35
-
36
- // src/Witness.ts
37
- var import_abstract_witness = require("@xyo-network/abstract-witness");
38
- var import_blocknative_ethereum_gas_payload_plugin = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
39
- var import_payload_builder = require("@xyo-network/payload-builder");
40
-
41
- // src/lib/getGasFromBlocknative.ts
42
- var import_axios = require("@xylabs/axios");
43
- var url = "https://api.blocknative.com/gasprices/blockprices";
44
- var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
45
- var config = {
46
- headers: {
47
- Authorization
48
- }
49
- };
50
- var getGasFromBlocknative = /* @__PURE__ */ __name(async () => {
51
- return (await import_axios.axios.get(url, config)).data;
52
- }, "getGasFromBlocknative");
53
-
54
- // src/Schema.ts
55
- var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
56
-
57
- // src/Witness.ts
58
- var EthereumGasBlocknativeWitness = class extends import_abstract_witness.AbstractWitness {
59
- static {
60
- __name(this, "EthereumGasBlocknativeWitness");
61
- }
62
- static configSchemas = [
63
- ...super.configSchemas,
64
- EthereumGasBlocknativeWitnessConfigSchema
65
- ];
66
- static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
67
- async observeHandler() {
68
- const fields = await getGasFromBlocknative();
69
- const payload = await new import_payload_builder.PayloadBuilder({
70
- schema: import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema
71
- }).fields(fields).build();
72
- return [
73
- payload
74
- ];
75
- }
76
- };
77
-
78
- // src/Plugin.ts
79
- var EthereumGasBlocknativePlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
80
- required: {
81
- [import_blocknative_ethereum_gas_payload_plugin2.EthereumGasBlocknativeSchema]: 1
82
- },
83
- schema: import_payload_model.PayloadSetSchema
84
- }, {
85
- witness: /* @__PURE__ */ __name(async (params) => {
86
- return await EthereumGasBlocknativeWitness.create(params);
87
- }, "witness")
88
- }), "EthereumGasBlocknativePlugin");
89
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
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,gCAAN,cAA4CC,wCAAAA;EAZnD,OAYmDA;;;EACjD,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,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;;;ADnBO,IAAMK,+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","configSchemas","EthereumGasBlocknativeWitnessConfigSchema","defaultConfigSchema","observeHandler","fields","getGasFromBlocknative","payload","PayloadBuilder","schema","EthereumGasBlocknativeSchema","build","EthereumGasBlocknativePlugin","createPayloadSetWitnessPlugin","required","EthereumGasBlocknativeSchema","schema","PayloadSetSchema","witness","params","EthereumGasBlocknativeWitness","create"]}
@@ -1,5 +0,0 @@
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
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAE3B,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AACnG,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -1,5 +0,0 @@
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
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAE3B,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AACnG,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -1,5 +0,0 @@
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
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAE3B,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AACnG,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -1,68 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/Plugin.ts
5
- import { EthereumGasBlocknativeSchema as EthereumGasBlocknativeSchema2 } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
6
- import { PayloadSetSchema } from "@xyo-network/payload-model";
7
- import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
8
-
9
- // src/Witness.ts
10
- import { AbstractWitness } from "@xyo-network/abstract-witness";
11
- import { EthereumGasBlocknativeSchema } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
12
- import { PayloadBuilder } from "@xyo-network/payload-builder";
13
-
14
- // src/lib/getGasFromBlocknative.ts
15
- import { axios } from "@xylabs/axios";
16
- var url = "https://api.blocknative.com/gasprices/blockprices";
17
- var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
18
- var config = {
19
- headers: {
20
- Authorization
21
- }
22
- };
23
- var getGasFromBlocknative = /* @__PURE__ */ __name(async () => {
24
- return (await axios.get(url, config)).data;
25
- }, "getGasFromBlocknative");
26
-
27
- // src/Schema.ts
28
- var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
29
-
30
- // src/Witness.ts
31
- var EthereumGasBlocknativeWitness = class extends AbstractWitness {
32
- static {
33
- __name(this, "EthereumGasBlocknativeWitness");
34
- }
35
- static configSchemas = [
36
- ...super.configSchemas,
37
- EthereumGasBlocknativeWitnessConfigSchema
38
- ];
39
- static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
40
- async observeHandler() {
41
- const fields = await getGasFromBlocknative();
42
- const payload = await new PayloadBuilder({
43
- schema: EthereumGasBlocknativeSchema
44
- }).fields(fields).build();
45
- return [
46
- payload
47
- ];
48
- }
49
- };
50
-
51
- // src/Plugin.ts
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");
62
- export {
63
- EthereumGasBlocknativePlugin,
64
- EthereumGasBlocknativeWitness,
65
- EthereumGasBlocknativeWitnessConfigSchema,
66
- EthereumGasBlocknativePlugin as default
67
- };
68
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- import { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
2
- export declare const getGasFromBlocknative: () => Promise<EthereumGasBlocknativeResponse>;
3
- //# sourceMappingURL=getGasFromBlocknative.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getGasFromBlocknative.d.ts","sourceRoot":"","sources":["../../../src/lib/getGasFromBlocknative.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAA;AAOrG,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,8BAA8B,CAEpF,CAAA"}
@@ -1,3 +0,0 @@
1
- import { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
2
- export declare const getGasFromBlocknative: () => Promise<EthereumGasBlocknativeResponse>;
3
- //# sourceMappingURL=getGasFromBlocknative.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getGasFromBlocknative.d.ts","sourceRoot":"","sources":["../../../src/lib/getGasFromBlocknative.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAA;AAOrG,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,8BAA8B,CAEpF,CAAA"}
@@ -1,3 +0,0 @@
1
- import { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
2
- export declare const getGasFromBlocknative: () => Promise<EthereumGasBlocknativeResponse>;
3
- //# sourceMappingURL=getGasFromBlocknative.d.ts.map