@xyo-network/etherscan-ethereum-gas-plugin 5.1.3 → 5.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/etherscan-ethereum-gas-plugin",
3
- "version": "5.1.3",
3
+ "version": "5.1.4",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,24 +30,27 @@
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
33
- "src"
33
+ "src",
34
+ "!**/*.bench.*",
35
+ "!**/*.spec.*",
36
+ "!**/*.test.*"
34
37
  ],
35
38
  "dependencies": {
36
- "@xylabs/assert": "~5.0.11",
37
- "@xylabs/axios": "~5.0.11",
38
- "@xyo-network/abstract-witness": "~5.1.2",
39
- "@xyo-network/etherscan-ethereum-gas-payload-plugin": "~5.1.3",
40
- "@xyo-network/module-model": "~5.1.2",
41
- "@xyo-network/payload-builder": "~5.1.2",
42
- "@xyo-network/payload-model": "~5.1.2",
43
- "@xyo-network/payloadset-plugin": "~5.1.2",
44
- "@xyo-network/witness-model": "~5.1.2"
39
+ "@xylabs/assert": "~5.0.33",
40
+ "@xylabs/axios": "~5.0.33",
41
+ "@xyo-network/abstract-witness": "~5.1.23",
42
+ "@xyo-network/etherscan-ethereum-gas-payload-plugin": "~5.1.4",
43
+ "@xyo-network/module-model": "~5.1.23",
44
+ "@xyo-network/payload-builder": "~5.1.23",
45
+ "@xyo-network/payload-model": "~5.1.23",
46
+ "@xyo-network/payloadset-plugin": "~5.1.23",
47
+ "@xyo-network/witness-model": "~5.1.23"
45
48
  },
46
49
  "devDependencies": {
47
- "@xylabs/ts-scripts-yarn3": "~7.1.7",
48
- "@xylabs/tsconfig": "~7.1.7",
49
- "@xylabs/vitest-extended": "~5.0.11",
50
- "@xyo-network/payload-wrapper": "~5.1.2",
50
+ "@xylabs/ts-scripts-yarn3": "~7.2.8",
51
+ "@xylabs/tsconfig": "~7.2.8",
52
+ "@xylabs/vitest-extended": "~5.0.33",
53
+ "@xyo-network/payload-wrapper": "~5.1.23",
51
54
  "typescript": "~5.9.2",
52
55
  "vitest": "~3.2.4"
53
56
  },
@@ -1,2 +0,0 @@
1
- import '@xylabs/vitest-extended';
2
- //# sourceMappingURL=getGasFromEtherscan.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getGasFromEtherscan.spec.d.ts","sourceRoot":"","sources":["../../../../src/lib/spec/getGasFromEtherscan.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA"}
@@ -1,2 +0,0 @@
1
- import '@xylabs/vitest-extended';
2
- //# sourceMappingURL=Plugin.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/Plugin.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA"}
@@ -1,2 +0,0 @@
1
- import '@xylabs/vitest-extended';
2
- //# sourceMappingURL=Witness.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Witness.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/Witness.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA"}
@@ -1,26 +0,0 @@
1
- import '@xylabs/vitest-extended'
2
-
3
- import {
4
- describe, expect,
5
- test,
6
- } from 'vitest'
7
-
8
- import { getGasFromEtherscan } from '../getGasFromEtherscan.ts'
9
-
10
- const apiKey = process.env.ETHERSCAN_API_KEY || ''
11
-
12
- describe('getGasFromEtherscan', () => {
13
- test.skipIf(!apiKey)('returns prices', async () => {
14
- const gas = await getGasFromEtherscan(apiKey)
15
- expect(gas).toBeTruthy()
16
- expect(gas.status).toEqual('1')
17
- expect(gas.message).toEqual('OK')
18
- expect(gas.result).toBeObject()
19
- expect(gas.result.FastGasPrice).toBeString()
20
- expect(gas.result.LastBlock).toBeString()
21
- expect(gas.result.ProposeGasPrice).toBeString()
22
- expect(gas.result.SafeGasPrice).toBeString()
23
- expect(gas.result.gasUsedRatio).toBeString()
24
- expect(gas.result.suggestBaseFee).toBeString()
25
- })
26
- })
@@ -1,21 +0,0 @@
1
- import '@xylabs/vitest-extended'
2
-
3
- import { PayloadSetPluginResolver } from '@xyo-network/payloadset-plugin'
4
- import {
5
- describe, expect,
6
- test,
7
- } from 'vitest'
8
-
9
- import { EthereumGasEtherscanPlugin } from '../Plugin.ts'
10
- import { EthereumGasEtherscanWitness } from '../Witness.ts'
11
-
12
- const apiKey = process.env.ETHERSCAN_API_KEY || ''
13
-
14
- describe('EthereumGasEtherscanPlugin', () => {
15
- test.skipIf(!apiKey)('Add to Resolver', async () => {
16
- const plugin = EthereumGasEtherscanPlugin()
17
- const resolver = await new PayloadSetPluginResolver().register(plugin, { config: { apiKey, schema: EthereumGasEtherscanWitness.defaultConfigSchema } })
18
- expect(await resolver.resolve(plugin.set)).toBeObject()
19
- expect(await resolver.witness(plugin.set)).toBeObject()
20
- })
21
- })
@@ -1,45 +0,0 @@
1
- import '@xylabs/vitest-extended'
2
-
3
- import type { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
4
- import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
5
- import { PayloadWrapper } from '@xyo-network/payload-wrapper'
6
- import {
7
- describe, expect,
8
- test,
9
- } from 'vitest'
10
-
11
- import { EthereumGasEtherscanWitnessConfigSchema } from '../Schema.ts'
12
- import { EthereumGasEtherscanWitness } from '../Witness.ts'
13
-
14
- const apiKey = process.env.ETHERSCAN_API_KEY || ''
15
-
16
- describe('EthereumGasEtherscanWitness', () => {
17
- test.skipIf(!apiKey)('returns observation', async () => {
18
- const sut = await EthereumGasEtherscanWitness.create({
19
- config: {
20
- apiKey,
21
- schema: EthereumGasEtherscanWitnessConfigSchema,
22
- },
23
- })
24
- const [actual] = (await sut.observe()) as EthereumGasEtherscanPayload[]
25
- expect(actual.result).toBeObject()
26
- expect(actual.result.FastGasPrice).toBeString()
27
- expect(actual.result.gasUsedRatio).toBeString()
28
- expect(actual.result.LastBlock).toBeString()
29
- expect(actual.result.ProposeGasPrice).toBeString()
30
- expect(actual.result.SafeGasPrice).toBeString()
31
- expect(actual.result.suggestBaseFee).toBeString()
32
-
33
- expect(actual.timestamp).toBeNumber()
34
- expect(actual.schema).toBe(EthereumGasEtherscanSchema)
35
-
36
- const answerWrapper = PayloadWrapper.wrap(actual)
37
- expect(await answerWrapper.getValid()).toBe(true)
38
- })
39
-
40
- /* describe('create', () => {
41
- it('throws if no params provided', async () => {
42
- await expect(EthereumGasEtherscanWitness.create()).toReject()
43
- })
44
- }) */
45
- })