@xyo-network/gas-price-plugin 2.99.6 → 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 (463) hide show
  1. package/dist/neutral/index.d.ts +45 -4
  2. package/package.json +25 -44
  3. package/src/index.ts +1 -1
  4. package/xy.config.ts +4 -5
  5. package/dist/browser/Diviner.d.cts +0 -16
  6. package/dist/browser/Diviner.d.cts.map +0 -1
  7. package/dist/browser/Diviner.d.mts +0 -16
  8. package/dist/browser/Diviner.d.mts.map +0 -1
  9. package/dist/browser/Diviner.d.ts +0 -16
  10. package/dist/browser/Diviner.d.ts.map +0 -1
  11. package/dist/browser/Plugin.d.cts +0 -19
  12. package/dist/browser/Plugin.d.cts.map +0 -1
  13. package/dist/browser/Plugin.d.mts +0 -19
  14. package/dist/browser/Plugin.d.mts.map +0 -1
  15. package/dist/browser/Plugin.d.ts +0 -19
  16. package/dist/browser/Plugin.d.ts.map +0 -1
  17. package/dist/browser/Schema.d.cts +0 -5
  18. package/dist/browser/Schema.d.cts.map +0 -1
  19. package/dist/browser/Schema.d.mts +0 -5
  20. package/dist/browser/Schema.d.mts.map +0 -1
  21. package/dist/browser/Schema.d.ts +0 -5
  22. package/dist/browser/Schema.d.ts.map +0 -1
  23. package/dist/browser/index.cjs +0 -278
  24. package/dist/browser/index.cjs.map +0 -1
  25. package/dist/browser/index.d.cts +0 -4
  26. package/dist/browser/index.d.cts.map +0 -1
  27. package/dist/browser/index.d.mts +0 -4
  28. package/dist/browser/index.d.mts.map +0 -1
  29. package/dist/browser/index.d.ts +0 -4
  30. package/dist/browser/index.d.ts.map +0 -1
  31. package/dist/browser/index.mjs +0 -255
  32. package/dist/browser/index.mjs.map +0 -1
  33. package/dist/browser/lib/average.d.cts +0 -3
  34. package/dist/browser/lib/average.d.cts.map +0 -1
  35. package/dist/browser/lib/average.d.mts +0 -3
  36. package/dist/browser/lib/average.d.mts.map +0 -1
  37. package/dist/browser/lib/average.d.ts +0 -3
  38. package/dist/browser/lib/average.d.ts.map +0 -1
  39. package/dist/browser/lib/divineGas.d.cts +0 -4
  40. package/dist/browser/lib/divineGas.d.cts.map +0 -1
  41. package/dist/browser/lib/divineGas.d.mts +0 -4
  42. package/dist/browser/lib/divineGas.d.mts.map +0 -1
  43. package/dist/browser/lib/divineGas.d.ts +0 -4
  44. package/dist/browser/lib/divineGas.d.ts.map +0 -1
  45. package/dist/browser/lib/identities/index.d.cts +0 -6
  46. package/dist/browser/lib/identities/index.d.cts.map +0 -1
  47. package/dist/browser/lib/identities/index.d.mts +0 -6
  48. package/dist/browser/lib/identities/index.d.mts.map +0 -1
  49. package/dist/browser/lib/identities/index.d.ts +0 -6
  50. package/dist/browser/lib/identities/index.d.ts.map +0 -1
  51. package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.d.cts +0 -4
  52. package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.d.cts.map +0 -1
  53. package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.d.mts +0 -4
  54. package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.d.mts.map +0 -1
  55. package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.d.ts +0 -4
  56. package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.d.ts.map +0 -1
  57. package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.d.cts +0 -4
  58. package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.d.cts.map +0 -1
  59. package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.d.mts +0 -4
  60. package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.d.mts.map +0 -1
  61. package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.d.ts +0 -4
  62. package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.d.ts.map +0 -1
  63. package/dist/browser/lib/identities/isEthereumGasEthersPayload.d.cts +0 -4
  64. package/dist/browser/lib/identities/isEthereumGasEthersPayload.d.cts.map +0 -1
  65. package/dist/browser/lib/identities/isEthereumGasEthersPayload.d.mts +0 -4
  66. package/dist/browser/lib/identities/isEthereumGasEthersPayload.d.mts.map +0 -1
  67. package/dist/browser/lib/identities/isEthereumGasEthersPayload.d.ts +0 -4
  68. package/dist/browser/lib/identities/isEthereumGasEthersPayload.d.ts.map +0 -1
  69. package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.d.cts +0 -4
  70. package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.d.cts.map +0 -1
  71. package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.d.mts +0 -4
  72. package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.d.mts.map +0 -1
  73. package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.d.ts +0 -4
  74. package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.d.ts.map +0 -1
  75. package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.d.cts +0 -4
  76. package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.d.cts.map +0 -1
  77. package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.d.mts +0 -4
  78. package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.d.mts.map +0 -1
  79. package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.d.ts +0 -4
  80. package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.d.ts.map +0 -1
  81. package/dist/browser/lib/index.d.cts +0 -2
  82. package/dist/browser/lib/index.d.cts.map +0 -1
  83. package/dist/browser/lib/index.d.mts +0 -2
  84. package/dist/browser/lib/index.d.mts.map +0 -1
  85. package/dist/browser/lib/index.d.ts +0 -2
  86. package/dist/browser/lib/index.d.ts.map +0 -1
  87. package/dist/browser/lib/transforms/index.d.cts +0 -6
  88. package/dist/browser/lib/transforms/index.d.cts.map +0 -1
  89. package/dist/browser/lib/transforms/index.d.mts +0 -6
  90. package/dist/browser/lib/transforms/index.d.mts.map +0 -1
  91. package/dist/browser/lib/transforms/index.d.ts +0 -6
  92. package/dist/browser/lib/transforms/index.d.ts.map +0 -1
  93. package/dist/browser/lib/transforms/transformGasFromBlocknative.d.cts +0 -4
  94. package/dist/browser/lib/transforms/transformGasFromBlocknative.d.cts.map +0 -1
  95. package/dist/browser/lib/transforms/transformGasFromBlocknative.d.mts +0 -4
  96. package/dist/browser/lib/transforms/transformGasFromBlocknative.d.mts.map +0 -1
  97. package/dist/browser/lib/transforms/transformGasFromBlocknative.d.ts +0 -4
  98. package/dist/browser/lib/transforms/transformGasFromBlocknative.d.ts.map +0 -1
  99. package/dist/browser/lib/transforms/transformGasFromEtherchainV2.d.cts +0 -4
  100. package/dist/browser/lib/transforms/transformGasFromEtherchainV2.d.cts.map +0 -1
  101. package/dist/browser/lib/transforms/transformGasFromEtherchainV2.d.mts +0 -4
  102. package/dist/browser/lib/transforms/transformGasFromEtherchainV2.d.mts.map +0 -1
  103. package/dist/browser/lib/transforms/transformGasFromEtherchainV2.d.ts +0 -4
  104. package/dist/browser/lib/transforms/transformGasFromEtherchainV2.d.ts.map +0 -1
  105. package/dist/browser/lib/transforms/transformGasFromEthers.d.cts +0 -4
  106. package/dist/browser/lib/transforms/transformGasFromEthers.d.cts.map +0 -1
  107. package/dist/browser/lib/transforms/transformGasFromEthers.d.mts +0 -4
  108. package/dist/browser/lib/transforms/transformGasFromEthers.d.mts.map +0 -1
  109. package/dist/browser/lib/transforms/transformGasFromEthers.d.ts +0 -4
  110. package/dist/browser/lib/transforms/transformGasFromEthers.d.ts.map +0 -1
  111. package/dist/browser/lib/transforms/transformGasFromEtherscan.d.cts +0 -4
  112. package/dist/browser/lib/transforms/transformGasFromEtherscan.d.cts.map +0 -1
  113. package/dist/browser/lib/transforms/transformGasFromEtherscan.d.mts +0 -4
  114. package/dist/browser/lib/transforms/transformGasFromEtherscan.d.mts.map +0 -1
  115. package/dist/browser/lib/transforms/transformGasFromEtherscan.d.ts +0 -4
  116. package/dist/browser/lib/transforms/transformGasFromEtherscan.d.ts.map +0 -1
  117. package/dist/browser/lib/transforms/transformGasFromEthgasstation.d.cts +0 -4
  118. package/dist/browser/lib/transforms/transformGasFromEthgasstation.d.cts.map +0 -1
  119. package/dist/browser/lib/transforms/transformGasFromEthgasstation.d.mts +0 -4
  120. package/dist/browser/lib/transforms/transformGasFromEthgasstation.d.mts.map +0 -1
  121. package/dist/browser/lib/transforms/transformGasFromEthgasstation.d.ts +0 -4
  122. package/dist/browser/lib/transforms/transformGasFromEthgasstation.d.ts.map +0 -1
  123. package/dist/browser/test/index.d.cts +0 -6
  124. package/dist/browser/test/index.d.cts.map +0 -1
  125. package/dist/browser/test/index.d.mts +0 -6
  126. package/dist/browser/test/index.d.mts.map +0 -1
  127. package/dist/browser/test/index.d.ts +0 -6
  128. package/dist/browser/test/index.d.ts.map +0 -1
  129. package/dist/browser/test/sampleBlocknativeGas.d.cts +0 -3
  130. package/dist/browser/test/sampleBlocknativeGas.d.cts.map +0 -1
  131. package/dist/browser/test/sampleBlocknativeGas.d.mts +0 -3
  132. package/dist/browser/test/sampleBlocknativeGas.d.mts.map +0 -1
  133. package/dist/browser/test/sampleBlocknativeGas.d.ts +0 -3
  134. package/dist/browser/test/sampleBlocknativeGas.d.ts.map +0 -1
  135. package/dist/browser/test/sampleEtherchainGasV2.d.cts +0 -3
  136. package/dist/browser/test/sampleEtherchainGasV2.d.cts.map +0 -1
  137. package/dist/browser/test/sampleEtherchainGasV2.d.mts +0 -3
  138. package/dist/browser/test/sampleEtherchainGasV2.d.mts.map +0 -1
  139. package/dist/browser/test/sampleEtherchainGasV2.d.ts +0 -3
  140. package/dist/browser/test/sampleEtherchainGasV2.d.ts.map +0 -1
  141. package/dist/browser/test/sampleEthersGas.d.cts +0 -3
  142. package/dist/browser/test/sampleEthersGas.d.cts.map +0 -1
  143. package/dist/browser/test/sampleEthersGas.d.mts +0 -3
  144. package/dist/browser/test/sampleEthersGas.d.mts.map +0 -1
  145. package/dist/browser/test/sampleEthersGas.d.ts +0 -3
  146. package/dist/browser/test/sampleEthersGas.d.ts.map +0 -1
  147. package/dist/browser/test/sampleEtherscanGas.d.cts +0 -3
  148. package/dist/browser/test/sampleEtherscanGas.d.cts.map +0 -1
  149. package/dist/browser/test/sampleEtherscanGas.d.mts +0 -3
  150. package/dist/browser/test/sampleEtherscanGas.d.mts.map +0 -1
  151. package/dist/browser/test/sampleEtherscanGas.d.ts +0 -3
  152. package/dist/browser/test/sampleEtherscanGas.d.ts.map +0 -1
  153. package/dist/browser/test/sampleEthgasstationGas.d.cts +0 -3
  154. package/dist/browser/test/sampleEthgasstationGas.d.cts.map +0 -1
  155. package/dist/browser/test/sampleEthgasstationGas.d.mts +0 -3
  156. package/dist/browser/test/sampleEthgasstationGas.d.mts.map +0 -1
  157. package/dist/browser/test/sampleEthgasstationGas.d.ts +0 -3
  158. package/dist/browser/test/sampleEthgasstationGas.d.ts.map +0 -1
  159. package/dist/neutral/Diviner.d.cts +0 -16
  160. package/dist/neutral/Diviner.d.cts.map +0 -1
  161. package/dist/neutral/Diviner.d.mts +0 -16
  162. package/dist/neutral/Diviner.d.mts.map +0 -1
  163. package/dist/neutral/Diviner.d.ts +0 -16
  164. package/dist/neutral/Diviner.d.ts.map +0 -1
  165. package/dist/neutral/Plugin.d.cts +0 -19
  166. package/dist/neutral/Plugin.d.cts.map +0 -1
  167. package/dist/neutral/Plugin.d.mts +0 -19
  168. package/dist/neutral/Plugin.d.mts.map +0 -1
  169. package/dist/neutral/Plugin.d.ts +0 -19
  170. package/dist/neutral/Plugin.d.ts.map +0 -1
  171. package/dist/neutral/Schema.d.cts +0 -5
  172. package/dist/neutral/Schema.d.cts.map +0 -1
  173. package/dist/neutral/Schema.d.mts +0 -5
  174. package/dist/neutral/Schema.d.mts.map +0 -1
  175. package/dist/neutral/Schema.d.ts +0 -5
  176. package/dist/neutral/Schema.d.ts.map +0 -1
  177. package/dist/neutral/index.cjs +0 -278
  178. package/dist/neutral/index.cjs.map +0 -1
  179. package/dist/neutral/index.d.cts +0 -4
  180. package/dist/neutral/index.d.cts.map +0 -1
  181. package/dist/neutral/index.d.mts +0 -4
  182. package/dist/neutral/index.d.mts.map +0 -1
  183. package/dist/neutral/index.d.ts.map +0 -1
  184. package/dist/neutral/lib/average.d.cts +0 -3
  185. package/dist/neutral/lib/average.d.cts.map +0 -1
  186. package/dist/neutral/lib/average.d.mts +0 -3
  187. package/dist/neutral/lib/average.d.mts.map +0 -1
  188. package/dist/neutral/lib/average.d.ts +0 -3
  189. package/dist/neutral/lib/average.d.ts.map +0 -1
  190. package/dist/neutral/lib/divineGas.d.cts +0 -4
  191. package/dist/neutral/lib/divineGas.d.cts.map +0 -1
  192. package/dist/neutral/lib/divineGas.d.mts +0 -4
  193. package/dist/neutral/lib/divineGas.d.mts.map +0 -1
  194. package/dist/neutral/lib/divineGas.d.ts +0 -4
  195. package/dist/neutral/lib/divineGas.d.ts.map +0 -1
  196. package/dist/neutral/lib/identities/index.d.cts +0 -6
  197. package/dist/neutral/lib/identities/index.d.cts.map +0 -1
  198. package/dist/neutral/lib/identities/index.d.mts +0 -6
  199. package/dist/neutral/lib/identities/index.d.mts.map +0 -1
  200. package/dist/neutral/lib/identities/index.d.ts +0 -6
  201. package/dist/neutral/lib/identities/index.d.ts.map +0 -1
  202. package/dist/neutral/lib/identities/isEthereumGasBlocknativePayload.d.cts +0 -4
  203. package/dist/neutral/lib/identities/isEthereumGasBlocknativePayload.d.cts.map +0 -1
  204. package/dist/neutral/lib/identities/isEthereumGasBlocknativePayload.d.mts +0 -4
  205. package/dist/neutral/lib/identities/isEthereumGasBlocknativePayload.d.mts.map +0 -1
  206. package/dist/neutral/lib/identities/isEthereumGasBlocknativePayload.d.ts +0 -4
  207. package/dist/neutral/lib/identities/isEthereumGasBlocknativePayload.d.ts.map +0 -1
  208. package/dist/neutral/lib/identities/isEthereumGasEtherchainV2Payload.d.cts +0 -4
  209. package/dist/neutral/lib/identities/isEthereumGasEtherchainV2Payload.d.cts.map +0 -1
  210. package/dist/neutral/lib/identities/isEthereumGasEtherchainV2Payload.d.mts +0 -4
  211. package/dist/neutral/lib/identities/isEthereumGasEtherchainV2Payload.d.mts.map +0 -1
  212. package/dist/neutral/lib/identities/isEthereumGasEtherchainV2Payload.d.ts +0 -4
  213. package/dist/neutral/lib/identities/isEthereumGasEtherchainV2Payload.d.ts.map +0 -1
  214. package/dist/neutral/lib/identities/isEthereumGasEthersPayload.d.cts +0 -4
  215. package/dist/neutral/lib/identities/isEthereumGasEthersPayload.d.cts.map +0 -1
  216. package/dist/neutral/lib/identities/isEthereumGasEthersPayload.d.mts +0 -4
  217. package/dist/neutral/lib/identities/isEthereumGasEthersPayload.d.mts.map +0 -1
  218. package/dist/neutral/lib/identities/isEthereumGasEthersPayload.d.ts +0 -4
  219. package/dist/neutral/lib/identities/isEthereumGasEthersPayload.d.ts.map +0 -1
  220. package/dist/neutral/lib/identities/isEthereumGasEtherscanPayload.d.cts +0 -4
  221. package/dist/neutral/lib/identities/isEthereumGasEtherscanPayload.d.cts.map +0 -1
  222. package/dist/neutral/lib/identities/isEthereumGasEtherscanPayload.d.mts +0 -4
  223. package/dist/neutral/lib/identities/isEthereumGasEtherscanPayload.d.mts.map +0 -1
  224. package/dist/neutral/lib/identities/isEthereumGasEtherscanPayload.d.ts +0 -4
  225. package/dist/neutral/lib/identities/isEthereumGasEtherscanPayload.d.ts.map +0 -1
  226. package/dist/neutral/lib/identities/isEthereumGasEthgasstationPayload.d.cts +0 -4
  227. package/dist/neutral/lib/identities/isEthereumGasEthgasstationPayload.d.cts.map +0 -1
  228. package/dist/neutral/lib/identities/isEthereumGasEthgasstationPayload.d.mts +0 -4
  229. package/dist/neutral/lib/identities/isEthereumGasEthgasstationPayload.d.mts.map +0 -1
  230. package/dist/neutral/lib/identities/isEthereumGasEthgasstationPayload.d.ts +0 -4
  231. package/dist/neutral/lib/identities/isEthereumGasEthgasstationPayload.d.ts.map +0 -1
  232. package/dist/neutral/lib/index.d.cts +0 -2
  233. package/dist/neutral/lib/index.d.cts.map +0 -1
  234. package/dist/neutral/lib/index.d.mts +0 -2
  235. package/dist/neutral/lib/index.d.mts.map +0 -1
  236. package/dist/neutral/lib/index.d.ts +0 -2
  237. package/dist/neutral/lib/index.d.ts.map +0 -1
  238. package/dist/neutral/lib/transforms/index.d.cts +0 -6
  239. package/dist/neutral/lib/transforms/index.d.cts.map +0 -1
  240. package/dist/neutral/lib/transforms/index.d.mts +0 -6
  241. package/dist/neutral/lib/transforms/index.d.mts.map +0 -1
  242. package/dist/neutral/lib/transforms/index.d.ts +0 -6
  243. package/dist/neutral/lib/transforms/index.d.ts.map +0 -1
  244. package/dist/neutral/lib/transforms/transformGasFromBlocknative.d.cts +0 -4
  245. package/dist/neutral/lib/transforms/transformGasFromBlocknative.d.cts.map +0 -1
  246. package/dist/neutral/lib/transforms/transformGasFromBlocknative.d.mts +0 -4
  247. package/dist/neutral/lib/transforms/transformGasFromBlocknative.d.mts.map +0 -1
  248. package/dist/neutral/lib/transforms/transformGasFromBlocknative.d.ts +0 -4
  249. package/dist/neutral/lib/transforms/transformGasFromBlocknative.d.ts.map +0 -1
  250. package/dist/neutral/lib/transforms/transformGasFromEtherchainV2.d.cts +0 -4
  251. package/dist/neutral/lib/transforms/transformGasFromEtherchainV2.d.cts.map +0 -1
  252. package/dist/neutral/lib/transforms/transformGasFromEtherchainV2.d.mts +0 -4
  253. package/dist/neutral/lib/transforms/transformGasFromEtherchainV2.d.mts.map +0 -1
  254. package/dist/neutral/lib/transforms/transformGasFromEtherchainV2.d.ts +0 -4
  255. package/dist/neutral/lib/transforms/transformGasFromEtherchainV2.d.ts.map +0 -1
  256. package/dist/neutral/lib/transforms/transformGasFromEthers.d.cts +0 -4
  257. package/dist/neutral/lib/transforms/transformGasFromEthers.d.cts.map +0 -1
  258. package/dist/neutral/lib/transforms/transformGasFromEthers.d.mts +0 -4
  259. package/dist/neutral/lib/transforms/transformGasFromEthers.d.mts.map +0 -1
  260. package/dist/neutral/lib/transforms/transformGasFromEthers.d.ts +0 -4
  261. package/dist/neutral/lib/transforms/transformGasFromEthers.d.ts.map +0 -1
  262. package/dist/neutral/lib/transforms/transformGasFromEtherscan.d.cts +0 -4
  263. package/dist/neutral/lib/transforms/transformGasFromEtherscan.d.cts.map +0 -1
  264. package/dist/neutral/lib/transforms/transformGasFromEtherscan.d.mts +0 -4
  265. package/dist/neutral/lib/transforms/transformGasFromEtherscan.d.mts.map +0 -1
  266. package/dist/neutral/lib/transforms/transformGasFromEtherscan.d.ts +0 -4
  267. package/dist/neutral/lib/transforms/transformGasFromEtherscan.d.ts.map +0 -1
  268. package/dist/neutral/lib/transforms/transformGasFromEthgasstation.d.cts +0 -4
  269. package/dist/neutral/lib/transforms/transformGasFromEthgasstation.d.cts.map +0 -1
  270. package/dist/neutral/lib/transforms/transformGasFromEthgasstation.d.mts +0 -4
  271. package/dist/neutral/lib/transforms/transformGasFromEthgasstation.d.mts.map +0 -1
  272. package/dist/neutral/lib/transforms/transformGasFromEthgasstation.d.ts +0 -4
  273. package/dist/neutral/lib/transforms/transformGasFromEthgasstation.d.ts.map +0 -1
  274. package/dist/neutral/test/index.d.cts +0 -6
  275. package/dist/neutral/test/index.d.cts.map +0 -1
  276. package/dist/neutral/test/index.d.mts +0 -6
  277. package/dist/neutral/test/index.d.mts.map +0 -1
  278. package/dist/neutral/test/index.d.ts +0 -6
  279. package/dist/neutral/test/index.d.ts.map +0 -1
  280. package/dist/neutral/test/sampleBlocknativeGas.d.cts +0 -3
  281. package/dist/neutral/test/sampleBlocknativeGas.d.cts.map +0 -1
  282. package/dist/neutral/test/sampleBlocknativeGas.d.mts +0 -3
  283. package/dist/neutral/test/sampleBlocknativeGas.d.mts.map +0 -1
  284. package/dist/neutral/test/sampleBlocknativeGas.d.ts +0 -3
  285. package/dist/neutral/test/sampleBlocknativeGas.d.ts.map +0 -1
  286. package/dist/neutral/test/sampleEtherchainGasV2.d.cts +0 -3
  287. package/dist/neutral/test/sampleEtherchainGasV2.d.cts.map +0 -1
  288. package/dist/neutral/test/sampleEtherchainGasV2.d.mts +0 -3
  289. package/dist/neutral/test/sampleEtherchainGasV2.d.mts.map +0 -1
  290. package/dist/neutral/test/sampleEtherchainGasV2.d.ts +0 -3
  291. package/dist/neutral/test/sampleEtherchainGasV2.d.ts.map +0 -1
  292. package/dist/neutral/test/sampleEthersGas.d.cts +0 -3
  293. package/dist/neutral/test/sampleEthersGas.d.cts.map +0 -1
  294. package/dist/neutral/test/sampleEthersGas.d.mts +0 -3
  295. package/dist/neutral/test/sampleEthersGas.d.mts.map +0 -1
  296. package/dist/neutral/test/sampleEthersGas.d.ts +0 -3
  297. package/dist/neutral/test/sampleEthersGas.d.ts.map +0 -1
  298. package/dist/neutral/test/sampleEtherscanGas.d.cts +0 -3
  299. package/dist/neutral/test/sampleEtherscanGas.d.cts.map +0 -1
  300. package/dist/neutral/test/sampleEtherscanGas.d.mts +0 -3
  301. package/dist/neutral/test/sampleEtherscanGas.d.mts.map +0 -1
  302. package/dist/neutral/test/sampleEtherscanGas.d.ts +0 -3
  303. package/dist/neutral/test/sampleEtherscanGas.d.ts.map +0 -1
  304. package/dist/neutral/test/sampleEthgasstationGas.d.cts +0 -3
  305. package/dist/neutral/test/sampleEthgasstationGas.d.cts.map +0 -1
  306. package/dist/neutral/test/sampleEthgasstationGas.d.mts +0 -3
  307. package/dist/neutral/test/sampleEthgasstationGas.d.mts.map +0 -1
  308. package/dist/neutral/test/sampleEthgasstationGas.d.ts +0 -3
  309. package/dist/neutral/test/sampleEthgasstationGas.d.ts.map +0 -1
  310. package/dist/node/Diviner.d.cts +0 -16
  311. package/dist/node/Diviner.d.cts.map +0 -1
  312. package/dist/node/Diviner.d.mts +0 -16
  313. package/dist/node/Diviner.d.mts.map +0 -1
  314. package/dist/node/Diviner.d.ts +0 -16
  315. package/dist/node/Diviner.d.ts.map +0 -1
  316. package/dist/node/Plugin.d.cts +0 -19
  317. package/dist/node/Plugin.d.cts.map +0 -1
  318. package/dist/node/Plugin.d.mts +0 -19
  319. package/dist/node/Plugin.d.mts.map +0 -1
  320. package/dist/node/Plugin.d.ts +0 -19
  321. package/dist/node/Plugin.d.ts.map +0 -1
  322. package/dist/node/Schema.d.cts +0 -5
  323. package/dist/node/Schema.d.cts.map +0 -1
  324. package/dist/node/Schema.d.mts +0 -5
  325. package/dist/node/Schema.d.mts.map +0 -1
  326. package/dist/node/Schema.d.ts +0 -5
  327. package/dist/node/Schema.d.ts.map +0 -1
  328. package/dist/node/index.cjs +0 -288
  329. package/dist/node/index.cjs.map +0 -1
  330. package/dist/node/index.d.cts +0 -4
  331. package/dist/node/index.d.cts.map +0 -1
  332. package/dist/node/index.d.mts +0 -4
  333. package/dist/node/index.d.mts.map +0 -1
  334. package/dist/node/index.d.ts +0 -4
  335. package/dist/node/index.d.ts.map +0 -1
  336. package/dist/node/index.mjs +0 -258
  337. package/dist/node/index.mjs.map +0 -1
  338. package/dist/node/lib/average.d.cts +0 -3
  339. package/dist/node/lib/average.d.cts.map +0 -1
  340. package/dist/node/lib/average.d.mts +0 -3
  341. package/dist/node/lib/average.d.mts.map +0 -1
  342. package/dist/node/lib/average.d.ts +0 -3
  343. package/dist/node/lib/average.d.ts.map +0 -1
  344. package/dist/node/lib/divineGas.d.cts +0 -4
  345. package/dist/node/lib/divineGas.d.cts.map +0 -1
  346. package/dist/node/lib/divineGas.d.mts +0 -4
  347. package/dist/node/lib/divineGas.d.mts.map +0 -1
  348. package/dist/node/lib/divineGas.d.ts +0 -4
  349. package/dist/node/lib/divineGas.d.ts.map +0 -1
  350. package/dist/node/lib/identities/index.d.cts +0 -6
  351. package/dist/node/lib/identities/index.d.cts.map +0 -1
  352. package/dist/node/lib/identities/index.d.mts +0 -6
  353. package/dist/node/lib/identities/index.d.mts.map +0 -1
  354. package/dist/node/lib/identities/index.d.ts +0 -6
  355. package/dist/node/lib/identities/index.d.ts.map +0 -1
  356. package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.cts +0 -4
  357. package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.cts.map +0 -1
  358. package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.mts +0 -4
  359. package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.mts.map +0 -1
  360. package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.ts +0 -4
  361. package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.ts.map +0 -1
  362. package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.cts +0 -4
  363. package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.cts.map +0 -1
  364. package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.mts +0 -4
  365. package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.mts.map +0 -1
  366. package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.ts +0 -4
  367. package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.ts.map +0 -1
  368. package/dist/node/lib/identities/isEthereumGasEthersPayload.d.cts +0 -4
  369. package/dist/node/lib/identities/isEthereumGasEthersPayload.d.cts.map +0 -1
  370. package/dist/node/lib/identities/isEthereumGasEthersPayload.d.mts +0 -4
  371. package/dist/node/lib/identities/isEthereumGasEthersPayload.d.mts.map +0 -1
  372. package/dist/node/lib/identities/isEthereumGasEthersPayload.d.ts +0 -4
  373. package/dist/node/lib/identities/isEthereumGasEthersPayload.d.ts.map +0 -1
  374. package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.cts +0 -4
  375. package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.cts.map +0 -1
  376. package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.mts +0 -4
  377. package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.mts.map +0 -1
  378. package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.ts +0 -4
  379. package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.ts.map +0 -1
  380. package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.cts +0 -4
  381. package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.cts.map +0 -1
  382. package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.mts +0 -4
  383. package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.mts.map +0 -1
  384. package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.ts +0 -4
  385. package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.ts.map +0 -1
  386. package/dist/node/lib/index.d.cts +0 -2
  387. package/dist/node/lib/index.d.cts.map +0 -1
  388. package/dist/node/lib/index.d.mts +0 -2
  389. package/dist/node/lib/index.d.mts.map +0 -1
  390. package/dist/node/lib/index.d.ts +0 -2
  391. package/dist/node/lib/index.d.ts.map +0 -1
  392. package/dist/node/lib/transforms/index.d.cts +0 -6
  393. package/dist/node/lib/transforms/index.d.cts.map +0 -1
  394. package/dist/node/lib/transforms/index.d.mts +0 -6
  395. package/dist/node/lib/transforms/index.d.mts.map +0 -1
  396. package/dist/node/lib/transforms/index.d.ts +0 -6
  397. package/dist/node/lib/transforms/index.d.ts.map +0 -1
  398. package/dist/node/lib/transforms/transformGasFromBlocknative.d.cts +0 -4
  399. package/dist/node/lib/transforms/transformGasFromBlocknative.d.cts.map +0 -1
  400. package/dist/node/lib/transforms/transformGasFromBlocknative.d.mts +0 -4
  401. package/dist/node/lib/transforms/transformGasFromBlocknative.d.mts.map +0 -1
  402. package/dist/node/lib/transforms/transformGasFromBlocknative.d.ts +0 -4
  403. package/dist/node/lib/transforms/transformGasFromBlocknative.d.ts.map +0 -1
  404. package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.cts +0 -4
  405. package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.cts.map +0 -1
  406. package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.mts +0 -4
  407. package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.mts.map +0 -1
  408. package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.ts +0 -4
  409. package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.ts.map +0 -1
  410. package/dist/node/lib/transforms/transformGasFromEthers.d.cts +0 -4
  411. package/dist/node/lib/transforms/transformGasFromEthers.d.cts.map +0 -1
  412. package/dist/node/lib/transforms/transformGasFromEthers.d.mts +0 -4
  413. package/dist/node/lib/transforms/transformGasFromEthers.d.mts.map +0 -1
  414. package/dist/node/lib/transforms/transformGasFromEthers.d.ts +0 -4
  415. package/dist/node/lib/transforms/transformGasFromEthers.d.ts.map +0 -1
  416. package/dist/node/lib/transforms/transformGasFromEtherscan.d.cts +0 -4
  417. package/dist/node/lib/transforms/transformGasFromEtherscan.d.cts.map +0 -1
  418. package/dist/node/lib/transforms/transformGasFromEtherscan.d.mts +0 -4
  419. package/dist/node/lib/transforms/transformGasFromEtherscan.d.mts.map +0 -1
  420. package/dist/node/lib/transforms/transformGasFromEtherscan.d.ts +0 -4
  421. package/dist/node/lib/transforms/transformGasFromEtherscan.d.ts.map +0 -1
  422. package/dist/node/lib/transforms/transformGasFromEthgasstation.d.cts +0 -4
  423. package/dist/node/lib/transforms/transformGasFromEthgasstation.d.cts.map +0 -1
  424. package/dist/node/lib/transforms/transformGasFromEthgasstation.d.mts +0 -4
  425. package/dist/node/lib/transforms/transformGasFromEthgasstation.d.mts.map +0 -1
  426. package/dist/node/lib/transforms/transformGasFromEthgasstation.d.ts +0 -4
  427. package/dist/node/lib/transforms/transformGasFromEthgasstation.d.ts.map +0 -1
  428. package/dist/node/test/index.d.cts +0 -6
  429. package/dist/node/test/index.d.cts.map +0 -1
  430. package/dist/node/test/index.d.mts +0 -6
  431. package/dist/node/test/index.d.mts.map +0 -1
  432. package/dist/node/test/index.d.ts +0 -6
  433. package/dist/node/test/index.d.ts.map +0 -1
  434. package/dist/node/test/sampleBlocknativeGas.d.cts +0 -3
  435. package/dist/node/test/sampleBlocknativeGas.d.cts.map +0 -1
  436. package/dist/node/test/sampleBlocknativeGas.d.mts +0 -3
  437. package/dist/node/test/sampleBlocknativeGas.d.mts.map +0 -1
  438. package/dist/node/test/sampleBlocknativeGas.d.ts +0 -3
  439. package/dist/node/test/sampleBlocknativeGas.d.ts.map +0 -1
  440. package/dist/node/test/sampleEtherchainGasV2.d.cts +0 -3
  441. package/dist/node/test/sampleEtherchainGasV2.d.cts.map +0 -1
  442. package/dist/node/test/sampleEtherchainGasV2.d.mts +0 -3
  443. package/dist/node/test/sampleEtherchainGasV2.d.mts.map +0 -1
  444. package/dist/node/test/sampleEtherchainGasV2.d.ts +0 -3
  445. package/dist/node/test/sampleEtherchainGasV2.d.ts.map +0 -1
  446. package/dist/node/test/sampleEthersGas.d.cts +0 -3
  447. package/dist/node/test/sampleEthersGas.d.cts.map +0 -1
  448. package/dist/node/test/sampleEthersGas.d.mts +0 -3
  449. package/dist/node/test/sampleEthersGas.d.mts.map +0 -1
  450. package/dist/node/test/sampleEthersGas.d.ts +0 -3
  451. package/dist/node/test/sampleEthersGas.d.ts.map +0 -1
  452. package/dist/node/test/sampleEtherscanGas.d.cts +0 -3
  453. package/dist/node/test/sampleEtherscanGas.d.cts.map +0 -1
  454. package/dist/node/test/sampleEtherscanGas.d.mts +0 -3
  455. package/dist/node/test/sampleEtherscanGas.d.mts.map +0 -1
  456. package/dist/node/test/sampleEtherscanGas.d.ts +0 -3
  457. package/dist/node/test/sampleEtherscanGas.d.ts.map +0 -1
  458. package/dist/node/test/sampleEthgasstationGas.d.cts +0 -3
  459. package/dist/node/test/sampleEthgasstationGas.d.cts.map +0 -1
  460. package/dist/node/test/sampleEthgasstationGas.d.mts +0 -3
  461. package/dist/node/test/sampleEthgasstationGas.d.mts.map +0 -1
  462. package/dist/node/test/sampleEthgasstationGas.d.ts +0 -3
  463. package/dist/node/test/sampleEthgasstationGas.d.ts.map +0 -1
@@ -1,4 +1,45 @@
1
- export * from './Diviner.ts';
2
- export { EthereumGasPlugin as default, EthereumGasPlugin } from './Plugin.ts';
3
- export * from './Schema.ts';
4
- //# sourceMappingURL=index.d.ts.map
1
+ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
2
+ import { DivinerConfig, DivinerParams, DivinerModule } from '@xyo-network/diviner-model';
3
+ import * as _xyo_network_module_model from '@xyo-network/module-model';
4
+ import { AnyConfigSchema } from '@xyo-network/module-model';
5
+ import * as _xyo_network_payload_model from '@xyo-network/payload-model';
6
+ import { Schema, Payload } from '@xyo-network/payload-model';
7
+ import * as _xyo_network_payloadset_plugin from '@xyo-network/payloadset-plugin';
8
+ import * as _store__xyo_network_account_model_virtual_3afa553815_package from '.store/@xyo-network-account-model-virtual-3afa553815/package';
9
+ import * as _store__xylabs_object_npm_4_0_0_ffd6151301_package from '.store/@xylabs-object-npm-4.0.0-ffd6151301/package';
10
+
11
+ type EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query';
12
+ declare const EthereumGasDivinerQuerySchema: EthereumGasDivinerQuerySchema;
13
+ type EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config';
14
+ declare const EthereumGasDivinerConfigSchema: EthereumGasDivinerConfigSchema;
15
+
16
+ type EthereumGasDivinerConfig = DivinerConfig<{
17
+ schema: EthereumGasDivinerConfigSchema;
18
+ }>;
19
+ type EthereumGasDivinerParams = DivinerParams<AnyConfigSchema<EthereumGasDivinerConfig>>;
20
+ declare class EthereumGasDiviner<TParams extends EthereumGasDivinerParams = EthereumGasDivinerParams> extends AbstractDiviner<TParams> implements DivinerModule {
21
+ static readonly configSchemas: Schema[];
22
+ static readonly defaultConfigSchema: Schema;
23
+ static targetSchema: string;
24
+ protected divineHandler(payloads?: Payload[]): Promise<Payload[]>;
25
+ }
26
+
27
+ declare const EthereumGasPlugin: () => _xyo_network_payloadset_plugin.PayloadSetDivinerPlugin<EthereumGasDiviner<_store__xylabs_object_npm_4_0_0_ffd6151301_package.BaseParamsFields & {
28
+ account?: _store__xyo_network_account_model_virtual_3afa553815_package.AccountInstance | "random";
29
+ addToResolvers?: boolean;
30
+ additionalSigners?: _store__xyo_network_account_model_virtual_3afa553815_package.AccountInstance[];
31
+ allowNameResolution?: boolean;
32
+ config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
33
+ schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
34
+ } & {
35
+ schema: EthereumGasDivinerConfigSchema;
36
+ }, "schema"> & {
37
+ schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
38
+ }, "schema"> & {
39
+ schema: string;
40
+ };
41
+ ephemeralQueryAccountEnabled?: boolean;
42
+ moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
43
+ }>>;
44
+
45
+ export { EthereumGasDiviner, type EthereumGasDivinerConfig, EthereumGasDivinerConfigSchema, type EthereumGasDivinerParams, EthereumGasDivinerQuerySchema, EthereumGasPlugin, EthereumGasPlugin as default };
package/package.json CHANGED
@@ -10,61 +10,42 @@
10
10
  "url": "https://github.com/XYOracleNetwork/plugins/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/exists": "^3.6.12",
14
- "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.99.6",
15
- "@xyo-network/diviner-abstract": "^2.111.3",
16
- "@xyo-network/diviner-model": "^2.111.3",
17
- "@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.99.6",
18
- "@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.99.6",
19
- "@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.99.6",
20
- "@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.99.6",
21
- "@xyo-network/gas-price-payload-plugin": "^2.99.6",
22
- "@xyo-network/module-model": "^2.111.3",
23
- "@xyo-network/payload-builder": "^2.111.3",
24
- "@xyo-network/payload-model": "^2.111.3",
25
- "@xyo-network/payloadset-plugin": "^2.111.3",
13
+ "@xylabs/exists": "^4.0.0",
14
+ "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.0.0",
15
+ "@xyo-network/diviner-abstract": "^3.0.1",
16
+ "@xyo-network/diviner-model": "^3.0.1",
17
+ "@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^3.0.0",
18
+ "@xyo-network/ethers-ethereum-gas-payload-plugin": "^3.0.0",
19
+ "@xyo-network/etherscan-ethereum-gas-payload-plugin": "^3.0.0",
20
+ "@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^3.0.0",
21
+ "@xyo-network/gas-price-payload-plugin": "^3.0.0",
22
+ "@xyo-network/module-model": "^3.0.1",
23
+ "@xyo-network/payload-builder": "^3.0.1",
24
+ "@xyo-network/payload-model": "^3.0.1",
25
+ "@xyo-network/payloadset-plugin": "^3.0.1",
26
26
  "regression": "^2.0.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/regression": "^2.0.6",
30
- "@xylabs/ts-scripts-yarn3": "^3.15.14",
31
- "@xylabs/tsconfig": "^3.15.14",
32
- "@xyo-network/blocknative-ethereum-gas-plugin": "^2.99.6",
33
- "@xyo-network/etherchain-gas-ethereum-blockchain-plugins": "^2.99.6",
34
- "@xyo-network/ethers-ethereum-gas-plugin": "^2.99.6",
35
- "@xyo-network/etherscan-ethereum-gas-plugin": "^2.99.6",
36
- "@xyo-network/witness-blockchain-abstract": "^2.111.3",
30
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
31
+ "@xylabs/tsconfig": "^4.0.0-rc.15",
32
+ "@xyo-network/blocknative-ethereum-gas-plugin": "^3.0.0",
33
+ "@xyo-network/etherchain-gas-ethereum-blockchain-plugins": "^3.0.0",
34
+ "@xyo-network/ethers-ethereum-gas-plugin": "^3.0.0",
35
+ "@xyo-network/etherscan-ethereum-gas-plugin": "^3.0.0",
36
+ "@xyo-network/witness-blockchain-abstract": "^3.0.1",
37
37
  "typescript": "^5.5.4"
38
38
  },
39
39
  "description": "Typescript/Javascript Plugins for XYO Platform",
40
- "types": "dist/node/index.d.ts",
40
+ "types": "dist/neutral/index.d.ts",
41
41
  "exports": {
42
42
  ".": {
43
- "browser": {
44
- "require": {
45
- "types": "./dist/browser/index.d.cts",
46
- "default": "./dist/browser/index.cjs"
47
- },
48
- "import": {
49
- "types": "./dist/browser/index.d.mts",
50
- "default": "./dist/browser/index.mjs"
51
- }
52
- },
53
- "node": {
54
- "require": {
55
- "types": "./dist/node/index.d.cts",
56
- "default": "./dist/node/index.cjs"
57
- },
58
- "import": {
59
- "types": "./dist/node/index.d.mts",
60
- "default": "./dist/node/index.mjs"
61
- }
62
- }
43
+ "types": "./dist/neutral/index.d.ts",
44
+ "default": "./dist/neutral/index.mjs"
63
45
  },
64
46
  "./package.json": "./package.json"
65
47
  },
66
- "main": "dist/node/index.cjs",
67
- "module": "dist/node/index.mjs",
48
+ "module": "dist/neutral/index.mjs",
68
49
  "homepage": "https://xyo.network",
69
50
  "license": "LGPL-3.0-only",
70
51
  "publishConfig": {
@@ -75,6 +56,6 @@
75
56
  "url": "https://github.com/XYOracleNetwork/plugins.git"
76
57
  },
77
58
  "sideEffects": false,
78
- "version": "2.99.6",
59
+ "version": "3.0.0",
79
60
  "type": "module"
80
61
  }
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './Diviner.ts'
2
- // eslint-disable-next-line import/no-default-export
2
+ // eslint-disable-next-line import-x/no-default-export
3
3
  export { EthereumGasPlugin as default, EthereumGasPlugin } from './Plugin.ts'
4
4
  export * from './Schema.ts'
package/xy.config.ts CHANGED
@@ -1,14 +1,13 @@
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
+ node: {},
6
+ neutral: {
8
7
  src: true,
9
8
  },
10
9
  },
11
10
  }
12
11
 
13
- // eslint-disable-next-line import/no-default-export
12
+ // eslint-disable-next-line import-x/no-default-export
14
13
  export default config
@@ -1,16 +0,0 @@
1
- import { AbstractDiviner } from '@xyo-network/diviner-abstract';
2
- import { DivinerConfig, DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
3
- import { AnyConfigSchema } from '@xyo-network/module-model';
4
- import { Payload, Schema } from '@xyo-network/payload-model';
5
- import { EthereumGasDivinerConfigSchema } from './Schema.ts';
6
- export type EthereumGasDivinerConfig = DivinerConfig<{
7
- schema: EthereumGasDivinerConfigSchema;
8
- }>;
9
- export type EthereumGasDivinerParams = DivinerParams<AnyConfigSchema<EthereumGasDivinerConfig>>;
10
- export declare class EthereumGasDiviner<TParams extends EthereumGasDivinerParams = EthereumGasDivinerParams> extends AbstractDiviner<TParams> implements DivinerModule {
11
- static readonly configSchemas: Schema[];
12
- static readonly defaultConfigSchema: Schema;
13
- static targetSchema: string;
14
- protected divineHandler(payloads?: Payload[]): Promise<Payload[]>;
15
- }
16
- //# sourceMappingURL=Diviner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAG5D,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAE5D,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC;IAAE,MAAM,EAAE,8BAA8B,CAAA;CAAE,CAAC,CAAA;AAChG,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,eAAe,CAAC,wBAAwB,CAAC,CAAC,CAAA;AAE/F,qBAAa,kBAAkB,CAAC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,CACjG,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA2D;IAC3G,gBAAyB,mBAAmB,EAAE,MAAM,CAAiC;IACrF,OAAgB,YAAY,EAAE,MAAM,CAAoB;cAE/B,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAIjF"}
@@ -1,16 +0,0 @@
1
- import { AbstractDiviner } from '@xyo-network/diviner-abstract';
2
- import { DivinerConfig, DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
3
- import { AnyConfigSchema } from '@xyo-network/module-model';
4
- import { Payload, Schema } from '@xyo-network/payload-model';
5
- import { EthereumGasDivinerConfigSchema } from './Schema.ts';
6
- export type EthereumGasDivinerConfig = DivinerConfig<{
7
- schema: EthereumGasDivinerConfigSchema;
8
- }>;
9
- export type EthereumGasDivinerParams = DivinerParams<AnyConfigSchema<EthereumGasDivinerConfig>>;
10
- export declare class EthereumGasDiviner<TParams extends EthereumGasDivinerParams = EthereumGasDivinerParams> extends AbstractDiviner<TParams> implements DivinerModule {
11
- static readonly configSchemas: Schema[];
12
- static readonly defaultConfigSchema: Schema;
13
- static targetSchema: string;
14
- protected divineHandler(payloads?: Payload[]): Promise<Payload[]>;
15
- }
16
- //# sourceMappingURL=Diviner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAG5D,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAE5D,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC;IAAE,MAAM,EAAE,8BAA8B,CAAA;CAAE,CAAC,CAAA;AAChG,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,eAAe,CAAC,wBAAwB,CAAC,CAAC,CAAA;AAE/F,qBAAa,kBAAkB,CAAC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,CACjG,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA2D;IAC3G,gBAAyB,mBAAmB,EAAE,MAAM,CAAiC;IACrF,OAAgB,YAAY,EAAE,MAAM,CAAoB;cAE/B,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAIjF"}
@@ -1,16 +0,0 @@
1
- import { AbstractDiviner } from '@xyo-network/diviner-abstract';
2
- import { DivinerConfig, DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
3
- import { AnyConfigSchema } from '@xyo-network/module-model';
4
- import { Payload, Schema } from '@xyo-network/payload-model';
5
- import { EthereumGasDivinerConfigSchema } from './Schema.ts';
6
- export type EthereumGasDivinerConfig = DivinerConfig<{
7
- schema: EthereumGasDivinerConfigSchema;
8
- }>;
9
- export type EthereumGasDivinerParams = DivinerParams<AnyConfigSchema<EthereumGasDivinerConfig>>;
10
- export declare class EthereumGasDiviner<TParams extends EthereumGasDivinerParams = EthereumGasDivinerParams> extends AbstractDiviner<TParams> implements DivinerModule {
11
- static readonly configSchemas: Schema[];
12
- static readonly defaultConfigSchema: Schema;
13
- static targetSchema: string;
14
- protected divineHandler(payloads?: Payload[]): Promise<Payload[]>;
15
- }
16
- //# sourceMappingURL=Diviner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAG5D,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAE5D,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC;IAAE,MAAM,EAAE,8BAA8B,CAAA;CAAE,CAAC,CAAA;AAChG,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,eAAe,CAAC,wBAAwB,CAAC,CAAC,CAAA;AAE/F,qBAAa,kBAAkB,CAAC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,CACjG,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA2D;IAC3G,gBAAyB,mBAAmB,EAAE,MAAM,CAAiC;IACrF,OAAgB,YAAY,EAAE,MAAM,CAAoB;cAE/B,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAIjF"}
@@ -1,19 +0,0 @@
1
- import { EthereumGasDiviner } from './Diviner.ts';
2
- export declare const EthereumGasPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<EthereumGasDiviner<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
- account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
- addToResolvers?: boolean;
5
- additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
- allowNameResolution?: boolean;
7
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
- schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
9
- } & {
10
- schema: import("./Schema.ts").EthereumGasDivinerConfigSchema;
11
- }, "schema"> & {
12
- schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
13
- }, "schema"> & {
14
- schema: string;
15
- };
16
- ephemeralQueryAccountEnabled?: boolean;
17
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
18
- }>>;
19
- //# 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,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;GAQ3B,CAAA"}
@@ -1,19 +0,0 @@
1
- import { EthereumGasDiviner } from './Diviner.ts';
2
- export declare const EthereumGasPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<EthereumGasDiviner<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
- account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
- addToResolvers?: boolean;
5
- additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
- allowNameResolution?: boolean;
7
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
- schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
9
- } & {
10
- schema: import("./Schema.ts").EthereumGasDivinerConfigSchema;
11
- }, "schema"> & {
12
- schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
13
- }, "schema"> & {
14
- schema: string;
15
- };
16
- ephemeralQueryAccountEnabled?: boolean;
17
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
18
- }>>;
19
- //# 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,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;GAQ3B,CAAA"}
@@ -1,19 +0,0 @@
1
- import { EthereumGasDiviner } from './Diviner.ts';
2
- export declare const EthereumGasPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<EthereumGasDiviner<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
3
- account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
4
- addToResolvers?: boolean;
5
- additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
6
- allowNameResolution?: boolean;
7
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
8
- schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
9
- } & {
10
- schema: import("./Schema.ts").EthereumGasDivinerConfigSchema;
11
- }, "schema"> & {
12
- schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
13
- }, "schema"> & {
14
- schema: string;
15
- };
16
- ephemeralQueryAccountEnabled?: boolean;
17
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
18
- }>>;
19
- //# 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,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;GAQ3B,CAAA"}
@@ -1,5 +0,0 @@
1
- export type EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query';
2
- export declare const EthereumGasDivinerQuerySchema: EthereumGasDivinerQuerySchema;
3
- export type EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config';
4
- export declare const EthereumGasDivinerConfigSchema: EthereumGasDivinerConfigSchema;
5
- //# 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,6BAA6B,GAAG,mDAAmD,CAAA;AAC/F,eAAO,MAAM,6BAA6B,EAAE,6BAAmF,CAAA;AAE/H,MAAM,MAAM,8BAA8B,GAAG,oDAAoD,CAAA;AACjG,eAAO,MAAM,8BAA8B,EAAE,8BAAqF,CAAA"}
@@ -1,5 +0,0 @@
1
- export type EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query';
2
- export declare const EthereumGasDivinerQuerySchema: EthereumGasDivinerQuerySchema;
3
- export type EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config';
4
- export declare const EthereumGasDivinerConfigSchema: EthereumGasDivinerConfigSchema;
5
- //# 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,6BAA6B,GAAG,mDAAmD,CAAA;AAC/F,eAAO,MAAM,6BAA6B,EAAE,6BAAmF,CAAA;AAE/H,MAAM,MAAM,8BAA8B,GAAG,oDAAoD,CAAA;AACjG,eAAO,MAAM,8BAA8B,EAAE,8BAAqF,CAAA"}
@@ -1,5 +0,0 @@
1
- export type EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query';
2
- export declare const EthereumGasDivinerQuerySchema: EthereumGasDivinerQuerySchema;
3
- export type EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config';
4
- export declare const EthereumGasDivinerConfigSchema: EthereumGasDivinerConfigSchema;
5
- //# 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,6BAA6B,GAAG,mDAAmD,CAAA;AAC/F,eAAO,MAAM,6BAA6B,EAAE,6BAAmF,CAAA;AAE/H,MAAM,MAAM,8BAA8B,GAAG,oDAAoD,CAAA;AACjG,eAAO,MAAM,8BAA8B,EAAE,8BAAqF,CAAA"}
@@ -1,278 +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 __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- EthereumGasDiviner: () => EthereumGasDiviner,
24
- EthereumGasDivinerConfigSchema: () => EthereumGasDivinerConfigSchema,
25
- EthereumGasDivinerQuerySchema: () => EthereumGasDivinerQuerySchema,
26
- EthereumGasPlugin: () => EthereumGasPlugin,
27
- default: () => EthereumGasPlugin
28
- });
29
- module.exports = __toCommonJS(src_exports);
30
-
31
- // src/Diviner.ts
32
- var import_diviner_abstract = require("@xyo-network/diviner-abstract");
33
- var import_gas_price_payload_plugin2 = require("@xyo-network/gas-price-payload-plugin");
34
-
35
- // src/lib/divineGas.ts
36
- var import_gas_price_payload_plugin = require("@xyo-network/gas-price-payload-plugin");
37
- var import_payload_builder = require("@xyo-network/payload-builder");
38
-
39
- // src/lib/average.ts
40
- var import_exists = require("@xylabs/exists");
41
- var listAverage = (x) => x?.length ? x.reduce((a, b) => a + b) / x.length : void 0;
42
- var averageProperty = (data, propertyExpression) => {
43
- return listAverage(data.map(propertyExpression).filter(import_exists.exists));
44
- };
45
- var average = (input) => {
46
- const data = input?.filter(import_exists.exists) || [];
47
- const averaged = {
48
- baseFee: averageProperty(data, (x) => x.baseFee),
49
- feePerGas: {
50
- high: averageProperty(data, (x) => x.feePerGas.high),
51
- low: averageProperty(data, (x) => x.feePerGas.low),
52
- medium: averageProperty(data, (x) => x.feePerGas.medium),
53
- veryHigh: averageProperty(data, (x) => x.feePerGas.veryHigh)
54
- },
55
- priorityFeePerGas: {
56
- high: averageProperty(data, (x) => x.priorityFeePerGas.high),
57
- low: averageProperty(data, (x) => x.priorityFeePerGas.low),
58
- medium: averageProperty(data, (x) => x.priorityFeePerGas.medium),
59
- veryHigh: averageProperty(data, (x) => x.priorityFeePerGas.veryHigh)
60
- }
61
- };
62
- return averaged;
63
- };
64
-
65
- // src/lib/identities/isEthereumGasBlocknativePayload.ts
66
- var import_blocknative_ethereum_gas_payload_plugin = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
67
- var isEthereumGasBlocknativePayload = (payload) => {
68
- return payload?.schema === import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema;
69
- };
70
-
71
- // src/lib/identities/isEthereumGasEtherchainV2Payload.ts
72
- var import_etherchain_gas_ethereum_blockchain_payload_plugins = require("@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins");
73
- var isEthereumGasEtherchainV2Payload = (payload) => {
74
- return payload?.schema === import_etherchain_gas_ethereum_blockchain_payload_plugins.EthereumGasEtherchainV2Schema;
75
- };
76
-
77
- // src/lib/identities/isEthereumGasEtherscanPayload.ts
78
- var import_etherscan_ethereum_gas_payload_plugin = require("@xyo-network/etherscan-ethereum-gas-payload-plugin");
79
- var isEthereumGasEtherscanPayload = (payload) => {
80
- return payload?.schema === import_etherscan_ethereum_gas_payload_plugin.EthereumGasEtherscanSchema;
81
- };
82
-
83
- // src/lib/identities/isEthereumGasEthersPayload.ts
84
- var import_ethers_ethereum_gas_payload_plugin = require("@xyo-network/ethers-ethereum-gas-payload-plugin");
85
- var isEthereumGasEthersPayload = (payload) => {
86
- return payload?.schema === import_ethers_ethereum_gas_payload_plugin.EthereumGasEthersSchema;
87
- };
88
-
89
- // src/lib/identities/isEthereumGasEthgasstationPayload.ts
90
- var import_ethgasstation_ethereum_gas_payload_plugin = require("@xyo-network/ethgasstation-ethereum-gas-payload-plugin");
91
- var isEthereumGasEthgasstationPayload = (payload) => {
92
- return payload?.schema === import_ethgasstation_ethereum_gas_payload_plugin.EthereumGasEthgasstationSchema;
93
- };
94
-
95
- // src/lib/transforms/transformGasFromBlocknative.ts
96
- var import_regression = require("regression");
97
- var getBaseFee = (payload) => {
98
- return payload?.blockPrices?.[0]?.baseFeePerGas;
99
- };
100
- var getFeePerGas = (payload) => {
101
- const sorted = payload.blockPrices?.[0].estimatedPrices?.sort((a, b) => a.confidence - b.confidence);
102
- const trend = (0, import_regression.linear)([
103
- [0, sorted?.[0].price],
104
- [1, sorted?.[1].price],
105
- [2, sorted?.[2].price],
106
- [3, sorted?.[3].price],
107
- [4, sorted?.[4].price]
108
- ]);
109
- const feePerGas = {
110
- low: trend.predict(0.5)[1],
111
- medium: trend.predict(1.5)[1],
112
- high: trend.predict(2.5)[1],
113
- veryHigh: trend.predict(3.5)[1]
114
- };
115
- return feePerGas;
116
- };
117
- var getPriorityFeePerGas = (payload) => {
118
- const sorted = payload.blockPrices?.[0].estimatedPrices?.sort((a, b) => a.confidence - b.confidence);
119
- const trend = (0, import_regression.linear)([
120
- [0, sorted?.[0].maxPriorityFeePerGas],
121
- [1, sorted?.[1].maxPriorityFeePerGas],
122
- [2, sorted?.[2].maxPriorityFeePerGas],
123
- [3, sorted?.[3].maxPriorityFeePerGas],
124
- [4, sorted?.[4].maxPriorityFeePerGas]
125
- ]);
126
- const priorityFeePerGas = {
127
- low: trend.predict(0.5)[1],
128
- medium: trend.predict(1.5)[1],
129
- high: trend.predict(2.5)[1],
130
- veryHigh: trend.predict(3.5)[1]
131
- };
132
- return priorityFeePerGas;
133
- };
134
- var transformGasFromBlocknative = (payload) => {
135
- const baseFee = getBaseFee(payload);
136
- const feePerGas = getFeePerGas(payload);
137
- const priorityFeePerGas = getPriorityFeePerGas(payload);
138
- return { baseFee, feePerGas, priorityFeePerGas };
139
- };
140
-
141
- // src/lib/transforms/transformGasFromEtherchainV2.ts
142
- var getFeePerGas2 = (payload) => {
143
- const { slow, standard, fast, rapid } = payload.data;
144
- const low = slow / 1e9;
145
- const medium = standard / 1e9;
146
- const high = fast / 1e9;
147
- const veryHigh = rapid / 1e9;
148
- return { high, low, medium, veryHigh };
149
- };
150
- var transformGasFromEtherchainV2 = (payload) => {
151
- const baseFee = void 0;
152
- const feePerGas = getFeePerGas2(payload);
153
- const priorityFeePerGas = {};
154
- return { baseFee, feePerGas, priorityFeePerGas };
155
- };
156
-
157
- // src/lib/transforms/transformGasFromEthers.ts
158
- var getBaseFee2 = (payload) => {
159
- const { gasPrice } = payload;
160
- return gasPrice ? gasPrice / 1e9 : void 0;
161
- };
162
- var getFeePerGas3 = (payload) => {
163
- const { maxFeePerGas } = payload;
164
- const high = maxFeePerGas ? maxFeePerGas / 1e9 : void 0;
165
- return { high };
166
- };
167
- var getPriorityFeePerGas2 = (payload) => {
168
- const { maxPriorityFeePerGas } = payload;
169
- const high = maxPriorityFeePerGas ? maxPriorityFeePerGas / 1e9 : void 0;
170
- return { high };
171
- };
172
- var transformGasFromEthers = (payload) => {
173
- const baseFee = getBaseFee2(payload);
174
- const feePerGas = getFeePerGas3(payload);
175
- const priorityFeePerGas = getPriorityFeePerGas2(payload);
176
- return { baseFee, feePerGas, priorityFeePerGas };
177
- };
178
-
179
- // src/lib/transforms/transformGasFromEtherscan.ts
180
- var import_regression2 = require("regression");
181
- var getBaseFee3 = (payload) => {
182
- const { suggestBaseFee } = payload.result;
183
- return Number.parseFloat(suggestBaseFee);
184
- };
185
- var getFeePerGas4 = (payload) => {
186
- const { FastGasPrice, ProposeGasPrice, SafeGasPrice } = payload.result;
187
- const low = Number.parseFloat(SafeGasPrice);
188
- const medium = Number.parseFloat(ProposeGasPrice);
189
- const high = Number.parseFloat(FastGasPrice);
190
- const veryHigh = (0, import_regression2.linear)([
191
- [0, low],
192
- [1, medium],
193
- [2, high]
194
- ]).predict(3)[1];
195
- return { high, low, medium, veryHigh };
196
- };
197
- var transformGasFromEtherscan = (payload) => {
198
- const baseFee = getBaseFee3(payload);
199
- const feePerGas = getFeePerGas4(payload);
200
- const priorityFeePerGas = {};
201
- return { baseFee, feePerGas, priorityFeePerGas };
202
- };
203
-
204
- // src/lib/transforms/transformGasFromEthgasstation.ts
205
- var import_regression3 = require("regression");
206
- var getBaseFee4 = (payload) => {
207
- const { baseFee } = payload;
208
- return baseFee;
209
- };
210
- var getFeePerGas5 = (payload) => {
211
- const { standard: medium, fast: high, instant: veryHigh } = payload.gasPrice;
212
- const trend = (0, import_regression3.linear)([
213
- [1, medium],
214
- [2, high],
215
- [3, veryHigh]
216
- ]);
217
- const low = trend.predict(0)[1];
218
- return { low, medium, high, veryHigh };
219
- };
220
- var getPriorityFeePerGas3 = (payload) => {
221
- const { standard: medium, fast: high, instant: veryHigh } = payload.priorityFee;
222
- const trend = (0, import_regression3.linear)([
223
- [1, medium],
224
- [2, high],
225
- [3, veryHigh]
226
- ]);
227
- const low = trend.predict(0)[1];
228
- return { low, medium, high, veryHigh };
229
- };
230
- var transformGasFromEthgasstation = (payload) => {
231
- const baseFee = getBaseFee4(payload);
232
- const feePerGas = getFeePerGas5(payload);
233
- const priorityFeePerGas = getPriorityFeePerGas3(payload);
234
- return { baseFee, feePerGas, priorityFeePerGas };
235
- };
236
-
237
- // src/lib/divineGas.ts
238
- var divineGas = async (payloads) => {
239
- const blocknative = payloads.filter(isEthereumGasBlocknativePayload).map(transformGasFromBlocknative);
240
- const etherchainV2 = payloads.filter(isEthereumGasEtherchainV2Payload).map(transformGasFromEtherchainV2);
241
- const ethers = payloads.filter(isEthereumGasEthersPayload).map(transformGasFromEthers);
242
- const etherscan = payloads.filter(isEthereumGasEtherscanPayload).map(transformGasFromEtherscan);
243
- const ethgasstation = payloads.filter(isEthereumGasEthgasstationPayload).map(transformGasFromEthgasstation);
244
- const transactionCosts = [...blocknative, ...etherchainV2, ...ethers, ...etherscan, ...ethgasstation];
245
- const avg = average(transactionCosts);
246
- const timestamp = Date.now();
247
- const payload = await new import_payload_builder.PayloadBuilder({ schema: import_gas_price_payload_plugin.EthereumGasSchema }).fields({ ...avg, timestamp }).build();
248
- return payload;
249
- };
250
-
251
- // src/Schema.ts
252
- var EthereumGasDivinerQuerySchema = "network.xyo.blockchain.ethereum.gas.diviner.query";
253
- var EthereumGasDivinerConfigSchema = "network.xyo.blockchain.ethereum.gas.diviner.config";
254
-
255
- // src/Diviner.ts
256
- var EthereumGasDiviner = class extends import_diviner_abstract.AbstractDiviner {
257
- static configSchemas = [...super.configSchemas, EthereumGasDivinerConfigSchema];
258
- static defaultConfigSchema = EthereumGasDivinerConfigSchema;
259
- static targetSchema = import_gas_price_payload_plugin2.EthereumGasSchema;
260
- async divineHandler(payloads) {
261
- const cost = await divineGas(payloads ?? []);
262
- return [cost];
263
- }
264
- };
265
-
266
- // src/Plugin.ts
267
- var import_gas_price_payload_plugin3 = require("@xyo-network/gas-price-payload-plugin");
268
- var import_payload_model = require("@xyo-network/payload-model");
269
- var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
270
- var EthereumGasPlugin = () => (0, import_payloadset_plugin.createPayloadSetDivinerPlugin)(
271
- { required: { [import_gas_price_payload_plugin3.EthereumGasSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
272
- {
273
- diviner: async (params) => {
274
- return await EthereumGasDiviner.create(params);
275
- }
276
- }
277
- );
278
- //# sourceMappingURL=index.cjs.map