@xyo-network/gas-price-plugin 2.75.0 → 2.75.2
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.d.cts +16 -0
- package/dist/browser/Diviner.d.cts.map +1 -0
- package/dist/browser/Diviner.js +5 -225
- package/dist/browser/Diviner.js.map +1 -1
- package/dist/browser/Plugin.d.cts +50 -0
- package/dist/browser/Plugin.d.cts.map +1 -0
- package/dist/browser/Plugin.js +4 -239
- package/dist/browser/Plugin.js.map +1 -1
- package/dist/browser/Schema.d.cts +5 -0
- package/dist/browser/Schema.d.cts.map +1 -0
- package/dist/browser/Schema.js +2 -3
- package/dist/browser/Schema.js.map +1 -1
- package/dist/browser/index.d.cts +6 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/index.js +3 -253
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/lib/average.d.cts +8 -0
- package/dist/browser/lib/average.d.cts.map +1 -0
- package/dist/browser/lib/average.js +3 -4
- package/dist/browser/lib/average.js.map +1 -1
- package/dist/browser/lib/divineGas.d.cts +4 -0
- package/dist/browser/lib/divineGas.d.cts.map +1 -0
- package/dist/browser/lib/divineGas.js +16 -202
- package/dist/browser/lib/divineGas.js.map +1 -1
- package/dist/browser/lib/identities/index.d.cts +6 -0
- package/dist/browser/lib/identities/index.d.cts.map +1 -0
- package/dist/browser/lib/identities/index.js +5 -36
- package/dist/browser/lib/identities/index.js.map +1 -1
- package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.d.cts +6 -0
- package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.d.cts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.js +1 -2
- package/dist/browser/lib/identities/isEthereumGasBlocknativePayload.js.map +1 -1
- package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.d.cts +6 -0
- package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.d.cts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.js +1 -2
- package/dist/browser/lib/identities/isEthereumGasEtherchainV2Payload.js.map +1 -1
- package/dist/browser/lib/identities/isEthereumGasEthersPayload.d.cts +6 -0
- package/dist/browser/lib/identities/isEthereumGasEthersPayload.d.cts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEthersPayload.js +1 -2
- package/dist/browser/lib/identities/isEthereumGasEthersPayload.js.map +1 -1
- package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.d.cts +6 -0
- package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.d.cts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.js +1 -2
- package/dist/browser/lib/identities/isEthereumGasEtherscanPayload.js.map +1 -1
- package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.d.cts +6 -0
- package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.d.cts.map +1 -0
- package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.js +1 -2
- package/dist/browser/lib/identities/isEthereumGasEthgasstationPayload.js.map +1 -1
- package/dist/browser/lib/index.d.cts +2 -0
- package/dist/browser/lib/index.d.cts.map +1 -0
- package/dist/browser/lib/index.js +1 -218
- package/dist/browser/lib/index.js.map +1 -1
- package/dist/browser/lib/transforms/index.d.cts +6 -0
- package/dist/browser/lib/transforms/index.d.cts.map +1 -0
- package/dist/browser/lib/transforms/index.js +5 -148
- package/dist/browser/lib/transforms/index.js.map +1 -1
- package/dist/browser/lib/transforms/transformGasFromBlocknative.d.cts +4 -0
- package/dist/browser/lib/transforms/transformGasFromBlocknative.d.cts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromBlocknative.js +4 -5
- package/dist/browser/lib/transforms/transformGasFromBlocknative.js.map +1 -1
- package/dist/browser/lib/transforms/transformGasFromEtherchainV2.d.cts +4 -0
- package/dist/browser/lib/transforms/transformGasFromEtherchainV2.d.cts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEtherchainV2.js +2 -3
- package/dist/browser/lib/transforms/transformGasFromEtherchainV2.js.map +1 -1
- package/dist/browser/lib/transforms/transformGasFromEthers.d.cts +4 -0
- package/dist/browser/lib/transforms/transformGasFromEthers.d.cts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEthers.js +4 -5
- package/dist/browser/lib/transforms/transformGasFromEthers.js.map +1 -1
- package/dist/browser/lib/transforms/transformGasFromEtherscan.d.cts +4 -0
- package/dist/browser/lib/transforms/transformGasFromEtherscan.d.cts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEtherscan.js +3 -4
- package/dist/browser/lib/transforms/transformGasFromEtherscan.js.map +1 -1
- package/dist/browser/lib/transforms/transformGasFromEthgasstation.d.cts +4 -0
- package/dist/browser/lib/transforms/transformGasFromEthgasstation.d.cts.map +1 -0
- package/dist/browser/lib/transforms/transformGasFromEthgasstation.js +4 -5
- package/dist/browser/lib/transforms/transformGasFromEthgasstation.js.map +1 -1
- package/dist/browser/test/index.d.cts +6 -0
- package/dist/browser/test/index.d.cts.map +1 -0
- package/dist/browser/test/index.js +5 -165
- package/dist/browser/test/index.js.map +1 -1
- package/dist/browser/test/sampleBlocknativeGas.d.cts +3 -0
- package/dist/browser/test/sampleBlocknativeGas.d.cts.map +1 -0
- package/dist/browser/test/sampleBlocknativeGas.js +1 -2
- package/dist/browser/test/sampleBlocknativeGas.js.map +1 -1
- package/dist/browser/test/sampleEtherchainGasV2.d.cts +3 -0
- package/dist/browser/test/sampleEtherchainGasV2.d.cts.map +1 -0
- package/dist/browser/test/sampleEtherchainGasV2.js +1 -2
- package/dist/browser/test/sampleEtherchainGasV2.js.map +1 -1
- package/dist/browser/test/sampleEthersGas.d.cts +3 -0
- package/dist/browser/test/sampleEthersGas.d.cts.map +1 -0
- package/dist/browser/test/sampleEthersGas.js +1 -2
- package/dist/browser/test/sampleEthersGas.js.map +1 -1
- package/dist/browser/test/sampleEtherscanGas.d.cts +3 -0
- package/dist/browser/test/sampleEtherscanGas.d.cts.map +1 -0
- package/dist/browser/test/sampleEtherscanGas.js +1 -2
- package/dist/browser/test/sampleEtherscanGas.js.map +1 -1
- package/dist/browser/test/sampleEthgasstationGas.d.cts +3 -0
- package/dist/browser/test/sampleEthgasstationGas.d.cts.map +1 -0
- package/dist/browser/test/sampleEthgasstationGas.js +1 -2
- package/dist/browser/test/sampleEthgasstationGas.js.map +1 -1
- package/dist/docs.json +21982 -0
- package/dist/node/Diviner.d.cts +16 -0
- package/dist/node/Diviner.d.cts.map +1 -0
- package/dist/node/Diviner.js +231 -7
- package/dist/node/Diviner.js.map +1 -1
- package/dist/node/Diviner.mjs +228 -5
- package/dist/node/Diviner.mjs.map +1 -1
- package/dist/node/Plugin.d.cts +50 -0
- package/dist/node/Plugin.d.cts.map +1 -0
- package/dist/node/Plugin.js +244 -5
- package/dist/node/Plugin.js.map +1 -1
- package/dist/node/Plugin.mjs +242 -4
- package/dist/node/Plugin.mjs.map +1 -1
- package/dist/node/Schema.d.cts +5 -0
- package/dist/node/Schema.d.cts.map +1 -0
- package/dist/node/Schema.js +4 -2
- package/dist/node/Schema.js.map +1 -1
- package/dist/node/Schema.mjs +3 -2
- package/dist/node/Schema.mjs.map +1 -1
- package/dist/node/index.d.cts +6 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +265 -9
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +256 -3
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/lib/average.d.cts +8 -0
- package/dist/node/lib/average.d.cts.map +1 -0
- package/dist/node/lib/average.js +6 -4
- package/dist/node/lib/average.js.map +1 -1
- package/dist/node/lib/average.mjs +5 -4
- package/dist/node/lib/average.mjs.map +1 -1
- package/dist/node/lib/divineGas.d.cts +4 -0
- package/dist/node/lib/divineGas.d.cts.map +1 -0
- package/dist/node/lib/divineGas.js +212 -10
- package/dist/node/lib/divineGas.js.map +1 -1
- package/dist/node/lib/divineGas.mjs +205 -16
- package/dist/node/lib/divineGas.mjs.map +1 -1
- package/dist/node/lib/identities/index.d.cts +6 -0
- package/dist/node/lib/identities/index.d.cts.map +1 -0
- package/dist/node/lib/identities/index.js +48 -11
- package/dist/node/lib/identities/index.js.map +1 -1
- package/dist/node/lib/identities/index.mjs +36 -5
- package/dist/node/lib/identities/index.mjs.map +1 -1
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.cts +6 -0
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.d.cts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.js +4 -2
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.js.map +1 -1
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.mjs +3 -2
- package/dist/node/lib/identities/isEthereumGasBlocknativePayload.mjs.map +1 -1
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.cts +6 -0
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.d.cts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.js +4 -2
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.js.map +1 -1
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.mjs +3 -2
- package/dist/node/lib/identities/isEthereumGasEtherchainV2Payload.mjs.map +1 -1
- package/dist/node/lib/identities/isEthereumGasEthersPayload.d.cts +6 -0
- package/dist/node/lib/identities/isEthereumGasEthersPayload.d.cts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEthersPayload.js +4 -2
- package/dist/node/lib/identities/isEthereumGasEthersPayload.js.map +1 -1
- package/dist/node/lib/identities/isEthereumGasEthersPayload.mjs +3 -2
- package/dist/node/lib/identities/isEthereumGasEthersPayload.mjs.map +1 -1
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.cts +6 -0
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.d.cts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.js +4 -2
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.js.map +1 -1
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.mjs +3 -2
- package/dist/node/lib/identities/isEthereumGasEtherscanPayload.mjs.map +1 -1
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.cts +6 -0
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.d.cts.map +1 -0
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.js +4 -2
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.js.map +1 -1
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.mjs +3 -2
- package/dist/node/lib/identities/isEthereumGasEthgasstationPayload.mjs.map +1 -1
- package/dist/node/lib/index.d.cts +2 -0
- package/dist/node/lib/index.d.cts.map +1 -0
- package/dist/node/lib/index.js +229 -3
- package/dist/node/lib/index.js.map +1 -1
- package/dist/node/lib/index.mjs +221 -1
- package/dist/node/lib/index.mjs.map +1 -1
- package/dist/node/lib/transforms/index.d.cts +6 -0
- package/dist/node/lib/transforms/index.d.cts.map +1 -0
- package/dist/node/lib/transforms/index.js +163 -11
- package/dist/node/lib/transforms/index.js.map +1 -1
- package/dist/node/lib/transforms/index.mjs +151 -5
- package/dist/node/lib/transforms/index.mjs.map +1 -1
- package/dist/node/lib/transforms/transformGasFromBlocknative.d.cts +4 -0
- package/dist/node/lib/transforms/transformGasFromBlocknative.d.cts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromBlocknative.js +22 -17
- package/dist/node/lib/transforms/transformGasFromBlocknative.js.map +1 -1
- package/dist/node/lib/transforms/transformGasFromBlocknative.mjs +21 -17
- package/dist/node/lib/transforms/transformGasFromBlocknative.mjs.map +1 -1
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.cts +4 -0
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.d.cts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.js +4 -2
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.js.map +1 -1
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.mjs +3 -2
- package/dist/node/lib/transforms/transformGasFromEtherchainV2.mjs.map +1 -1
- package/dist/node/lib/transforms/transformGasFromEthers.d.cts +4 -0
- package/dist/node/lib/transforms/transformGasFromEthers.d.cts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEthers.js +6 -4
- package/dist/node/lib/transforms/transformGasFromEthers.js.map +1 -1
- package/dist/node/lib/transforms/transformGasFromEthers.mjs +5 -4
- package/dist/node/lib/transforms/transformGasFromEthers.mjs.map +1 -1
- package/dist/node/lib/transforms/transformGasFromEtherscan.d.cts +4 -0
- package/dist/node/lib/transforms/transformGasFromEtherscan.d.cts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEtherscan.js +5 -3
- package/dist/node/lib/transforms/transformGasFromEtherscan.js.map +1 -1
- package/dist/node/lib/transforms/transformGasFromEtherscan.mjs +4 -3
- package/dist/node/lib/transforms/transformGasFromEtherscan.mjs.map +1 -1
- package/dist/node/lib/transforms/transformGasFromEthgasstation.d.cts +4 -0
- package/dist/node/lib/transforms/transformGasFromEthgasstation.d.cts.map +1 -0
- package/dist/node/lib/transforms/transformGasFromEthgasstation.js +6 -4
- package/dist/node/lib/transforms/transformGasFromEthgasstation.js.map +1 -1
- package/dist/node/lib/transforms/transformGasFromEthgasstation.mjs +5 -4
- package/dist/node/lib/transforms/transformGasFromEthgasstation.mjs.map +1 -1
- package/dist/node/test/index.d.cts +6 -0
- package/dist/node/test/index.d.cts.map +1 -0
- package/dist/node/test/index.js +177 -11
- package/dist/node/test/index.js.map +1 -1
- package/dist/node/test/index.mjs +165 -5
- package/dist/node/test/index.mjs.map +1 -1
- package/dist/node/test/sampleBlocknativeGas.d.cts +3 -0
- package/dist/node/test/sampleBlocknativeGas.d.cts.map +1 -0
- package/dist/node/test/sampleBlocknativeGas.js +3 -1
- package/dist/node/test/sampleBlocknativeGas.js.map +1 -1
- package/dist/node/test/sampleBlocknativeGas.mjs +2 -1
- package/dist/node/test/sampleBlocknativeGas.mjs.map +1 -1
- package/dist/node/test/sampleEtherchainGasV2.d.cts +3 -0
- package/dist/node/test/sampleEtherchainGasV2.d.cts.map +1 -0
- package/dist/node/test/sampleEtherchainGasV2.js +3 -1
- package/dist/node/test/sampleEtherchainGasV2.js.map +1 -1
- package/dist/node/test/sampleEtherchainGasV2.mjs +2 -1
- package/dist/node/test/sampleEtherchainGasV2.mjs.map +1 -1
- package/dist/node/test/sampleEthersGas.d.cts +3 -0
- package/dist/node/test/sampleEthersGas.d.cts.map +1 -0
- package/dist/node/test/sampleEthersGas.js +3 -1
- package/dist/node/test/sampleEthersGas.js.map +1 -1
- package/dist/node/test/sampleEthersGas.mjs +2 -1
- package/dist/node/test/sampleEthersGas.mjs.map +1 -1
- package/dist/node/test/sampleEtherscanGas.d.cts +3 -0
- package/dist/node/test/sampleEtherscanGas.d.cts.map +1 -0
- package/dist/node/test/sampleEtherscanGas.js +3 -1
- package/dist/node/test/sampleEtherscanGas.js.map +1 -1
- package/dist/node/test/sampleEtherscanGas.mjs +2 -1
- package/dist/node/test/sampleEtherscanGas.mjs.map +1 -1
- package/dist/node/test/sampleEthgasstationGas.d.cts +3 -0
- package/dist/node/test/sampleEthgasstationGas.d.cts.map +1 -0
- package/dist/node/test/sampleEthgasstationGas.js +3 -1
- package/dist/node/test/sampleEthgasstationGas.js.map +1 -1
- package/dist/node/test/sampleEthgasstationGas.mjs +2 -1
- package/dist/node/test/sampleEthgasstationGas.mjs.map +1 -1
- package/package.json +19 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/transforms/transformGasFromEtherscan.ts"],"sourcesContent":["import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'\nimport { linear } from 'regression'\n\nconst getBaseFee = (payload: EthereumGasEtherscanPayload): number | undefined => {\n const { suggestBaseFee } = payload.result\n return parseFloat(suggestBaseFee)\n}\n\nconst getFeePerGas = (payload: EthereumGasEtherscanPayload): Partial<FeePerGas> => {\n const { FastGasPrice, ProposeGasPrice, SafeGasPrice } = payload.result\n const low = parseFloat(SafeGasPrice)\n const medium = parseFloat(ProposeGasPrice)\n const high = parseFloat(FastGasPrice)\n const veryHigh = linear([\n [0, low],\n [1, medium],\n [2, high],\n ]).predict(3)[1]\n return { high, low, medium, veryHigh }\n}\n\nexport const transformGasFromEtherscan = (payload: EthereumGasEtherscanPayload): FeeData => {\n const baseFee = getBaseFee(payload)\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = {}\n return { baseFee, feePerGas, priorityFeePerGas }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/transforms/transformGasFromEtherscan.ts"],"sourcesContent":["import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'\nimport { linear } from 'regression'\n\nconst getBaseFee = (payload: EthereumGasEtherscanPayload): number | undefined => {\n const { suggestBaseFee } = payload.result\n return parseFloat(suggestBaseFee)\n}\n\nconst getFeePerGas = (payload: EthereumGasEtherscanPayload): Partial<FeePerGas> => {\n const { FastGasPrice, ProposeGasPrice, SafeGasPrice } = payload.result\n const low = parseFloat(SafeGasPrice)\n const medium = parseFloat(ProposeGasPrice)\n const high = parseFloat(FastGasPrice)\n const veryHigh = linear([\n [0, low],\n [1, medium],\n [2, high],\n ]).predict(3)[1]\n return { high, low, medium, veryHigh }\n}\n\nexport const transformGasFromEtherscan = (payload: EthereumGasEtherscanPayload): FeeData => {\n const baseFee = getBaseFee(payload)\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = {}\n return { baseFee, feePerGas, priorityFeePerGas }\n}\n"],"mappings":"AAEA,SAAS,cAAc;AAEvB,MAAM,aAAa,CAAC,YAA6D;AAC/E,QAAM,EAAE,eAAe,IAAI,QAAQ;AACnC,SAAO,WAAW,cAAc;AAClC;AAEA,MAAM,eAAe,CAAC,YAA6D;AACjF,QAAM,EAAE,cAAc,iBAAiB,aAAa,IAAI,QAAQ;AAChE,QAAM,MAAM,WAAW,YAAY;AACnC,QAAM,SAAS,WAAW,eAAe;AACzC,QAAM,OAAO,WAAW,YAAY;AACpC,QAAM,WAAW,OAAO;AAAA,IACtB,CAAC,GAAG,GAAG;AAAA,IACP,CAAC,GAAG,MAAM;AAAA,IACV,CAAC,GAAG,IAAI;AAAA,EACV,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC;AACf,SAAO,EAAE,MAAM,KAAK,QAAQ,SAAS;AACvC;AAEO,MAAM,4BAA4B,CAAC,YAAkD;AAC1F,QAAM,UAAU,WAAW,OAAO;AAClC,QAAM,YAAY,aAAa,OAAO;AACtC,QAAM,oBAAoB,CAAC;AAC3B,SAAO,EAAE,SAAS,WAAW,kBAAkB;AACjD;","names":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin';
|
|
2
|
+
import { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
+
export declare const transformGasFromEthgasstation: (payload: EthereumGasEthgasstationPayload) => FeeData;
|
|
4
|
+
//# sourceMappingURL=transformGasFromEthgasstation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,10 +1,9 @@
|
|
|
1
|
-
// src/lib/transforms/transformGasFromEthgasstation.ts
|
|
2
1
|
import { linear } from "regression";
|
|
3
|
-
|
|
2
|
+
const getBaseFee = (payload) => {
|
|
4
3
|
const { baseFee } = payload;
|
|
5
4
|
return baseFee;
|
|
6
5
|
};
|
|
7
|
-
|
|
6
|
+
const getFeePerGas = (payload) => {
|
|
8
7
|
const { standard: medium, fast: high, instant: veryHigh } = payload.gasPrice;
|
|
9
8
|
const trend = linear([
|
|
10
9
|
[1, medium],
|
|
@@ -14,7 +13,7 @@ var getFeePerGas = (payload) => {
|
|
|
14
13
|
const low = trend.predict(0)[1];
|
|
15
14
|
return { low, medium, high, veryHigh };
|
|
16
15
|
};
|
|
17
|
-
|
|
16
|
+
const getPriorityFeePerGas = (payload) => {
|
|
18
17
|
const { standard: medium, fast: high, instant: veryHigh } = payload.priorityFee;
|
|
19
18
|
const trend = linear([
|
|
20
19
|
[1, medium],
|
|
@@ -24,7 +23,7 @@ var getPriorityFeePerGas = (payload) => {
|
|
|
24
23
|
const low = trend.predict(0)[1];
|
|
25
24
|
return { low, medium, high, veryHigh };
|
|
26
25
|
};
|
|
27
|
-
|
|
26
|
+
const transformGasFromEthgasstation = (payload) => {
|
|
28
27
|
const baseFee = getBaseFee(payload);
|
|
29
28
|
const feePerGas = getFeePerGas(payload);
|
|
30
29
|
const priorityFeePerGas = getPriorityFeePerGas(payload);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/transforms/transformGasFromEthgasstation.ts"],"sourcesContent":["/* eslint-disable sort-keys-fix/sort-keys-fix */\nimport { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'\nimport { FeeData, FeePerGas, PriorityFeePerGas } from '@xyo-network/gas-price-payload-plugin'\nimport { linear } from 'regression'\n\nconst getBaseFee = (payload: EthereumGasEthgasstationPayload): number | undefined => {\n const { baseFee } = payload\n return baseFee\n}\n\nconst getFeePerGas = (payload: EthereumGasEthgasstationPayload): Partial<FeePerGas> => {\n const { standard: medium, fast: high, instant: veryHigh } = payload.gasPrice\n const trend = linear([\n [1, medium],\n [2, high],\n [3, veryHigh],\n ])\n const low = trend.predict(0)[1]\n return { low, medium, high, veryHigh }\n}\n\nconst getPriorityFeePerGas = (payload: EthereumGasEthgasstationPayload): Partial<PriorityFeePerGas> => {\n const { standard: medium, fast: high, instant: veryHigh } = payload.priorityFee\n const trend = linear([\n [1, medium],\n [2, high],\n [3, veryHigh],\n ])\n const low = trend.predict(0)[1]\n return { low, medium, high, veryHigh }\n}\n\nexport const transformGasFromEthgasstation = (payload: EthereumGasEthgasstationPayload): FeeData => {\n const baseFee = getBaseFee(payload)\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = getPriorityFeePerGas(payload)\n return { baseFee, feePerGas, priorityFeePerGas }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/transforms/transformGasFromEthgasstation.ts"],"sourcesContent":["/* eslint-disable sort-keys-fix/sort-keys-fix */\nimport { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'\nimport { FeeData, FeePerGas, PriorityFeePerGas } from '@xyo-network/gas-price-payload-plugin'\nimport { linear } from 'regression'\n\nconst getBaseFee = (payload: EthereumGasEthgasstationPayload): number | undefined => {\n const { baseFee } = payload\n return baseFee\n}\n\nconst getFeePerGas = (payload: EthereumGasEthgasstationPayload): Partial<FeePerGas> => {\n const { standard: medium, fast: high, instant: veryHigh } = payload.gasPrice\n const trend = linear([\n [1, medium],\n [2, high],\n [3, veryHigh],\n ])\n const low = trend.predict(0)[1]\n return { low, medium, high, veryHigh }\n}\n\nconst getPriorityFeePerGas = (payload: EthereumGasEthgasstationPayload): Partial<PriorityFeePerGas> => {\n const { standard: medium, fast: high, instant: veryHigh } = payload.priorityFee\n const trend = linear([\n [1, medium],\n [2, high],\n [3, veryHigh],\n ])\n const low = trend.predict(0)[1]\n return { low, medium, high, veryHigh }\n}\n\nexport const transformGasFromEthgasstation = (payload: EthereumGasEthgasstationPayload): FeeData => {\n const baseFee = getBaseFee(payload)\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = getPriorityFeePerGas(payload)\n return { baseFee, feePerGas, priorityFeePerGas }\n}\n"],"mappings":"AAGA,SAAS,cAAc;AAEvB,MAAM,aAAa,CAAC,YAAiE;AACnF,QAAM,EAAE,QAAQ,IAAI;AACpB,SAAO;AACT;AAEA,MAAM,eAAe,CAAC,YAAiE;AACrF,QAAM,EAAE,UAAU,QAAQ,MAAM,MAAM,SAAS,SAAS,IAAI,QAAQ;AACpE,QAAM,QAAQ,OAAO;AAAA,IACnB,CAAC,GAAG,MAAM;AAAA,IACV,CAAC,GAAG,IAAI;AAAA,IACR,CAAC,GAAG,QAAQ;AAAA,EACd,CAAC;AACD,QAAM,MAAM,MAAM,QAAQ,CAAC,EAAE,CAAC;AAC9B,SAAO,EAAE,KAAK,QAAQ,MAAM,SAAS;AACvC;AAEA,MAAM,uBAAuB,CAAC,YAAyE;AACrG,QAAM,EAAE,UAAU,QAAQ,MAAM,MAAM,SAAS,SAAS,IAAI,QAAQ;AACpE,QAAM,QAAQ,OAAO;AAAA,IACnB,CAAC,GAAG,MAAM;AAAA,IACV,CAAC,GAAG,IAAI;AAAA,IACR,CAAC,GAAG,QAAQ;AAAA,EACd,CAAC;AACD,QAAM,MAAM,MAAM,QAAQ,CAAC,EAAE,CAAC;AAC9B,SAAO,EAAE,KAAK,QAAQ,MAAM,SAAS;AACvC;AAEO,MAAM,gCAAgC,CAAC,YAAsD;AAClG,QAAM,UAAU,WAAW,OAAO;AAClC,QAAM,YAAY,aAAa,OAAO;AACtC,QAAM,oBAAoB,qBAAqB,OAAO;AACtD,SAAO,EAAE,SAAS,WAAW,kBAAkB;AACjD;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA"}
|
|
@@ -1,166 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
baseFeePerGas: 13.691764456,
|
|
7
|
-
blockNumber: 16028191,
|
|
8
|
-
estimatedPrices: [
|
|
9
|
-
{
|
|
10
|
-
confidence: 99,
|
|
11
|
-
maxFeePerGas: 22.04,
|
|
12
|
-
maxPriorityFeePerGas: 1.09,
|
|
13
|
-
price: 14
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
confidence: 95,
|
|
17
|
-
maxFeePerGas: 21.58,
|
|
18
|
-
maxPriorityFeePerGas: 0.63,
|
|
19
|
-
price: 14
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
confidence: 90,
|
|
23
|
-
maxFeePerGas: 21.25,
|
|
24
|
-
maxPriorityFeePerGas: 0.3,
|
|
25
|
-
price: 13
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
confidence: 80,
|
|
29
|
-
maxFeePerGas: 21.16,
|
|
30
|
-
maxPriorityFeePerGas: 0.21,
|
|
31
|
-
price: 13
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
confidence: 70,
|
|
35
|
-
maxFeePerGas: 21.12,
|
|
36
|
-
maxPriorityFeePerGas: 0.17,
|
|
37
|
-
price: 13
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
estimatedTransactionCount: 69
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
currentBlockNumber: 16028190,
|
|
44
|
-
estimatedBaseFees: [
|
|
45
|
-
{
|
|
46
|
-
"pending+1": [
|
|
47
|
-
{
|
|
48
|
-
baseFee: 15.41,
|
|
49
|
-
confidence: 99
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"pending+2": [
|
|
55
|
-
{
|
|
56
|
-
baseFee: 17.32,
|
|
57
|
-
confidence: 99
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"pending+3": [
|
|
63
|
-
{
|
|
64
|
-
baseFee: 19.17,
|
|
65
|
-
confidence: 99
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"pending+4": [
|
|
71
|
-
{
|
|
72
|
-
baseFee: 20.12,
|
|
73
|
-
confidence: 99
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"pending+5": [
|
|
79
|
-
{
|
|
80
|
-
baseFee: 20.95,
|
|
81
|
-
confidence: 99
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
],
|
|
86
|
-
maxPrice: 36,
|
|
87
|
-
msSinceLastBlock: 3643,
|
|
88
|
-
network: "main",
|
|
89
|
-
schema: EthereumGasBlocknativeSchema,
|
|
90
|
-
system: "ethereum",
|
|
91
|
-
timestamp: 1668697958837,
|
|
92
|
-
unit: "gwei"
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
// src/test/sampleEtherchainGasV2.ts
|
|
96
|
-
import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins";
|
|
97
|
-
var sampleEtherchainGasV2 = {
|
|
98
|
-
code: 200,
|
|
99
|
-
data: {
|
|
100
|
-
fast: 19803047330,
|
|
101
|
-
priceUSD: 1195.77,
|
|
102
|
-
rapid: 29714286170,
|
|
103
|
-
slow: 112e8,
|
|
104
|
-
standard: 12e9,
|
|
105
|
-
timestamp: 1668621234096
|
|
106
|
-
},
|
|
107
|
-
schema: EthereumGasEtherchainV2Schema,
|
|
108
|
-
timestamp: 1668621240790
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// src/test/sampleEtherscanGas.ts
|
|
112
|
-
import { EthereumGasEtherscanSchema } from "@xyo-network/etherscan-ethereum-gas-payload-plugin";
|
|
113
|
-
var sampleEtherscanGas = {
|
|
114
|
-
message: "OK",
|
|
115
|
-
result: {
|
|
116
|
-
FastGasPrice: "30",
|
|
117
|
-
LastBlock: "15990556",
|
|
118
|
-
ProposeGasPrice: "29",
|
|
119
|
-
SafeGasPrice: "28",
|
|
120
|
-
gasUsedRatio: "0.416266666666667,0.5672862,0.540979033333333,0.342410966666667,0.389071233333333",
|
|
121
|
-
suggestBaseFee: "27.616709247"
|
|
122
|
-
},
|
|
123
|
-
schema: EthereumGasEtherscanSchema,
|
|
124
|
-
status: "1",
|
|
125
|
-
timestamp: 1668697958837
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
// src/test/sampleEthersGas.ts
|
|
129
|
-
import { EthereumGasEthersSchema } from "@xyo-network/ethers-ethereum-gas-payload-plugin";
|
|
130
|
-
var sampleEthersGas = {
|
|
131
|
-
gasPrice: 13547863640,
|
|
132
|
-
lastBaseFeePerGas: 13447862081,
|
|
133
|
-
maxFeePerGas: 28395724162,
|
|
134
|
-
maxPriorityFeePerGas: 15e8,
|
|
135
|
-
schema: EthereumGasEthersSchema,
|
|
136
|
-
timestamp: 1668697958837
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
// src/test/sampleEthgasstationGas.ts
|
|
140
|
-
import { EthereumGasEthgasstationSchema } from "@xyo-network/ethgasstation-ethereum-gas-payload-plugin";
|
|
141
|
-
var sampleEthgasstationGas = {
|
|
142
|
-
baseFee: 10,
|
|
143
|
-
blockNumber: 16028883,
|
|
144
|
-
blockTime: 11.88,
|
|
145
|
-
gasPrice: {
|
|
146
|
-
fast: 12,
|
|
147
|
-
instant: 13,
|
|
148
|
-
standard: 12
|
|
149
|
-
},
|
|
150
|
-
nextBaseFee: 10,
|
|
151
|
-
priorityFee: {
|
|
152
|
-
fast: 2,
|
|
153
|
-
instant: 2,
|
|
154
|
-
standard: 2
|
|
155
|
-
},
|
|
156
|
-
schema: EthereumGasEthgasstationSchema,
|
|
157
|
-
timestamp: 1668697958837
|
|
158
|
-
};
|
|
159
|
-
export {
|
|
160
|
-
sampleBlocknativeGas,
|
|
161
|
-
sampleEtherchainGasV2,
|
|
162
|
-
sampleEthersGas,
|
|
163
|
-
sampleEtherscanGas,
|
|
164
|
-
sampleEthgasstationGas
|
|
165
|
-
};
|
|
1
|
+
export * from "./sampleBlocknativeGas";
|
|
2
|
+
export * from "./sampleEtherchainGasV2";
|
|
3
|
+
export * from "./sampleEtherscanGas";
|
|
4
|
+
export * from "./sampleEthersGas";
|
|
5
|
+
export * from "./sampleEthgasstationGas";
|
|
166
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/
|
|
1
|
+
{"version":3,"sources":["../../../src/test/index.ts"],"sourcesContent":["export * from './sampleBlocknativeGas'\nexport * from './sampleEtherchainGasV2'\nexport * from './sampleEtherscanGas'\nexport * from './sampleEthersGas'\nexport * from './sampleEthgasstationGas'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/sampleBlocknativeGas.ts"],"sourcesContent":["import { EstimatedBaseFee, EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nexport const sampleBlocknativeGas: EthereumGasBlocknativePayload = {\n blockPrices: [\n {\n baseFeePerGas: 13.691764456,\n blockNumber: 16028191,\n estimatedPrices: [\n {\n confidence: 99,\n maxFeePerGas: 22.04,\n maxPriorityFeePerGas: 1.09,\n price: 14,\n },\n {\n confidence: 95,\n maxFeePerGas: 21.58,\n maxPriorityFeePerGas: 0.63,\n price: 14,\n },\n {\n confidence: 90,\n maxFeePerGas: 21.25,\n maxPriorityFeePerGas: 0.3,\n price: 13,\n },\n {\n confidence: 80,\n maxFeePerGas: 21.16,\n maxPriorityFeePerGas: 0.21,\n price: 13,\n },\n {\n confidence: 70,\n maxFeePerGas: 21.12,\n maxPriorityFeePerGas: 0.17,\n price: 13,\n },\n ],\n estimatedTransactionCount: 69,\n },\n ],\n currentBlockNumber: 16028190,\n estimatedBaseFees: [\n {\n 'pending+1': [\n {\n baseFee: 15.41,\n confidence: 99,\n },\n ],\n },\n {\n 'pending+2': [\n {\n baseFee: 17.32,\n confidence: 99,\n },\n ],\n },\n {\n 'pending+3': [\n {\n baseFee: 19.17,\n confidence: 99,\n },\n ],\n },\n {\n 'pending+4': [\n {\n baseFee: 20.12,\n confidence: 99,\n },\n ],\n },\n {\n 'pending+5': [\n {\n baseFee: 20.95,\n confidence: 99,\n },\n ],\n },\n ] as unknown as EstimatedBaseFee[],\n maxPrice: 36,\n msSinceLastBlock: 3643,\n network: 'main',\n schema: EthereumGasBlocknativeSchema,\n system: 'ethereum',\n timestamp: 1668697958837,\n unit: 'gwei',\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/test/sampleBlocknativeGas.ts"],"sourcesContent":["import { EstimatedBaseFee, EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nexport const sampleBlocknativeGas: EthereumGasBlocknativePayload = {\n blockPrices: [\n {\n baseFeePerGas: 13.691764456,\n blockNumber: 16028191,\n estimatedPrices: [\n {\n confidence: 99,\n maxFeePerGas: 22.04,\n maxPriorityFeePerGas: 1.09,\n price: 14,\n },\n {\n confidence: 95,\n maxFeePerGas: 21.58,\n maxPriorityFeePerGas: 0.63,\n price: 14,\n },\n {\n confidence: 90,\n maxFeePerGas: 21.25,\n maxPriorityFeePerGas: 0.3,\n price: 13,\n },\n {\n confidence: 80,\n maxFeePerGas: 21.16,\n maxPriorityFeePerGas: 0.21,\n price: 13,\n },\n {\n confidence: 70,\n maxFeePerGas: 21.12,\n maxPriorityFeePerGas: 0.17,\n price: 13,\n },\n ],\n estimatedTransactionCount: 69,\n },\n ],\n currentBlockNumber: 16028190,\n estimatedBaseFees: [\n {\n 'pending+1': [\n {\n baseFee: 15.41,\n confidence: 99,\n },\n ],\n },\n {\n 'pending+2': [\n {\n baseFee: 17.32,\n confidence: 99,\n },\n ],\n },\n {\n 'pending+3': [\n {\n baseFee: 19.17,\n confidence: 99,\n },\n ],\n },\n {\n 'pending+4': [\n {\n baseFee: 20.12,\n confidence: 99,\n },\n ],\n },\n {\n 'pending+5': [\n {\n baseFee: 20.95,\n confidence: 99,\n },\n ],\n },\n ] as unknown as EstimatedBaseFee[],\n maxPrice: 36,\n msSinceLastBlock: 3643,\n network: 'main',\n schema: EthereumGasBlocknativeSchema,\n system: 'ethereum',\n timestamp: 1668697958837,\n unit: 'gwei',\n}\n"],"mappings":"AAAA,SAA0D,oCAAoC;AAEvF,MAAM,uBAAsD;AAAA,EACjE,aAAa;AAAA,IACX;AAAA,MACE,eAAe;AAAA,MACf,aAAa;AAAA,MACb,iBAAiB;AAAA,QACf;AAAA,UACE,YAAY;AAAA,UACZ,cAAc;AAAA,UACd,sBAAsB;AAAA,UACtB,OAAO;AAAA,QACT;AAAA,QACA;AAAA,UACE,YAAY;AAAA,UACZ,cAAc;AAAA,UACd,sBAAsB;AAAA,UACtB,OAAO;AAAA,QACT;AAAA,QACA;AAAA,UACE,YAAY;AAAA,UACZ,cAAc;AAAA,UACd,sBAAsB;AAAA,UACtB,OAAO;AAAA,QACT;AAAA,QACA;AAAA,UACE,YAAY;AAAA,UACZ,cAAc;AAAA,UACd,sBAAsB;AAAA,UACtB,OAAO;AAAA,QACT;AAAA,QACA;AAAA,UACE,YAAY;AAAA,UACZ,cAAc;AAAA,UACd,sBAAsB;AAAA,UACtB,OAAO;AAAA,QACT;AAAA,MACF;AAAA,MACA,2BAA2B;AAAA,IAC7B;AAAA,EACF;AAAA,EACA,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,IACjB;AAAA,MACE,aAAa;AAAA,QACX;AAAA,UACE,SAAS;AAAA,UACT,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE,aAAa;AAAA,QACX;AAAA,UACE,SAAS;AAAA,UACT,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE,aAAa;AAAA,QACX;AAAA,UACE,SAAS;AAAA,UACT,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE,aAAa;AAAA,QACX;AAAA,UACE,SAAS;AAAA,UACT,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE,aAAa;AAAA,QACX;AAAA,UACE,SAAS;AAAA,UACT,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,MAAM;AACR;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/sampleEtherchainGasV2.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'\n\nexport const sampleEtherchainGasV2: EthereumGasEtherchainV2Payload = {\n code: 200,\n data: {\n fast: 19803047330,\n priceUSD: 1195.77,\n rapid: 29714286170,\n slow: 11200000000,\n standard: 12000000000,\n timestamp: 1668621234096,\n },\n schema: EthereumGasEtherchainV2Schema,\n timestamp: 1668621240790,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/test/sampleEtherchainGasV2.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'\n\nexport const sampleEtherchainGasV2: EthereumGasEtherchainV2Payload = {\n code: 200,\n data: {\n fast: 19803047330,\n priceUSD: 1195.77,\n rapid: 29714286170,\n slow: 11200000000,\n standard: 12000000000,\n timestamp: 1668621234096,\n },\n schema: EthereumGasEtherchainV2Schema,\n timestamp: 1668621240790,\n}\n"],"mappings":"AAAA,SAAyC,qCAAqC;AAEvE,MAAM,wBAAwD;AAAA,EACnE,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,IACP,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,EACR,WAAW;AACb;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/sampleEthersGas.ts"],"sourcesContent":["import { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\n\nexport const sampleEthersGas: EthereumGasEthersPayload = {\n gasPrice: 13547863640,\n lastBaseFeePerGas: 13447862081,\n maxFeePerGas: 28395724162,\n maxPriorityFeePerGas: 1500000000,\n schema: EthereumGasEthersSchema,\n timestamp: 1668697958837,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/test/sampleEthersGas.ts"],"sourcesContent":["import { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\n\nexport const sampleEthersGas: EthereumGasEthersPayload = {\n gasPrice: 13547863640,\n lastBaseFeePerGas: 13447862081,\n maxFeePerGas: 28395724162,\n maxPriorityFeePerGas: 1500000000,\n schema: EthereumGasEthersSchema,\n timestamp: 1668697958837,\n}\n"],"mappings":"AAAA,SAAmC,+BAA+B;AAE3D,MAAM,kBAA4C;AAAA,EACvD,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,cAAc;AAAA,EACd,sBAAsB;AAAA,EACtB,QAAQ;AAAA,EACR,WAAW;AACb;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/sampleEtherscanGas.ts"],"sourcesContent":["import { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const sampleEtherscanGas: EthereumGasEtherscanPayload = {\n message: 'OK',\n result: {\n FastGasPrice: '30',\n LastBlock: '15990556',\n ProposeGasPrice: '29',\n SafeGasPrice: '28',\n gasUsedRatio: '0.416266666666667,0.5672862,0.540979033333333,0.342410966666667,0.389071233333333',\n suggestBaseFee: '27.616709247',\n },\n schema: EthereumGasEtherscanSchema,\n status: '1',\n timestamp: 1668697958837,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/test/sampleEtherscanGas.ts"],"sourcesContent":["import { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const sampleEtherscanGas: EthereumGasEtherscanPayload = {\n message: 'OK',\n result: {\n FastGasPrice: '30',\n LastBlock: '15990556',\n ProposeGasPrice: '29',\n SafeGasPrice: '28',\n gasUsedRatio: '0.416266666666667,0.5672862,0.540979033333333,0.342410966666667,0.389071233333333',\n suggestBaseFee: '27.616709247',\n },\n schema: EthereumGasEtherscanSchema,\n status: '1',\n timestamp: 1668697958837,\n}\n"],"mappings":"AAAA,SAAsC,kCAAkC;AAEjE,MAAM,qBAAkD;AAAA,EAC7D,SAAS;AAAA,EACT,QAAQ;AAAA,IACN,cAAc;AAAA,IACd,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd,cAAc;AAAA,IACd,gBAAgB;AAAA,EAClB;AAAA,EACA,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AACb;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// src/test/sampleEthgasstationGas.ts
|
|
2
1
|
import { EthereumGasEthgasstationSchema } from "@xyo-network/ethgasstation-ethereum-gas-payload-plugin";
|
|
3
|
-
|
|
2
|
+
const sampleEthgasstationGas = {
|
|
4
3
|
baseFee: 10,
|
|
5
4
|
blockNumber: 16028883,
|
|
6
5
|
blockTime: 11.88,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/test/sampleEthgasstationGas.ts"],"sourcesContent":["import { EthereumGasEthgasstationPayload, EthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'\n\nexport const sampleEthgasstationGas: EthereumGasEthgasstationPayload = {\n baseFee: 10,\n blockNumber: 16028883,\n blockTime: 11.88,\n gasPrice: {\n fast: 12,\n instant: 13,\n standard: 12,\n },\n nextBaseFee: 10,\n priorityFee: {\n fast: 2,\n instant: 2,\n standard: 2,\n },\n schema: EthereumGasEthgasstationSchema,\n timestamp: 1668697958837,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/test/sampleEthgasstationGas.ts"],"sourcesContent":["import { EthereumGasEthgasstationPayload, EthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'\n\nexport const sampleEthgasstationGas: EthereumGasEthgasstationPayload = {\n baseFee: 10,\n blockNumber: 16028883,\n blockTime: 11.88,\n gasPrice: {\n fast: 12,\n instant: 13,\n standard: 12,\n },\n nextBaseFee: 10,\n priorityFee: {\n fast: 2,\n instant: 2,\n standard: 2,\n },\n schema: EthereumGasEthgasstationSchema,\n timestamp: 1668697958837,\n}\n"],"mappings":"AAAA,SAA0C,sCAAsC;AAEzE,MAAM,yBAA0D;AAAA,EACrE,SAAS;AAAA,EACT,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AAAA,EACA,aAAa;AAAA,EACb,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,EACR,WAAW;AACb;","names":[]}
|