@xyo-network/blocknative-ethereum-gas-plugin 2.47.8 → 2.47.10

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.
@@ -14,5 +14,5 @@ export declare const XyoEthereumGasBlocknativePlugin: () => PayloadSetWitnessPlu
14
14
  targetSet?: (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("@xyo-network/payload-model").PayloadSet & {
15
15
  schema: "network.xyo.payload.set";
16
16
  }) | undefined;
17
- }, import("@xyo-network/core").EmptyObject>>;
17
+ }, import("@xyo-network/core").AnyObject>>;
18
18
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAA0B,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAGhG,OAAO,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAA;AAE5D,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;4CASzC,CAAA"}
1
+ {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAA0B,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAGhG,OAAO,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAA;AAE5D,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;0CASzC,CAAA"}
package/package.json CHANGED
@@ -10,17 +10,17 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xyo-network/axios": "^2.47.8",
14
- "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.47.8",
15
- "@xyo-network/module": "^2.47.8",
16
- "@xyo-network/payload-builder": "^2.47.8",
17
- "@xyo-network/payload-model": "^2.47.8",
18
- "@xyo-network/payloadset-plugin": "^2.47.8",
19
- "@xyo-network/witness": "^2.47.8"
13
+ "@xyo-network/axios": "^2.47.10",
14
+ "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.47.10",
15
+ "@xyo-network/module": "^2.47.10",
16
+ "@xyo-network/payload-builder": "^2.47.10",
17
+ "@xyo-network/payload-model": "^2.47.10",
18
+ "@xyo-network/payloadset-plugin": "^2.47.10",
19
+ "@xyo-network/witness": "^2.47.10"
20
20
  },
21
21
  "devDependencies": {
22
- "@xylabs/ts-scripts-yarn3": "^2.14.16",
23
- "@xylabs/tsconfig": "^2.14.16",
22
+ "@xylabs/ts-scripts-yarn3": "^2.15.0",
23
+ "@xylabs/tsconfig": "^2.15.0",
24
24
  "typescript": "^4.9.5"
25
25
  },
26
26
  "description": "Primary SDK for using XYO Protocol 2.0",
@@ -56,5 +56,5 @@
56
56
  },
57
57
  "sideEffects": false,
58
58
  "types": "dist/types/index.d.ts",
59
- "version": "2.47.8"
59
+ "version": "2.47.10"
60
60
  }
@@ -1,39 +0,0 @@
1
- import { PendingBlockNumber } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
2
-
3
- import { getGasFromBlocknative } from './getGasFromBlocknative'
4
-
5
- describe('getGasFromBlocknative', () => {
6
- test('returns prices', async () => {
7
- const result = await getGasFromBlocknative()
8
- expect(result).toBeObject()
9
- expect(result?.blockPrices).toBeArrayOfSize(1)
10
- result.blockPrices.map((blockPrice) => {
11
- expect(blockPrice.baseFeePerGas).toBeNumber()
12
- expect(blockPrice.blockNumber).toBeNumber()
13
- expect(blockPrice.estimatedPrices).toBeArrayOfSize(5)
14
- blockPrice.estimatedPrices.map((estimatedPrice) => {
15
- expect(estimatedPrice?.confidence).toBeNumber()
16
- expect(estimatedPrice?.maxFeePerGas).toBeNumber()
17
- expect(estimatedPrice?.maxPriorityFeePerGas).toBeNumber()
18
- expect(estimatedPrice?.price).toBeNumber()
19
- })
20
- expect(blockPrice.estimatedTransactionCount).toBeNumber()
21
- })
22
- expect(result?.estimatedBaseFees).toBeArrayOfSize(5)
23
- for (let index = 0; index < result?.estimatedBaseFees.length; index++) {
24
- const blockNumber = `pending+${index + 1}` as PendingBlockNumber
25
- const pendingBlockInfo = result.estimatedBaseFees?.[index]?.[blockNumber]
26
- expect(pendingBlockInfo).toBeArrayOfSize(1)
27
- const pendingBlock = pendingBlockInfo?.[0]
28
- expect(pendingBlock).toBeObject()
29
- expect(pendingBlock?.baseFee).toBeNumber()
30
- expect(pendingBlock?.confidence).toBeNumber()
31
- }
32
- expect(result?.currentBlockNumber).toBeNumber()
33
- expect(result?.maxPrice).toBeNumber()
34
- expect(result?.msSinceLastBlock).toBeNumber()
35
- expect(result?.network).toEqual('main')
36
- expect(result?.system).toEqual('ethereum')
37
- expect(result?.unit).toEqual('gwei')
38
- })
39
- })
@@ -1,18 +0,0 @@
1
- import { XyoEthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
2
- import { PayloadSetPluginResolver } from '@xyo-network/payloadset-plugin'
3
-
4
- import { XyoEthereumGasBlocknativePlugin } from '../Plugin'
5
- import { XyoEthereumGasBlocknativeWitness } from '../Witness'
6
-
7
- describe('XyoEthereumGasBlocknativePlugin', () => {
8
- test('Add to Resolver', () => {
9
- const plugin = XyoEthereumGasBlocknativePlugin()
10
- const resolver = new PayloadSetPluginResolver().register(plugin, {
11
- witness: {
12
- config: { schema: XyoEthereumGasBlocknativeWitness.configSchema },
13
- },
14
- })
15
- expect(resolver.resolve(plugin.set)).toBeObject()
16
- expect(resolver.witness(XyoEthereumGasBlocknativeSchema)).toBeObject()
17
- })
18
- })
@@ -1,20 +0,0 @@
1
- import { XyoEthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
2
- import { PayloadWrapper } from '@xyo-network/payload-wrapper'
3
-
4
- import { XyoEthereumGasBlocknativeWitnessConfigSchema } from '../Schema'
5
- import { XyoEthereumGasBlocknativeWitness } from '../Witness'
6
-
7
- describe('XyoEthereumGasBlocknativeWitness', () => {
8
- it('returns observation', async () => {
9
- const sut = await XyoEthereumGasBlocknativeWitness.create({
10
- config: {
11
- schema: XyoEthereumGasBlocknativeWitnessConfigSchema,
12
- },
13
- })
14
- const [actual] = await sut.observe()
15
- expect(actual.timestamp).toBeNumber()
16
- expect(actual.schema).toBe(XyoEthereumGasBlocknativeSchema)
17
- const answerWrapper = new PayloadWrapper(actual)
18
- expect(answerWrapper.valid).toBe(true)
19
- })
20
- })