@xyo-network/gas-price-plugin 2.74.5 → 2.75.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.
- package/dist/browser/Diviner.cjs +257 -0
- package/dist/browser/Diviner.cjs.map +1 -0
- package/dist/browser/Diviner.d.mts.map +1 -0
- package/dist/browser/Diviner.d.ts.map +1 -0
- package/dist/browser/Diviner.js +236 -0
- package/dist/browser/Diviner.js.map +1 -0
- package/dist/browser/Plugin.cjs +272 -0
- package/dist/browser/Plugin.cjs.map +1 -0
- package/dist/browser/Plugin.d.mts.map +1 -0
- package/dist/browser/Plugin.d.ts.map +1 -0
- package/dist/browser/Plugin.js +251 -0
- package/dist/browser/Plugin.js.map +1 -0
- package/dist/browser/Schema.cjs +29 -0
- package/dist/browser/Schema.cjs.map +1 -0
- package/dist/browser/Schema.d.mts.map +1 -0
- package/dist/browser/Schema.d.ts.map +1 -0
- package/dist/browser/Schema.js +8 -0
- package/dist/browser/Schema.js.map +1 -0
- package/dist/{index.js → browser/index.cjs} +1 -8
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.mts.map +1 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/{index.mjs → browser/index.js} +1 -1
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/lib/average.cjs +50 -0
- package/dist/browser/lib/average.cjs.map +1 -0
- package/dist/browser/lib/average.d.mts.map +1 -0
- package/dist/browser/lib/average.d.ts.map +1 -0
- package/dist/browser/lib/average.js +29 -0
- package/dist/browser/lib/average.js.map +1 -0
- package/dist/browser/lib/divineGas.cjs +240 -0
- package/dist/browser/lib/divineGas.cjs.map +1 -0
- package/dist/browser/lib/divineGas.d.mts.map +1 -0
- package/dist/browser/lib/divineGas.d.ts.map +1 -0
- package/dist/browser/lib/divineGas.js +219 -0
- package/dist/browser/lib/divineGas.js.map +1 -0
- package/dist/browser/lib/identities/index.cjs +60 -0
- package/dist/browser/lib/identities/index.cjs.map +1 -0
- package/dist/browser/lib/identities/index.d.mts.map +1 -0
- package/dist/browser/lib/identities/index.d.ts.map +1 -0
- package/dist/browser/lib/identities/index.js +37 -0
- package/dist/browser/lib/identities/index.js.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.cjs +30 -0
- package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.cjs.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.d.mts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.d.ts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.js +9 -0
- package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.js.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.cjs +30 -0
- package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.cjs.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.d.mts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.d.ts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.js +9 -0
- package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.js.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEthersPayload.cjs +30 -0
- package/dist/browser/lib/identities/isEthereumGasEthersPayload.cjs.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEthersPayload.d.mts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEthersPayload.d.ts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEthersPayload.js +9 -0
- package/dist/browser/lib/identities/isEthereumGasEthersPayload.js.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.cjs +30 -0
- package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.cjs.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.d.mts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.d.ts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.js +9 -0
- package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.js.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.cjs +30 -0
- package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.cjs.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.d.mts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.d.ts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.js +9 -0
- package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.js.map +1 -0
- package/dist/browser/lib/index.cjs +242 -0
- package/dist/browser/lib/index.cjs.map +1 -0
- package/dist/browser/lib/index.d.mts.map +1 -0
- package/dist/browser/lib/index.d.ts.map +1 -0
- package/dist/browser/lib/index.js +219 -0
- package/dist/browser/lib/index.js.map +1 -0
- package/dist/browser/lib/transforms/index.cjs +172 -0
- package/dist/browser/lib/transforms/index.cjs.map +1 -0
- package/dist/browser/lib/transforms/index.d.mts.map +1 -0
- package/dist/browser/lib/transforms/index.d.ts.map +1 -0
- package/dist/browser/lib/transforms/index.js +149 -0
- package/dist/browser/lib/transforms/index.js.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromBlocknative.cjs +70 -0
- package/dist/browser/lib/transforms/transformGasFromBlocknative.cjs.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromBlocknative.d.mts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromBlocknative.d.ts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromBlocknative.js +49 -0
- package/dist/browser/lib/transforms/transformGasFromBlocknative.js.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEtherchainV2.cjs +40 -0
- package/dist/browser/lib/transforms/transformGasFromEtherchainV2.cjs.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEtherchainV2.d.mts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEtherchainV2.d.ts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEtherchainV2.js +19 -0
- package/dist/browser/lib/transforms/transformGasFromEtherchainV2.js.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEthers.cjs +46 -0
- package/dist/browser/lib/transforms/transformGasFromEthers.cjs.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEthers.d.mts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEthers.d.ts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEthers.js +25 -0
- package/dist/browser/lib/transforms/transformGasFromEthers.js.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEtherscan.cjs +49 -0
- package/dist/browser/lib/transforms/transformGasFromEtherscan.cjs.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEtherscan.d.mts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEtherscan.d.ts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEtherscan.js +28 -0
- package/dist/browser/lib/transforms/transformGasFromEtherscan.js.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEthgasstation.cjs +57 -0
- package/dist/browser/lib/transforms/transformGasFromEthgasstation.cjs.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEthgasstation.d.mts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEthgasstation.d.ts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEthgasstation.js +36 -0
- package/dist/browser/lib/transforms/transformGasFromEthgasstation.js.map +1 -0
- package/dist/browser/test/index.cjs +189 -0
- package/dist/browser/test/index.cjs.map +1 -0
- package/dist/browser/test/index.d.mts.map +1 -0
- package/dist/browser/test/index.d.ts.map +1 -0
- package/dist/browser/test/index.js +166 -0
- package/dist/browser/test/index.js.map +1 -0
- package/dist/browser/test/sampleBlocknativeGas.cjs +118 -0
- package/dist/browser/test/sampleBlocknativeGas.cjs.map +1 -0
- package/dist/browser/test/sampleBlocknativeGas.d.mts.map +1 -0
- package/dist/browser/test/sampleBlocknativeGas.d.ts.map +1 -0
- package/dist/browser/test/sampleBlocknativeGas.js +97 -0
- package/dist/browser/test/sampleBlocknativeGas.js.map +1 -0
- package/dist/browser/test/sampleEtherchainGasV2.cjs +40 -0
- package/dist/browser/test/sampleEtherchainGasV2.cjs.map +1 -0
- package/dist/browser/test/sampleEtherchainGasV2.d.mts.map +1 -0
- package/dist/browser/test/sampleEtherchainGasV2.d.ts.map +1 -0
- package/dist/browser/test/sampleEtherchainGasV2.js +19 -0
- package/dist/browser/test/sampleEtherchainGasV2.js.map +1 -0
- package/dist/browser/test/sampleEthersGas.cjs +35 -0
- package/dist/browser/test/sampleEthersGas.cjs.map +1 -0
- package/dist/browser/test/sampleEthersGas.d.mts.map +1 -0
- package/dist/browser/test/sampleEthersGas.d.ts.map +1 -0
- package/dist/browser/test/sampleEthersGas.js +14 -0
- package/dist/browser/test/sampleEthersGas.js.map +1 -0
- package/dist/browser/test/sampleEtherscanGas.cjs +41 -0
- package/dist/browser/test/sampleEtherscanGas.cjs.map +1 -0
- package/dist/browser/test/sampleEtherscanGas.d.mts.map +1 -0
- package/dist/browser/test/sampleEtherscanGas.d.ts.map +1 -0
- package/dist/browser/test/sampleEtherscanGas.js +20 -0
- package/dist/browser/test/sampleEtherscanGas.js.map +1 -0
- package/dist/browser/test/sampleEthgasstationGas.cjs +45 -0
- package/dist/browser/test/sampleEthgasstationGas.cjs.map +1 -0
- package/dist/browser/test/sampleEthgasstationGas.d.mts.map +1 -0
- package/dist/browser/test/sampleEthgasstationGas.d.ts.map +1 -0
- package/dist/browser/test/sampleEthgasstationGas.js +24 -0
- package/dist/browser/test/sampleEthgasstationGas.js.map +1 -0
- package/dist/node/Diviner.d.mts +16 -0
- package/dist/node/Diviner.d.mts.map +1 -0
- package/dist/node/Diviner.d.ts +16 -0
- package/dist/node/Diviner.d.ts.map +1 -0
- package/dist/node/Diviner.js +40 -0
- package/dist/node/Diviner.js.map +1 -0
- package/dist/node/Diviner.mjs +16 -0
- package/dist/node/Diviner.mjs.map +1 -0
- package/dist/node/Plugin.d.mts +50 -0
- package/dist/node/Plugin.d.mts.map +1 -0
- package/dist/node/Plugin.d.ts +50 -0
- package/dist/node/Plugin.d.ts.map +1 -0
- package/dist/node/Plugin.js +40 -0
- package/dist/node/Plugin.js.map +1 -0
- package/dist/node/Plugin.mjs +16 -0
- package/dist/node/Plugin.mjs.map +1 -0
- package/dist/node/Schema.d.mts +5 -0
- package/dist/node/Schema.d.mts.map +1 -0
- package/dist/node/Schema.d.ts +5 -0
- package/dist/node/Schema.d.ts.map +1 -0
- package/dist/node/Schema.js +32 -0
- package/dist/node/Schema.js.map +1 -0
- package/dist/node/Schema.mjs +7 -0
- package/dist/node/Schema.mjs.map +1 -0
- package/dist/node/index.d.mts +6 -0
- package/dist/node/index.d.mts.map +1 -0
- package/dist/node/index.d.ts +6 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +36 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/index.mjs +9 -0
- package/dist/node/index.mjs.map +1 -0
- package/dist/node/lib/average.d.mts +8 -0
- package/dist/node/lib/average.d.mts.map +1 -0
- package/dist/node/lib/average.d.ts +8 -0
- package/dist/node/lib/average.d.ts.map +1 -0
- package/dist/node/lib/average.js +52 -0
- package/dist/node/lib/average.js.map +1 -0
- package/dist/node/lib/average.mjs +28 -0
- package/dist/node/lib/average.mjs.map +1 -0
- package/dist/node/lib/divineGas.d.mts +4 -0
- package/dist/node/lib/divineGas.d.mts.map +1 -0
- package/dist/node/lib/divineGas.d.ts +4 -0
- package/dist/node/lib/divineGas.d.ts.map +1 -0
- package/dist/node/lib/divineGas.js +45 -0
- package/dist/node/lib/divineGas.js.map +1 -0
- package/dist/node/lib/divineGas.mjs +33 -0
- package/dist/node/lib/divineGas.mjs.map +1 -0
- package/dist/node/lib/identities/index.d.mts +6 -0
- package/dist/node/lib/identities/index.d.mts.map +1 -0
- package/dist/node/lib/identities/index.d.ts +6 -0
- package/dist/node/lib/identities/index.d.ts.map +1 -0
- package/dist/node/lib/identities/index.js +31 -0
- package/dist/node/lib/identities/index.js.map +1 -0
- package/dist/node/lib/identities/index.mjs +6 -0
- package/dist/node/lib/identities/index.mjs.map +1 -0
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.mts +6 -0
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.mts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.ts +6 -0
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.ts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.js +32 -0
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.js.map +1 -0
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.mjs +8 -0
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.mjs.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.mts +6 -0
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.mts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.ts +6 -0
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.ts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.js +32 -0
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.js.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.mjs +8 -0
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.mjs.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEthersPayload.d.mts +6 -0
- package/dist/node/lib/identities/isEthereumGasEthersPayload.d.mts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEthersPayload.d.ts +6 -0
- package/dist/node/lib/identities/isEthereumGasEthersPayload.d.ts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEthersPayload.js +32 -0
- package/dist/node/lib/identities/isEthereumGasEthersPayload.js.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEthersPayload.mjs +8 -0
- package/dist/node/lib/identities/isEthereumGasEthersPayload.mjs.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.mts +6 -0
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.mts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.ts +6 -0
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.ts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.js +32 -0
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.js.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.mjs +8 -0
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.mjs.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.mts +6 -0
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.mts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.ts +6 -0
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.ts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.js +32 -0
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.js.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.mjs +8 -0
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.mjs.map +1 -0
- package/dist/node/lib/index.d.mts +2 -0
- package/dist/node/lib/index.d.mts.map +1 -0
- package/dist/node/lib/index.d.ts +2 -0
- package/dist/node/lib/index.d.ts.map +1 -0
- package/dist/node/lib/index.js +23 -0
- package/dist/node/lib/index.js.map +1 -0
- package/dist/node/lib/index.mjs +2 -0
- package/dist/node/lib/index.mjs.map +1 -0
- package/dist/node/lib/transforms/index.d.mts +6 -0
- package/dist/node/lib/transforms/index.d.mts.map +1 -0
- package/dist/node/lib/transforms/index.d.ts +6 -0
- package/dist/node/lib/transforms/index.d.ts.map +1 -0
- package/dist/node/lib/transforms/index.js +31 -0
- package/dist/node/lib/transforms/index.js.map +1 -0
- package/dist/node/lib/transforms/index.mjs +6 -0
- package/dist/node/lib/transforms/index.mjs.map +1 -0
- package/dist/node/lib/transforms/transformGasFromBlocknative.d.mts +4 -0
- package/dist/node/lib/transforms/transformGasFromBlocknative.d.mts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromBlocknative.d.ts +4 -0
- package/dist/node/lib/transforms/transformGasFromBlocknative.d.ts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromBlocknative.js +72 -0
- package/dist/node/lib/transforms/transformGasFromBlocknative.js.map +1 -0
- package/dist/node/lib/transforms/transformGasFromBlocknative.mjs +48 -0
- package/dist/node/lib/transforms/transformGasFromBlocknative.mjs.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.mts +4 -0
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.mts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.ts +4 -0
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.ts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.js +42 -0
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.js.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.mjs +18 -0
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.mjs.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEthers.d.mts +4 -0
- package/dist/node/lib/transforms/transformGasFromEthers.d.mts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEthers.d.ts +4 -0
- package/dist/node/lib/transforms/transformGasFromEthers.d.ts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEthers.js +48 -0
- package/dist/node/lib/transforms/transformGasFromEthers.js.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEthers.mjs +24 -0
- package/dist/node/lib/transforms/transformGasFromEthers.mjs.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEtherscan.d.mts +4 -0
- package/dist/node/lib/transforms/transformGasFromEtherscan.d.mts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEtherscan.d.ts +4 -0
- package/dist/node/lib/transforms/transformGasFromEtherscan.d.ts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEtherscan.js +51 -0
- package/dist/node/lib/transforms/transformGasFromEtherscan.js.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEtherscan.mjs +27 -0
- package/dist/node/lib/transforms/transformGasFromEtherscan.mjs.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEthgasstation.d.mts +4 -0
- package/dist/node/lib/transforms/transformGasFromEthgasstation.d.mts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEthgasstation.d.ts +4 -0
- package/dist/node/lib/transforms/transformGasFromEthgasstation.d.ts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEthgasstation.js +59 -0
- package/dist/node/lib/transforms/transformGasFromEthgasstation.js.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEthgasstation.mjs +35 -0
- package/dist/node/lib/transforms/transformGasFromEthgasstation.mjs.map +1 -0
- package/dist/node/test/index.d.mts +6 -0
- package/dist/node/test/index.d.mts.map +1 -0
- package/dist/node/test/index.d.ts +6 -0
- package/dist/node/test/index.d.ts.map +1 -0
- package/dist/node/test/index.js +31 -0
- package/dist/node/test/index.js.map +1 -0
- package/dist/node/test/index.mjs +6 -0
- package/dist/node/test/index.mjs.map +1 -0
- package/dist/node/test/sampleBlocknativeGas.d.mts +3 -0
- package/dist/node/test/sampleBlocknativeGas.d.mts.map +1 -0
- package/dist/node/test/sampleBlocknativeGas.d.ts +3 -0
- package/dist/node/test/sampleBlocknativeGas.d.ts.map +1 -0
- package/dist/node/test/sampleBlocknativeGas.js +120 -0
- package/dist/node/test/sampleBlocknativeGas.js.map +1 -0
- package/dist/node/test/sampleBlocknativeGas.mjs +96 -0
- package/dist/node/test/sampleBlocknativeGas.mjs.map +1 -0
- package/dist/node/test/sampleEtherchainGasV2.d.mts +3 -0
- package/dist/node/test/sampleEtherchainGasV2.d.mts.map +1 -0
- package/dist/node/test/sampleEtherchainGasV2.d.ts +3 -0
- package/dist/node/test/sampleEtherchainGasV2.d.ts.map +1 -0
- package/dist/node/test/sampleEtherchainGasV2.js +42 -0
- package/dist/node/test/sampleEtherchainGasV2.js.map +1 -0
- package/dist/node/test/sampleEtherchainGasV2.mjs +18 -0
- package/dist/node/test/sampleEtherchainGasV2.mjs.map +1 -0
- package/dist/node/test/sampleEthersGas.d.mts +3 -0
- package/dist/node/test/sampleEthersGas.d.mts.map +1 -0
- package/dist/node/test/sampleEthersGas.d.ts +3 -0
- package/dist/node/test/sampleEthersGas.d.ts.map +1 -0
- package/dist/node/test/sampleEthersGas.js +37 -0
- package/dist/node/test/sampleEthersGas.js.map +1 -0
- package/dist/node/test/sampleEthersGas.mjs +13 -0
- package/dist/node/test/sampleEthersGas.mjs.map +1 -0
- package/dist/node/test/sampleEtherscanGas.d.mts +3 -0
- package/dist/node/test/sampleEtherscanGas.d.mts.map +1 -0
- package/dist/node/test/sampleEtherscanGas.d.ts +3 -0
- package/dist/node/test/sampleEtherscanGas.d.ts.map +1 -0
- package/dist/node/test/sampleEtherscanGas.js +43 -0
- package/dist/node/test/sampleEtherscanGas.js.map +1 -0
- package/dist/node/test/sampleEtherscanGas.mjs +19 -0
- package/dist/node/test/sampleEtherscanGas.mjs.map +1 -0
- package/dist/node/test/sampleEthgasstationGas.d.mts +3 -0
- package/dist/node/test/sampleEthgasstationGas.d.mts.map +1 -0
- package/dist/node/test/sampleEthgasstationGas.d.ts +3 -0
- package/dist/node/test/sampleEthgasstationGas.d.ts.map +1 -0
- package/dist/node/test/sampleEthgasstationGas.js +47 -0
- package/dist/node/test/sampleEthgasstationGas.js.map +1 -0
- package/dist/node/test/sampleEthgasstationGas.mjs +23 -0
- package/dist/node/test/sampleEthgasstationGas.mjs.map +1 -0
- package/package.json +38 -35
- package/dist/Diviner.d.mts.map +0 -1
- package/dist/Diviner.d.ts.map +0 -1
- package/dist/Plugin.d.mts.map +0 -1
- package/dist/Plugin.d.ts.map +0 -1
- package/dist/Schema.d.mts.map +0 -1
- package/dist/Schema.d.ts.map +0 -1
- package/dist/docs.json +0 -21982
- package/dist/index.d.mts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/lib/average.d.mts.map +0 -1
- package/dist/lib/average.d.ts.map +0 -1
- package/dist/lib/divineGas.d.mts.map +0 -1
- package/dist/lib/divineGas.d.ts.map +0 -1
- package/dist/lib/identities/index.d.mts.map +0 -1
- package/dist/lib/identities/index.d.ts.map +0 -1
- package/dist/lib/identities/isEthereumGasBlocknativePayload.d.mts.map +0 -1
- package/dist/lib/identities/isEthereumGasBlocknativePayload.d.ts.map +0 -1
- package/dist/lib/identities/isEthereumGasEtherchainV2Payload.d.mts.map +0 -1
- package/dist/lib/identities/isEthereumGasEtherchainV2Payload.d.ts.map +0 -1
- package/dist/lib/identities/isEthereumGasEthersPayload.d.mts.map +0 -1
- package/dist/lib/identities/isEthereumGasEthersPayload.d.ts.map +0 -1
- package/dist/lib/identities/isEthereumGasEtherscanPayload.d.mts.map +0 -1
- package/dist/lib/identities/isEthereumGasEtherscanPayload.d.ts.map +0 -1
- package/dist/lib/identities/isEthereumGasEthgasstationPayload.d.mts.map +0 -1
- package/dist/lib/identities/isEthereumGasEthgasstationPayload.d.ts.map +0 -1
- package/dist/lib/index.d.mts.map +0 -1
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/transforms/index.d.mts.map +0 -1
- package/dist/lib/transforms/index.d.ts.map +0 -1
- package/dist/lib/transforms/transformGasFromBlocknative.d.mts.map +0 -1
- package/dist/lib/transforms/transformGasFromBlocknative.d.ts.map +0 -1
- package/dist/lib/transforms/transformGasFromEtherchainV2.d.mts.map +0 -1
- package/dist/lib/transforms/transformGasFromEtherchainV2.d.ts.map +0 -1
- package/dist/lib/transforms/transformGasFromEthers.d.mts.map +0 -1
- package/dist/lib/transforms/transformGasFromEthers.d.ts.map +0 -1
- package/dist/lib/transforms/transformGasFromEtherscan.d.mts.map +0 -1
- package/dist/lib/transforms/transformGasFromEtherscan.d.ts.map +0 -1
- package/dist/lib/transforms/transformGasFromEthgasstation.d.mts.map +0 -1
- package/dist/lib/transforms/transformGasFromEthgasstation.d.ts.map +0 -1
- package/dist/test/index.d.mts.map +0 -1
- package/dist/test/index.d.ts.map +0 -1
- package/dist/test/sampleBlocknativeGas.d.mts.map +0 -1
- package/dist/test/sampleBlocknativeGas.d.ts.map +0 -1
- package/dist/test/sampleEtherchainGasV2.d.mts.map +0 -1
- package/dist/test/sampleEtherchainGasV2.d.ts.map +0 -1
- package/dist/test/sampleEthersGas.d.mts.map +0 -1
- package/dist/test/sampleEthersGas.d.ts.map +0 -1
- package/dist/test/sampleEtherscanGas.d.mts.map +0 -1
- package/dist/test/sampleEtherscanGas.d.ts.map +0 -1
- package/dist/test/sampleEthgasstationGas.d.mts.map +0 -1
- package/dist/test/sampleEthgasstationGas.d.ts.map +0 -1
- /package/dist/{Diviner.d.mts → browser/Diviner.d.mts} +0 -0
- /package/dist/{Diviner.d.ts → browser/Diviner.d.ts} +0 -0
- /package/dist/{Plugin.d.mts → browser/Plugin.d.mts} +0 -0
- /package/dist/{Plugin.d.ts → browser/Plugin.d.ts} +0 -0
- /package/dist/{Schema.d.mts → browser/Schema.d.mts} +0 -0
- /package/dist/{Schema.d.ts → browser/Schema.d.ts} +0 -0
- /package/dist/{index.d.mts → browser/index.d.mts} +0 -0
- /package/dist/{index.d.ts → browser/index.d.ts} +0 -0
- /package/dist/{lib → browser/lib}/average.d.mts +0 -0
- /package/dist/{lib → browser/lib}/average.d.ts +0 -0
- /package/dist/{lib → browser/lib}/divineGas.d.mts +0 -0
- /package/dist/{lib → browser/lib}/divineGas.d.ts +0 -0
- /package/dist/{lib → browser/lib}/identities/index.d.mts +0 -0
- /package/dist/{lib → browser/lib}/identities/index.d.ts +0 -0
- /package/dist/{lib → browser/lib}/identities/isEthereumGasBlocknativePayload.d.mts +0 -0
- /package/dist/{lib → browser/lib}/identities/isEthereumGasBlocknativePayload.d.ts +0 -0
- /package/dist/{lib → browser/lib}/identities/isEthereumGasEtherchainV2Payload.d.mts +0 -0
- /package/dist/{lib → browser/lib}/identities/isEthereumGasEtherchainV2Payload.d.ts +0 -0
- /package/dist/{lib → browser/lib}/identities/isEthereumGasEthersPayload.d.mts +0 -0
- /package/dist/{lib → browser/lib}/identities/isEthereumGasEthersPayload.d.ts +0 -0
- /package/dist/{lib → browser/lib}/identities/isEthereumGasEtherscanPayload.d.mts +0 -0
- /package/dist/{lib → browser/lib}/identities/isEthereumGasEtherscanPayload.d.ts +0 -0
- /package/dist/{lib → browser/lib}/identities/isEthereumGasEthgasstationPayload.d.mts +0 -0
- /package/dist/{lib → browser/lib}/identities/isEthereumGasEthgasstationPayload.d.ts +0 -0
- /package/dist/{lib → browser/lib}/index.d.mts +0 -0
- /package/dist/{lib → browser/lib}/index.d.ts +0 -0
- /package/dist/{lib → browser/lib}/transforms/index.d.mts +0 -0
- /package/dist/{lib → browser/lib}/transforms/index.d.ts +0 -0
- /package/dist/{lib → browser/lib}/transforms/transformGasFromBlocknative.d.mts +0 -0
- /package/dist/{lib → browser/lib}/transforms/transformGasFromBlocknative.d.ts +0 -0
- /package/dist/{lib → browser/lib}/transforms/transformGasFromEtherchainV2.d.mts +0 -0
- /package/dist/{lib → browser/lib}/transforms/transformGasFromEtherchainV2.d.ts +0 -0
- /package/dist/{lib → browser/lib}/transforms/transformGasFromEthers.d.mts +0 -0
- /package/dist/{lib → browser/lib}/transforms/transformGasFromEthers.d.ts +0 -0
- /package/dist/{lib → browser/lib}/transforms/transformGasFromEtherscan.d.mts +0 -0
- /package/dist/{lib → browser/lib}/transforms/transformGasFromEtherscan.d.ts +0 -0
- /package/dist/{lib → browser/lib}/transforms/transformGasFromEthgasstation.d.mts +0 -0
- /package/dist/{lib → browser/lib}/transforms/transformGasFromEthgasstation.d.ts +0 -0
- /package/dist/{test → browser/test}/index.d.mts +0 -0
- /package/dist/{test → browser/test}/index.d.ts +0 -0
- /package/dist/{test → browser/test}/sampleBlocknativeGas.d.mts +0 -0
- /package/dist/{test → browser/test}/sampleBlocknativeGas.d.ts +0 -0
- /package/dist/{test → browser/test}/sampleEtherchainGasV2.d.mts +0 -0
- /package/dist/{test → browser/test}/sampleEtherchainGasV2.d.ts +0 -0
- /package/dist/{test → browser/test}/sampleEthersGas.d.mts +0 -0
- /package/dist/{test → browser/test}/sampleEthersGas.d.ts +0 -0
- /package/dist/{test → browser/test}/sampleEtherscanGas.d.mts +0 -0
- /package/dist/{test → browser/test}/sampleEtherscanGas.d.ts +0 -0
- /package/dist/{test → browser/test}/sampleEthgasstationGas.d.mts +0 -0
- /package/dist/{test → browser/test}/sampleEthgasstationGas.d.ts +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AbstractDiviner } from "@xyo-network/abstract-diviner";
|
|
2
|
+
import { EthereumGasSchema } from "@xyo-network/gas-price-payload-plugin";
|
|
3
|
+
import { divineGas } from "./lib";
|
|
4
|
+
import { EthereumGasDivinerConfigSchema } from "./Schema";
|
|
5
|
+
class EthereumGasDiviner extends AbstractDiviner {
|
|
6
|
+
static configSchemas = [EthereumGasDivinerConfigSchema];
|
|
7
|
+
static targetSchema = EthereumGasSchema;
|
|
8
|
+
divineHandler(payloads) {
|
|
9
|
+
const cost = divineGas(payloads ?? []);
|
|
10
|
+
return [cost];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
EthereumGasDiviner
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=Diviner.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Diviner.ts"],"sourcesContent":["import { AbstractDiviner } from '@xyo-network/abstract-diviner'\nimport { DivinerConfig, DivinerModule, DivinerParams } from '@xyo-network/diviner'\nimport { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport { Promisable } from '@xyo-network/promise'\n\nimport { divineGas } from './lib'\nimport { EthereumGasDivinerConfigSchema } from './Schema'\n\nexport type EthereumGasDivinerConfig = DivinerConfig<{ schema: EthereumGasDivinerConfigSchema }>\nexport type EthereumGasDivinerParams = DivinerParams<AnyConfigSchema<EthereumGasDivinerConfig>>\n\nexport class EthereumGasDiviner<TParams extends EthereumGasDivinerParams = EthereumGasDivinerParams>\n extends AbstractDiviner<TParams>\n implements DivinerModule\n{\n static override readonly configSchemas: string[] = [EthereumGasDivinerConfigSchema]\n static override targetSchema: string = EthereumGasSchema\n\n protected override divineHandler(payloads?: Payload[]): Promisable<Payload[]> {\n const cost = divineGas(payloads ?? [])\n return [cost]\n }\n}\n"],"mappings":"AAAA,SAAS,uBAAuB;AAEhC,SAAS,yBAAyB;AAKlC,SAAS,iBAAiB;AAC1B,SAAS,sCAAsC;AAKxC,MAAM,2BACH,gBAEV;AAAA,EACE,OAAyB,gBAA0B,CAAC,8BAA8B;AAAA,EAClF,OAAgB,eAAuB;AAAA,EAEpB,cAAc,UAA6C;AAC5E,UAAM,OAAO,UAAU,YAAY,CAAC,CAAC;AACrC,WAAO,CAAC,IAAI;AAAA,EACd;AACF;","names":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { EthereumGasDiviner } from './Diviner';
|
|
2
|
+
export declare const EthereumGasPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<EthereumGasDiviner<import("@xyo-network/core").BaseParamsFields & {
|
|
3
|
+
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
4
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
5
|
+
accountDerivationPath?: string | undefined;
|
|
6
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
7
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
8
|
+
readonly name?: string | undefined;
|
|
9
|
+
readonly paging?: Record<string, {
|
|
10
|
+
size?: number | undefined;
|
|
11
|
+
}> | undefined;
|
|
12
|
+
readonly security?: {
|
|
13
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
14
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
15
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly sign?: boolean | undefined;
|
|
18
|
+
readonly storeQueries?: boolean | undefined;
|
|
19
|
+
readonly timestamp?: boolean | undefined;
|
|
20
|
+
} & Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
21
|
+
accountDerivationPath?: string | undefined;
|
|
22
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
23
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
24
|
+
readonly name?: string | undefined;
|
|
25
|
+
readonly paging?: Record<string, {
|
|
26
|
+
size?: number | undefined;
|
|
27
|
+
}> | undefined;
|
|
28
|
+
readonly security?: {
|
|
29
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
30
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
31
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
readonly sign?: boolean | undefined;
|
|
34
|
+
readonly storeQueries?: boolean | undefined;
|
|
35
|
+
readonly timestamp?: boolean | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
|
|
38
|
+
} & Omit<{
|
|
39
|
+
schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
|
|
40
|
+
}, "schema">, "schema"> & {
|
|
41
|
+
schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
|
|
42
|
+
}, "schema"> & {
|
|
43
|
+
schema: string;
|
|
44
|
+
}, "schema"> & {
|
|
45
|
+
schema: string;
|
|
46
|
+
};
|
|
47
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
48
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
49
|
+
}>>;
|
|
50
|
+
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAE9C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQ3B,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { EthereumGasDiviner } from './Diviner';
|
|
2
|
+
export declare const EthereumGasPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<EthereumGasDiviner<import("@xyo-network/core").BaseParamsFields & {
|
|
3
|
+
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
4
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
5
|
+
accountDerivationPath?: string | undefined;
|
|
6
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
7
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
8
|
+
readonly name?: string | undefined;
|
|
9
|
+
readonly paging?: Record<string, {
|
|
10
|
+
size?: number | undefined;
|
|
11
|
+
}> | undefined;
|
|
12
|
+
readonly security?: {
|
|
13
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
14
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
15
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly sign?: boolean | undefined;
|
|
18
|
+
readonly storeQueries?: boolean | undefined;
|
|
19
|
+
readonly timestamp?: boolean | undefined;
|
|
20
|
+
} & Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
21
|
+
accountDerivationPath?: string | undefined;
|
|
22
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
23
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
24
|
+
readonly name?: string | undefined;
|
|
25
|
+
readonly paging?: Record<string, {
|
|
26
|
+
size?: number | undefined;
|
|
27
|
+
}> | undefined;
|
|
28
|
+
readonly security?: {
|
|
29
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
30
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
31
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
readonly sign?: boolean | undefined;
|
|
34
|
+
readonly storeQueries?: boolean | undefined;
|
|
35
|
+
readonly timestamp?: boolean | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
|
|
38
|
+
} & Omit<{
|
|
39
|
+
schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
|
|
40
|
+
}, "schema">, "schema"> & {
|
|
41
|
+
schema: "network.xyo.blockchain.ethereum.gas.diviner.config";
|
|
42
|
+
}, "schema"> & {
|
|
43
|
+
schema: string;
|
|
44
|
+
}, "schema"> & {
|
|
45
|
+
schema: string;
|
|
46
|
+
};
|
|
47
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
48
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
49
|
+
}>>;
|
|
50
|
+
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAE9C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQ3B,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var Plugin_exports = {};
|
|
20
|
+
__export(Plugin_exports, {
|
|
21
|
+
EthereumGasPlugin: () => EthereumGasPlugin
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(Plugin_exports);
|
|
24
|
+
var import_gas_price_payload_plugin = require("@xyo-network/gas-price-payload-plugin");
|
|
25
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
26
|
+
var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
|
|
27
|
+
var import_Diviner = require("./Diviner");
|
|
28
|
+
const EthereumGasPlugin = () => (0, import_payloadset_plugin.createPayloadSetDivinerPlugin)(
|
|
29
|
+
{ required: { [import_gas_price_payload_plugin.EthereumGasSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
30
|
+
{
|
|
31
|
+
diviner: async (params) => {
|
|
32
|
+
return await import_Diviner.EthereumGasDiviner.create(params);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
EthereumGasPlugin
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=Plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts"],"sourcesContent":["import { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasDiviner } from './Diviner'\n\nexport const EthereumGasPlugin = () =>\n createPayloadSetDivinerPlugin<EthereumGasDiviner>(\n { required: { [EthereumGasSchema]: 1 }, schema: PayloadSetSchema },\n {\n diviner: async (params) => {\n return (await EthereumGasDiviner.create(params)) as EthereumGasDiviner\n },\n },\n )\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAAkC;AAClC,2BAAiC;AACjC,+BAA8C;AAE9C,qBAAmC;AAE5B,MAAM,oBAAoB,UAC/B;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,iDAAiB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACjE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,kCAAmB,OAAO,MAAM;AAAA,IAChD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EthereumGasSchema } from "@xyo-network/gas-price-payload-plugin";
|
|
2
|
+
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
3
|
+
import { createPayloadSetDivinerPlugin } from "@xyo-network/payloadset-plugin";
|
|
4
|
+
import { EthereumGasDiviner } from "./Diviner";
|
|
5
|
+
const EthereumGasPlugin = () => createPayloadSetDivinerPlugin(
|
|
6
|
+
{ required: { [EthereumGasSchema]: 1 }, schema: PayloadSetSchema },
|
|
7
|
+
{
|
|
8
|
+
diviner: async (params) => {
|
|
9
|
+
return await EthereumGasDiviner.create(params);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
export {
|
|
14
|
+
EthereumGasPlugin
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=Plugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts"],"sourcesContent":["import { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasDiviner } from './Diviner'\n\nexport const EthereumGasPlugin = () =>\n createPayloadSetDivinerPlugin<EthereumGasDiviner>(\n { required: { [EthereumGasSchema]: 1 }, schema: PayloadSetSchema },\n {\n diviner: async (params) => {\n return (await EthereumGasDiviner.create(params)) as EthereumGasDiviner\n },\n },\n )\n"],"mappings":"AAAA,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAE9C,SAAS,0BAA0B;AAE5B,MAAM,oBAAoB,MAC/B;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,iBAAiB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACjE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,mBAAmB,OAAO,MAAM;AAAA,IAChD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,5 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
var Schema_exports = {};
|
|
20
|
+
__export(Schema_exports, {
|
|
21
|
+
EthereumGasDivinerConfigSchema: () => EthereumGasDivinerConfigSchema,
|
|
22
|
+
EthereumGasDivinerQuerySchema: () => EthereumGasDivinerQuerySchema
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Schema_exports);
|
|
25
|
+
const EthereumGasDivinerQuerySchema = "network.xyo.blockchain.ethereum.gas.diviner.query";
|
|
26
|
+
const EthereumGasDivinerConfigSchema = "network.xyo.blockchain.ethereum.gas.diviner.config";
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
EthereumGasDivinerConfigSchema,
|
|
30
|
+
EthereumGasDivinerQuerySchema
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=Schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["export type EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query'\nexport const EthereumGasDivinerQuerySchema: EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query'\n\nexport type EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config'\nexport const EthereumGasDivinerConfigSchema: EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,MAAM,gCAA+D;AAGrE,MAAM,iCAAiE;","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const EthereumGasDivinerQuerySchema = "network.xyo.blockchain.ethereum.gas.diviner.query";
|
|
2
|
+
const EthereumGasDivinerConfigSchema = "network.xyo.blockchain.ethereum.gas.diviner.config";
|
|
3
|
+
export {
|
|
4
|
+
EthereumGasDivinerConfigSchema,
|
|
5
|
+
EthereumGasDivinerQuerySchema
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=Schema.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["export type EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query'\nexport const EthereumGasDivinerQuerySchema: EthereumGasDivinerQuerySchema = 'network.xyo.blockchain.ethereum.gas.diviner.query'\n\nexport type EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config'\nexport const EthereumGasDivinerConfigSchema: EthereumGasDivinerConfigSchema = 'network.xyo.blockchain.ethereum.gas.diviner.config'\n"],"mappings":"AACO,MAAM,gCAA+D;AAGrE,MAAM,iCAAiE;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AAExB,OAAO,EAAE,iBAAiB,EAAE,CAAA;AAG5B,eAAe,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AAExB,OAAO,EAAE,iBAAiB,EAAE,CAAA;AAG5B,eAAe,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var src_exports = {};
|
|
21
|
+
__export(src_exports, {
|
|
22
|
+
EthereumGasPlugin: () => import_Plugin.EthereumGasPlugin,
|
|
23
|
+
default: () => src_default
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(src_exports);
|
|
26
|
+
var import_Plugin = require("./Plugin");
|
|
27
|
+
__reExport(src_exports, require("./Diviner"), module.exports);
|
|
28
|
+
__reExport(src_exports, require("./Schema"), module.exports);
|
|
29
|
+
var src_default = import_Plugin.EthereumGasPlugin;
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
EthereumGasPlugin,
|
|
33
|
+
...require("./Diviner"),
|
|
34
|
+
...require("./Schema")
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import { EthereumGasPlugin } from './Plugin'\n\nexport * from './Diviner'\nexport * from './Schema'\n\nexport { EthereumGasPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasPlugin\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAkC;AAElC,wBAAc,sBAFd;AAGA,wBAAc,qBAHd;AAQA,IAAO,cAAQ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import { EthereumGasPlugin } from './Plugin'\n\nexport * from './Diviner'\nexport * from './Schema'\n\nexport { EthereumGasPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasPlugin\n"],"mappings":"AAAA,SAAS,yBAAyB;AAElC,cAAc;AACd,cAAc;AAKd,IAAO,cAAQ;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
2
|
+
/**
|
|
3
|
+
* Averages the supplied FeeData
|
|
4
|
+
* @param input An array of FeeData or undefined
|
|
5
|
+
* @returns The average of the supplied FeeData
|
|
6
|
+
*/
|
|
7
|
+
export declare const average: (input?: (FeeData | undefined)[]) => FeeData;
|
|
8
|
+
//# sourceMappingURL=average.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"average.d.ts","sourceRoot":"","sources":["../../../src/lib/average.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAsB/D;;;;GAIG;AACH,eAAO,MAAM,OAAO,WAAY,CAAC,OAAO,GAAG,SAAS,CAAC,EAAE,KAAG,OAkBzD,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
2
|
+
/**
|
|
3
|
+
* Averages the supplied FeeData
|
|
4
|
+
* @param input An array of FeeData or undefined
|
|
5
|
+
* @returns The average of the supplied FeeData
|
|
6
|
+
*/
|
|
7
|
+
export declare const average: (input?: (FeeData | undefined)[]) => FeeData;
|
|
8
|
+
//# sourceMappingURL=average.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"average.d.ts","sourceRoot":"","sources":["../../../src/lib/average.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAsB/D;;;;GAIG;AACH,eAAO,MAAM,OAAO,WAAY,CAAC,OAAO,GAAG,SAAS,CAAC,EAAE,KAAG,OAkBzD,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
var average_exports = {};
|
|
20
|
+
__export(average_exports, {
|
|
21
|
+
average: () => average
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(average_exports);
|
|
24
|
+
var import_exists = require("@xylabs/exists");
|
|
25
|
+
const listAverage = (x) => x?.length ? x.reduce((a, b) => a + b) / x.length : void 0;
|
|
26
|
+
const averageProperty = (data, propertyExpression) => {
|
|
27
|
+
return listAverage(data.map(propertyExpression).filter(import_exists.exists));
|
|
28
|
+
};
|
|
29
|
+
const average = (input) => {
|
|
30
|
+
const data = input?.filter(import_exists.exists) || [];
|
|
31
|
+
const averaged = {
|
|
32
|
+
baseFee: averageProperty(data, (x) => x.baseFee),
|
|
33
|
+
feePerGas: {
|
|
34
|
+
high: averageProperty(data, (x) => x.feePerGas.high),
|
|
35
|
+
low: averageProperty(data, (x) => x.feePerGas.low),
|
|
36
|
+
medium: averageProperty(data, (x) => x.feePerGas.medium),
|
|
37
|
+
veryHigh: averageProperty(data, (x) => x.feePerGas.veryHigh)
|
|
38
|
+
},
|
|
39
|
+
priorityFeePerGas: {
|
|
40
|
+
high: averageProperty(data, (x) => x.priorityFeePerGas.high),
|
|
41
|
+
low: averageProperty(data, (x) => x.priorityFeePerGas.low),
|
|
42
|
+
medium: averageProperty(data, (x) => x.priorityFeePerGas.medium),
|
|
43
|
+
veryHigh: averageProperty(data, (x) => x.priorityFeePerGas.veryHigh)
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return averaged;
|
|
47
|
+
};
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
average
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=average.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/average.ts"],"sourcesContent":["import { exists } from '@xylabs/exists'\nimport { FeeData } from '@xyo-network/gas-price-payload-plugin'\n\n/**\n * Averages an array of numbers\n * @param x Averages an array of numbers\n * @returns The average of the array of numbers or undefined if the\n * array is empty or undefined\n */\nconst listAverage = (x?: number[]) => (x?.length ? x.reduce((a, b) => a + b) / x.length : undefined)\n\n/**\n * Averages the property indicates by the supplied property\n * expression across the array of FeeData\n * @param data The array of data to average\n * @param propertyExpression The expression for the property to\n * average\n * @returns The average of the supplied property across the array\n */\nconst averageProperty = (data: FeeData[], propertyExpression: (x: FeeData) => number | undefined) => {\n return listAverage(data.map(propertyExpression).filter(exists))\n}\n\n/**\n * Averages the supplied FeeData\n * @param input An array of FeeData or undefined\n * @returns The average of the supplied FeeData\n */\nexport const average = (input?: (FeeData | undefined)[]): FeeData => {\n const data = input?.filter(exists) || []\n const averaged: FeeData = {\n baseFee: averageProperty(data, (x) => x.baseFee),\n feePerGas: {\n high: averageProperty(data, (x) => x.feePerGas.high),\n low: averageProperty(data, (x) => x.feePerGas.low),\n medium: averageProperty(data, (x) => x.feePerGas.medium),\n veryHigh: averageProperty(data, (x) => x.feePerGas.veryHigh),\n },\n priorityFeePerGas: {\n high: averageProperty(data, (x) => x.priorityFeePerGas.high),\n low: averageProperty(data, (x) => x.priorityFeePerGas.low),\n medium: averageProperty(data, (x) => x.priorityFeePerGas.medium),\n veryHigh: averageProperty(data, (x) => x.priorityFeePerGas.veryHigh),\n },\n }\n return averaged\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AASvB,MAAM,cAAc,CAAC,MAAkB,GAAG,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,SAAS;AAU1F,MAAM,kBAAkB,CAAC,MAAiB,uBAA2D;AACnG,SAAO,YAAY,KAAK,IAAI,kBAAkB,EAAE,OAAO,oBAAM,CAAC;AAChE;AAOO,MAAM,UAAU,CAAC,UAA6C;AACnE,QAAM,OAAO,OAAO,OAAO,oBAAM,KAAK,CAAC;AACvC,QAAM,WAAoB;AAAA,IACxB,SAAS,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO;AAAA,IAC/C,WAAW;AAAA,MACT,MAAM,gBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,IAAI;AAAA,MACnD,KAAK,gBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG;AAAA,MACjD,QAAQ,gBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,MAAM;AAAA,MACvD,UAAU,gBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,QAAQ;AAAA,IAC7D;AAAA,IACA,mBAAmB;AAAA,MACjB,MAAM,gBAAgB,MAAM,CAAC,MAAM,EAAE,kBAAkB,IAAI;AAAA,MAC3D,KAAK,gBAAgB,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG;AAAA,MACzD,QAAQ,gBAAgB,MAAM,CAAC,MAAM,EAAE,kBAAkB,MAAM;AAAA,MAC/D,UAAU,gBAAgB,MAAM,CAAC,MAAM,EAAE,kBAAkB,QAAQ;AAAA,IACrE;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { exists } from "@xylabs/exists";
|
|
2
|
+
const listAverage = (x) => x?.length ? x.reduce((a, b) => a + b) / x.length : void 0;
|
|
3
|
+
const averageProperty = (data, propertyExpression) => {
|
|
4
|
+
return listAverage(data.map(propertyExpression).filter(exists));
|
|
5
|
+
};
|
|
6
|
+
const average = (input) => {
|
|
7
|
+
const data = input?.filter(exists) || [];
|
|
8
|
+
const averaged = {
|
|
9
|
+
baseFee: averageProperty(data, (x) => x.baseFee),
|
|
10
|
+
feePerGas: {
|
|
11
|
+
high: averageProperty(data, (x) => x.feePerGas.high),
|
|
12
|
+
low: averageProperty(data, (x) => x.feePerGas.low),
|
|
13
|
+
medium: averageProperty(data, (x) => x.feePerGas.medium),
|
|
14
|
+
veryHigh: averageProperty(data, (x) => x.feePerGas.veryHigh)
|
|
15
|
+
},
|
|
16
|
+
priorityFeePerGas: {
|
|
17
|
+
high: averageProperty(data, (x) => x.priorityFeePerGas.high),
|
|
18
|
+
low: averageProperty(data, (x) => x.priorityFeePerGas.low),
|
|
19
|
+
medium: averageProperty(data, (x) => x.priorityFeePerGas.medium),
|
|
20
|
+
veryHigh: averageProperty(data, (x) => x.priorityFeePerGas.veryHigh)
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return averaged;
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
average
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=average.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/average.ts"],"sourcesContent":["import { exists } from '@xylabs/exists'\nimport { FeeData } from '@xyo-network/gas-price-payload-plugin'\n\n/**\n * Averages an array of numbers\n * @param x Averages an array of numbers\n * @returns The average of the array of numbers or undefined if the\n * array is empty or undefined\n */\nconst listAverage = (x?: number[]) => (x?.length ? x.reduce((a, b) => a + b) / x.length : undefined)\n\n/**\n * Averages the property indicates by the supplied property\n * expression across the array of FeeData\n * @param data The array of data to average\n * @param propertyExpression The expression for the property to\n * average\n * @returns The average of the supplied property across the array\n */\nconst averageProperty = (data: FeeData[], propertyExpression: (x: FeeData) => number | undefined) => {\n return listAverage(data.map(propertyExpression).filter(exists))\n}\n\n/**\n * Averages the supplied FeeData\n * @param input An array of FeeData or undefined\n * @returns The average of the supplied FeeData\n */\nexport const average = (input?: (FeeData | undefined)[]): FeeData => {\n const data = input?.filter(exists) || []\n const averaged: FeeData = {\n baseFee: averageProperty(data, (x) => x.baseFee),\n feePerGas: {\n high: averageProperty(data, (x) => x.feePerGas.high),\n low: averageProperty(data, (x) => x.feePerGas.low),\n medium: averageProperty(data, (x) => x.feePerGas.medium),\n veryHigh: averageProperty(data, (x) => x.feePerGas.veryHigh),\n },\n priorityFeePerGas: {\n high: averageProperty(data, (x) => x.priorityFeePerGas.high),\n low: averageProperty(data, (x) => x.priorityFeePerGas.low),\n medium: averageProperty(data, (x) => x.priorityFeePerGas.medium),\n veryHigh: averageProperty(data, (x) => x.priorityFeePerGas.veryHigh),\n },\n }\n return averaged\n}\n"],"mappings":"AAAA,SAAS,cAAc;AASvB,MAAM,cAAc,CAAC,MAAkB,GAAG,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,SAAS;AAU1F,MAAM,kBAAkB,CAAC,MAAiB,uBAA2D;AACnG,SAAO,YAAY,KAAK,IAAI,kBAAkB,EAAE,OAAO,MAAM,CAAC;AAChE;AAOO,MAAM,UAAU,CAAC,UAA6C;AACnE,QAAM,OAAO,OAAO,OAAO,MAAM,KAAK,CAAC;AACvC,QAAM,WAAoB;AAAA,IACxB,SAAS,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO;AAAA,IAC/C,WAAW;AAAA,MACT,MAAM,gBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,IAAI;AAAA,MACnD,KAAK,gBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG;AAAA,MACjD,QAAQ,gBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,MAAM;AAAA,MACvD,UAAU,gBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,QAAQ;AAAA,IAC7D;AAAA,IACA,mBAAmB;AAAA,MACjB,MAAM,gBAAgB,MAAM,CAAC,MAAM,EAAE,kBAAkB,IAAI;AAAA,MAC3D,KAAK,gBAAgB,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG;AAAA,MACzD,QAAQ,gBAAgB,MAAM,CAAC,MAAM,EAAE,kBAAkB,MAAM;AAAA,MAC/D,UAAU,gBAAgB,MAAM,CAAC,MAAM,EAAE,kBAAkB,QAAQ;AAAA,IACrE;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divineGas.d.ts","sourceRoot":"","sources":["../../../src/lib/divineGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA8B,MAAM,uCAAuC,CAAA;AAEtG,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAkBpD,eAAO,MAAM,SAAS,aAAc,OAAO,EAAE,KAAG,kBAW/C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divineGas.d.ts","sourceRoot":"","sources":["../../../src/lib/divineGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA8B,MAAM,uCAAuC,CAAA;AAEtG,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAkBpD,eAAO,MAAM,SAAS,aAAc,OAAO,EAAE,KAAG,kBAW/C,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
var divineGas_exports = {};
|
|
20
|
+
__export(divineGas_exports, {
|
|
21
|
+
divineGas: () => divineGas
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(divineGas_exports);
|
|
24
|
+
var import_gas_price_payload_plugin = require("@xyo-network/gas-price-payload-plugin");
|
|
25
|
+
var import_payload_builder = require("@xyo-network/payload-builder");
|
|
26
|
+
var import_average = require("./average");
|
|
27
|
+
var import_identities = require("./identities");
|
|
28
|
+
var import_transforms = require("./transforms");
|
|
29
|
+
const divineGas = (payloads) => {
|
|
30
|
+
const blocknative = payloads.filter(import_identities.isEthereumGasBlocknativePayload).map(import_transforms.transformGasFromBlocknative);
|
|
31
|
+
const etherchainV2 = payloads.filter(import_identities.isEthereumGasEtherchainV2Payload).map(import_transforms.transformGasFromEtherchainV2);
|
|
32
|
+
const ethers = payloads.filter(import_identities.isEthereumGasEthersPayload).map(import_transforms.transformGasFromEthers);
|
|
33
|
+
const etherscan = payloads.filter(import_identities.isEthereumGasEtherscanPayload).map(import_transforms.transformGasFromEtherscan);
|
|
34
|
+
const ethgasstation = payloads.filter(import_identities.isEthereumGasEthgasstationPayload).map(import_transforms.transformGasFromEthgasstation);
|
|
35
|
+
const transactionCosts = [...blocknative, ...etherchainV2, ...ethers, ...etherscan, ...ethgasstation];
|
|
36
|
+
const avg = (0, import_average.average)(transactionCosts);
|
|
37
|
+
const timestamp = Date.now();
|
|
38
|
+
const payload = new import_payload_builder.PayloadBuilder({ schema: import_gas_price_payload_plugin.EthereumGasSchema }).fields({ ...avg, timestamp }).build();
|
|
39
|
+
return payload;
|
|
40
|
+
};
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
divineGas
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=divineGas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/divineGas.ts"],"sourcesContent":["import { EthereumGasPayload, EthereumGasSchema, FeeData } from '@xyo-network/gas-price-payload-plugin'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { average } from './average'\nimport {\n isEthereumGasBlocknativePayload,\n isEthereumGasEtherchainV2Payload,\n isEthereumGasEtherscanPayload,\n isEthereumGasEthersPayload,\n isEthereumGasEthgasstationPayload,\n} from './identities'\nimport {\n transformGasFromBlocknative,\n transformGasFromEtherchainV2,\n transformGasFromEthers,\n transformGasFromEtherscan,\n transformGasFromEthgasstation,\n} from './transforms'\n\nexport const divineGas = (payloads: Payload[]): EthereumGasPayload => {\n const blocknative = payloads.filter(isEthereumGasBlocknativePayload).map(transformGasFromBlocknative)\n const etherchainV2 = payloads.filter(isEthereumGasEtherchainV2Payload).map(transformGasFromEtherchainV2)\n const ethers = payloads.filter(isEthereumGasEthersPayload).map(transformGasFromEthers)\n const etherscan = payloads.filter(isEthereumGasEtherscanPayload).map(transformGasFromEtherscan)\n const ethgasstation = payloads.filter(isEthereumGasEthgasstationPayload).map(transformGasFromEthgasstation)\n const transactionCosts: FeeData[] = [...blocknative, ...etherchainV2, ...ethers, ...etherscan, ...ethgasstation]\n const avg = average(transactionCosts)\n const timestamp = Date.now()\n const payload = new PayloadBuilder<EthereumGasPayload>({ schema: EthereumGasSchema }).fields({ ...avg, timestamp }).build()\n return payload\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAA+D;AAC/D,6BAA+B;AAG/B,qBAAwB;AACxB,wBAMO;AACP,wBAMO;AAEA,MAAM,YAAY,CAAC,aAA4C;AACpE,QAAM,cAAc,SAAS,OAAO,iDAA+B,EAAE,IAAI,6CAA2B;AACpG,QAAM,eAAe,SAAS,OAAO,kDAAgC,EAAE,IAAI,8CAA4B;AACvG,QAAM,SAAS,SAAS,OAAO,4CAA0B,EAAE,IAAI,wCAAsB;AACrF,QAAM,YAAY,SAAS,OAAO,+CAA6B,EAAE,IAAI,2CAAyB;AAC9F,QAAM,gBAAgB,SAAS,OAAO,mDAAiC,EAAE,IAAI,+CAA6B;AAC1G,QAAM,mBAA8B,CAAC,GAAG,aAAa,GAAG,cAAc,GAAG,QAAQ,GAAG,WAAW,GAAG,aAAa;AAC/G,QAAM,UAAM,wBAAQ,gBAAgB;AACpC,QAAM,YAAY,KAAK,IAAI;AAC3B,QAAM,UAAU,IAAI,sCAAmC,EAAE,QAAQ,kDAAkB,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,UAAU,CAAC,EAAE,MAAM;AAC1H,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EthereumGasSchema } from "@xyo-network/gas-price-payload-plugin";
|
|
2
|
+
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
3
|
+
import { average } from "./average";
|
|
4
|
+
import {
|
|
5
|
+
isEthereumGasBlocknativePayload,
|
|
6
|
+
isEthereumGasEtherchainV2Payload,
|
|
7
|
+
isEthereumGasEtherscanPayload,
|
|
8
|
+
isEthereumGasEthersPayload,
|
|
9
|
+
isEthereumGasEthgasstationPayload
|
|
10
|
+
} from "./identities";
|
|
11
|
+
import {
|
|
12
|
+
transformGasFromBlocknative,
|
|
13
|
+
transformGasFromEtherchainV2,
|
|
14
|
+
transformGasFromEthers,
|
|
15
|
+
transformGasFromEtherscan,
|
|
16
|
+
transformGasFromEthgasstation
|
|
17
|
+
} from "./transforms";
|
|
18
|
+
const divineGas = (payloads) => {
|
|
19
|
+
const blocknative = payloads.filter(isEthereumGasBlocknativePayload).map(transformGasFromBlocknative);
|
|
20
|
+
const etherchainV2 = payloads.filter(isEthereumGasEtherchainV2Payload).map(transformGasFromEtherchainV2);
|
|
21
|
+
const ethers = payloads.filter(isEthereumGasEthersPayload).map(transformGasFromEthers);
|
|
22
|
+
const etherscan = payloads.filter(isEthereumGasEtherscanPayload).map(transformGasFromEtherscan);
|
|
23
|
+
const ethgasstation = payloads.filter(isEthereumGasEthgasstationPayload).map(transformGasFromEthgasstation);
|
|
24
|
+
const transactionCosts = [...blocknative, ...etherchainV2, ...ethers, ...etherscan, ...ethgasstation];
|
|
25
|
+
const avg = average(transactionCosts);
|
|
26
|
+
const timestamp = Date.now();
|
|
27
|
+
const payload = new PayloadBuilder({ schema: EthereumGasSchema }).fields({ ...avg, timestamp }).build();
|
|
28
|
+
return payload;
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
divineGas
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=divineGas.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/divineGas.ts"],"sourcesContent":["import { EthereumGasPayload, EthereumGasSchema, FeeData } from '@xyo-network/gas-price-payload-plugin'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { average } from './average'\nimport {\n isEthereumGasBlocknativePayload,\n isEthereumGasEtherchainV2Payload,\n isEthereumGasEtherscanPayload,\n isEthereumGasEthersPayload,\n isEthereumGasEthgasstationPayload,\n} from './identities'\nimport {\n transformGasFromBlocknative,\n transformGasFromEtherchainV2,\n transformGasFromEthers,\n transformGasFromEtherscan,\n transformGasFromEthgasstation,\n} from './transforms'\n\nexport const divineGas = (payloads: Payload[]): EthereumGasPayload => {\n const blocknative = payloads.filter(isEthereumGasBlocknativePayload).map(transformGasFromBlocknative)\n const etherchainV2 = payloads.filter(isEthereumGasEtherchainV2Payload).map(transformGasFromEtherchainV2)\n const ethers = payloads.filter(isEthereumGasEthersPayload).map(transformGasFromEthers)\n const etherscan = payloads.filter(isEthereumGasEtherscanPayload).map(transformGasFromEtherscan)\n const ethgasstation = payloads.filter(isEthereumGasEthgasstationPayload).map(transformGasFromEthgasstation)\n const transactionCosts: FeeData[] = [...blocknative, ...etherchainV2, ...ethers, ...etherscan, ...ethgasstation]\n const avg = average(transactionCosts)\n const timestamp = Date.now()\n const payload = new PayloadBuilder<EthereumGasPayload>({ schema: EthereumGasSchema }).fields({ ...avg, timestamp }).build()\n return payload\n}\n"],"mappings":"AAAA,SAA6B,yBAAkC;AAC/D,SAAS,sBAAsB;AAG/B,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,MAAM,YAAY,CAAC,aAA4C;AACpE,QAAM,cAAc,SAAS,OAAO,+BAA+B,EAAE,IAAI,2BAA2B;AACpG,QAAM,eAAe,SAAS,OAAO,gCAAgC,EAAE,IAAI,4BAA4B;AACvG,QAAM,SAAS,SAAS,OAAO,0BAA0B,EAAE,IAAI,sBAAsB;AACrF,QAAM,YAAY,SAAS,OAAO,6BAA6B,EAAE,IAAI,yBAAyB;AAC9F,QAAM,gBAAgB,SAAS,OAAO,iCAAiC,EAAE,IAAI,6BAA6B;AAC1G,QAAM,mBAA8B,CAAC,GAAG,aAAa,GAAG,cAAc,GAAG,QAAQ,GAAG,WAAW,GAAG,aAAa;AAC/G,QAAM,MAAM,QAAQ,gBAAgB;AACpC,QAAM,YAAY,KAAK,IAAI;AAC3B,QAAM,UAAU,IAAI,eAAmC,EAAE,QAAQ,kBAAkB,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,UAAU,CAAC,EAAE,MAAM;AAC1H,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './isEthereumGasBlocknativePayload';
|
|
2
|
+
export * from './isEthereumGasEtherchainV2Payload';
|
|
3
|
+
export * from './isEthereumGasEtherscanPayload';
|
|
4
|
+
export * from './isEthereumGasEthersPayload';
|
|
5
|
+
export * from './isEthereumGasEthgasstationPayload';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAA;AACjD,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,qCAAqC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './isEthereumGasBlocknativePayload';
|
|
2
|
+
export * from './isEthereumGasEtherchainV2Payload';
|
|
3
|
+
export * from './isEthereumGasEtherscanPayload';
|
|
4
|
+
export * from './isEthereumGasEthersPayload';
|
|
5
|
+
export * from './isEthereumGasEthgasstationPayload';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAA;AACjD,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,qCAAqC,CAAA"}
|