@xyo-network/gas-price-plugin 2.61.0 → 2.62.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 (173) hide show
  1. package/dist/cjs/Diviner.js +5 -5
  2. package/dist/cjs/Diviner.js.map +1 -1
  3. package/dist/cjs/Plugin.js +4 -4
  4. package/dist/cjs/Plugin.js.map +1 -1
  5. package/dist/cjs/Schema.js +3 -3
  6. package/dist/cjs/Schema.js.map +1 -1
  7. package/dist/cjs/index.js +3 -3
  8. package/dist/cjs/index.js.map +1 -1
  9. package/dist/cjs/lib/divineGas.js +6 -6
  10. package/dist/cjs/lib/divineGas.js.map +1 -1
  11. package/dist/cjs/lib/identities/index.js +5 -5
  12. package/dist/cjs/lib/identities/index.js.map +1 -1
  13. package/dist/cjs/lib/identities/isEthereumGasBlocknativePayload.js +9 -0
  14. package/dist/cjs/lib/identities/isEthereumGasBlocknativePayload.js.map +1 -0
  15. package/dist/cjs/lib/identities/{isXyoEthereumGasEtherchainV2Payload.js → isEthereumGasEtherchainV2Payload.js} +5 -5
  16. package/dist/cjs/lib/identities/isEthereumGasEtherchainV2Payload.js.map +1 -0
  17. package/dist/cjs/lib/identities/isEthereumGasEthersPayload.js +9 -0
  18. package/dist/cjs/lib/identities/isEthereumGasEthersPayload.js.map +1 -0
  19. package/dist/cjs/lib/identities/isEthereumGasEtherscanPayload.js +9 -0
  20. package/dist/cjs/lib/identities/isEthereumGasEtherscanPayload.js.map +1 -0
  21. package/dist/cjs/lib/identities/isEthereumGasEthgasstationPayload.js +9 -0
  22. package/dist/cjs/lib/identities/isEthereumGasEthgasstationPayload.js.map +1 -0
  23. package/dist/cjs/lib/transforms/transformGasFromBlocknative.js.map +1 -1
  24. package/dist/cjs/lib/transforms/transformGasFromEtherchainV2.js.map +1 -1
  25. package/dist/cjs/lib/transforms/transformGasFromEthers.js.map +1 -1
  26. package/dist/cjs/lib/transforms/transformGasFromEtherscan.js.map +1 -1
  27. package/dist/cjs/lib/transforms/transformGasFromEthgasstation.js.map +1 -1
  28. package/dist/cjs/test/sampleBlocknativeGas.js +1 -1
  29. package/dist/cjs/test/sampleBlocknativeGas.js.map +1 -1
  30. package/dist/cjs/test/sampleEtherchainGasV2.js +1 -1
  31. package/dist/cjs/test/sampleEtherchainGasV2.js.map +1 -1
  32. package/dist/cjs/test/sampleEthersGas.js +1 -1
  33. package/dist/cjs/test/sampleEthersGas.js.map +1 -1
  34. package/dist/cjs/test/sampleEtherscanGas.js +1 -1
  35. package/dist/cjs/test/sampleEtherscanGas.js.map +1 -1
  36. package/dist/cjs/test/sampleEthgasstationGas.js +1 -1
  37. package/dist/cjs/test/sampleEthgasstationGas.js.map +1 -1
  38. package/dist/docs.json +106 -106
  39. package/dist/esm/Diviner.js +5 -5
  40. package/dist/esm/Diviner.js.map +1 -1
  41. package/dist/esm/Plugin.js +4 -4
  42. package/dist/esm/Plugin.js.map +1 -1
  43. package/dist/esm/Schema.js +2 -2
  44. package/dist/esm/Schema.js.map +1 -1
  45. package/dist/esm/index.js +3 -3
  46. package/dist/esm/index.js.map +1 -1
  47. package/dist/esm/lib/divineGas.js +8 -8
  48. package/dist/esm/lib/divineGas.js.map +1 -1
  49. package/dist/esm/lib/identities/index.js +5 -5
  50. package/dist/esm/lib/identities/index.js.map +1 -1
  51. package/dist/esm/lib/identities/isEthereumGasBlocknativePayload.js +5 -0
  52. package/dist/esm/lib/identities/isEthereumGasBlocknativePayload.js.map +1 -0
  53. package/dist/esm/lib/identities/isEthereumGasEtherchainV2Payload.js +5 -0
  54. package/dist/esm/lib/identities/isEthereumGasEtherchainV2Payload.js.map +1 -0
  55. package/dist/esm/lib/identities/isEthereumGasEthersPayload.js +5 -0
  56. package/dist/esm/lib/identities/isEthereumGasEthersPayload.js.map +1 -0
  57. package/dist/esm/lib/identities/isEthereumGasEtherscanPayload.js +5 -0
  58. package/dist/esm/lib/identities/isEthereumGasEtherscanPayload.js.map +1 -0
  59. package/dist/esm/lib/identities/isEthereumGasEthgasstationPayload.js +5 -0
  60. package/dist/esm/lib/identities/isEthereumGasEthgasstationPayload.js.map +1 -0
  61. package/dist/esm/lib/transforms/transformGasFromBlocknative.js.map +1 -1
  62. package/dist/esm/lib/transforms/transformGasFromEtherchainV2.js.map +1 -1
  63. package/dist/esm/lib/transforms/transformGasFromEthers.js.map +1 -1
  64. package/dist/esm/lib/transforms/transformGasFromEtherscan.js.map +1 -1
  65. package/dist/esm/lib/transforms/transformGasFromEthgasstation.js.map +1 -1
  66. package/dist/esm/test/sampleBlocknativeGas.js +2 -2
  67. package/dist/esm/test/sampleBlocknativeGas.js.map +1 -1
  68. package/dist/esm/test/sampleEtherchainGasV2.js +2 -2
  69. package/dist/esm/test/sampleEtherchainGasV2.js.map +1 -1
  70. package/dist/esm/test/sampleEthersGas.js +2 -2
  71. package/dist/esm/test/sampleEthersGas.js.map +1 -1
  72. package/dist/esm/test/sampleEtherscanGas.js +2 -2
  73. package/dist/esm/test/sampleEtherscanGas.js.map +1 -1
  74. package/dist/esm/test/sampleEthgasstationGas.js +2 -2
  75. package/dist/esm/test/sampleEthgasstationGas.js.map +1 -1
  76. package/dist/types/Diviner.d.ts +5 -5
  77. package/dist/types/Diviner.d.ts.map +1 -1
  78. package/dist/types/Plugin.d.ts +2 -2
  79. package/dist/types/Plugin.d.ts.map +1 -1
  80. package/dist/types/Schema.d.ts +4 -4
  81. package/dist/types/Schema.d.ts.map +1 -1
  82. package/dist/types/index.d.ts +3 -3
  83. package/dist/types/index.d.ts.map +1 -1
  84. package/dist/types/lib/divineGas.d.ts +2 -2
  85. package/dist/types/lib/divineGas.d.ts.map +1 -1
  86. package/dist/types/lib/identities/index.d.ts +5 -5
  87. package/dist/types/lib/identities/index.d.ts.map +1 -1
  88. package/dist/types/lib/identities/isEthereumGasBlocknativePayload.d.ts +6 -0
  89. package/dist/types/lib/identities/isEthereumGasBlocknativePayload.d.ts.map +1 -0
  90. package/dist/types/lib/identities/isEthereumGasEtherchainV2Payload.d.ts +6 -0
  91. package/dist/types/lib/identities/isEthereumGasEtherchainV2Payload.d.ts.map +1 -0
  92. package/dist/types/lib/identities/isEthereumGasEthersPayload.d.ts +6 -0
  93. package/dist/types/lib/identities/isEthereumGasEthersPayload.d.ts.map +1 -0
  94. package/dist/types/lib/identities/isEthereumGasEtherscanPayload.d.ts +6 -0
  95. package/dist/types/lib/identities/isEthereumGasEtherscanPayload.d.ts.map +1 -0
  96. package/dist/types/lib/identities/isEthereumGasEthgasstationPayload.d.ts +6 -0
  97. package/dist/types/lib/identities/isEthereumGasEthgasstationPayload.d.ts.map +1 -0
  98. package/dist/types/lib/transforms/transformGasFromBlocknative.d.ts +2 -2
  99. package/dist/types/lib/transforms/transformGasFromBlocknative.d.ts.map +1 -1
  100. package/dist/types/lib/transforms/transformGasFromEtherchainV2.d.ts +2 -2
  101. package/dist/types/lib/transforms/transformGasFromEtherchainV2.d.ts.map +1 -1
  102. package/dist/types/lib/transforms/transformGasFromEthers.d.ts +2 -2
  103. package/dist/types/lib/transforms/transformGasFromEthers.d.ts.map +1 -1
  104. package/dist/types/lib/transforms/transformGasFromEtherscan.d.ts +2 -2
  105. package/dist/types/lib/transforms/transformGasFromEtherscan.d.ts.map +1 -1
  106. package/dist/types/lib/transforms/transformGasFromEthgasstation.d.ts +2 -2
  107. package/dist/types/lib/transforms/transformGasFromEthgasstation.d.ts.map +1 -1
  108. package/dist/types/test/sampleBlocknativeGas.d.ts +2 -2
  109. package/dist/types/test/sampleBlocknativeGas.d.ts.map +1 -1
  110. package/dist/types/test/sampleEtherchainGasV2.d.ts +2 -2
  111. package/dist/types/test/sampleEtherchainGasV2.d.ts.map +1 -1
  112. package/dist/types/test/sampleEthersGas.d.ts +2 -2
  113. package/dist/types/test/sampleEthersGas.d.ts.map +1 -1
  114. package/dist/types/test/sampleEtherscanGas.d.ts +2 -2
  115. package/dist/types/test/sampleEtherscanGas.d.ts.map +1 -1
  116. package/dist/types/test/sampleEthgasstationGas.d.ts +2 -2
  117. package/dist/types/test/sampleEthgasstationGas.d.ts.map +1 -1
  118. package/package.json +14 -14
  119. package/src/Diviner.ts +7 -7
  120. package/src/Plugin.ts +6 -6
  121. package/src/Schema.ts +4 -4
  122. package/src/index.ts +3 -3
  123. package/src/lib/divineGas.ts +13 -13
  124. package/src/lib/identities/index.ts +5 -5
  125. package/src/lib/identities/isEthereumGasBlocknativePayload.ts +6 -0
  126. package/src/lib/identities/isEthereumGasEtherchainV2Payload.ts +6 -0
  127. package/src/lib/identities/isEthereumGasEthersPayload.ts +6 -0
  128. package/src/lib/identities/isEthereumGasEtherscanPayload.ts +6 -0
  129. package/src/lib/identities/isEthereumGasEthgasstationPayload.ts +6 -0
  130. package/src/lib/transforms/transformGasFromBlocknative.ts +5 -5
  131. package/src/lib/transforms/transformGasFromEtherchainV2.ts +3 -3
  132. package/src/lib/transforms/transformGasFromEthers.ts +5 -5
  133. package/src/lib/transforms/transformGasFromEtherscan.ts +4 -4
  134. package/src/lib/transforms/transformGasFromEthgasstation.ts +5 -5
  135. package/src/test/sampleBlocknativeGas.ts +3 -7
  136. package/src/test/sampleEtherchainGasV2.ts +3 -3
  137. package/src/test/sampleEthersGas.ts +3 -3
  138. package/src/test/sampleEtherscanGas.ts +3 -3
  139. package/src/test/sampleEthgasstationGas.ts +3 -3
  140. package/dist/cjs/lib/identities/isXyoEthereumGasBlocknativePayload.js +0 -9
  141. package/dist/cjs/lib/identities/isXyoEthereumGasBlocknativePayload.js.map +0 -1
  142. package/dist/cjs/lib/identities/isXyoEthereumGasEtherchainV2Payload.js.map +0 -1
  143. package/dist/cjs/lib/identities/isXyoEthereumGasEthersPayload.js +0 -9
  144. package/dist/cjs/lib/identities/isXyoEthereumGasEthersPayload.js.map +0 -1
  145. package/dist/cjs/lib/identities/isXyoEthereumGasEtherscanPayload.js +0 -9
  146. package/dist/cjs/lib/identities/isXyoEthereumGasEtherscanPayload.js.map +0 -1
  147. package/dist/cjs/lib/identities/isXyoEthereumGasEthgasstationPayload.js +0 -9
  148. package/dist/cjs/lib/identities/isXyoEthereumGasEthgasstationPayload.js.map +0 -1
  149. package/dist/esm/lib/identities/isXyoEthereumGasBlocknativePayload.js +0 -5
  150. package/dist/esm/lib/identities/isXyoEthereumGasBlocknativePayload.js.map +0 -1
  151. package/dist/esm/lib/identities/isXyoEthereumGasEtherchainV2Payload.js +0 -5
  152. package/dist/esm/lib/identities/isXyoEthereumGasEtherchainV2Payload.js.map +0 -1
  153. package/dist/esm/lib/identities/isXyoEthereumGasEthersPayload.js +0 -5
  154. package/dist/esm/lib/identities/isXyoEthereumGasEthersPayload.js.map +0 -1
  155. package/dist/esm/lib/identities/isXyoEthereumGasEtherscanPayload.js +0 -5
  156. package/dist/esm/lib/identities/isXyoEthereumGasEtherscanPayload.js.map +0 -1
  157. package/dist/esm/lib/identities/isXyoEthereumGasEthgasstationPayload.js +0 -5
  158. package/dist/esm/lib/identities/isXyoEthereumGasEthgasstationPayload.js.map +0 -1
  159. package/dist/types/lib/identities/isXyoEthereumGasBlocknativePayload.d.ts +0 -6
  160. package/dist/types/lib/identities/isXyoEthereumGasBlocknativePayload.d.ts.map +0 -1
  161. package/dist/types/lib/identities/isXyoEthereumGasEtherchainV2Payload.d.ts +0 -6
  162. package/dist/types/lib/identities/isXyoEthereumGasEtherchainV2Payload.d.ts.map +0 -1
  163. package/dist/types/lib/identities/isXyoEthereumGasEthersPayload.d.ts +0 -6
  164. package/dist/types/lib/identities/isXyoEthereumGasEthersPayload.d.ts.map +0 -1
  165. package/dist/types/lib/identities/isXyoEthereumGasEtherscanPayload.d.ts +0 -6
  166. package/dist/types/lib/identities/isXyoEthereumGasEtherscanPayload.d.ts.map +0 -1
  167. package/dist/types/lib/identities/isXyoEthereumGasEthgasstationPayload.d.ts +0 -6
  168. package/dist/types/lib/identities/isXyoEthereumGasEthgasstationPayload.d.ts.map +0 -1
  169. package/src/lib/identities/isXyoEthereumGasBlocknativePayload.ts +0 -6
  170. package/src/lib/identities/isXyoEthereumGasEtherchainV2Payload.ts +0 -6
  171. package/src/lib/identities/isXyoEthereumGasEthersPayload.ts +0 -6
  172. package/src/lib/identities/isXyoEthereumGasEtherscanPayload.ts +0 -6
  173. package/src/lib/identities/isXyoEthereumGasEthgasstationPayload.ts +0 -6
@@ -1,4 +1,4 @@
1
- import { XyoEthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
1
+ import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
2
2
  import { FeeData } from '@xyo-network/gas-price-payload-plugin';
3
- export declare const transformGasFromEtherscan: (payload: XyoEthereumGasEtherscanPayload) => FeeData;
3
+ export declare const transformGasFromEtherscan: (payload: EthereumGasEtherscanPayload) => FeeData;
4
4
  //# sourceMappingURL=transformGasFromEtherscan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transformGasFromEtherscan.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEtherscan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAA;AACnG,OAAO,EAAE,OAAO,EAAa,MAAM,uCAAuC,CAAA;AAqB1E,eAAO,MAAM,yBAAyB,YAAa,8BAA8B,KAAG,OAKnF,CAAA"}
1
+ {"version":3,"file":"transformGasFromEtherscan.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEtherscan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAA;AAChG,OAAO,EAAE,OAAO,EAAa,MAAM,uCAAuC,CAAA;AAqB1E,eAAO,MAAM,yBAAyB,YAAa,2BAA2B,KAAG,OAKhF,CAAA"}
@@ -1,4 +1,4 @@
1
- import { XyoEthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin';
1
+ import { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin';
2
2
  import { FeeData } from '@xyo-network/gas-price-payload-plugin';
3
- export declare const transformGasFromEthgasstation: (payload: XyoEthereumGasEthgasstationPayload) => FeeData;
3
+ export declare const transformGasFromEthgasstation: (payload: EthereumGasEthgasstationPayload) => FeeData;
4
4
  //# sourceMappingURL=transformGasFromEthgasstation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transformGasFromEthgasstation.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEthgasstation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kCAAkC,EAAE,MAAM,wDAAwD,CAAA;AAC3G,OAAO,EAAE,OAAO,EAAgC,MAAM,uCAAuC,CAAA;AA8B7F,eAAO,MAAM,6BAA6B,YAAa,kCAAkC,KAAG,OAK3F,CAAA"}
1
+ {"version":3,"file":"transformGasFromEthgasstation.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEthgasstation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAA;AACxG,OAAO,EAAE,OAAO,EAAgC,MAAM,uCAAuC,CAAA;AA8B7F,eAAO,MAAM,6BAA6B,YAAa,+BAA+B,KAAG,OAKxF,CAAA"}
@@ -1,3 +1,3 @@
1
- import { XyoEthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
2
- export declare const sampleBlocknativeGas: XyoEthereumGasBlocknativePayload;
1
+ import { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
2
+ export declare const sampleBlocknativeGas: EthereumGasBlocknativePayload;
3
3
  //# sourceMappingURL=sampleBlocknativeGas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampleBlocknativeGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleBlocknativeGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gCAAgC,EAEjC,MAAM,sDAAsD,CAAA;AAE7D,eAAO,MAAM,oBAAoB,EAAE,gCA0FlC,CAAA"}
1
+ {"version":3,"file":"sampleBlocknativeGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleBlocknativeGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,6BAA6B,EAAgC,MAAM,sDAAsD,CAAA;AAEpJ,eAAO,MAAM,oBAAoB,EAAE,6BA0FlC,CAAA"}
@@ -1,3 +1,3 @@
1
- import { XyoEthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins';
2
- export declare const sampleEtherchainGasV2: XyoEthereumGasEtherchainV2Payload;
1
+ import { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins';
2
+ export declare const sampleEtherchainGasV2: EthereumGasEtherchainV2Payload;
3
3
  //# sourceMappingURL=sampleEtherchainGasV2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampleEtherchainGasV2.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherchainGasV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAoC,MAAM,iEAAiE,CAAA;AAErJ,eAAO,MAAM,qBAAqB,EAAE,iCAYnC,CAAA"}
1
+ {"version":3,"file":"sampleEtherchainGasV2.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherchainGasV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAiC,MAAM,iEAAiE,CAAA;AAE/I,eAAO,MAAM,qBAAqB,EAAE,8BAYnC,CAAA"}
@@ -1,3 +1,3 @@
1
- import { XyoEthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin';
2
- export declare const sampleEthersGas: XyoEthereumGasEthersPayload;
1
+ import { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin';
2
+ export declare const sampleEthersGas: EthereumGasEthersPayload;
3
3
  //# sourceMappingURL=sampleEthersGas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampleEthersGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthersGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAA8B,MAAM,iDAAiD,CAAA;AAEzH,eAAO,MAAM,eAAe,EAAE,2BAO7B,CAAA"}
1
+ {"version":3,"file":"sampleEthersGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthersGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAA2B,MAAM,iDAAiD,CAAA;AAEnH,eAAO,MAAM,eAAe,EAAE,wBAO7B,CAAA"}
@@ -1,3 +1,3 @@
1
- import { XyoEthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
2
- export declare const sampleEtherscanGas: XyoEthereumGasEtherscanPayload;
1
+ import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
2
+ export declare const sampleEtherscanGas: EthereumGasEtherscanPayload;
3
3
  //# sourceMappingURL=sampleEtherscanGas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampleEtherscanGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherscanGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAiC,MAAM,oDAAoD,CAAA;AAElI,eAAO,MAAM,kBAAkB,EAAE,8BAahC,CAAA"}
1
+ {"version":3,"file":"sampleEtherscanGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherscanGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAA8B,MAAM,oDAAoD,CAAA;AAE5H,eAAO,MAAM,kBAAkB,EAAE,2BAahC,CAAA"}
@@ -1,3 +1,3 @@
1
- import { XyoEthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin';
2
- export declare const sampleEthgasstationGas: XyoEthereumGasEthgasstationPayload;
1
+ import { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin';
2
+ export declare const sampleEthgasstationGas: EthereumGasEthgasstationPayload;
3
3
  //# sourceMappingURL=sampleEthgasstationGas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampleEthgasstationGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthgasstationGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAqC,MAAM,wDAAwD,CAAA;AAE9I,eAAO,MAAM,sBAAsB,EAAE,kCAiBpC,CAAA"}
1
+ {"version":3,"file":"sampleEthgasstationGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthgasstationGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAkC,MAAM,wDAAwD,CAAA;AAExI,eAAO,MAAM,sBAAsB,EAAE,+BAiBpC,CAAA"}
package/package.json CHANGED
@@ -11,19 +11,19 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@xylabs/exists": "^2.9.1",
14
- "@xyo-network/abstract-diviner": "^2.61.0",
15
- "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.61.0",
16
- "@xyo-network/diviner": "^2.61.0",
17
- "@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.61.0",
18
- "@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.61.0",
19
- "@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.61.0",
20
- "@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.61.0",
21
- "@xyo-network/gas-price-payload-plugin": "^2.61.0",
22
- "@xyo-network/module": "^2.61.0",
23
- "@xyo-network/payload-builder": "^2.61.0",
24
- "@xyo-network/payload-model": "^2.61.0",
25
- "@xyo-network/payloadset-plugin": "^2.61.0",
26
- "@xyo-network/promise": "^2.61.0",
14
+ "@xyo-network/abstract-diviner": "^2.62.0",
15
+ "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.62.0",
16
+ "@xyo-network/diviner": "^2.62.0",
17
+ "@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.62.0",
18
+ "@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.62.0",
19
+ "@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.62.0",
20
+ "@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.62.0",
21
+ "@xyo-network/gas-price-payload-plugin": "^2.62.0",
22
+ "@xyo-network/module": "^2.62.0",
23
+ "@xyo-network/payload-builder": "^2.62.0",
24
+ "@xyo-network/payload-model": "^2.62.0",
25
+ "@xyo-network/payloadset-plugin": "^2.62.0",
26
+ "@xyo-network/promise": "^2.62.0",
27
27
  "regression": "^2.0.1"
28
28
  },
29
29
  "devDependencies": {
@@ -83,5 +83,5 @@
83
83
  },
84
84
  "sideEffects": false,
85
85
  "types": "dist/types/index.d.ts",
86
- "version": "2.61.0"
86
+ "version": "2.62.0"
87
87
  }
package/src/Diviner.ts CHANGED
@@ -1,22 +1,22 @@
1
1
  import { AbstractDiviner } from '@xyo-network/abstract-diviner'
2
2
  import { DivinerConfig, DivinerModule, DivinerParams } from '@xyo-network/diviner'
3
- import { XyoEthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
3
+ import { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
4
4
  import { AnyConfigSchema } from '@xyo-network/module'
5
5
  import { Payload } from '@xyo-network/payload-model'
6
6
  import { Promisable } from '@xyo-network/promise'
7
7
 
8
8
  import { divineGas } from './lib'
9
- import { XyoEthereumGasDivinerConfigSchema } from './Schema'
9
+ import { EthereumGasDivinerConfigSchema } from './Schema'
10
10
 
11
- export type XyoEthereumGasDivinerConfig = DivinerConfig<{ schema: XyoEthereumGasDivinerConfigSchema }>
12
- export type XyoEthereumGasDivinerParams = DivinerParams<AnyConfigSchema<XyoEthereumGasDivinerConfig>>
11
+ export type EthereumGasDivinerConfig = DivinerConfig<{ schema: EthereumGasDivinerConfigSchema }>
12
+ export type EthereumGasDivinerParams = DivinerParams<AnyConfigSchema<EthereumGasDivinerConfig>>
13
13
 
14
- export class XyoEthereumGasDiviner<TParams extends XyoEthereumGasDivinerParams = XyoEthereumGasDivinerParams>
14
+ export class EthereumGasDiviner<TParams extends EthereumGasDivinerParams = EthereumGasDivinerParams>
15
15
  extends AbstractDiviner<TParams>
16
16
  implements DivinerModule
17
17
  {
18
- static override configSchema: string = XyoEthereumGasDivinerConfigSchema
19
- static override targetSchema: string = XyoEthereumGasSchema
18
+ static override configSchema: string = EthereumGasDivinerConfigSchema
19
+ static override targetSchema: string = EthereumGasSchema
20
20
 
21
21
  override divine(payloads?: Payload[]): Promisable<Payload[]> {
22
22
  const cost = divineGas(payloads ?? [])
package/src/Plugin.ts CHANGED
@@ -1,15 +1,15 @@
1
- import { XyoEthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
1
+ import { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
2
2
  import { PayloadSetSchema } from '@xyo-network/payload-model'
3
3
  import { createPayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin'
4
4
 
5
- import { XyoEthereumGasDiviner } from './Diviner'
5
+ import { EthereumGasDiviner } from './Diviner'
6
6
 
7
- export const XyoEthereumGasPlugin = () =>
8
- createPayloadSetDivinerPlugin<XyoEthereumGasDiviner>(
9
- { required: { [XyoEthereumGasSchema]: 1 }, schema: PayloadSetSchema },
7
+ export const EthereumGasPlugin = () =>
8
+ createPayloadSetDivinerPlugin<EthereumGasDiviner>(
9
+ { required: { [EthereumGasSchema]: 1 }, schema: PayloadSetSchema },
10
10
  {
11
11
  diviner: async (params) => {
12
- return (await XyoEthereumGasDiviner.create(params)) as XyoEthereumGasDiviner
12
+ return (await EthereumGasDiviner.create(params)) as EthereumGasDiviner
13
13
  },
14
14
  },
15
15
  )
package/src/Schema.ts CHANGED
@@ -1,5 +1,5 @@
1
- export type XyoEthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query'
2
- export const XyoEthereumGasDivinerQuerySchema: XyoEthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query'
1
+ export type EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query'
2
+ export const EthereumGasDivinerQuerySchema: EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query'
3
3
 
4
- export type XyoEthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config'
5
- export const XyoEthereumGasDivinerConfigSchema: XyoEthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config'
4
+ export type EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config'
5
+ export const EthereumGasDivinerConfigSchema: EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config'
package/src/index.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { XyoEthereumGasPlugin } from './Plugin'
1
+ import { EthereumGasPlugin } from './Plugin'
2
2
 
3
3
  export * from './Diviner'
4
4
  export * from './Schema'
5
5
 
6
- export { XyoEthereumGasPlugin }
6
+ export { EthereumGasPlugin }
7
7
 
8
8
  // eslint-disable-next-line import/no-default-export
9
- export default XyoEthereumGasPlugin
9
+ export default EthereumGasPlugin
@@ -1,14 +1,14 @@
1
- import { FeeData, XyoEthereumGasPayload, XyoEthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
1
+ import { EthereumGasPayload, EthereumGasSchema, FeeData } from '@xyo-network/gas-price-payload-plugin'
2
2
  import { PayloadBuilder } from '@xyo-network/payload-builder'
3
3
  import { Payload } from '@xyo-network/payload-model'
4
4
 
5
5
  import { average } from './average'
6
6
  import {
7
- isXyoEthereumGasBlocknativePayload,
8
- isXyoEthereumGasEtherchainV2Payload,
9
- isXyoEthereumGasEtherscanPayload,
10
- isXyoEthereumGasEthersPayload,
11
- isXyoEthereumGasEthgasstationPayload,
7
+ isEthereumGasBlocknativePayload,
8
+ isEthereumGasEtherchainV2Payload,
9
+ isEthereumGasEtherscanPayload,
10
+ isEthereumGasEthersPayload,
11
+ isEthereumGasEthgasstationPayload,
12
12
  } from './identities'
13
13
  import {
14
14
  transformGasFromBlocknative,
@@ -18,15 +18,15 @@ import {
18
18
  transformGasFromEthgasstation,
19
19
  } from './transforms'
20
20
 
21
- export const divineGas = (payloads: Payload[]): XyoEthereumGasPayload => {
22
- const blocknative = payloads.filter(isXyoEthereumGasBlocknativePayload).map(transformGasFromBlocknative)
23
- const etherchainV2 = payloads.filter(isXyoEthereumGasEtherchainV2Payload).map(transformGasFromEtherchainV2)
24
- const ethers = payloads.filter(isXyoEthereumGasEthersPayload).map(transformGasFromEthers)
25
- const etherscan = payloads.filter(isXyoEthereumGasEtherscanPayload).map(transformGasFromEtherscan)
26
- const ethgasstation = payloads.filter(isXyoEthereumGasEthgasstationPayload).map(transformGasFromEthgasstation)
21
+ export const divineGas = (payloads: Payload[]): EthereumGasPayload => {
22
+ const blocknative = payloads.filter(isEthereumGasBlocknativePayload).map(transformGasFromBlocknative)
23
+ const etherchainV2 = payloads.filter(isEthereumGasEtherchainV2Payload).map(transformGasFromEtherchainV2)
24
+ const ethers = payloads.filter(isEthereumGasEthersPayload).map(transformGasFromEthers)
25
+ const etherscan = payloads.filter(isEthereumGasEtherscanPayload).map(transformGasFromEtherscan)
26
+ const ethgasstation = payloads.filter(isEthereumGasEthgasstationPayload).map(transformGasFromEthgasstation)
27
27
  const transactionCosts: FeeData[] = [...blocknative, ...etherchainV2, ...ethers, ...etherscan, ...ethgasstation]
28
28
  const avg = average(transactionCosts)
29
29
  const timestamp = Date.now()
30
- const payload = new PayloadBuilder<XyoEthereumGasPayload>({ schema: XyoEthereumGasSchema }).fields({ ...avg, timestamp }).build()
30
+ const payload = new PayloadBuilder<EthereumGasPayload>({ schema: EthereumGasSchema }).fields({ ...avg, timestamp }).build()
31
31
  return payload
32
32
  }
@@ -1,5 +1,5 @@
1
- export * from './isXyoEthereumGasBlocknativePayload'
2
- export * from './isXyoEthereumGasEtherchainV2Payload'
3
- export * from './isXyoEthereumGasEtherscanPayload'
4
- export * from './isXyoEthereumGasEthersPayload'
5
- export * from './isXyoEthereumGasEthgasstationPayload'
1
+ export * from './isEthereumGasBlocknativePayload'
2
+ export * from './isEthereumGasEtherchainV2Payload'
3
+ export * from './isEthereumGasEtherscanPayload'
4
+ export * from './isEthereumGasEthersPayload'
5
+ export * from './isEthereumGasEthgasstationPayload'
@@ -0,0 +1,6 @@
1
+ import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
2
+ import { Payload } from '@xyo-network/payload-model'
3
+
4
+ export const isEthereumGasBlocknativePayload = (payload?: Payload | null): payload is EthereumGasBlocknativePayload => {
5
+ return payload?.schema === EthereumGasBlocknativeSchema
6
+ }
@@ -0,0 +1,6 @@
1
+ import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
2
+ import { Payload } from '@xyo-network/payload-model'
3
+
4
+ export const isEthereumGasEtherchainV2Payload = (payload?: Payload | null): payload is EthereumGasEtherchainV2Payload => {
5
+ return payload?.schema === EthereumGasEtherchainV2Schema
6
+ }
@@ -0,0 +1,6 @@
1
+ import { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
2
+ import { Payload } from '@xyo-network/payload-model'
3
+
4
+ export const isEthereumGasEthersPayload = (payload?: Payload | null): payload is EthereumGasEthersPayload => {
5
+ return payload?.schema === EthereumGasEthersSchema
6
+ }
@@ -0,0 +1,6 @@
1
+ import { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
2
+ import { Payload } from '@xyo-network/payload-model'
3
+
4
+ export const isEthereumGasEtherscanPayload = (payload?: Payload | null): payload is EthereumGasEtherscanPayload => {
5
+ return payload?.schema === EthereumGasEtherscanSchema
6
+ }
@@ -0,0 +1,6 @@
1
+ import { EthereumGasEthgasstationPayload, EthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
2
+ import { Payload } from '@xyo-network/payload-model'
3
+
4
+ export const isEthereumGasEthgasstationPayload = (payload?: Payload | null): payload is EthereumGasEthgasstationPayload => {
5
+ return payload?.schema === EthereumGasEthgasstationSchema
6
+ }
@@ -1,13 +1,13 @@
1
1
  /* eslint-disable sort-keys-fix/sort-keys-fix */
2
- import { XyoEthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
2
+ import { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
3
3
  import { FeeData, FeePerGas, PriorityFeePerGas } from '@xyo-network/gas-price-payload-plugin'
4
4
  import { linear } from 'regression'
5
5
 
6
- const getBaseFee = (payload: XyoEthereumGasBlocknativePayload): number | undefined => {
6
+ const getBaseFee = (payload: EthereumGasBlocknativePayload): number | undefined => {
7
7
  return payload?.blockPrices?.[0]?.baseFeePerGas
8
8
  }
9
9
 
10
- const getFeePerGas = (payload: XyoEthereumGasBlocknativePayload): Partial<FeePerGas> => {
10
+ const getFeePerGas = (payload: EthereumGasBlocknativePayload): Partial<FeePerGas> => {
11
11
  const sorted = payload.blockPrices?.[0].estimatedPrices?.sort((a, b) => a.confidence - b.confidence)
12
12
  const trend = linear([
13
13
  [0, sorted?.[0].price],
@@ -25,7 +25,7 @@ const getFeePerGas = (payload: XyoEthereumGasBlocknativePayload): Partial<FeePer
25
25
  return feePerGas
26
26
  }
27
27
 
28
- const getPriorityFeePerGas = (payload: XyoEthereumGasBlocknativePayload): Partial<PriorityFeePerGas> => {
28
+ const getPriorityFeePerGas = (payload: EthereumGasBlocknativePayload): Partial<PriorityFeePerGas> => {
29
29
  const sorted = payload.blockPrices?.[0].estimatedPrices?.sort((a, b) => a.confidence - b.confidence)
30
30
  const trend = linear([
31
31
  [0, sorted?.[0].maxPriorityFeePerGas],
@@ -43,7 +43,7 @@ const getPriorityFeePerGas = (payload: XyoEthereumGasBlocknativePayload): Partia
43
43
  return priorityFeePerGas
44
44
  }
45
45
 
46
- export const transformGasFromBlocknative = (payload: XyoEthereumGasBlocknativePayload): FeeData => {
46
+ export const transformGasFromBlocknative = (payload: EthereumGasBlocknativePayload): FeeData => {
47
47
  const baseFee = getBaseFee(payload)
48
48
  const feePerGas = getFeePerGas(payload)
49
49
  const priorityFeePerGas = getPriorityFeePerGas(payload)
@@ -1,7 +1,7 @@
1
- import { XyoEthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
1
+ import { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
2
2
  import { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'
3
3
 
4
- const getFeePerGas = (payload: XyoEthereumGasEtherchainV2Payload): Partial<FeePerGas> => {
4
+ const getFeePerGas = (payload: EthereumGasEtherchainV2Payload): Partial<FeePerGas> => {
5
5
  const { slow, standard, fast, rapid } = payload.data
6
6
  const low = slow / 1_000_000_000
7
7
  const medium = standard / 1_000_000_000
@@ -10,7 +10,7 @@ const getFeePerGas = (payload: XyoEthereumGasEtherchainV2Payload): Partial<FeePe
10
10
  return { high, low, medium, veryHigh }
11
11
  }
12
12
 
13
- export const transformGasFromEtherchainV2 = (payload: XyoEthereumGasEtherchainV2Payload): FeeData => {
13
+ export const transformGasFromEtherchainV2 = (payload: EthereumGasEtherchainV2Payload): FeeData => {
14
14
  const baseFee = undefined
15
15
  const feePerGas = getFeePerGas(payload)
16
16
  const priorityFeePerGas = {}
@@ -1,24 +1,24 @@
1
- import { XyoEthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
1
+ import { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
2
2
  import { FeeData, FeePerGas, PriorityFeePerGas } from '@xyo-network/gas-price-payload-plugin'
3
3
 
4
- const getBaseFee = (payload: XyoEthereumGasEthersPayload): number | undefined => {
4
+ const getBaseFee = (payload: EthereumGasEthersPayload): number | undefined => {
5
5
  const { lastBaseFeePerGas } = payload
6
6
  return lastBaseFeePerGas ? lastBaseFeePerGas / 1_000_000_000 : undefined
7
7
  }
8
8
 
9
- const getFeePerGas = (payload: XyoEthereumGasEthersPayload): Partial<FeePerGas> => {
9
+ const getFeePerGas = (payload: EthereumGasEthersPayload): Partial<FeePerGas> => {
10
10
  const { maxFeePerGas } = payload
11
11
  const high = maxFeePerGas ? maxFeePerGas / 1_000_000_000 : undefined
12
12
  return { high }
13
13
  }
14
14
 
15
- const getPriorityFeePerGas = (payload: XyoEthereumGasEthersPayload): Partial<PriorityFeePerGas> => {
15
+ const getPriorityFeePerGas = (payload: EthereumGasEthersPayload): Partial<PriorityFeePerGas> => {
16
16
  const { maxPriorityFeePerGas } = payload
17
17
  const high = maxPriorityFeePerGas ? maxPriorityFeePerGas / 1_000_000_000 : undefined
18
18
  return { high }
19
19
  }
20
20
 
21
- export const transformGasFromEthers = (payload: XyoEthereumGasEthersPayload): FeeData => {
21
+ export const transformGasFromEthers = (payload: EthereumGasEthersPayload): FeeData => {
22
22
  const baseFee = getBaseFee(payload)
23
23
  const feePerGas = getFeePerGas(payload)
24
24
  const priorityFeePerGas = getPriorityFeePerGas(payload)
@@ -1,13 +1,13 @@
1
- import { XyoEthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
1
+ import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
2
2
  import { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'
3
3
  import { linear } from 'regression'
4
4
 
5
- const getBaseFee = (payload: XyoEthereumGasEtherscanPayload): number | undefined => {
5
+ const getBaseFee = (payload: EthereumGasEtherscanPayload): number | undefined => {
6
6
  const { suggestBaseFee } = payload.result
7
7
  return parseFloat(suggestBaseFee)
8
8
  }
9
9
 
10
- const getFeePerGas = (payload: XyoEthereumGasEtherscanPayload): Partial<FeePerGas> => {
10
+ const getFeePerGas = (payload: EthereumGasEtherscanPayload): Partial<FeePerGas> => {
11
11
  const { FastGasPrice, ProposeGasPrice, SafeGasPrice } = payload.result
12
12
  const low = parseFloat(SafeGasPrice)
13
13
  const medium = parseFloat(ProposeGasPrice)
@@ -20,7 +20,7 @@ const getFeePerGas = (payload: XyoEthereumGasEtherscanPayload): Partial<FeePerGa
20
20
  return { high, low, medium, veryHigh }
21
21
  }
22
22
 
23
- export const transformGasFromEtherscan = (payload: XyoEthereumGasEtherscanPayload): FeeData => {
23
+ export const transformGasFromEtherscan = (payload: EthereumGasEtherscanPayload): FeeData => {
24
24
  const baseFee = getBaseFee(payload)
25
25
  const feePerGas = getFeePerGas(payload)
26
26
  const priorityFeePerGas = {}
@@ -1,14 +1,14 @@
1
1
  /* eslint-disable sort-keys-fix/sort-keys-fix */
2
- import { XyoEthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
2
+ import { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
3
3
  import { FeeData, FeePerGas, PriorityFeePerGas } from '@xyo-network/gas-price-payload-plugin'
4
4
  import { linear } from 'regression'
5
5
 
6
- const getBaseFee = (payload: XyoEthereumGasEthgasstationPayload): number | undefined => {
6
+ const getBaseFee = (payload: EthereumGasEthgasstationPayload): number | undefined => {
7
7
  const { baseFee } = payload
8
8
  return baseFee
9
9
  }
10
10
 
11
- const getFeePerGas = (payload: XyoEthereumGasEthgasstationPayload): Partial<FeePerGas> => {
11
+ const getFeePerGas = (payload: EthereumGasEthgasstationPayload): Partial<FeePerGas> => {
12
12
  const { standard: medium, fast: high, instant: veryHigh } = payload.gasPrice
13
13
  const trend = linear([
14
14
  [1, medium],
@@ -19,7 +19,7 @@ const getFeePerGas = (payload: XyoEthereumGasEthgasstationPayload): Partial<FeeP
19
19
  return { low, medium, high, veryHigh }
20
20
  }
21
21
 
22
- const getPriorityFeePerGas = (payload: XyoEthereumGasEthgasstationPayload): Partial<PriorityFeePerGas> => {
22
+ const getPriorityFeePerGas = (payload: EthereumGasEthgasstationPayload): Partial<PriorityFeePerGas> => {
23
23
  const { standard: medium, fast: high, instant: veryHigh } = payload.priorityFee
24
24
  const trend = linear([
25
25
  [1, medium],
@@ -30,7 +30,7 @@ const getPriorityFeePerGas = (payload: XyoEthereumGasEthgasstationPayload): Part
30
30
  return { low, medium, high, veryHigh }
31
31
  }
32
32
 
33
- export const transformGasFromEthgasstation = (payload: XyoEthereumGasEthgasstationPayload): FeeData => {
33
+ export const transformGasFromEthgasstation = (payload: EthereumGasEthgasstationPayload): FeeData => {
34
34
  const baseFee = getBaseFee(payload)
35
35
  const feePerGas = getFeePerGas(payload)
36
36
  const priorityFeePerGas = getPriorityFeePerGas(payload)
@@ -1,10 +1,6 @@
1
- import {
2
- EstimatedBaseFee,
3
- XyoEthereumGasBlocknativePayload,
4
- XyoEthereumGasBlocknativeSchema,
5
- } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
1
+ import { EstimatedBaseFee, EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
6
2
 
7
- export const sampleBlocknativeGas: XyoEthereumGasBlocknativePayload = {
3
+ export const sampleBlocknativeGas: EthereumGasBlocknativePayload = {
8
4
  blockPrices: [
9
5
  {
10
6
  baseFeePerGas: 13.691764456,
@@ -90,7 +86,7 @@ export const sampleBlocknativeGas: XyoEthereumGasBlocknativePayload = {
90
86
  maxPrice: 36,
91
87
  msSinceLastBlock: 3643,
92
88
  network: 'main',
93
- schema: XyoEthereumGasBlocknativeSchema,
89
+ schema: EthereumGasBlocknativeSchema,
94
90
  system: 'ethereum',
95
91
  timestamp: 1668697958837,
96
92
  unit: 'gwei',
@@ -1,6 +1,6 @@
1
- import { XyoEthereumGasEtherchainV2Payload, XyoEthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
1
+ import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
2
2
 
3
- export const sampleEtherchainGasV2: XyoEthereumGasEtherchainV2Payload = {
3
+ export const sampleEtherchainGasV2: EthereumGasEtherchainV2Payload = {
4
4
  code: 200,
5
5
  data: {
6
6
  fast: 19803047330,
@@ -10,6 +10,6 @@ export const sampleEtherchainGasV2: XyoEthereumGasEtherchainV2Payload = {
10
10
  standard: 12000000000,
11
11
  timestamp: 1668621234096,
12
12
  },
13
- schema: XyoEthereumGasEtherchainV2Schema,
13
+ schema: EthereumGasEtherchainV2Schema,
14
14
  timestamp: 1668621240790,
15
15
  }
@@ -1,10 +1,10 @@
1
- import { XyoEthereumGasEthersPayload, XyoEthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
1
+ import { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
2
2
 
3
- export const sampleEthersGas: XyoEthereumGasEthersPayload = {
3
+ export const sampleEthersGas: EthereumGasEthersPayload = {
4
4
  gasPrice: 13547863640,
5
5
  lastBaseFeePerGas: 13447862081,
6
6
  maxFeePerGas: 28395724162,
7
7
  maxPriorityFeePerGas: 1500000000,
8
- schema: XyoEthereumGasEthersSchema,
8
+ schema: EthereumGasEthersSchema,
9
9
  timestamp: 1668697958837,
10
10
  }
@@ -1,6 +1,6 @@
1
- import { XyoEthereumGasEtherscanPayload, XyoEthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
1
+ import { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
2
2
 
3
- export const sampleEtherscanGas: XyoEthereumGasEtherscanPayload = {
3
+ export const sampleEtherscanGas: EthereumGasEtherscanPayload = {
4
4
  message: 'OK',
5
5
  result: {
6
6
  FastGasPrice: '30',
@@ -10,7 +10,7 @@ export const sampleEtherscanGas: XyoEthereumGasEtherscanPayload = {
10
10
  gasUsedRatio: '0.416266666666667,0.5672862,0.540979033333333,0.342410966666667,0.389071233333333',
11
11
  suggestBaseFee: '27.616709247',
12
12
  },
13
- schema: XyoEthereumGasEtherscanSchema,
13
+ schema: EthereumGasEtherscanSchema,
14
14
  status: '1',
15
15
  timestamp: 1668697958837,
16
16
  }
@@ -1,6 +1,6 @@
1
- import { XyoEthereumGasEthgasstationPayload, XyoEthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
1
+ import { EthereumGasEthgasstationPayload, EthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
2
2
 
3
- export const sampleEthgasstationGas: XyoEthereumGasEthgasstationPayload = {
3
+ export const sampleEthgasstationGas: EthereumGasEthgasstationPayload = {
4
4
  baseFee: 10,
5
5
  blockNumber: 16028883,
6
6
  blockTime: 11.88,
@@ -15,6 +15,6 @@ export const sampleEthgasstationGas: XyoEthereumGasEthgasstationPayload = {
15
15
  instant: 2,
16
16
  standard: 2,
17
17
  },
18
- schema: XyoEthereumGasEthgasstationSchema,
18
+ schema: EthereumGasEthgasstationSchema,
19
19
  timestamp: 1668697958837,
20
20
  }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isXyoEthereumGasBlocknativePayload = void 0;
4
- const blocknative_ethereum_gas_payload_plugin_1 = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
5
- const isXyoEthereumGasBlocknativePayload = (payload) => {
6
- return (payload === null || payload === void 0 ? void 0 : payload.schema) === blocknative_ethereum_gas_payload_plugin_1.XyoEthereumGasBlocknativeSchema;
7
- };
8
- exports.isXyoEthereumGasBlocknativePayload = isXyoEthereumGasBlocknativePayload;
9
- //# sourceMappingURL=isXyoEthereumGasBlocknativePayload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isXyoEthereumGasBlocknativePayload.js","sourceRoot":"","sources":["../../../../src/lib/identities/isXyoEthereumGasBlocknativePayload.ts"],"names":[],"mappings":";;;AAAA,kHAAwI;AAGjI,MAAM,kCAAkC,GAAG,CAAC,OAAwB,EAA+C,EAAE;IAC1H,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,MAAK,yEAA+B,CAAA;AAC5D,CAAC,CAAA;AAFY,QAAA,kCAAkC,sCAE9C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"isXyoEthereumGasEtherchainV2Payload.js","sourceRoot":"","sources":["../../../../src/lib/identities/isXyoEthereumGasEtherchainV2Payload.ts"],"names":[],"mappings":";;;AAAA,wIAAqJ;AAG9I,MAAM,mCAAmC,GAAG,CAAC,OAAwB,EAAgD,EAAE;IAC5H,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,MAAK,qFAAgC,CAAA;AAC7D,CAAC,CAAA;AAFY,QAAA,mCAAmC,uCAE/C"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isXyoEthereumGasEthersPayload = void 0;
4
- const ethers_ethereum_gas_payload_plugin_1 = require("@xyo-network/ethers-ethereum-gas-payload-plugin");
5
- const isXyoEthereumGasEthersPayload = (payload) => {
6
- return (payload === null || payload === void 0 ? void 0 : payload.schema) === ethers_ethereum_gas_payload_plugin_1.XyoEthereumGasEthersSchema;
7
- };
8
- exports.isXyoEthereumGasEthersPayload = isXyoEthereumGasEthersPayload;
9
- //# sourceMappingURL=isXyoEthereumGasEthersPayload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isXyoEthereumGasEthersPayload.js","sourceRoot":"","sources":["../../../../src/lib/identities/isXyoEthereumGasEthersPayload.ts"],"names":[],"mappings":";;;AAAA,wGAAyH;AAGlH,MAAM,6BAA6B,GAAG,CAAC,OAAwB,EAA0C,EAAE;IAChH,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,MAAK,+DAA0B,CAAA;AACvD,CAAC,CAAA;AAFY,QAAA,6BAA6B,iCAEzC"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isXyoEthereumGasEtherscanPayload = void 0;
4
- const etherscan_ethereum_gas_payload_plugin_1 = require("@xyo-network/etherscan-ethereum-gas-payload-plugin");
5
- const isXyoEthereumGasEtherscanPayload = (payload) => {
6
- return (payload === null || payload === void 0 ? void 0 : payload.schema) === etherscan_ethereum_gas_payload_plugin_1.XyoEthereumGasEtherscanSchema;
7
- };
8
- exports.isXyoEthereumGasEtherscanPayload = isXyoEthereumGasEtherscanPayload;
9
- //# sourceMappingURL=isXyoEthereumGasEtherscanPayload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isXyoEthereumGasEtherscanPayload.js","sourceRoot":"","sources":["../../../../src/lib/identities/isXyoEthereumGasEtherscanPayload.ts"],"names":[],"mappings":";;;AAAA,8GAAkI;AAG3H,MAAM,gCAAgC,GAAG,CAAC,OAAwB,EAA6C,EAAE;IACtH,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,MAAK,qEAA6B,CAAA;AAC1D,CAAC,CAAA;AAFY,QAAA,gCAAgC,oCAE5C"}