@xyo-network/gas-price-plugin 3.4.3 → 3.4.5
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/neutral/index.mjs +1 -3
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/{neutral → types}/Diviner.d.ts +3 -3
- package/dist/types/Diviner.d.ts.map +1 -0
- package/dist/{neutral → types}/Plugin.d.ts +3 -3
- package/dist/{neutral → types}/lib/average.d.ts +1 -1
- package/dist/types/lib/average.d.ts.map +1 -0
- package/dist/types/lib/divineGas.d.ts +4 -0
- package/dist/types/lib/divineGas.d.ts.map +1 -0
- package/dist/types/lib/identities/isEthereumGasBlocknativePayload.d.ts +4 -0
- package/dist/types/lib/identities/isEthereumGasBlocknativePayload.d.ts.map +1 -0
- package/dist/types/lib/identities/isEthereumGasEtherchainV2Payload.d.ts +4 -0
- package/dist/types/lib/identities/isEthereumGasEtherchainV2Payload.d.ts.map +1 -0
- package/dist/types/lib/identities/isEthereumGasEthersPayload.d.ts +4 -0
- package/dist/types/lib/identities/isEthereumGasEthersPayload.d.ts.map +1 -0
- package/dist/types/lib/identities/isEthereumGasEtherscanPayload.d.ts +4 -0
- package/dist/types/lib/identities/isEthereumGasEtherscanPayload.d.ts.map +1 -0
- package/dist/types/lib/identities/isEthereumGasEthgasstationPayload.d.ts +4 -0
- package/dist/{neutral → types}/lib/identities/isEthereumGasEthgasstationPayload.d.ts.map +1 -1
- package/dist/types/lib/transforms/transformGasFromBlocknative.d.ts +4 -0
- package/dist/types/lib/transforms/transformGasFromBlocknative.d.ts.map +1 -0
- package/dist/types/lib/transforms/transformGasFromEtherchainV2.d.ts +4 -0
- package/dist/types/lib/transforms/transformGasFromEtherchainV2.d.ts.map +1 -0
- package/dist/types/lib/transforms/transformGasFromEthers.d.ts +4 -0
- package/dist/types/lib/transforms/transformGasFromEthers.d.ts.map +1 -0
- package/dist/types/lib/transforms/transformGasFromEtherscan.d.ts +4 -0
- package/dist/types/lib/transforms/transformGasFromEtherscan.d.ts.map +1 -0
- package/dist/types/lib/transforms/transformGasFromEthgasstation.d.ts +4 -0
- package/dist/types/lib/transforms/transformGasFromEthgasstation.d.ts.map +1 -0
- package/dist/types/test/sampleBlocknativeGas.d.ts +3 -0
- package/dist/{neutral → types}/test/sampleBlocknativeGas.d.ts.map +1 -1
- package/dist/types/test/sampleEtherchainGasV2.d.ts +3 -0
- package/dist/{neutral → types}/test/sampleEtherchainGasV2.d.ts.map +1 -1
- package/dist/types/test/sampleEthersGas.d.ts +3 -0
- package/dist/{neutral → types}/test/sampleEthersGas.d.ts.map +1 -1
- package/dist/types/test/sampleEtherscanGas.d.ts +3 -0
- package/dist/{neutral → types}/test/sampleEtherscanGas.d.ts.map +1 -1
- package/dist/types/test/sampleEthgasstationGas.d.ts +3 -0
- package/dist/{neutral → types}/test/sampleEthgasstationGas.d.ts.map +1 -1
- package/package.json +25 -25
- package/src/Diviner.ts +3 -3
- package/src/lib/average.ts +1 -1
- package/src/lib/divineGas.ts +3 -4
- package/src/lib/identities/isEthereumGasBlocknativePayload.ts +3 -2
- package/src/lib/identities/isEthereumGasEtherchainV2Payload.ts +3 -2
- package/src/lib/identities/isEthereumGasEthersPayload.ts +3 -2
- package/src/lib/identities/isEthereumGasEtherscanPayload.ts +3 -2
- package/src/lib/identities/isEthereumGasEthgasstationPayload.ts +3 -2
- package/src/lib/transforms/transformGasFromBlocknative.ts +2 -2
- package/src/lib/transforms/transformGasFromEtherchainV2.ts +2 -2
- package/src/lib/transforms/transformGasFromEthers.ts +2 -2
- package/src/lib/transforms/transformGasFromEtherscan.ts +2 -2
- package/src/lib/transforms/transformGasFromEthgasstation.ts +2 -2
- package/src/test/sampleBlocknativeGas.ts +2 -3
- package/src/test/sampleEtherchainGasV2.ts +2 -1
- package/src/test/sampleEthersGas.ts +2 -1
- package/src/test/sampleEtherscanGas.ts +2 -1
- package/src/test/sampleEthgasstationGas.ts +2 -1
- package/xy.config.ts +1 -1
- package/dist/neutral/Diviner.d.ts.map +0 -1
- package/dist/neutral/lib/average.d.ts.map +0 -1
- package/dist/neutral/lib/divineGas.d.ts +0 -4
- package/dist/neutral/lib/divineGas.d.ts.map +0 -1
- package/dist/neutral/lib/identities/isEthereumGasBlocknativePayload.d.ts +0 -4
- package/dist/neutral/lib/identities/isEthereumGasBlocknativePayload.d.ts.map +0 -1
- package/dist/neutral/lib/identities/isEthereumGasEtherchainV2Payload.d.ts +0 -4
- package/dist/neutral/lib/identities/isEthereumGasEtherchainV2Payload.d.ts.map +0 -1
- package/dist/neutral/lib/identities/isEthereumGasEthersPayload.d.ts +0 -4
- package/dist/neutral/lib/identities/isEthereumGasEthersPayload.d.ts.map +0 -1
- package/dist/neutral/lib/identities/isEthereumGasEtherscanPayload.d.ts +0 -4
- package/dist/neutral/lib/identities/isEthereumGasEtherscanPayload.d.ts.map +0 -1
- package/dist/neutral/lib/identities/isEthereumGasEthgasstationPayload.d.ts +0 -4
- package/dist/neutral/lib/transforms/transformGasFromBlocknative.d.ts +0 -4
- package/dist/neutral/lib/transforms/transformGasFromBlocknative.d.ts.map +0 -1
- package/dist/neutral/lib/transforms/transformGasFromEtherchainV2.d.ts +0 -4
- package/dist/neutral/lib/transforms/transformGasFromEtherchainV2.d.ts.map +0 -1
- package/dist/neutral/lib/transforms/transformGasFromEthers.d.ts +0 -4
- package/dist/neutral/lib/transforms/transformGasFromEthers.d.ts.map +0 -1
- package/dist/neutral/lib/transforms/transformGasFromEtherscan.d.ts +0 -4
- package/dist/neutral/lib/transforms/transformGasFromEtherscan.d.ts.map +0 -1
- package/dist/neutral/lib/transforms/transformGasFromEthgasstation.d.ts +0 -4
- package/dist/neutral/lib/transforms/transformGasFromEthgasstation.d.ts.map +0 -1
- package/dist/neutral/test/sampleBlocknativeGas.d.ts +0 -3
- package/dist/neutral/test/sampleEtherchainGasV2.d.ts +0 -3
- package/dist/neutral/test/sampleEthersGas.d.ts +0 -3
- package/dist/neutral/test/sampleEtherscanGas.d.ts +0 -3
- package/dist/neutral/test/sampleEthgasstationGas.d.ts +0 -3
- /package/dist/{neutral → types}/Plugin.d.ts.map +0 -0
- /package/dist/{neutral → types}/Schema.d.ts +0 -0
- /package/dist/{neutral → types}/Schema.d.ts.map +0 -0
- /package/dist/{neutral → types}/index.d.ts +0 -0
- /package/dist/{neutral → types}/index.d.ts.map +0 -0
- /package/dist/{neutral → types}/lib/identities/index.d.ts +0 -0
- /package/dist/{neutral → types}/lib/identities/index.d.ts.map +0 -0
- /package/dist/{neutral → types}/lib/index.d.ts +0 -0
- /package/dist/{neutral → types}/lib/index.d.ts.map +0 -0
- /package/dist/{neutral → types}/lib/transforms/index.d.ts +0 -0
- /package/dist/{neutral → types}/lib/transforms/index.d.ts.map +0 -0
- /package/dist/{neutral → types}/test/index.d.ts +0 -0
- /package/dist/{neutral → types}/test/index.d.ts.map +0 -0
package/dist/neutral/index.mjs
CHANGED
|
@@ -3,9 +3,7 @@ import { AbstractDiviner } from "@xyo-network/diviner-abstract";
|
|
|
3
3
|
import { EthereumGasSchema as EthereumGasSchema2 } from "@xyo-network/gas-price-payload-plugin";
|
|
4
4
|
|
|
5
5
|
// src/lib/divineGas.ts
|
|
6
|
-
import {
|
|
7
|
-
EthereumGasSchema
|
|
8
|
-
} from "@xyo-network/gas-price-payload-plugin";
|
|
6
|
+
import { EthereumGasSchema } from "@xyo-network/gas-price-payload-plugin";
|
|
9
7
|
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
10
8
|
|
|
11
9
|
// src/lib/average.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Diviner.ts","../../src/lib/divineGas.ts","../../src/lib/average.ts","../../src/lib/identities/isEthereumGasBlocknativePayload.ts","../../src/lib/identities/isEthereumGasEtherchainV2Payload.ts","../../src/lib/identities/isEthereumGasEtherscanPayload.ts","../../src/lib/identities/isEthereumGasEthersPayload.ts","../../src/lib/identities/isEthereumGasEthgasstationPayload.ts","../../src/lib/transforms/transformGasFromBlocknative.ts","../../src/lib/transforms/transformGasFromEtherchainV2.ts","../../src/lib/transforms/transformGasFromEthers.ts","../../src/lib/transforms/transformGasFromEtherscan.ts","../../src/lib/transforms/transformGasFromEthgasstation.ts","../../src/Schema.ts","../../src/Plugin.ts"],"sourcesContent":["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport {\n DivinerConfig, DivinerModule, DivinerParams,\n} from '@xyo-network/diviner-model'\nimport { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\n\nimport { divineGas } from './lib/index.ts'\nimport { EthereumGasDivinerConfigSchema } from './Schema.ts'\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 static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasDivinerConfigSchema\n static override readonly targetSchema: string = EthereumGasSchema\n\n protected override divineHandler(payloads?: Payload[]): Payload[] {\n const cost = divineGas(payloads ?? [])\n return [cost]\n }\n}\n","import {\n EthereumGasPayload, EthereumGasSchema, FeeData,\n} 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.ts'\nimport {\n isEthereumGasBlocknativePayload,\n isEthereumGasEtherchainV2Payload,\n isEthereumGasEtherscanPayload,\n isEthereumGasEthersPayload,\n isEthereumGasEthgasstationPayload,\n} from './identities/index.ts'\nimport {\n transformGasFromBlocknative,\n transformGasFromEtherchainV2,\n transformGasFromEthers,\n transformGasFromEtherscan,\n transformGasFromEthgasstation,\n} from './transforms/index.ts'\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","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 */\n// eslint-disable-next-line sonarjs/reduce-initial-value\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","import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const isEthereumGasBlocknativePayload = (payload?: Payload | null): payload is EthereumGasBlocknativePayload => {\n return payload?.schema === EthereumGasBlocknativeSchema\n}\n","import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const isEthereumGasEtherchainV2Payload = (payload?: Payload | null): payload is EthereumGasEtherchainV2Payload => {\n return payload?.schema === EthereumGasEtherchainV2Schema\n}\n","import { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const isEthereumGasEtherscanPayload = (payload?: Payload | null): payload is EthereumGasEtherscanPayload => {\n return payload?.schema === EthereumGasEtherscanSchema\n}\n","import { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const isEthereumGasEthersPayload = (payload?: Payload | null): payload is EthereumGasEthersPayload => {\n return payload?.schema === EthereumGasEthersSchema\n}\n","import { EthereumGasEthgasstationPayload, EthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const isEthereumGasEthgasstationPayload = (payload?: Payload | null): payload is EthereumGasEthgasstationPayload => {\n return payload?.schema === EthereumGasEthgasstationSchema\n}\n","import { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport {\n FeeData, FeePerGas, PriorityFeePerGas,\n} from '@xyo-network/gas-price-payload-plugin'\nimport regression from 'regression'\n\nconst getBaseFee = (payload: EthereumGasBlocknativePayload): number | undefined => {\n return payload?.blockPrices?.[0]?.baseFeePerGas\n}\n\nconst getFeePerGas = (payload: EthereumGasBlocknativePayload): Partial<FeePerGas> => {\n const sorted = payload.blockPrices?.[0].estimatedPrices?.toSorted((a, b) => a.confidence - b.confidence)\n const trend = regression.linear([\n [0, sorted?.[0].price],\n [1, sorted?.[1].price],\n [2, sorted?.[2].price],\n [3, sorted?.[3].price],\n [4, sorted?.[4].price],\n ])\n const feePerGas: FeePerGas = {\n low: trend.predict(0.5)[1],\n medium: trend.predict(1.5)[1],\n high: trend.predict(2.5)[1],\n veryHigh: trend.predict(3.5)[1],\n }\n return feePerGas\n}\n\nconst getPriorityFeePerGas = (payload: EthereumGasBlocknativePayload): Partial<PriorityFeePerGas> => {\n const sorted = payload.blockPrices?.[0].estimatedPrices?.toSorted((a, b) => a.confidence - b.confidence)\n const trend = regression.linear([\n [0, sorted?.[0].maxPriorityFeePerGas],\n [1, sorted?.[1].maxPriorityFeePerGas],\n [2, sorted?.[2].maxPriorityFeePerGas],\n [3, sorted?.[3].maxPriorityFeePerGas],\n [4, sorted?.[4].maxPriorityFeePerGas],\n ])\n const priorityFeePerGas: PriorityFeePerGas = {\n low: trend.predict(0.5)[1],\n medium: trend.predict(1.5)[1],\n high: trend.predict(2.5)[1],\n veryHigh: trend.predict(3.5)[1],\n }\n return priorityFeePerGas\n}\n\nexport const transformGasFromBlocknative = (payload: EthereumGasBlocknativePayload): FeeData => {\n const baseFee = getBaseFee(payload)\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = getPriorityFeePerGas(payload)\n return {\n baseFee, feePerGas, priorityFeePerGas,\n }\n}\n","import { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'\nimport { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'\n\nconst getFeePerGas = (payload: EthereumGasEtherchainV2Payload): Partial<FeePerGas> => {\n const {\n slow, standard, fast, rapid,\n } = payload.data\n const low = slow / 1_000_000_000\n const medium = standard / 1_000_000_000\n const high = fast / 1_000_000_000\n const veryHigh = rapid / 1_000_000_000\n return {\n high, low, medium, veryHigh,\n }\n}\n\nexport const transformGasFromEtherchainV2 = (payload: EthereumGasEtherchainV2Payload): FeeData => {\n const baseFee = undefined\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = {}\n return {\n baseFee, feePerGas, priorityFeePerGas,\n }\n}\n","import { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport {\n FeeData, FeePerGas, PriorityFeePerGas,\n} from '@xyo-network/gas-price-payload-plugin'\n\nconst getBaseFee = (payload: EthereumGasEthersPayload): number | undefined => {\n const { gasPrice } = payload\n return gasPrice ? gasPrice / 1_000_000_000 : undefined\n}\n\nconst getFeePerGas = (payload: EthereumGasEthersPayload): Partial<FeePerGas> => {\n const { maxFeePerGas } = payload\n const high = maxFeePerGas ? maxFeePerGas / 1_000_000_000 : undefined\n return { high }\n}\n\nconst getPriorityFeePerGas = (payload: EthereumGasEthersPayload): Partial<PriorityFeePerGas> => {\n const { maxPriorityFeePerGas } = payload\n const high = maxPriorityFeePerGas ? maxPriorityFeePerGas / 1_000_000_000 : undefined\n return { high }\n}\n\nexport const transformGasFromEthers = (payload: EthereumGasEthersPayload): FeeData => {\n const baseFee = getBaseFee(payload)\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = getPriorityFeePerGas(payload)\n return {\n baseFee, feePerGas, priorityFeePerGas,\n }\n}\n","import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'\nimport regression from 'regression'\n\nconst getBaseFee = (payload: EthereumGasEtherscanPayload): number | undefined => {\n const { suggestBaseFee } = payload.result\n return Number.parseFloat(suggestBaseFee)\n}\n\nconst getFeePerGas = (payload: EthereumGasEtherscanPayload): Partial<FeePerGas> => {\n const {\n FastGasPrice, ProposeGasPrice, SafeGasPrice,\n } = payload.result\n const low = Number.parseFloat(SafeGasPrice)\n const medium = Number.parseFloat(ProposeGasPrice)\n const high = Number.parseFloat(FastGasPrice)\n const veryHigh = regression.linear([\n [0, low],\n [1, medium],\n [2, high],\n ]).predict(3)[1]\n return {\n high, low, medium, veryHigh,\n }\n}\n\nexport const transformGasFromEtherscan = (payload: EthereumGasEtherscanPayload): FeeData => {\n const baseFee = getBaseFee(payload)\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = {}\n return {\n baseFee, feePerGas, priorityFeePerGas,\n }\n}\n","import { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'\nimport {\n FeeData, FeePerGas, PriorityFeePerGas,\n} from '@xyo-network/gas-price-payload-plugin'\nimport regression 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 {\n standard: medium, fast: high, instant: veryHigh,\n } = payload.gasPrice\n const trend = regression.linear([\n [1, medium],\n [2, high],\n [3, veryHigh],\n ])\n const low = trend.predict(0)[1]\n return {\n low, medium, high, veryHigh,\n }\n}\n\nconst getPriorityFeePerGas = (payload: EthereumGasEthgasstationPayload): Partial<PriorityFeePerGas> => {\n const {\n standard: medium, fast: high, instant: veryHigh,\n } = payload.priorityFee\n const trend = regression.linear([\n [1, medium],\n [2, high],\n [3, veryHigh],\n ])\n const low = trend.predict(0)[1]\n return {\n low, medium, high, veryHigh,\n }\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 {\n baseFee, feePerGas, priorityFeePerGas,\n }\n}\n","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","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.ts'\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,uBAAuB;AAIhC,SAAS,qBAAAA,0BAAyB;;;ACJlC;AAAA,EACsB;AAAA,OACf;AACP,SAAS,sBAAsB;;;ACH/B,SAAS,cAAc;AAUvB,IAAM,cAAc,CAAC,MAAkB,GAAG,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,SAAS;AAU1F,IAAM,kBAAkB,CAAC,MAAiB,uBAA2D;AACnG,SAAO,YAAY,KAAK,IAAI,kBAAkB,EAAE,OAAO,MAAM,CAAC;AAChE;AAOO,IAAM,UAAU,CAAC,UAA6C;AACnE,QAAM,OAAO,OAAO,OAAO,MAAM,KAAK,CAAC;AACvC,QAAM,WAAoB;AAAA,IACxB,SAAS,gBAAgB,MAAM,OAAK,EAAE,OAAO;AAAA,IAC7C,WAAW;AAAA,MACT,MAAM,gBAAgB,M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,IAAM,gCAA+D;AAGrE,IAAM,iCAAiE;;;AbUvE,IAAM,qBAAN,cACG,gBACiB;AAAA,EACzB,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,8BAA8B;AAAA,EAC1G,OAAyB,sBAA8B;AAAA,EACvD,OAAyB,eAAuBC;AAAA,EAE7B,cAAc,UAAiC;AAChE,UAAM,OAAO,UAAU,YAAY,CAAC,CAAC;AACrC,WAAO,CAAC,IAAI;AAAA,EACd;AACF;;;AczBA,SAAS,qBAAAC,0BAAyB;AAClC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAIvC,IAAM,oBAAoB,MAC/B;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,kBAAiB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACjE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,mBAAmB,OAAO,MAAM;AAAA,IAChD;AAAA,EACF;AACF;","names":["EthereumGasSchema","getFeePerGas","getBaseFee","getFeePerGas","getPriorityFeePerGas","regression","getBaseFee","getFeePerGas","regression","getBaseFee","getFeePerGas","getPriorityFeePerGas","EthereumGasSchema","EthereumGasSchema","EthereumGasSchema"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Diviner.ts","../../src/lib/divineGas.ts","../../src/lib/average.ts","../../src/lib/identities/isEthereumGasBlocknativePayload.ts","../../src/lib/identities/isEthereumGasEtherchainV2Payload.ts","../../src/lib/identities/isEthereumGasEtherscanPayload.ts","../../src/lib/identities/isEthereumGasEthersPayload.ts","../../src/lib/identities/isEthereumGasEthgasstationPayload.ts","../../src/lib/transforms/transformGasFromBlocknative.ts","../../src/lib/transforms/transformGasFromEtherchainV2.ts","../../src/lib/transforms/transformGasFromEthers.ts","../../src/lib/transforms/transformGasFromEtherscan.ts","../../src/lib/transforms/transformGasFromEthgasstation.ts","../../src/Schema.ts","../../src/Plugin.ts"],"sourcesContent":["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type {\n DivinerConfig, DivinerModule, DivinerParams,\n} from '@xyo-network/diviner-model'\nimport { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport type { Payload, Schema } from '@xyo-network/payload-model'\n\nimport { divineGas } from './lib/index.ts'\nimport { EthereumGasDivinerConfigSchema } from './Schema.ts'\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 static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasDivinerConfigSchema\n static override readonly targetSchema: string = EthereumGasSchema\n\n protected override divineHandler(payloads?: Payload[]): Payload[] {\n const cost = divineGas(payloads ?? [])\n return [cost]\n }\n}\n","import type { EthereumGasPayload, FeeData } from '@xyo-network/gas-price-payload-plugin'\nimport { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport { average } from './average.ts'\nimport {\n isEthereumGasBlocknativePayload,\n isEthereumGasEtherchainV2Payload,\n isEthereumGasEtherscanPayload,\n isEthereumGasEthersPayload,\n isEthereumGasEthgasstationPayload,\n} from './identities/index.ts'\nimport {\n transformGasFromBlocknative,\n transformGasFromEtherchainV2,\n transformGasFromEthers,\n transformGasFromEtherscan,\n transformGasFromEthgasstation,\n} from './transforms/index.ts'\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","import { exists } from '@xylabs/exists'\nimport type { 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 */\n// eslint-disable-next-line sonarjs/reduce-initial-value\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","import type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const isEthereumGasBlocknativePayload = (payload?: Payload | null): payload is EthereumGasBlocknativePayload => {\n return payload?.schema === EthereumGasBlocknativeSchema\n}\n","import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'\nimport { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const isEthereumGasEtherchainV2Payload = (payload?: Payload | null): payload is EthereumGasEtherchainV2Payload => {\n return payload?.schema === EthereumGasEtherchainV2Schema\n}\n","import type { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const isEthereumGasEtherscanPayload = (payload?: Payload | null): payload is EthereumGasEtherscanPayload => {\n return payload?.schema === EthereumGasEtherscanSchema\n}\n","import type { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const isEthereumGasEthersPayload = (payload?: Payload | null): payload is EthereumGasEthersPayload => {\n return payload?.schema === EthereumGasEthersSchema\n}\n","import type { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'\nimport { EthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const isEthereumGasEthgasstationPayload = (payload?: Payload | null): payload is EthereumGasEthgasstationPayload => {\n return payload?.schema === EthereumGasEthgasstationSchema\n}\n","import type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport type {\n FeeData, FeePerGas, PriorityFeePerGas,\n} from '@xyo-network/gas-price-payload-plugin'\nimport regression from 'regression'\n\nconst getBaseFee = (payload: EthereumGasBlocknativePayload): number | undefined => {\n return payload?.blockPrices?.[0]?.baseFeePerGas\n}\n\nconst getFeePerGas = (payload: EthereumGasBlocknativePayload): Partial<FeePerGas> => {\n const sorted = payload.blockPrices?.[0].estimatedPrices?.toSorted((a, b) => a.confidence - b.confidence)\n const trend = regression.linear([\n [0, sorted?.[0].price],\n [1, sorted?.[1].price],\n [2, sorted?.[2].price],\n [3, sorted?.[3].price],\n [4, sorted?.[4].price],\n ])\n const feePerGas: FeePerGas = {\n low: trend.predict(0.5)[1],\n medium: trend.predict(1.5)[1],\n high: trend.predict(2.5)[1],\n veryHigh: trend.predict(3.5)[1],\n }\n return feePerGas\n}\n\nconst getPriorityFeePerGas = (payload: EthereumGasBlocknativePayload): Partial<PriorityFeePerGas> => {\n const sorted = payload.blockPrices?.[0].estimatedPrices?.toSorted((a, b) => a.confidence - b.confidence)\n const trend = regression.linear([\n [0, sorted?.[0].maxPriorityFeePerGas],\n [1, sorted?.[1].maxPriorityFeePerGas],\n [2, sorted?.[2].maxPriorityFeePerGas],\n [3, sorted?.[3].maxPriorityFeePerGas],\n [4, sorted?.[4].maxPriorityFeePerGas],\n ])\n const priorityFeePerGas: PriorityFeePerGas = {\n low: trend.predict(0.5)[1],\n medium: trend.predict(1.5)[1],\n high: trend.predict(2.5)[1],\n veryHigh: trend.predict(3.5)[1],\n }\n return priorityFeePerGas\n}\n\nexport const transformGasFromBlocknative = (payload: EthereumGasBlocknativePayload): FeeData => {\n const baseFee = getBaseFee(payload)\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = getPriorityFeePerGas(payload)\n return {\n baseFee, feePerGas, priorityFeePerGas,\n }\n}\n","import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'\nimport type { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'\n\nconst getFeePerGas = (payload: EthereumGasEtherchainV2Payload): Partial<FeePerGas> => {\n const {\n slow, standard, fast, rapid,\n } = payload.data\n const low = slow / 1_000_000_000\n const medium = standard / 1_000_000_000\n const high = fast / 1_000_000_000\n const veryHigh = rapid / 1_000_000_000\n return {\n high, low, medium, veryHigh,\n }\n}\n\nexport const transformGasFromEtherchainV2 = (payload: EthereumGasEtherchainV2Payload): FeeData => {\n const baseFee = undefined\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = {}\n return {\n baseFee, feePerGas, priorityFeePerGas,\n }\n}\n","import type { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport type {\n FeeData, FeePerGas, PriorityFeePerGas,\n} from '@xyo-network/gas-price-payload-plugin'\n\nconst getBaseFee = (payload: EthereumGasEthersPayload): number | undefined => {\n const { gasPrice } = payload\n return gasPrice ? gasPrice / 1_000_000_000 : undefined\n}\n\nconst getFeePerGas = (payload: EthereumGasEthersPayload): Partial<FeePerGas> => {\n const { maxFeePerGas } = payload\n const high = maxFeePerGas ? maxFeePerGas / 1_000_000_000 : undefined\n return { high }\n}\n\nconst getPriorityFeePerGas = (payload: EthereumGasEthersPayload): Partial<PriorityFeePerGas> => {\n const { maxPriorityFeePerGas } = payload\n const high = maxPriorityFeePerGas ? maxPriorityFeePerGas / 1_000_000_000 : undefined\n return { high }\n}\n\nexport const transformGasFromEthers = (payload: EthereumGasEthersPayload): FeeData => {\n const baseFee = getBaseFee(payload)\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = getPriorityFeePerGas(payload)\n return {\n baseFee, feePerGas, priorityFeePerGas,\n }\n}\n","import type { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport type { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'\nimport regression from 'regression'\n\nconst getBaseFee = (payload: EthereumGasEtherscanPayload): number | undefined => {\n const { suggestBaseFee } = payload.result\n return Number.parseFloat(suggestBaseFee)\n}\n\nconst getFeePerGas = (payload: EthereumGasEtherscanPayload): Partial<FeePerGas> => {\n const {\n FastGasPrice, ProposeGasPrice, SafeGasPrice,\n } = payload.result\n const low = Number.parseFloat(SafeGasPrice)\n const medium = Number.parseFloat(ProposeGasPrice)\n const high = Number.parseFloat(FastGasPrice)\n const veryHigh = regression.linear([\n [0, low],\n [1, medium],\n [2, high],\n ]).predict(3)[1]\n return {\n high, low, medium, veryHigh,\n }\n}\n\nexport const transformGasFromEtherscan = (payload: EthereumGasEtherscanPayload): FeeData => {\n const baseFee = getBaseFee(payload)\n const feePerGas = getFeePerGas(payload)\n const priorityFeePerGas = {}\n return {\n baseFee, feePerGas, priorityFeePerGas,\n }\n}\n","import type { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'\nimport type {\n FeeData, FeePerGas, PriorityFeePerGas,\n} from '@xyo-network/gas-price-payload-plugin'\nimport regression 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 {\n standard: medium, fast: high, instant: veryHigh,\n } = payload.gasPrice\n const trend = regression.linear([\n [1, medium],\n [2, high],\n [3, veryHigh],\n ])\n const low = trend.predict(0)[1]\n return {\n low, medium, high, veryHigh,\n }\n}\n\nconst getPriorityFeePerGas = (payload: EthereumGasEthgasstationPayload): Partial<PriorityFeePerGas> => {\n const {\n standard: medium, fast: high, instant: veryHigh,\n } = payload.priorityFee\n const trend = regression.linear([\n [1, medium],\n [2, high],\n [3, veryHigh],\n ])\n const low = trend.predict(0)[1]\n return {\n low, medium, high, veryHigh,\n }\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 {\n baseFee, feePerGas, priorityFeePerGas,\n }\n}\n","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","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.ts'\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,uBAAuB;AAIhC,SAAS,qBAAAA,0BAAyB;;;ACHlC,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;;;ACF/B,SAAS,cAAc;AAUvB,IAAM,cAAc,CAAC,MAAkB,GAAG,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,SAAS;AAU1F,IAAM,kBAAkB,CAAC,MAAiB,uBAA2D;AACnG,SAAO,YAAY,KAAK,IAAI,kBAAkB,EAAE,OAAO,MAAM,CAAC;AAChE;AAOO,IAAM,UAAU,CAAC,UAA6C;AACnE,QAAM,OAAO,OAAO,OAAO,MAAM,KAAK,CAAC;AACvC,QAAM,WAAoB;AAAA,IACxB,SAAS,gBAAgB,MAAM,OAAK,EAAE,OAAO;AAAA,IAC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AM;AAC1H,SAAO;AACT;;;AY/BO,IAAM,gCAA+D;AAGrE,IAAM,iCAAiE;;;AbUvE,IAAM,qBAAN,cACG,gBACiB;AAAA,EACzB,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,8BAA8B;AAAA,EAC1G,OAAyB,sBAA8B;AAAA,EACvD,OAAyB,eAAuBC;AAAA,EAE7B,cAAc,UAAiC;AAChE,UAAM,OAAO,UAAU,YAAY,CAAC,CAAC;AACrC,WAAO,CAAC,IAAI;AAAA,EACd;AACF;;;AczBA,SAAS,qBAAAC,0BAAyB;AAClC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAIvC,IAAM,oBAAoB,MAC/B;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,kBAAiB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACjE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,mBAAmB,OAAO,MAAM;AAAA,IAChD;AAAA,EACF;AACF;","names":["EthereumGasSchema","getFeePerGas","getBaseFee","getFeePerGas","getPriorityFeePerGas","regression","getBaseFee","getFeePerGas","regression","getBaseFee","getFeePerGas","getPriorityFeePerGas","EthereumGasSchema","EthereumGasSchema","EthereumGasSchema"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
2
|
-
import { DivinerConfig, DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
|
|
3
|
-
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
4
|
-
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
2
|
+
import type { DivinerConfig, DivinerModule, DivinerParams } from '@xyo-network/diviner-model';
|
|
3
|
+
import type { AnyConfigSchema } from '@xyo-network/module-model';
|
|
4
|
+
import type { Payload, Schema } from '@xyo-network/payload-model';
|
|
5
5
|
import { EthereumGasDivinerConfigSchema } from './Schema.ts';
|
|
6
6
|
export type EthereumGasDivinerConfig = DivinerConfig<{
|
|
7
7
|
schema: EthereumGasDivinerConfigSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,aAAa,EAC5C,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAE5D,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC;IAAE,MAAM,EAAE,8BAA8B,CAAA;CAAE,CAAC,CAAA;AAChG,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,eAAe,CAAC,wBAAwB,CAAC,CAAC,CAAA;AAE/F,qBAAa,kBAAkB,CAAC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,CACjG,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA2D;IAC3G,gBAAyB,mBAAmB,EAAE,MAAM,CAAiC;IACrF,gBAAyB,YAAY,EAAE,MAAM,CAAoB;cAE9C,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE;CAIlE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EthereumGasDiviner } from './Diviner.ts';
|
|
2
|
-
export declare const EthereumGasPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<EthereumGasDiviner<import(".store/@xylabs-object-npm-4.
|
|
3
|
-
account?: import(".store/@xyo-network-account-model-
|
|
2
|
+
export declare const EthereumGasPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<EthereumGasDiviner<import(".store/@xylabs-object-npm-4.7.13-9e41d80be7/package").BaseParamsFields & {
|
|
3
|
+
account?: import(".store/@xyo-network-account-model-npm-3.10.6-b5f2fc03db/package").AccountInstance | "random";
|
|
4
4
|
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import(".store/@xyo-network-account-model-
|
|
5
|
+
additionalSigners?: import(".store/@xyo-network-account-model-npm-3.10.6-b5f2fc03db/package").AccountInstance[];
|
|
6
6
|
allowNameResolution?: boolean;
|
|
7
7
|
config: import("@xyo-network/module-model").AnyConfigSchema<import("./Diviner.ts").EthereumGasDivinerConfig>;
|
|
8
8
|
ephemeralQueryAccountEnabled?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"average.d.ts","sourceRoot":"","sources":["../../../src/lib/average.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAuBpE;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,QAAQ,CAAC,OAAO,GAAG,SAAS,CAAC,EAAE,KAAG,OAkBzD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divineGas.d.ts","sourceRoot":"","sources":["../../../src/lib/divineGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAW,MAAM,uCAAuC,CAAA;AAGxF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAkBzD,eAAO,MAAM,SAAS,GAAI,UAAU,OAAO,EAAE,KAAG,kBAW/C,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
|
|
2
|
+
import type { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const isEthereumGasBlocknativePayload: (payload?: Payload | null) => payload is EthereumGasBlocknativePayload;
|
|
4
|
+
//# sourceMappingURL=isEthereumGasBlocknativePayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isEthereumGasBlocknativePayload.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/isEthereumGasBlocknativePayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAA;AAEzG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,eAAO,MAAM,+BAA+B,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,OAAO,IAAI,6BAErF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins';
|
|
2
|
+
import type { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const isEthereumGasEtherchainV2Payload: (payload?: Payload | null) => payload is EthereumGasEtherchainV2Payload;
|
|
4
|
+
//# sourceMappingURL=isEthereumGasEtherchainV2Payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isEthereumGasEtherchainV2Payload.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/isEthereumGasEtherchainV2Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,iEAAiE,CAAA;AAErH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,eAAO,MAAM,gCAAgC,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,OAAO,IAAI,8BAEtF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin';
|
|
2
|
+
import type { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const isEthereumGasEthersPayload: (payload?: Payload | null) => payload is EthereumGasEthersPayload;
|
|
4
|
+
//# sourceMappingURL=isEthereumGasEthersPayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isEthereumGasEthersPayload.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/isEthereumGasEthersPayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAA;AAE/F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,eAAO,MAAM,0BAA0B,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,OAAO,IAAI,wBAEhF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
|
|
2
|
+
import type { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const isEthereumGasEtherscanPayload: (payload?: Payload | null) => payload is EthereumGasEtherscanPayload;
|
|
4
|
+
//# sourceMappingURL=isEthereumGasEtherscanPayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isEthereumGasEtherscanPayload.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/isEthereumGasEtherscanPayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAA;AAErG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,eAAO,MAAM,6BAA6B,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,OAAO,IAAI,2BAEnF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin';
|
|
2
|
+
import type { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const isEthereumGasEthgasstationPayload: (payload?: Payload | null) => payload is EthereumGasEthgasstationPayload;
|
|
4
|
+
//# sourceMappingURL=isEthereumGasEthgasstationPayload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEthereumGasEthgasstationPayload.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/isEthereumGasEthgasstationPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,
|
|
1
|
+
{"version":3,"file":"isEthereumGasEthgasstationPayload.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/isEthereumGasEthgasstationPayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAA;AAE7G,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,eAAO,MAAM,iCAAiC,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,OAAO,IAAI,+BAEvF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
|
|
2
|
+
import type { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
+
export declare const transformGasFromBlocknative: (payload: EthereumGasBlocknativePayload) => FeeData;
|
|
4
|
+
//# sourceMappingURL=transformGasFromBlocknative.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformGasFromBlocknative.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromBlocknative.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAA;AACzG,OAAO,KAAK,EACV,OAAO,EACR,MAAM,uCAAuC,CAAA;AA2C9C,eAAO,MAAM,2BAA2B,GAAI,SAAS,6BAA6B,KAAG,OAOpF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins';
|
|
2
|
+
import type { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
+
export declare const transformGasFromEtherchainV2: (payload: EthereumGasEtherchainV2Payload) => FeeData;
|
|
4
|
+
//# sourceMappingURL=transformGasFromEtherchainV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformGasFromEtherchainV2.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEtherchainV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,iEAAiE,CAAA;AACrH,OAAO,KAAK,EAAE,OAAO,EAAa,MAAM,uCAAuC,CAAA;AAe/E,eAAO,MAAM,4BAA4B,GAAI,SAAS,8BAA8B,KAAG,OAOtF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin';
|
|
2
|
+
import type { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
+
export declare const transformGasFromEthers: (payload: EthereumGasEthersPayload) => FeeData;
|
|
4
|
+
//# sourceMappingURL=transformGasFromEthers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformGasFromEthers.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEthers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAA;AAC/F,OAAO,KAAK,EACV,OAAO,EACR,MAAM,uCAAuC,CAAA;AAmB9C,eAAO,MAAM,sBAAsB,GAAI,SAAS,wBAAwB,KAAG,OAO1E,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
|
|
2
|
+
import type { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
+
export declare const transformGasFromEtherscan: (payload: EthereumGasEtherscanPayload) => FeeData;
|
|
4
|
+
//# sourceMappingURL=transformGasFromEtherscan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformGasFromEtherscan.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEtherscan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAA;AACrG,OAAO,KAAK,EAAE,OAAO,EAAa,MAAM,uCAAuC,CAAA;AAyB/E,eAAO,MAAM,yBAAyB,GAAI,SAAS,2BAA2B,KAAG,OAOhF,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin';
|
|
2
|
+
import type { 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":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAA;AAC7G,OAAO,KAAK,EACV,OAAO,EACR,MAAM,uCAAuC,CAAA;AAsC9C,eAAO,MAAM,6BAA6B,GAAI,SAAS,+BAA+B,KAAG,OAOxF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleBlocknativeGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleBlocknativeGas.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sampleBlocknativeGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleBlocknativeGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,6BAA6B,EAAE,MAAM,sDAAsD,CAAA;AAG3H,eAAO,MAAM,oBAAoB,EAAE,6BA0FlC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleEtherchainGasV2.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherchainGasV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"sampleEtherchainGasV2.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherchainGasV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,iEAAiE,CAAA;AAGrH,eAAO,MAAM,qBAAqB,EAAE,8BAYnC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleEthersGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthersGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"sampleEthersGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthersGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAA;AAG/F,eAAO,MAAM,eAAe,EAAE,wBAM7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleEtherscanGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherscanGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,
|
|
1
|
+
{"version":3,"file":"sampleEtherscanGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEtherscanGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAA;AAGrG,eAAO,MAAM,kBAAkB,EAAE,2BAahC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleEthgasstationGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthgasstationGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,
|
|
1
|
+
{"version":3,"file":"sampleEthgasstationGas.d.ts","sourceRoot":"","sources":["../../../src/test/sampleEthgasstationGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAA;AAG7G,eAAO,MAAM,sBAAsB,EAAE,+BAiBpC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/gas-price-plugin",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.5",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -21,41 +21,41 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
25
|
"default": "./dist/neutral/index.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
|
-
"types": "dist/
|
|
30
|
+
"types": "dist/types/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/exists": "^4.
|
|
33
|
-
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.4.
|
|
34
|
-
"@xyo-network/diviner-abstract": "^3.
|
|
35
|
-
"@xyo-network/diviner-model": "^3.
|
|
36
|
-
"@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^3.4.
|
|
37
|
-
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^3.4.
|
|
38
|
-
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "^3.4.
|
|
39
|
-
"@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^3.4.
|
|
40
|
-
"@xyo-network/gas-price-payload-plugin": "^3.4.
|
|
41
|
-
"@xyo-network/module-model": "^3.
|
|
42
|
-
"@xyo-network/payload-builder": "^3.
|
|
43
|
-
"@xyo-network/payload-model": "^3.
|
|
44
|
-
"@xyo-network/payloadset-plugin": "^3.
|
|
32
|
+
"@xylabs/exists": "^4.7.13",
|
|
33
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.4.5",
|
|
34
|
+
"@xyo-network/diviner-abstract": "^3.10.6",
|
|
35
|
+
"@xyo-network/diviner-model": "^3.10.6",
|
|
36
|
+
"@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^3.4.5",
|
|
37
|
+
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^3.4.5",
|
|
38
|
+
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "^3.4.5",
|
|
39
|
+
"@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^3.4.5",
|
|
40
|
+
"@xyo-network/gas-price-payload-plugin": "^3.4.5",
|
|
41
|
+
"@xyo-network/module-model": "^3.10.6",
|
|
42
|
+
"@xyo-network/payload-builder": "^3.10.6",
|
|
43
|
+
"@xyo-network/payload-model": "^3.10.6",
|
|
44
|
+
"@xyo-network/payloadset-plugin": "^3.10.6",
|
|
45
45
|
"regression": "^2.0.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/regression": "^2.0.6",
|
|
49
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
50
|
-
"@xylabs/tsconfig": "^
|
|
51
|
-
"@xylabs/vitest-extended": "^4.
|
|
52
|
-
"@xyo-network/blocknative-ethereum-gas-plugin": "^3.4.
|
|
53
|
-
"@xyo-network/etherchain-gas-ethereum-blockchain-plugins": "^3.4.
|
|
54
|
-
"@xyo-network/ethers-ethereum-gas-plugin": "^3.4.
|
|
55
|
-
"@xyo-network/etherscan-ethereum-gas-plugin": "^3.4.
|
|
56
|
-
"@xyo-network/witness-blockchain-abstract": "^3.
|
|
49
|
+
"@xylabs/ts-scripts-yarn3": "^6.1.13",
|
|
50
|
+
"@xylabs/tsconfig": "^6.1.13",
|
|
51
|
+
"@xylabs/vitest-extended": "^4.7.13",
|
|
52
|
+
"@xyo-network/blocknative-ethereum-gas-plugin": "^3.4.5",
|
|
53
|
+
"@xyo-network/etherchain-gas-ethereum-blockchain-plugins": "^3.4.5",
|
|
54
|
+
"@xyo-network/ethers-ethereum-gas-plugin": "^3.4.5",
|
|
55
|
+
"@xyo-network/etherscan-ethereum-gas-plugin": "^3.4.5",
|
|
56
|
+
"@xyo-network/witness-blockchain-abstract": "^3.10.6",
|
|
57
57
|
"typescript": "^5.8.2",
|
|
58
|
-
"vitest": "^3.0.
|
|
58
|
+
"vitest": "^3.0.9"
|
|
59
59
|
},
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
package/src/Diviner.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AbstractDiviner } from '@xyo-network/diviner-abstract'
|
|
2
|
-
import {
|
|
2
|
+
import type {
|
|
3
3
|
DivinerConfig, DivinerModule, DivinerParams,
|
|
4
4
|
} from '@xyo-network/diviner-model'
|
|
5
5
|
import { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
|
|
6
|
-
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
7
|
-
import { Payload, Schema } from '@xyo-network/payload-model'
|
|
6
|
+
import type { AnyConfigSchema } from '@xyo-network/module-model'
|
|
7
|
+
import type { Payload, Schema } from '@xyo-network/payload-model'
|
|
8
8
|
|
|
9
9
|
import { divineGas } from './lib/index.ts'
|
|
10
10
|
import { EthereumGasDivinerConfigSchema } from './Schema.ts'
|
package/src/lib/average.ts
CHANGED
package/src/lib/divineGas.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from '@xyo-network/gas-price-payload-plugin'
|
|
1
|
+
import type { EthereumGasPayload, FeeData } from '@xyo-network/gas-price-payload-plugin'
|
|
2
|
+
import { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
|
|
4
3
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
5
|
-
import { Payload } from '@xyo-network/payload-model'
|
|
4
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
6
5
|
|
|
7
6
|
import { average } from './average.ts'
|
|
8
7
|
import {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePayload
|
|
2
|
-
import {
|
|
1
|
+
import type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
2
|
+
import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
3
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
3
4
|
|
|
4
5
|
export const isEthereumGasBlocknativePayload = (payload?: Payload | null): payload is EthereumGasBlocknativePayload => {
|
|
5
6
|
return payload?.schema === EthereumGasBlocknativeSchema
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EthereumGasEtherchainV2Payload
|
|
2
|
-
import {
|
|
1
|
+
import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
|
|
2
|
+
import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
|
|
3
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
3
4
|
|
|
4
5
|
export const isEthereumGasEtherchainV2Payload = (payload?: Payload | null): payload is EthereumGasEtherchainV2Payload => {
|
|
5
6
|
return payload?.schema === EthereumGasEtherchainV2Schema
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EthereumGasEthersPayload
|
|
2
|
-
import {
|
|
1
|
+
import type { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
2
|
+
import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
3
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
3
4
|
|
|
4
5
|
export const isEthereumGasEthersPayload = (payload?: Payload | null): payload is EthereumGasEthersPayload => {
|
|
5
6
|
return payload?.schema === EthereumGasEthersSchema
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EthereumGasEtherscanPayload
|
|
2
|
-
import {
|
|
1
|
+
import type { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
|
|
2
|
+
import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
|
|
3
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
3
4
|
|
|
4
5
|
export const isEthereumGasEtherscanPayload = (payload?: Payload | null): payload is EthereumGasEtherscanPayload => {
|
|
5
6
|
return payload?.schema === EthereumGasEtherscanSchema
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EthereumGasEthgasstationPayload
|
|
2
|
-
import {
|
|
1
|
+
import type { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
|
|
2
|
+
import { EthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
|
|
3
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
3
4
|
|
|
4
5
|
export const isEthereumGasEthgasstationPayload = (payload?: Payload | null): payload is EthereumGasEthgasstationPayload => {
|
|
5
6
|
return payload?.schema === EthereumGasEthgasstationSchema
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
2
|
-
import {
|
|
1
|
+
import type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
2
|
+
import type {
|
|
3
3
|
FeeData, FeePerGas, PriorityFeePerGas,
|
|
4
4
|
} from '@xyo-network/gas-price-payload-plugin'
|
|
5
5
|
import regression from 'regression'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
|
|
2
|
-
import { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'
|
|
1
|
+
import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
|
|
2
|
+
import type { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'
|
|
3
3
|
|
|
4
4
|
const getFeePerGas = (payload: EthereumGasEtherchainV2Payload): Partial<FeePerGas> => {
|
|
5
5
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
2
|
-
import {
|
|
1
|
+
import type { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
2
|
+
import type {
|
|
3
3
|
FeeData, FeePerGas, PriorityFeePerGas,
|
|
4
4
|
} from '@xyo-network/gas-price-payload-plugin'
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
|
|
2
|
-
import { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'
|
|
1
|
+
import type { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
|
|
2
|
+
import type { FeeData, FeePerGas } from '@xyo-network/gas-price-payload-plugin'
|
|
3
3
|
import regression from 'regression'
|
|
4
4
|
|
|
5
5
|
const getBaseFee = (payload: EthereumGasEtherscanPayload): number | undefined => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
|
|
2
|
-
import {
|
|
1
|
+
import type { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
|
|
2
|
+
import type {
|
|
3
3
|
FeeData, FeePerGas, PriorityFeePerGas,
|
|
4
4
|
} from '@xyo-network/gas-price-payload-plugin'
|
|
5
5
|
import regression from 'regression'
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
1
|
+
import type { EstimatedBaseFee, EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
2
|
+
import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
4
3
|
|
|
5
4
|
export const sampleBlocknativeGas: EthereumGasBlocknativePayload = {
|
|
6
5
|
blockPrices: [
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EthereumGasEtherchainV2Payload
|
|
1
|
+
import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
|
|
2
|
+
import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins'
|
|
2
3
|
|
|
3
4
|
export const sampleEtherchainGasV2: EthereumGasEtherchainV2Payload = {
|
|
4
5
|
code: 200,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EthereumGasEthersPayload
|
|
1
|
+
import type { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
2
|
+
import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
2
3
|
|
|
3
4
|
export const sampleEthersGas: EthereumGasEthersPayload = {
|
|
4
5
|
gasPrice: 13_547_863_640,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EthereumGasEtherscanPayload
|
|
1
|
+
import type { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
|
|
2
|
+
import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
|
|
2
3
|
|
|
3
4
|
export const sampleEtherscanGas: EthereumGasEtherscanPayload = {
|
|
4
5
|
message: 'OK',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EthereumGasEthgasstationPayload
|
|
1
|
+
import type { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
|
|
2
|
+
import { EthereumGasEthgasstationSchema } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin'
|
|
2
3
|
|
|
3
4
|
export const sampleEthgasstationGas: EthereumGasEthgasstationPayload = {
|
|
4
5
|
baseFee: 10,
|
package/xy.config.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EACL,aAAa,EAAE,aAAa,EAAE,aAAa,EAC5C,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAG5D,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAE5D,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC;IAAE,MAAM,EAAE,8BAA8B,CAAA;CAAE,CAAC,CAAA;AAChG,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,eAAe,CAAC,wBAAwB,CAAC,CAAC,CAAA;AAE/F,qBAAa,kBAAkB,CAAC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,CACjG,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,aAAa;IACxB,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA2D;IAC3G,gBAAyB,mBAAmB,EAAE,MAAM,CAAiC;IACrF,gBAAyB,YAAY,EAAE,MAAM,CAAoB;cAE9C,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE;CAIlE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"average.d.ts","sourceRoot":"","sources":["../../../src/lib/average.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAuB/D;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,QAAQ,CAAC,OAAO,GAAG,SAAS,CAAC,EAAE,KAAG,OAkBzD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divineGas.d.ts","sourceRoot":"","sources":["../../../src/lib/divineGas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EACnB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAkBpD,eAAO,MAAM,SAAS,GAAI,UAAU,OAAO,EAAE,KAAG,kBAW/C,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
|
|
2
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
export declare const isEthereumGasBlocknativePayload: (payload?: Payload | null) => payload is EthereumGasBlocknativePayload;
|
|
4
|
-
//# sourceMappingURL=isEthereumGasBlocknativePayload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isEthereumGasBlocknativePayload.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/isEthereumGasBlocknativePayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAgC,MAAM,sDAAsD,CAAA;AAClI,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,eAAO,MAAM,+BAA+B,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,OAAO,IAAI,6BAErF,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins';
|
|
2
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
export declare const isEthereumGasEtherchainV2Payload: (payload?: Payload | null) => payload is EthereumGasEtherchainV2Payload;
|
|
4
|
-
//# sourceMappingURL=isEthereumGasEtherchainV2Payload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isEthereumGasEtherchainV2Payload.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/isEthereumGasEtherchainV2Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAiC,MAAM,iEAAiE,CAAA;AAC/I,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,eAAO,MAAM,gCAAgC,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,OAAO,IAAI,8BAEtF,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin';
|
|
2
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
export declare const isEthereumGasEthersPayload: (payload?: Payload | null) => payload is EthereumGasEthersPayload;
|
|
4
|
-
//# sourceMappingURL=isEthereumGasEthersPayload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isEthereumGasEthersPayload.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/isEthereumGasEthersPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAA2B,MAAM,iDAAiD,CAAA;AACnH,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,eAAO,MAAM,0BAA0B,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,OAAO,IAAI,wBAEhF,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
|
|
2
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
export declare const isEthereumGasEtherscanPayload: (payload?: Payload | null) => payload is EthereumGasEtherscanPayload;
|
|
4
|
-
//# sourceMappingURL=isEthereumGasEtherscanPayload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isEthereumGasEtherscanPayload.d.ts","sourceRoot":"","sources":["../../../../src/lib/identities/isEthereumGasEtherscanPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAA8B,MAAM,oDAAoD,CAAA;AAC5H,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,eAAO,MAAM,6BAA6B,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,OAAO,IAAI,2BAEnF,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EthereumGasEthgasstationPayload } from '@xyo-network/ethgasstation-ethereum-gas-payload-plugin';
|
|
2
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
export declare const isEthereumGasEthgasstationPayload: (payload?: Payload | null) => payload is EthereumGasEthgasstationPayload;
|
|
4
|
-
//# sourceMappingURL=isEthereumGasEthgasstationPayload.d.ts.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
|
|
2
|
-
import { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
-
export declare const transformGasFromBlocknative: (payload: EthereumGasBlocknativePayload) => FeeData;
|
|
4
|
-
//# sourceMappingURL=transformGasFromBlocknative.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformGasFromBlocknative.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromBlocknative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAA;AACpG,OAAO,EACL,OAAO,EACR,MAAM,uCAAuC,CAAA;AA2C9C,eAAO,MAAM,2BAA2B,GAAI,SAAS,6BAA6B,KAAG,OAOpF,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins';
|
|
2
|
-
import { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
-
export declare const transformGasFromEtherchainV2: (payload: EthereumGasEtherchainV2Payload) => FeeData;
|
|
4
|
-
//# sourceMappingURL=transformGasFromEtherchainV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformGasFromEtherchainV2.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEtherchainV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,iEAAiE,CAAA;AAChH,OAAO,EAAE,OAAO,EAAa,MAAM,uCAAuC,CAAA;AAe1E,eAAO,MAAM,4BAA4B,GAAI,SAAS,8BAA8B,KAAG,OAOtF,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EthereumGasEthersPayload } from '@xyo-network/ethers-ethereum-gas-payload-plugin';
|
|
2
|
-
import { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
-
export declare const transformGasFromEthers: (payload: EthereumGasEthersPayload) => FeeData;
|
|
4
|
-
//# sourceMappingURL=transformGasFromEthers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformGasFromEthers.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEthers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAA;AAC1F,OAAO,EACL,OAAO,EACR,MAAM,uCAAuC,CAAA;AAmB9C,eAAO,MAAM,sBAAsB,GAAI,SAAS,wBAAwB,KAAG,OAO1E,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
|
|
2
|
-
import { FeeData } from '@xyo-network/gas-price-payload-plugin';
|
|
3
|
-
export declare const transformGasFromEtherscan: (payload: EthereumGasEtherscanPayload) => FeeData;
|
|
4
|
-
//# sourceMappingURL=transformGasFromEtherscan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformGasFromEtherscan.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEtherscan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAA;AAChG,OAAO,EAAE,OAAO,EAAa,MAAM,uCAAuC,CAAA;AAyB1E,eAAO,MAAM,yBAAyB,GAAI,SAAS,2BAA2B,KAAG,OAOhF,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformGasFromEthgasstation.d.ts","sourceRoot":"","sources":["../../../../src/lib/transforms/transformGasFromEthgasstation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAA;AACxG,OAAO,EACL,OAAO,EACR,MAAM,uCAAuC,CAAA;AAsC9C,eAAO,MAAM,6BAA6B,GAAI,SAAS,+BAA+B,KAAG,OAOxF,CAAA"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|