@xyo-network/etherchain-ethereum-gas-v2-plugin 2.75.13 → 2.75.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/Config.cjs.map +1 -1
- package/dist/browser/Config.d.cts +1 -1
- package/dist/browser/Config.d.cts.map +1 -1
- package/dist/browser/Config.d.mts +1 -1
- package/dist/browser/Config.d.mts.map +1 -1
- package/dist/browser/Config.d.ts +1 -1
- package/dist/browser/Config.d.ts.map +1 -1
- package/dist/browser/Plugin.cjs +2 -2
- package/dist/browser/Plugin.cjs.map +1 -1
- package/dist/browser/Plugin.js +1 -1
- package/dist/browser/Plugin.js.map +1 -1
- package/dist/browser/Witness.cjs +2 -2
- package/dist/browser/Witness.cjs.map +1 -1
- package/dist/browser/Witness.d.cts +3 -2
- package/dist/browser/Witness.d.cts.map +1 -1
- package/dist/browser/Witness.d.mts +3 -2
- package/dist/browser/Witness.d.mts.map +1 -1
- package/dist/browser/Witness.d.ts +3 -2
- package/dist/browser/Witness.d.ts.map +1 -1
- package/dist/browser/Witness.js +1 -1
- package/dist/browser/Witness.js.map +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/docs.json +3684 -2999
- package/dist/node/Config.d.cts +1 -1
- package/dist/node/Config.d.cts.map +1 -1
- package/dist/node/Config.d.mts +1 -1
- package/dist/node/Config.d.mts.map +1 -1
- package/dist/node/Config.d.ts +1 -1
- package/dist/node/Config.d.ts.map +1 -1
- package/dist/node/Config.js.map +1 -1
- package/dist/node/Plugin.js +2 -2
- package/dist/node/Plugin.js.map +1 -1
- package/dist/node/Plugin.mjs +1 -1
- package/dist/node/Plugin.mjs.map +1 -1
- package/dist/node/Witness.d.cts +3 -2
- package/dist/node/Witness.d.cts.map +1 -1
- package/dist/node/Witness.d.mts +3 -2
- package/dist/node/Witness.d.mts.map +1 -1
- package/dist/node/Witness.d.ts +3 -2
- package/dist/node/Witness.d.ts.map +1 -1
- package/dist/node/Witness.js +2 -2
- package/dist/node/Witness.js.map +1 -1
- package/dist/node/Witness.mjs +1 -1
- package/dist/node/Witness.mjs.map +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +1 -1
- package/package.json +10 -9
- package/src/Config.ts +1 -1
- package/src/Witness.ts +3 -2
package/dist/node/Config.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WitnessConfig } from '@xyo-network/witness';
|
|
1
|
+
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
2
|
import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema';
|
|
3
3
|
export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEtherchainV2WitnessConfigSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,0CAA0C,EAAE,MAAM,UAAU,CAAA;AAErE,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC;IAC/D,MAAM,EAAE,0CAA0C,CAAA;CACnD,CAAC,CAAA"}
|
package/dist/node/Config.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WitnessConfig } from '@xyo-network/witness';
|
|
1
|
+
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
2
|
import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema';
|
|
3
3
|
export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEtherchainV2WitnessConfigSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,0CAA0C,EAAE,MAAM,UAAU,CAAA;AAErE,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC;IAC/D,MAAM,EAAE,0CAA0C,CAAA;CACnD,CAAC,CAAA"}
|
package/dist/node/Config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WitnessConfig } from '@xyo-network/witness';
|
|
1
|
+
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
2
|
import { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema';
|
|
3
3
|
export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEtherchainV2WitnessConfigSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,0CAA0C,EAAE,MAAM,UAAU,CAAA;AAErE,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC;IAC/D,MAAM,EAAE,0CAA0C,CAAA;CACnD,CAAC,CAAA"}
|
package/dist/node/Config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Config.ts"],"sourcesContent":["import { WitnessConfig } from '@xyo-network/witness'\n\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{\n schema: EthereumGasEtherchainV2WitnessConfigSchema\n}>\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/Config.ts"],"sourcesContent":["import { WitnessConfig } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{\n schema: EthereumGasEtherchainV2WitnessConfigSchema\n}>\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/node/Plugin.js
CHANGED
|
@@ -28,8 +28,8 @@ var import_payload_model = require("@xyo-network/payload-model");
|
|
|
28
28
|
var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
|
|
29
29
|
|
|
30
30
|
// src/Witness.ts
|
|
31
|
+
var import_abstract_witness = require("@xyo-network/abstract-witness");
|
|
31
32
|
var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/etherchain-ethereum-gas-v2-payload-plugin");
|
|
32
|
-
var import_witness = require("@xyo-network/witness");
|
|
33
33
|
|
|
34
34
|
// src/lib/getV2GasFromEtherchain.ts
|
|
35
35
|
var import_axios = require("@xyo-network/axios");
|
|
@@ -42,7 +42,7 @@ var getV2GasFromEtherchain = async () => {
|
|
|
42
42
|
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
43
43
|
|
|
44
44
|
// src/Witness.ts
|
|
45
|
-
var EtherchainEthereumGasWitnessV2 = class extends
|
|
45
|
+
var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
|
|
46
46
|
static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
|
|
47
47
|
async observeHandler() {
|
|
48
48
|
const payload = {
|
package/dist/node/Plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,oDAA8C;AAC9C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,uDAA8E;;;ACD9E,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,wCAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,gCAAgC,UAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,+EAA6B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;","names":["import_etherchain_ethereum_gas_v2_payload_plugin"]}
|
package/dist/node/Plugin.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
|
4
4
|
import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
|
|
5
5
|
|
|
6
6
|
// src/Witness.ts
|
|
7
|
+
import { AbstractWitness } from "@xyo-network/abstract-witness";
|
|
7
8
|
import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
|
|
8
|
-
import { AbstractWitness } from "@xyo-network/witness";
|
|
9
9
|
|
|
10
10
|
// src/lib/getV2GasFromEtherchain.ts
|
|
11
11
|
import { axios } from "@xyo-network/axios";
|
package/dist/node/Plugin.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";AAAA,SAAS,iCAAAA,sCAAqC;AAC9C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAyC,qCAAqC;;;ACD9E,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,gCAAgC,MAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,8BAA6B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;","names":["EthereumGasEtherchainV2Schema","EthereumGasEtherchainV2Schema"]}
|
package/dist/node/Witness.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
2
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
import {
|
|
4
|
+
import { WitnessParams } from '@xyo-network/witness-model';
|
|
4
5
|
import { EthereumGasEtherchainV2WitnessConfig } from './Config';
|
|
5
6
|
export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
|
|
6
7
|
export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"
|
|
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;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,oCAAoC,EAAE,MAAM,UAAU,CAAA;AAI/D,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC,eAAe,CAAC,oCAAoC,CAAC,CAAC,CAAA;AAEvH,qBAAa,8BAA+B,SAAQ,eAAe,CAAC,oCAAoC,CAAC;IACvG,OAAgB,aAAa,uEAA+C;cAEnD,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAQ9D"}
|
package/dist/node/Witness.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
2
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
import {
|
|
4
|
+
import { WitnessParams } from '@xyo-network/witness-model';
|
|
4
5
|
import { EthereumGasEtherchainV2WitnessConfig } from './Config';
|
|
5
6
|
export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
|
|
6
7
|
export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"
|
|
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;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,oCAAoC,EAAE,MAAM,UAAU,CAAA;AAI/D,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC,eAAe,CAAC,oCAAoC,CAAC,CAAC,CAAA;AAEvH,qBAAa,8BAA+B,SAAQ,eAAe,CAAC,oCAAoC,CAAC;IACvG,OAAgB,aAAa,uEAA+C;cAEnD,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAQ9D"}
|
package/dist/node/Witness.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
2
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
import {
|
|
4
|
+
import { WitnessParams } from '@xyo-network/witness-model';
|
|
4
5
|
import { EthereumGasEtherchainV2WitnessConfig } from './Config';
|
|
5
6
|
export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
|
|
6
7
|
export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"
|
|
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;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,oCAAoC,EAAE,MAAM,UAAU,CAAA;AAI/D,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC,eAAe,CAAC,oCAAoC,CAAC,CAAC,CAAA;AAEvH,qBAAa,8BAA+B,SAAQ,eAAe,CAAC,oCAAoC,CAAC;IACvG,OAAgB,aAAa,uEAA+C;cAEnD,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAQ9D"}
|
package/dist/node/Witness.js
CHANGED
|
@@ -23,8 +23,8 @@ __export(Witness_exports, {
|
|
|
23
23
|
EtherchainEthereumGasWitnessV2: () => EtherchainEthereumGasWitnessV2
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(Witness_exports);
|
|
26
|
+
var import_abstract_witness = require("@xyo-network/abstract-witness");
|
|
26
27
|
var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/etherchain-ethereum-gas-v2-payload-plugin");
|
|
27
|
-
var import_witness = require("@xyo-network/witness");
|
|
28
28
|
|
|
29
29
|
// src/lib/getV2GasFromEtherchain.ts
|
|
30
30
|
var import_axios = require("@xyo-network/axios");
|
|
@@ -37,7 +37,7 @@ var getV2GasFromEtherchain = async () => {
|
|
|
37
37
|
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
38
38
|
|
|
39
39
|
// src/Witness.ts
|
|
40
|
-
var EtherchainEthereumGasWitnessV2 = class extends
|
|
40
|
+
var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
|
|
41
41
|
static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
|
|
42
42
|
async observeHandler() {
|
|
43
43
|
const payload = {
|
package/dist/node/Witness.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAgC;AAChC,uDAA8E;;;ACD9E,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,wCAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;","names":[]}
|
package/dist/node/Witness.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/Witness.ts
|
|
2
|
+
import { AbstractWitness } from "@xyo-network/abstract-witness";
|
|
2
3
|
import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
|
|
3
|
-
import { AbstractWitness } from "@xyo-network/witness";
|
|
4
4
|
|
|
5
5
|
// src/lib/getV2GasFromEtherchain.ts
|
|
6
6
|
import { axios } from "@xyo-network/axios";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";AAAA,SAAS,uBAAuB;AAChC,SAAyC,qCAAqC;;;ACD9E,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;","names":[]}
|
package/dist/node/index.js
CHANGED
|
@@ -33,8 +33,8 @@ var import_payload_model = require("@xyo-network/payload-model");
|
|
|
33
33
|
var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
|
|
34
34
|
|
|
35
35
|
// src/Witness.ts
|
|
36
|
+
var import_abstract_witness = require("@xyo-network/abstract-witness");
|
|
36
37
|
var import_etherchain_ethereum_gas_v2_payload_plugin = require("@xyo-network/etherchain-ethereum-gas-v2-payload-plugin");
|
|
37
|
-
var import_witness = require("@xyo-network/witness");
|
|
38
38
|
|
|
39
39
|
// src/lib/getV2GasFromEtherchain.ts
|
|
40
40
|
var import_axios = require("@xyo-network/axios");
|
|
@@ -47,7 +47,7 @@ var getV2GasFromEtherchain = async () => {
|
|
|
47
47
|
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
48
48
|
|
|
49
49
|
// src/Witness.ts
|
|
50
|
-
var EtherchainEthereumGasWitnessV2 = class extends
|
|
50
|
+
var EtherchainEthereumGasWitnessV2 = class extends import_abstract_witness.AbstractWitness {
|
|
51
51
|
static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
|
|
52
52
|
async observeHandler() {
|
|
53
53
|
const payload = {
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Plugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasEtherchainV2Plugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasEtherchainV2Plugin\n","import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Plugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasEtherchainV2Plugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasEtherchainV2Plugin\n","import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,oDAA8C;AAC9C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,uDAA8E;;;ACD9E,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,wCAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,gCAAgC,UAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,+EAA6B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;;;ADLF,IAAO,cAAQ;","names":["import_etherchain_ethereum_gas_v2_payload_plugin"]}
|
package/dist/node/index.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
|
4
4
|
import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
|
|
5
5
|
|
|
6
6
|
// src/Witness.ts
|
|
7
|
+
import { AbstractWitness } from "@xyo-network/abstract-witness";
|
|
7
8
|
import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
|
|
8
|
-
import { AbstractWitness } from "@xyo-network/witness";
|
|
9
9
|
|
|
10
10
|
// src/lib/getV2GasFromEtherchain.ts
|
|
11
11
|
import { axios } from "@xyo-network/axios";
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts","../../src/index.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getV2GasFromEtherchain.ts","../../src/Schema.ts","../../src/index.ts"],"sourcesContent":["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\n\nimport { EthereumGasEtherchainV2WitnessConfig } from './Config'\nimport { getV2GasFromEtherchain } from './lib'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return (await axios.get<EthereumGasEtherchainV2Response>(url)).data\n}\n","export type EthereumGasEtherchainV2WitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\nexport const EthereumGasEtherchainV2WitnessConfigSchema: EthereumGasEtherchainV2WitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config'\n","import { EthereumGasEtherchainV2Plugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasEtherchainV2Plugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasEtherchainV2Plugin\n"],"mappings":";AAAA,SAAS,iCAAAA,sCAAqC;AAC9C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAyC,qCAAqC;;;ACD9E,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFUK,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAgB,gBAAgB,CAAC,0CAA0C;AAAA,EAE3E,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,gCAAgC,MAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,8BAA6B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;;;AILF,IAAO,cAAQ;","names":["EthereumGasEtherchainV2Schema","EthereumGasEtherchainV2Schema"]}
|
package/package.json
CHANGED
|
@@ -10,18 +10,19 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xyo-network/
|
|
14
|
-
"@xyo-network/
|
|
15
|
-
"@xyo-network/
|
|
16
|
-
"@xyo-network/
|
|
17
|
-
"@xyo-network/
|
|
18
|
-
"@xyo-network/
|
|
13
|
+
"@xyo-network/abstract-witness": "~2.75.15",
|
|
14
|
+
"@xyo-network/axios": "~2.75.15",
|
|
15
|
+
"@xyo-network/etherchain-ethereum-gas-v2-payload-plugin": "~2.75.15",
|
|
16
|
+
"@xyo-network/module-model": "~2.75.15",
|
|
17
|
+
"@xyo-network/payload-model": "~2.75.15",
|
|
18
|
+
"@xyo-network/payloadset-plugin": "~2.75.15",
|
|
19
|
+
"@xyo-network/witness-model": "~2.75.15"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
22
|
"@xylabs/ts-scripts-yarn3": "^3.0.88",
|
|
22
23
|
"@xylabs/tsconfig": "^3.0.88",
|
|
23
|
-
"@xyo-network/account": "~2.75.
|
|
24
|
-
"@xyo-network/payload-wrapper": "~2.75.
|
|
24
|
+
"@xyo-network/account": "~2.75.15",
|
|
25
|
+
"@xyo-network/payload-wrapper": "~2.75.15",
|
|
25
26
|
"typescript": "^5.2.2"
|
|
26
27
|
},
|
|
27
28
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
@@ -67,5 +68,5 @@
|
|
|
67
68
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
68
69
|
},
|
|
69
70
|
"sideEffects": false,
|
|
70
|
-
"version": "2.75.
|
|
71
|
+
"version": "2.75.15"
|
|
71
72
|
}
|
package/src/Config.ts
CHANGED
package/src/Witness.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness'
|
|
1
2
|
import { EthereumGasEtherchainV2Payload, EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'
|
|
2
|
-
import { AnyConfigSchema } from '@xyo-network/module'
|
|
3
|
+
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
3
4
|
import { Payload } from '@xyo-network/payload-model'
|
|
4
|
-
import {
|
|
5
|
+
import { WitnessParams } from '@xyo-network/witness-model'
|
|
5
6
|
|
|
6
7
|
import { EthereumGasEtherchainV2WitnessConfig } from './Config'
|
|
7
8
|
import { getV2GasFromEtherchain } from './lib'
|