@xyo-network/etherchain-ethereum-gas-v2-plugin 2.75.14 → 2.75.16
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.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/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/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/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/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 +12 -11
- package/src/Config.ts +1 -1
- package/src/Witness.ts +3 -2
- package/dist/browser/Config.cjs +0 -19
- package/dist/browser/Config.cjs.map +0 -1
- package/dist/browser/Config.js +0 -1
- package/dist/browser/Config.js.map +0 -1
- package/dist/browser/Plugin.cjs +0 -66
- package/dist/browser/Plugin.cjs.map +0 -1
- package/dist/browser/Plugin.js +0 -45
- package/dist/browser/Plugin.js.map +0 -1
- package/dist/browser/Schema.cjs +0 -27
- package/dist/browser/Schema.cjs.map +0 -1
- package/dist/browser/Schema.js +0 -6
- package/dist/browser/Schema.js.map +0 -1
- package/dist/browser/Witness.cjs +0 -51
- package/dist/browser/Witness.cjs.map +0 -1
- package/dist/browser/Witness.js +0 -30
- package/dist/browser/Witness.js.map +0 -1
- package/dist/browser/lib/getV2GasFromEtherchain.cjs +0 -31
- package/dist/browser/lib/getV2GasFromEtherchain.cjs.map +0 -1
- package/dist/browser/lib/getV2GasFromEtherchain.js +0 -10
- package/dist/browser/lib/getV2GasFromEtherchain.js.map +0 -1
- package/dist/browser/lib/index.cjs +0 -33
- package/dist/browser/lib/index.cjs.map +0 -1
- package/dist/browser/lib/index.js +0 -10
- package/dist/browser/lib/index.js.map +0 -1
- package/dist/node/Config.js +0 -19
- package/dist/node/Config.js.map +0 -1
- package/dist/node/Config.mjs +0 -1
- package/dist/node/Config.mjs.map +0 -1
- package/dist/node/Plugin.js +0 -70
- package/dist/node/Plugin.js.map +0 -1
- package/dist/node/Plugin.mjs +0 -45
- package/dist/node/Plugin.mjs.map +0 -1
- package/dist/node/Schema.js +0 -31
- package/dist/node/Schema.js.map +0 -1
- package/dist/node/Schema.mjs +0 -6
- package/dist/node/Schema.mjs.map +0 -1
- package/dist/node/Witness.js +0 -55
- package/dist/node/Witness.js.map +0 -1
- package/dist/node/Witness.mjs +0 -30
- package/dist/node/Witness.mjs.map +0 -1
- package/dist/node/lib/getV2GasFromEtherchain.js +0 -35
- package/dist/node/lib/getV2GasFromEtherchain.js.map +0 -1
- package/dist/node/lib/getV2GasFromEtherchain.mjs +0 -10
- package/dist/node/lib/getV2GasFromEtherchain.mjs.map +0 -1
- package/dist/node/lib/index.js +0 -37
- package/dist/node/lib/index.js.map +0 -1
- package/dist/node/lib/index.mjs +0 -10
- package/dist/node/lib/index.mjs.map +0 -1
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/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/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.16",
|
|
14
|
+
"@xyo-network/axios": "~2.75.16",
|
|
15
|
+
"@xyo-network/etherchain-ethereum-gas-v2-payload-plugin": "~2.75.16",
|
|
16
|
+
"@xyo-network/module-model": "~2.75.16",
|
|
17
|
+
"@xyo-network/payload-model": "~2.75.16",
|
|
18
|
+
"@xyo-network/payloadset-plugin": "~2.75.16",
|
|
19
|
+
"@xyo-network/witness-model": "~2.75.16"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
22
|
-
"@xylabs/tsconfig": "^3.
|
|
23
|
-
"@xyo-network/account": "~2.75.
|
|
24
|
-
"@xyo-network/payload-wrapper": "~2.75.
|
|
22
|
+
"@xylabs/ts-scripts-yarn3": "^3.1.3",
|
|
23
|
+
"@xylabs/tsconfig": "^3.1.3",
|
|
24
|
+
"@xyo-network/account": "~2.75.16",
|
|
25
|
+
"@xyo-network/payload-wrapper": "~2.75.16",
|
|
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.16"
|
|
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'
|
package/dist/browser/Config.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/Config.ts
|
|
17
|
-
var Config_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(Config_exports);
|
|
19
|
-
//# sourceMappingURL=Config.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|
package/dist/browser/Config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=Config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/browser/Plugin.cjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/Plugin.ts
|
|
21
|
-
var Plugin_exports = {};
|
|
22
|
-
__export(Plugin_exports, {
|
|
23
|
-
EthereumGasEtherchainV2Plugin: () => EthereumGasEtherchainV2Plugin
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(Plugin_exports);
|
|
26
|
-
var import_etherchain_ethereum_gas_v2_payload_plugin2 = require("@xyo-network/etherchain-ethereum-gas-v2-payload-plugin");
|
|
27
|
-
var import_payload_model = require("@xyo-network/payload-model");
|
|
28
|
-
var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
|
|
29
|
-
|
|
30
|
-
// src/Witness.ts
|
|
31
|
-
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
|
-
|
|
34
|
-
// src/lib/getV2GasFromEtherchain.ts
|
|
35
|
-
var import_axios = require("@xyo-network/axios");
|
|
36
|
-
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
37
|
-
var getV2GasFromEtherchain = async () => {
|
|
38
|
-
return (await import_axios.axios.get(url)).data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
// src/Schema.ts
|
|
42
|
-
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
43
|
-
|
|
44
|
-
// src/Witness.ts
|
|
45
|
-
var EtherchainEthereumGasWitnessV2 = class extends import_witness.AbstractWitness {
|
|
46
|
-
static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
|
|
47
|
-
async observeHandler() {
|
|
48
|
-
const payload = {
|
|
49
|
-
...await getV2GasFromEtherchain(),
|
|
50
|
-
schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
|
|
51
|
-
timestamp: Date.now()
|
|
52
|
-
};
|
|
53
|
-
return [payload];
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
// src/Plugin.ts
|
|
58
|
-
var EthereumGasEtherchainV2Plugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
59
|
-
{ required: { [import_etherchain_ethereum_gas_v2_payload_plugin2.EthereumGasEtherchainV2Schema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
60
|
-
{
|
|
61
|
-
witness: async (params) => {
|
|
62
|
-
return await EtherchainEthereumGasWitnessV2.create(params);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
//# sourceMappingURL=Plugin.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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 { AbstractWitness, WitnessParams } from '@xyo-network/witness'\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,uDAA8E;AAG9E,qBAA+C;;;ACH/C,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFSK,IAAM,iCAAN,cAA6C,+BAAsD;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;;;ADhBO,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/browser/Plugin.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// src/Plugin.ts
|
|
2
|
-
import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
|
|
3
|
-
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
4
|
-
import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
|
|
5
|
-
|
|
6
|
-
// src/Witness.ts
|
|
7
|
-
import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
|
|
8
|
-
import { AbstractWitness } from "@xyo-network/witness";
|
|
9
|
-
|
|
10
|
-
// src/lib/getV2GasFromEtherchain.ts
|
|
11
|
-
import { axios } from "@xyo-network/axios";
|
|
12
|
-
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
13
|
-
var getV2GasFromEtherchain = async () => {
|
|
14
|
-
return (await axios.get(url)).data;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// src/Schema.ts
|
|
18
|
-
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
19
|
-
|
|
20
|
-
// src/Witness.ts
|
|
21
|
-
var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
|
|
22
|
-
static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
|
|
23
|
-
async observeHandler() {
|
|
24
|
-
const payload = {
|
|
25
|
-
...await getV2GasFromEtherchain(),
|
|
26
|
-
schema: EthereumGasEtherchainV2Schema,
|
|
27
|
-
timestamp: Date.now()
|
|
28
|
-
};
|
|
29
|
-
return [payload];
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// src/Plugin.ts
|
|
34
|
-
var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
|
|
35
|
-
{ required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
|
|
36
|
-
{
|
|
37
|
-
witness: async (params) => {
|
|
38
|
-
return await EtherchainEthereumGasWitnessV2.create(params);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
export {
|
|
43
|
-
EthereumGasEtherchainV2Plugin
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=Plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 { AbstractWitness, WitnessParams } from '@xyo-network/witness'\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,SAAyC,qCAAqC;AAG9E,SAAS,uBAAsC;;;ACH/C,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFSK,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;;;ADhBO,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/browser/Schema.cjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/Schema.ts
|
|
21
|
-
var Schema_exports = {};
|
|
22
|
-
__export(Schema_exports, {
|
|
23
|
-
EthereumGasEtherchainV2WitnessConfigSchema: () => EthereumGasEtherchainV2WitnessConfigSchema
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(Schema_exports);
|
|
26
|
-
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
27
|
-
//# sourceMappingURL=Schema.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["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;AACO,IAAM,6CACX;","names":[]}
|
package/dist/browser/Schema.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["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":";AACO,IAAM,6CACX;","names":[]}
|
package/dist/browser/Witness.cjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/Witness.ts
|
|
21
|
-
var Witness_exports = {};
|
|
22
|
-
__export(Witness_exports, {
|
|
23
|
-
EtherchainEthereumGasWitnessV2: () => EtherchainEthereumGasWitnessV2
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(Witness_exports);
|
|
26
|
-
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
|
-
|
|
29
|
-
// src/lib/getV2GasFromEtherchain.ts
|
|
30
|
-
var import_axios = require("@xyo-network/axios");
|
|
31
|
-
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
32
|
-
var getV2GasFromEtherchain = async () => {
|
|
33
|
-
return (await import_axios.axios.get(url)).data;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// src/Schema.ts
|
|
37
|
-
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
38
|
-
|
|
39
|
-
// src/Witness.ts
|
|
40
|
-
var EtherchainEthereumGasWitnessV2 = class extends import_witness.AbstractWitness {
|
|
41
|
-
static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
|
|
42
|
-
async observeHandler() {
|
|
43
|
-
const payload = {
|
|
44
|
-
...await getV2GasFromEtherchain(),
|
|
45
|
-
schema: import_etherchain_ethereum_gas_v2_payload_plugin.EthereumGasEtherchainV2Schema,
|
|
46
|
-
timestamp: Date.now()
|
|
47
|
-
};
|
|
48
|
-
return [payload];
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=Witness.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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 { AbstractWitness, WitnessParams } from '@xyo-network/witness'\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,uDAA8E;AAG9E,qBAA+C;;;ACH/C,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFSK,IAAM,iCAAN,cAA6C,+BAAsD;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/browser/Witness.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// src/Witness.ts
|
|
2
|
-
import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
|
|
3
|
-
import { AbstractWitness } from "@xyo-network/witness";
|
|
4
|
-
|
|
5
|
-
// src/lib/getV2GasFromEtherchain.ts
|
|
6
|
-
import { axios } from "@xyo-network/axios";
|
|
7
|
-
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
8
|
-
var getV2GasFromEtherchain = async () => {
|
|
9
|
-
return (await axios.get(url)).data;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
// src/Schema.ts
|
|
13
|
-
var EthereumGasEtherchainV2WitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config";
|
|
14
|
-
|
|
15
|
-
// src/Witness.ts
|
|
16
|
-
var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
|
|
17
|
-
static configSchemas = [EthereumGasEtherchainV2WitnessConfigSchema];
|
|
18
|
-
async observeHandler() {
|
|
19
|
-
const payload = {
|
|
20
|
-
...await getV2GasFromEtherchain(),
|
|
21
|
-
schema: EthereumGasEtherchainV2Schema,
|
|
22
|
-
timestamp: Date.now()
|
|
23
|
-
};
|
|
24
|
-
return [payload];
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
EtherchainEthereumGasWitnessV2
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=Witness.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 { AbstractWitness, WitnessParams } from '@xyo-network/witness'\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,SAAyC,qCAAqC;AAG9E,SAAS,uBAAsC;;;ACH/C,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;;;ACNO,IAAM,6CACX;;;AFSK,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":[]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/lib/getV2GasFromEtherchain.ts
|
|
21
|
-
var getV2GasFromEtherchain_exports = {};
|
|
22
|
-
__export(getV2GasFromEtherchain_exports, {
|
|
23
|
-
getV2GasFromEtherchain: () => getV2GasFromEtherchain
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(getV2GasFromEtherchain_exports);
|
|
26
|
-
var import_axios = require("@xyo-network/axios");
|
|
27
|
-
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
28
|
-
var getV2GasFromEtherchain = async () => {
|
|
29
|
-
return (await import_axios.axios.get(url)).data;
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=getV2GasFromEtherchain.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/getV2GasFromEtherchain.ts"],"sourcesContent":["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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsB;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,mBAAM,IAAqC,GAAG,GAAG;AACjE;","names":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// src/lib/getV2GasFromEtherchain.ts
|
|
2
|
-
import { axios } from "@xyo-network/axios";
|
|
3
|
-
var url = "https://beaconcha.in/api/v1/execution/gasnow";
|
|
4
|
-
var getV2GasFromEtherchain = async () => {
|
|
5
|
-
return (await axios.get(url)).data;
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
getV2GasFromEtherchain
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=getV2GasFromEtherchain.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/getV2GasFromEtherchain.ts"],"sourcesContent":["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"],"mappings":";AAAA,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,UAAQ,MAAM,MAAM,IAAqC,GAAG,GAAG;AACjE;","names":[]}
|