@xyo-network/blocknative-ethereum-gas-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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness.ts'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config.ts'\nimport { getGasFromBlocknative } from './lib/index.ts'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasBlocknativeWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({ schema: EthereumGasBlocknativeSchema })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACT;;;AFUG,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EACrH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,eAA8C,EAAE,QAAQ,6BAA6B,CAAC,EACvG,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
1
+ {"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness.ts'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { Payload, Schema } from '@xyo-network/payload-model'\nimport type { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport type { EthereumGasBlocknativeWitnessConfig } from './Config.ts'\nimport { getGasFromBlocknative } from './lib/index.ts'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasBlocknativeWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({ schema: EthereumGasBlocknativeSchema })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport type { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAEhC,SAAS,oCAAoC;AAE7C,SAAS,sBAAsB;;;ACJ/B,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACT;;;AFWG,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EACrH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,eAA8C,EAAE,QAAQ,6BAA6B,CAAC,EACvG,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
@@ -0,0 +1,6 @@
1
+ import type { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
2
+ import type { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
3
+ export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
4
+ schema: EthereumGasBlocknativeWitnessConfigSchema;
5
+ }>;
6
+ //# sourceMappingURL=Config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAE5E,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAA;AAE5E,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;IACvE,MAAM,EAAE,yCAAyC,CAAA;CAClD,CAAC,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { AbstractWitness } from '@xyo-network/abstract-witness';
2
- import { AnyConfigSchema } from '@xyo-network/module-model';
3
- import { Payload, Schema } from '@xyo-network/payload-model';
4
- import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
5
- import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
2
+ import type { AnyConfigSchema } from '@xyo-network/module-model';
3
+ import type { Payload, Schema } from '@xyo-network/payload-model';
4
+ import type { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
5
+ import type { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
6
6
  export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
7
7
  export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
8
8
  static readonly configSchemas: Schema[];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAG/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAE5E,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAA;AAItE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC,eAAe,CAAC,mCAAmC,CAAC,CAAC,CAAA;AAC9H,qBAAa,6BAA8B,SAAQ,eAAe,CAAC,mCAAmC,CAAC;IACrG,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsE;IACtH,gBAAyB,mBAAmB,EAAE,MAAM,CAA4C;cAEvE,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAO9D"}
@@ -0,0 +1,3 @@
1
+ import type { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
2
+ export declare const getGasFromBlocknative: () => Promise<EthereumGasBlocknativeResponse>;
3
+ //# sourceMappingURL=getGasFromBlocknative.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getGasFromBlocknative.d.ts","sourceRoot":"","sources":["../../../src/lib/getGasFromBlocknative.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAA;AAOrG,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,8BAA8B,CAEpF,CAAA"}
1
+ {"version":3,"file":"getGasFromBlocknative.d.ts","sourceRoot":"","sources":["../../../src/lib/getGasFromBlocknative.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAA;AAO1G,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,8BAA8B,CAEpF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/blocknative-ethereum-gas-plugin",
3
- "version": "3.4.3",
3
+ "version": "3.4.5",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,30 +21,30 @@
21
21
  "type": "module",
22
22
  "exports": {
23
23
  ".": {
24
- "types": "./dist/neutral/index.d.ts",
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/neutral/index.d.ts",
30
+ "types": "dist/types/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/axios": "^4.5.1",
33
- "@xyo-network/abstract-witness": "^3.9.23",
34
- "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.4.3",
35
- "@xyo-network/module-model": "^3.9.23",
36
- "@xyo-network/payload-builder": "^3.9.23",
37
- "@xyo-network/payload-model": "^3.9.23",
38
- "@xyo-network/payloadset-plugin": "^3.9.23",
39
- "@xyo-network/witness-timestamp": "^3.9.23"
32
+ "@xylabs/axios": "^4.7.13",
33
+ "@xyo-network/abstract-witness": "^3.10.6",
34
+ "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.4.5",
35
+ "@xyo-network/module-model": "^3.10.6",
36
+ "@xyo-network/payload-builder": "^3.10.6",
37
+ "@xyo-network/payload-model": "^3.10.6",
38
+ "@xyo-network/payloadset-plugin": "^3.10.6",
39
+ "@xyo-network/witness-timestamp": "^3.10.6"
40
40
  },
41
41
  "devDependencies": {
42
- "@xylabs/ts-scripts-yarn3": "^5.0.39",
43
- "@xylabs/tsconfig": "^5.0.39",
44
- "@xylabs/vitest-extended": "^4.5.1",
45
- "@xyo-network/payload-wrapper": "^3.9.23",
42
+ "@xylabs/ts-scripts-yarn3": "^6.1.13",
43
+ "@xylabs/tsconfig": "^6.1.13",
44
+ "@xylabs/vitest-extended": "^4.7.13",
45
+ "@xyo-network/payload-wrapper": "^3.10.6",
46
46
  "typescript": "^5.8.2",
47
- "vitest": "^3.0.7"
47
+ "vitest": "^3.0.9"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"
package/src/Config.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp'
1
+ import type { TimestampWitnessConfig } from '@xyo-network/witness-timestamp'
2
2
 
3
- import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'
3
+ import type { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'
4
4
 
5
5
  export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
6
6
  schema: EthereumGasBlocknativeWitnessConfigSchema
package/src/Witness.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { AbstractWitness } from '@xyo-network/abstract-witness'
2
- import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
3
- import { AnyConfigSchema } from '@xyo-network/module-model'
2
+ import type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
3
+ import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
4
+ import type { AnyConfigSchema } from '@xyo-network/module-model'
4
5
  import { PayloadBuilder } from '@xyo-network/payload-builder'
5
- import { Payload, Schema } from '@xyo-network/payload-model'
6
- import { TimestampWitnessParams } from '@xyo-network/witness-timestamp'
6
+ import type { Payload, Schema } from '@xyo-network/payload-model'
7
+ import type { TimestampWitnessParams } from '@xyo-network/witness-timestamp'
7
8
 
8
- import { EthereumGasBlocknativeWitnessConfig } from './Config.ts'
9
+ import type { EthereumGasBlocknativeWitnessConfig } from './Config.ts'
9
10
  import { getGasFromBlocknative } from './lib/index.ts'
10
11
  import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'
11
12
 
@@ -1,5 +1,5 @@
1
1
  import { axios } from '@xylabs/axios'
2
- import { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
2
+ import type { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
3
3
 
4
4
  const url = 'https://api.blocknative.com/gasprices/blockprices'
5
5
 
package/xy.config.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
1
+ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
2
  const config: XyTsupConfig = {
3
3
  compile: {
4
4
  browser: {},
@@ -1,6 +0,0 @@
1
- import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
2
- import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
3
- export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
4
- schema: EthereumGasBlocknativeWitnessConfigSchema;
5
- }>;
6
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAA;AAEvE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;IACvE,MAAM,EAAE,yCAAyC,CAAA;CAClD,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAA;AAIjE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC,eAAe,CAAC,mCAAmC,CAAC,CAAC,CAAA;AAC9H,qBAAa,6BAA8B,SAAQ,eAAe,CAAC,mCAAmC,CAAC;IACrG,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsE;IACtH,gBAAyB,mBAAmB,EAAE,MAAM,CAA4C;cAEvE,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAO9D"}
@@ -1,3 +0,0 @@
1
- import { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin';
2
- export declare const getGasFromBlocknative: () => Promise<EthereumGasBlocknativeResponse>;
3
- //# sourceMappingURL=getGasFromBlocknative.d.ts.map
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes