@xyo-network/etherscan-ethereum-gas-plugin 2.73.3 → 2.73.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs.json +94 -94
- package/dist/index.d.mts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +51 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +36 -23
- package/tsup.config.ts +16 -0
- package/dist/cjs/Config.js +0 -3
- package/dist/cjs/Config.js.map +0 -1
- package/dist/cjs/Plugin.js +0 -16
- package/dist/cjs/Plugin.js.map +0 -1
- package/dist/cjs/Schema.js +0 -5
- package/dist/cjs/Schema.js.map +0 -1
- package/dist/cjs/Witness.js +0 -25
- package/dist/cjs/Witness.js.map +0 -1
- package/dist/cjs/index.js +0 -12
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/lib/getGasFromEtherscan.js +0 -11
- package/dist/cjs/lib/getGasFromEtherscan.js.map +0 -1
- package/dist/cjs/lib/index.js +0 -5
- package/dist/cjs/lib/index.js.map +0 -1
- package/dist/esm/Config.js +0 -2
- package/dist/esm/Config.js.map +0 -1
- package/dist/esm/Plugin.js +0 -11
- package/dist/esm/Plugin.js.map +0 -1
- package/dist/esm/Schema.js +0 -2
- package/dist/esm/Schema.js.map +0 -1
- package/dist/esm/Witness.js +0 -17
- package/dist/esm/Witness.js.map +0 -1
- package/dist/esm/index.js +0 -8
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lib/getGasFromEtherscan.js +0 -6
- package/dist/esm/lib/getGasFromEtherscan.js.map +0 -1
- package/dist/esm/lib/index.js +0 -2
- package/dist/esm/lib/index.js.map +0 -1
- package/dist/types/Config.d.ts +0 -7
- package/dist/types/Config.d.ts.map +0 -1
- package/dist/types/Plugin.d.ts +0 -3
- package/dist/types/Plugin.d.ts.map +0 -1
- package/dist/types/Schema.d.ts +0 -3
- package/dist/types/Schema.d.ts.map +0 -1
- package/dist/types/Witness.d.ts +0 -9
- package/dist/types/Witness.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -7
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/lib/getGasFromEtherscan.d.ts +0 -3
- package/dist/types/lib/getGasFromEtherscan.d.ts.map +0 -1
- package/dist/types/lib/index.d.ts +0 -2
- package/dist/types/lib/index.d.ts.map +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as _xyo_network_payloadset_plugin from '@xyo-network/payloadset-plugin';
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
import { WitnessConfig, AbstractWitness, WitnessParams } from '@xyo-network/witness';
|
|
5
|
+
|
|
6
|
+
type EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config';
|
|
7
|
+
declare const EthereumGasEtherscanWitnessConfigSchema: EthereumGasEtherscanWitnessConfigSchema;
|
|
8
|
+
|
|
9
|
+
type EthereumGasEtherscanWitnessConfig = WitnessConfig<{
|
|
10
|
+
apiKey: string;
|
|
11
|
+
schema: EthereumGasEtherscanWitnessConfigSchema;
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
declare class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {
|
|
15
|
+
static configSchemas: "network.xyo.blockchain.ethereum.gas.etherscan.witness.config"[];
|
|
16
|
+
protected observeHandler(): Promise<Payload[]>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const EthereumGasEtherscanPlugin: () => _xyo_network_payloadset_plugin.PayloadSetWitnessPlugin<EthereumGasEtherscanWitness>;
|
|
20
|
+
|
|
21
|
+
export { EthereumGasEtherscanPlugin, EthereumGasEtherscanWitness, EthereumGasEtherscanWitnessConfig, EthereumGasEtherscanWitnessConfigSchema, EthereumGasEtherscanPlugin as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as _xyo_network_payloadset_plugin from '@xyo-network/payloadset-plugin';
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
import { WitnessConfig, AbstractWitness, WitnessParams } from '@xyo-network/witness';
|
|
5
|
+
|
|
6
|
+
type EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config';
|
|
7
|
+
declare const EthereumGasEtherscanWitnessConfigSchema: EthereumGasEtherscanWitnessConfigSchema;
|
|
8
|
+
|
|
9
|
+
type EthereumGasEtherscanWitnessConfig = WitnessConfig<{
|
|
10
|
+
apiKey: string;
|
|
11
|
+
schema: EthereumGasEtherscanWitnessConfigSchema;
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
declare class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {
|
|
15
|
+
static configSchemas: "network.xyo.blockchain.ethereum.gas.etherscan.witness.config"[];
|
|
16
|
+
protected observeHandler(): Promise<Payload[]>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const EthereumGasEtherscanPlugin: () => _xyo_network_payloadset_plugin.PayloadSetWitnessPlugin<EthereumGasEtherscanWitness>;
|
|
20
|
+
|
|
21
|
+
export { EthereumGasEtherscanPlugin, EthereumGasEtherscanWitness, EthereumGasEtherscanWitnessConfig, EthereumGasEtherscanWitnessConfigSchema, EthereumGasEtherscanPlugin as default };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
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/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
EthereumGasEtherscanPlugin: () => EthereumGasEtherscanPlugin,
|
|
24
|
+
EthereumGasEtherscanWitness: () => EthereumGasEtherscanWitness,
|
|
25
|
+
EthereumGasEtherscanWitnessConfigSchema: () => EthereumGasEtherscanWitnessConfigSchema,
|
|
26
|
+
default: () => src_default
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(src_exports);
|
|
29
|
+
|
|
30
|
+
// src/Plugin.ts
|
|
31
|
+
var import_etherscan_ethereum_gas_payload_plugin2 = require("@xyo-network/etherscan-ethereum-gas-payload-plugin");
|
|
32
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
33
|
+
var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
|
|
34
|
+
|
|
35
|
+
// src/Witness.ts
|
|
36
|
+
var import_assert = require("@xylabs/assert");
|
|
37
|
+
var import_etherscan_ethereum_gas_payload_plugin = require("@xyo-network/etherscan-ethereum-gas-payload-plugin");
|
|
38
|
+
var import_payload_builder = require("@xyo-network/payload-builder");
|
|
39
|
+
var import_witness = require("@xyo-network/witness");
|
|
40
|
+
|
|
41
|
+
// src/lib/getGasFromEtherscan.ts
|
|
42
|
+
var import_axios = require("@xyo-network/axios");
|
|
43
|
+
var getGasFromEtherscan = async (apiKey) => {
|
|
44
|
+
const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`;
|
|
45
|
+
return (await import_axios.axios.get(url)).data;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// src/Schema.ts
|
|
49
|
+
var EthereumGasEtherscanWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherscan.witness.config";
|
|
50
|
+
|
|
51
|
+
// src/Witness.ts
|
|
52
|
+
var EthereumGasEtherscanWitness = class extends import_witness.AbstractWitness {
|
|
53
|
+
static configSchemas = [EthereumGasEtherscanWitnessConfigSchema];
|
|
54
|
+
async observeHandler() {
|
|
55
|
+
const apiKey = (0, import_assert.assertEx)(this.config?.apiKey, "apiKey is required");
|
|
56
|
+
const payload = new import_payload_builder.PayloadBuilder({ schema: import_etherscan_ethereum_gas_payload_plugin.EthereumGasEtherscanSchema }).fields(await getGasFromEtherscan(apiKey)).build();
|
|
57
|
+
return [payload];
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// src/Plugin.ts
|
|
62
|
+
var EthereumGasEtherscanPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
63
|
+
{ required: { [import_etherscan_ethereum_gas_payload_plugin2.EthereumGasEtherscanSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
64
|
+
{
|
|
65
|
+
witness: async (params) => {
|
|
66
|
+
const result = await EthereumGasEtherscanWitness.create(params);
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
// src/index.ts
|
|
73
|
+
var src_default = EthereumGasEtherscanPlugin;
|
|
74
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
+
0 && (module.exports = {
|
|
76
|
+
EthereumGasEtherscanPlugin,
|
|
77
|
+
EthereumGasEtherscanWitness,
|
|
78
|
+
EthereumGasEtherscanWitnessConfigSchema
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/Plugin.ts","../src/Witness.ts","../src/lib/getGasFromEtherscan.ts","../src/Schema.ts"],"sourcesContent":["import { EthereumGasEtherscanPlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasEtherscanPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasEtherscanPlugin\n","import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEtherscanWitness } from './Witness'\n\nexport const EthereumGasEtherscanPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEtherscanWitness>(\n { required: { [EthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await EthereumGasEtherscanWitness.create(params)\n return result as EthereumGasEtherscanWitness\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { AbstractWitness, WitnessParams } from '@xyo-network/witness'\n\nimport { EthereumGasEtherscanWitnessConfig } from './Config'\nimport { getGasFromEtherscan } from './lib'\nimport { EthereumGasEtherscanWitnessConfigSchema } from './Schema'\n\nexport class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {\n static override configSchemas = [EthereumGasEtherscanWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const apiKey = assertEx(this.config?.apiKey, 'apiKey is required')\n const payload = new PayloadBuilder<EthereumGasEtherscanPayload>({ schema: EthereumGasEtherscanSchema })\n .fields(await getGasFromEtherscan(apiKey))\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasEtherscanResponse } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const getGasFromEtherscan = async (apiKey: string): Promise<EthereumGasEtherscanResponse> => {\n const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`\n return (await axios.get<EthereumGasEtherscanResponse>(url)).data\n}\n","export type EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\nexport const EthereumGasEtherscanWitnessConfigSchema: EthereumGasEtherscanWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gDAA2C;AAC3C,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,mDAAwE;AAExE,6BAA+B;AAE/B,qBAA+C;;;ACL/C,mBAAsB;AAGf,IAAM,sBAAsB,OAAO,WAA0D;AAClG,QAAM,MAAM,0EAA0E,MAAM;AAC5F,UAAQ,MAAM,mBAAM,IAAkC,GAAG,GAAG;AAC9D;;;ACLO,IAAM,0CACX;;;AFSK,IAAM,8BAAN,cAA0C,+BAAmF;AAAA,EAClI,OAAgB,gBAAgB,CAAC,uCAAuC;AAAA,EAExE,MAAyB,iBAAqC;AAC5D,UAAM,aAAS,wBAAS,KAAK,QAAQ,QAAQ,oBAAoB;AACjE,UAAM,UAAU,IAAI,sCAA4C,EAAE,QAAQ,wEAA2B,CAAC,EACnG,OAAO,MAAM,oBAAoB,MAAM,CAAC,EACxC,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADfO,IAAM,6BAA6B,UACxC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,wEAA0B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC1E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,4BAA4B,OAAO,MAAM;AAC9D,aAAO;AAAA,IACT;AAAA,EACF;AACF;;;ADNF,IAAO,cAAQ;","names":["import_etherscan_ethereum_gas_payload_plugin"]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// src/Plugin.ts
|
|
2
|
+
import { EthereumGasEtherscanSchema as EthereumGasEtherscanSchema2 } from "@xyo-network/etherscan-ethereum-gas-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 { assertEx } from "@xylabs/assert";
|
|
8
|
+
import { EthereumGasEtherscanSchema } from "@xyo-network/etherscan-ethereum-gas-payload-plugin";
|
|
9
|
+
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
10
|
+
import { AbstractWitness } from "@xyo-network/witness";
|
|
11
|
+
|
|
12
|
+
// src/lib/getGasFromEtherscan.ts
|
|
13
|
+
import { axios } from "@xyo-network/axios";
|
|
14
|
+
var getGasFromEtherscan = async (apiKey) => {
|
|
15
|
+
const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`;
|
|
16
|
+
return (await axios.get(url)).data;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// src/Schema.ts
|
|
20
|
+
var EthereumGasEtherscanWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.etherscan.witness.config";
|
|
21
|
+
|
|
22
|
+
// src/Witness.ts
|
|
23
|
+
var EthereumGasEtherscanWitness = class extends AbstractWitness {
|
|
24
|
+
static configSchemas = [EthereumGasEtherscanWitnessConfigSchema];
|
|
25
|
+
async observeHandler() {
|
|
26
|
+
const apiKey = assertEx(this.config?.apiKey, "apiKey is required");
|
|
27
|
+
const payload = new PayloadBuilder({ schema: EthereumGasEtherscanSchema }).fields(await getGasFromEtherscan(apiKey)).build();
|
|
28
|
+
return [payload];
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// src/Plugin.ts
|
|
33
|
+
var EthereumGasEtherscanPlugin = () => createPayloadSetWitnessPlugin(
|
|
34
|
+
{ required: { [EthereumGasEtherscanSchema2]: 1 }, schema: PayloadSetSchema },
|
|
35
|
+
{
|
|
36
|
+
witness: async (params) => {
|
|
37
|
+
const result = await EthereumGasEtherscanWitness.create(params);
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
// src/index.ts
|
|
44
|
+
var src_default = EthereumGasEtherscanPlugin;
|
|
45
|
+
export {
|
|
46
|
+
EthereumGasEtherscanPlugin,
|
|
47
|
+
EthereumGasEtherscanWitness,
|
|
48
|
+
EthereumGasEtherscanWitnessConfigSchema,
|
|
49
|
+
src_default as default
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Plugin.ts","../src/Witness.ts","../src/lib/getGasFromEtherscan.ts","../src/Schema.ts","../src/index.ts"],"sourcesContent":["import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEtherscanWitness } from './Witness'\n\nexport const EthereumGasEtherscanPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEtherscanWitness>(\n { required: { [EthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await EthereumGasEtherscanWitness.create(params)\n return result as EthereumGasEtherscanWitness\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { EthereumGasEtherscanPayload, EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { AbstractWitness, WitnessParams } from '@xyo-network/witness'\n\nimport { EthereumGasEtherscanWitnessConfig } from './Config'\nimport { getGasFromEtherscan } from './lib'\nimport { EthereumGasEtherscanWitnessConfigSchema } from './Schema'\n\nexport class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {\n static override configSchemas = [EthereumGasEtherscanWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const apiKey = assertEx(this.config?.apiKey, 'apiKey is required')\n const payload = new PayloadBuilder<EthereumGasEtherscanPayload>({ schema: EthereumGasEtherscanSchema })\n .fields(await getGasFromEtherscan(apiKey))\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasEtherscanResponse } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const getGasFromEtherscan = async (apiKey: string): Promise<EthereumGasEtherscanResponse> => {\n const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`\n return (await axios.get<EthereumGasEtherscanResponse>(url)).data\n}\n","export type EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\nexport const EthereumGasEtherscanWitnessConfigSchema: EthereumGasEtherscanWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config'\n","import { EthereumGasEtherscanPlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasEtherscanPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasEtherscanPlugin\n"],"mappings":";AAAA,SAAS,8BAAAA,mCAAkC;AAC3C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,gBAAgB;AACzB,SAAsC,kCAAkC;AAExE,SAAS,sBAAsB;AAE/B,SAAS,uBAAsC;;;ACL/C,SAAS,aAAa;AAGf,IAAM,sBAAsB,OAAO,WAA0D;AAClG,QAAM,MAAM,0EAA0E,MAAM;AAC5F,UAAQ,MAAM,MAAM,IAAkC,GAAG,GAAG;AAC9D;;;ACLO,IAAM,0CACX;;;AFSK,IAAM,8BAAN,cAA0C,gBAAmF;AAAA,EAClI,OAAgB,gBAAgB,CAAC,uCAAuC;AAAA,EAExE,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,SAAS,KAAK,QAAQ,QAAQ,oBAAoB;AACjE,UAAM,UAAU,IAAI,eAA4C,EAAE,QAAQ,2BAA2B,CAAC,EACnG,OAAO,MAAM,oBAAoB,MAAM,CAAC,EACxC,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADfO,IAAM,6BAA6B,MACxC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,2BAA0B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC1E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,4BAA4B,OAAO,MAAM;AAC9D,aAAO;AAAA,IACT;AAAA,EACF;AACF;;;AINF,IAAO,cAAQ;","names":["EthereumGasEtherscanSchema","EthereumGasEtherscanSchema"]}
|
package/package.json
CHANGED
|
@@ -10,42 +10,56 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/assert": "^2.10.
|
|
14
|
-
"@xyo-network/axios": "~2.73.
|
|
15
|
-
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "~2.73.
|
|
16
|
-
"@xyo-network/module-model": "~2.73.
|
|
17
|
-
"@xyo-network/payload-builder": "~2.73.
|
|
18
|
-
"@xyo-network/payload-model": "~2.73.
|
|
19
|
-
"@xyo-network/payloadset-plugin": "~2.73.
|
|
20
|
-
"@xyo-network/witness": "~2.73.
|
|
13
|
+
"@xylabs/assert": "^2.10.16",
|
|
14
|
+
"@xyo-network/axios": "~2.73.4",
|
|
15
|
+
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "~2.73.4",
|
|
16
|
+
"@xyo-network/module-model": "~2.73.4",
|
|
17
|
+
"@xyo-network/payload-builder": "~2.73.4",
|
|
18
|
+
"@xyo-network/payload-model": "~2.73.4",
|
|
19
|
+
"@xyo-network/payloadset-plugin": "~2.73.4",
|
|
20
|
+
"@xyo-network/witness": "~2.73.4"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@xylabs/ts-scripts-yarn3": "^2.19.
|
|
24
|
-
"@xylabs/tsconfig": "^2.19.
|
|
23
|
+
"@xylabs/ts-scripts-yarn3": "^2.19.12",
|
|
24
|
+
"@xylabs/tsconfig": "^2.19.12",
|
|
25
|
+
"publint": "^0.2.2",
|
|
26
|
+
"tsup": "^7.2.0",
|
|
25
27
|
"typescript": "^5.2.2"
|
|
26
28
|
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"package-compile": "tsup && publint",
|
|
31
|
+
"package-recompile": "tsup && publint"
|
|
32
|
+
},
|
|
27
33
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
28
|
-
"browser": "dist/esm/index.js",
|
|
29
34
|
"docs": "dist/docs.json",
|
|
35
|
+
"types": "dist/index.d.ts",
|
|
30
36
|
"exports": {
|
|
31
37
|
".": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
},
|
|
36
|
-
"browser": {
|
|
37
|
-
"import": "./dist/esm/index.js",
|
|
38
|
-
"require": "./dist/cjs/index.js"
|
|
38
|
+
"require": {
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"default": "./dist/index.js"
|
|
39
41
|
},
|
|
40
|
-
"
|
|
42
|
+
"import": {
|
|
43
|
+
"types": "./dist/index.d.mts",
|
|
44
|
+
"default": "./dist/index.mjs"
|
|
45
|
+
}
|
|
41
46
|
},
|
|
42
47
|
"./dist/docs.json": {
|
|
43
48
|
"default": "./dist/docs.json"
|
|
44
49
|
},
|
|
50
|
+
"./cjs": {
|
|
51
|
+
"default": "./dist/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./docs": {
|
|
54
|
+
"default": "./dist/docs.json"
|
|
55
|
+
},
|
|
56
|
+
"./esm": {
|
|
57
|
+
"default": "./dist/index.mjs"
|
|
58
|
+
},
|
|
45
59
|
"./package.json": "./package.json"
|
|
46
60
|
},
|
|
47
|
-
"main": "dist/
|
|
48
|
-
"module": "dist/
|
|
61
|
+
"main": "dist/index.js",
|
|
62
|
+
"module": "dist/index.mjs",
|
|
49
63
|
"homepage": "https://xyo.network",
|
|
50
64
|
"license": "LGPL-3.0",
|
|
51
65
|
"publishConfig": {
|
|
@@ -56,6 +70,5 @@
|
|
|
56
70
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
57
71
|
},
|
|
58
72
|
"sideEffects": false,
|
|
59
|
-
"
|
|
60
|
-
"version": "2.73.3"
|
|
73
|
+
"version": "2.73.4"
|
|
61
74
|
}
|
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup'
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line import/no-default-export
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
bundle: true,
|
|
6
|
+
cjsInterop: true,
|
|
7
|
+
clean: false,
|
|
8
|
+
dts: {
|
|
9
|
+
entry: ['src/index.ts'],
|
|
10
|
+
},
|
|
11
|
+
entry: ['src/index.ts'],
|
|
12
|
+
format: ['cjs', 'esm'],
|
|
13
|
+
sourcemap: true,
|
|
14
|
+
splitting: false,
|
|
15
|
+
tsconfig: 'tsconfig.json',
|
|
16
|
+
})
|
package/dist/cjs/Config.js
DELETED
package/dist/cjs/Config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":""}
|
package/dist/cjs/Plugin.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EthereumGasEtherscanPlugin = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const etherscan_ethereum_gas_payload_plugin_1 = require("@xyo-network/etherscan-ethereum-gas-payload-plugin");
|
|
6
|
-
const payload_model_1 = require("@xyo-network/payload-model");
|
|
7
|
-
const payloadset_plugin_1 = require("@xyo-network/payloadset-plugin");
|
|
8
|
-
const Witness_1 = require("./Witness");
|
|
9
|
-
const EthereumGasEtherscanPlugin = () => (0, payloadset_plugin_1.createPayloadSetWitnessPlugin)({ required: { [etherscan_ethereum_gas_payload_plugin_1.EthereumGasEtherscanSchema]: 1 }, schema: payload_model_1.PayloadSetSchema }, {
|
|
10
|
-
witness: (params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
11
|
-
const result = yield Witness_1.EthereumGasEtherscanWitness.create(params);
|
|
12
|
-
return result;
|
|
13
|
-
}),
|
|
14
|
-
});
|
|
15
|
-
exports.EthereumGasEtherscanPlugin = EthereumGasEtherscanPlugin;
|
|
16
|
-
//# sourceMappingURL=Plugin.js.map
|
package/dist/cjs/Plugin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":";;;;AAAA,8GAA+F;AAC/F,8DAA6D;AAC7D,sEAA8E;AAE9E,uCAAuD;AAEhD,MAAM,0BAA0B,GAAG,GAAG,EAAE,CAC7C,IAAA,iDAA6B,EAC3B,EAAE,QAAQ,EAAE,EAAE,CAAC,kEAA0B,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gCAAgB,EAAE,EAC3E;IACE,OAAO,EAAE,CAAO,MAAM,EAAE,EAAE;QACxB,MAAM,MAAM,GAAG,MAAM,qCAA2B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAC/D,OAAO,MAAqC,CAAA;IAC9C,CAAC,CAAA;CACF,CACF,CAAA;AATU,QAAA,0BAA0B,8BASpC"}
|
package/dist/cjs/Schema.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EthereumGasEtherscanWitnessConfigSchema = void 0;
|
|
4
|
-
exports.EthereumGasEtherscanWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.etherscan.witness.config';
|
|
5
|
-
//# sourceMappingURL=Schema.js.map
|
package/dist/cjs/Schema.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.js","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":";;;AACa,QAAA,uCAAuC,GAClD,8DAA8D,CAAA"}
|
package/dist/cjs/Witness.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EthereumGasEtherscanWitness = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const assert_1 = require("@xylabs/assert");
|
|
6
|
-
const etherscan_ethereum_gas_payload_plugin_1 = require("@xyo-network/etherscan-ethereum-gas-payload-plugin");
|
|
7
|
-
const payload_builder_1 = require("@xyo-network/payload-builder");
|
|
8
|
-
const witness_1 = require("@xyo-network/witness");
|
|
9
|
-
const lib_1 = require("./lib");
|
|
10
|
-
const Schema_1 = require("./Schema");
|
|
11
|
-
class EthereumGasEtherscanWitness extends witness_1.AbstractWitness {
|
|
12
|
-
observeHandler() {
|
|
13
|
-
var _a;
|
|
14
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
|
-
const apiKey = (0, assert_1.assertEx)((_a = this.config) === null || _a === void 0 ? void 0 : _a.apiKey, 'apiKey is required');
|
|
16
|
-
const payload = new payload_builder_1.PayloadBuilder({ schema: etherscan_ethereum_gas_payload_plugin_1.EthereumGasEtherscanSchema })
|
|
17
|
-
.fields(yield (0, lib_1.getGasFromEtherscan)(apiKey))
|
|
18
|
-
.build();
|
|
19
|
-
return [payload];
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.EthereumGasEtherscanWitness = EthereumGasEtherscanWitness;
|
|
24
|
-
EthereumGasEtherscanWitness.configSchemas = [Schema_1.EthereumGasEtherscanWitnessConfigSchema];
|
|
25
|
-
//# sourceMappingURL=Witness.js.map
|
package/dist/cjs/Witness.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.js","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":";;;;AAAA,2CAAyC;AACzC,8GAA4H;AAE5H,kEAA6D;AAE7D,kDAAqE;AAGrE,+BAA2C;AAC3C,qCAAkE;AAElE,MAAa,2BAA4B,SAAQ,yBAAkF;IAGxG,cAAc;;;YACrC,MAAM,MAAM,GAAG,IAAA,iBAAQ,EAAC,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,EAAE,oBAAoB,CAAC,CAAA;YAClE,MAAM,OAAO,GAAG,IAAI,gCAAc,CAA8B,EAAE,MAAM,EAAE,kEAA0B,EAAE,CAAC;iBACpG,MAAM,CAAC,MAAM,IAAA,yBAAmB,EAAC,MAAM,CAAC,CAAC;iBACzC,KAAK,EAAE,CAAA;YACV,OAAO,CAAC,OAAO,CAAC,CAAA;;KACjB;;AATH,kEAUC;AATiB,yCAAa,GAAG,CAAC,gDAAuC,CAAC,CAAA"}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EthereumGasEtherscanPlugin = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const Plugin_1 = require("./Plugin");
|
|
6
|
-
Object.defineProperty(exports, "EthereumGasEtherscanPlugin", { enumerable: true, get: function () { return Plugin_1.EthereumGasEtherscanPlugin; } });
|
|
7
|
-
tslib_1.__exportStar(require("./Config"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./Schema"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./Witness"), exports);
|
|
10
|
-
// eslint-disable-next-line import/no-default-export
|
|
11
|
-
exports.default = Plugin_1.EthereumGasEtherscanPlugin;
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAqD;AAM5C,2GANA,mCAA0B,OAMA;AAJnC,mDAAwB;AACxB,mDAAwB;AACxB,oDAAyB;AAIzB,oDAAoD;AACpD,kBAAe,mCAA0B,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGasFromEtherscan = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const axios_1 = require("@xyo-network/axios");
|
|
6
|
-
const getGasFromEtherscan = (apiKey) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
-
const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`;
|
|
8
|
-
return (yield axios_1.axios.get(url)).data;
|
|
9
|
-
});
|
|
10
|
-
exports.getGasFromEtherscan = getGasFromEtherscan;
|
|
11
|
-
//# sourceMappingURL=getGasFromEtherscan.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getGasFromEtherscan.js","sourceRoot":"","sources":["../../../src/lib/getGasFromEtherscan.ts"],"names":[],"mappings":";;;;AAAA,8CAA0C;AAGnC,MAAM,mBAAmB,GAAG,CAAO,MAAc,EAAyC,EAAE;IACjG,MAAM,GAAG,GAAG,0EAA0E,MAAM,EAAE,CAAA;IAC9F,OAAO,CAAC,MAAM,aAAK,CAAC,GAAG,CAA+B,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA;AAClE,CAAC,CAAA,CAAA;AAHY,QAAA,mBAAmB,uBAG/B"}
|
package/dist/cjs/lib/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":";;;AAAA,gEAAqC"}
|
package/dist/esm/Config.js
DELETED
package/dist/esm/Config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":""}
|
package/dist/esm/Plugin.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
|
|
2
|
-
import { PayloadSetSchema } from '@xyo-network/payload-model';
|
|
3
|
-
import { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin';
|
|
4
|
-
import { EthereumGasEtherscanWitness } from './Witness';
|
|
5
|
-
export const EthereumGasEtherscanPlugin = () => createPayloadSetWitnessPlugin({ required: { [EthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema }, {
|
|
6
|
-
witness: async (params) => {
|
|
7
|
-
const result = await EthereumGasEtherscanWitness.create(params);
|
|
8
|
-
return result;
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=Plugin.js.map
|
package/dist/esm/Plugin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAA;AAE9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAA;AAEvD,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,EAAE,CAC7C,6BAA6B,CAC3B,EAAE,QAAQ,EAAE,EAAE,CAAC,0BAA0B,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAC3E;IACE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QACxB,MAAM,MAAM,GAAG,MAAM,2BAA2B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAC/D,OAAO,MAAqC,CAAA;IAC9C,CAAC;CACF,CACF,CAAA"}
|
package/dist/esm/Schema.js
DELETED
package/dist/esm/Schema.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.js","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,uCAAuC,GAClD,8DAA8D,CAAA"}
|
package/dist/esm/Witness.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { assertEx } from '@xylabs/assert';
|
|
2
|
-
import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
|
|
3
|
-
import { PayloadBuilder } from '@xyo-network/payload-builder';
|
|
4
|
-
import { AbstractWitness } from '@xyo-network/witness';
|
|
5
|
-
import { getGasFromEtherscan } from './lib';
|
|
6
|
-
import { EthereumGasEtherscanWitnessConfigSchema } from './Schema';
|
|
7
|
-
export class EthereumGasEtherscanWitness extends AbstractWitness {
|
|
8
|
-
static configSchemas = [EthereumGasEtherscanWitnessConfigSchema];
|
|
9
|
-
async observeHandler() {
|
|
10
|
-
const apiKey = assertEx(this.config?.apiKey, 'apiKey is required');
|
|
11
|
-
const payload = new PayloadBuilder({ schema: EthereumGasEtherscanSchema })
|
|
12
|
-
.fields(await getGasFromEtherscan(apiKey))
|
|
13
|
-
.build();
|
|
14
|
-
return [payload];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=Witness.js.map
|
package/dist/esm/Witness.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.js","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAA+B,0BAA0B,EAAE,MAAM,oDAAoD,CAAA;AAE5H,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAE7D,OAAO,EAAE,eAAe,EAAiB,MAAM,sBAAsB,CAAA;AAGrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,uCAAuC,EAAE,MAAM,UAAU,CAAA;AAElE,MAAM,OAAO,2BAA4B,SAAQ,eAAkF;IACjI,MAAM,CAAU,aAAa,GAAG,CAAC,uCAAuC,CAAC,CAAA;IAEtD,KAAK,CAAC,cAAc;QACrC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAA;QAClE,MAAM,OAAO,GAAG,IAAI,cAAc,CAA8B,EAAE,MAAM,EAAE,0BAA0B,EAAE,CAAC;aACpG,MAAM,CAAC,MAAM,mBAAmB,CAAC,MAAM,CAAC,CAAC;aACzC,KAAK,EAAE,CAAA;QACV,OAAO,CAAC,OAAO,CAAC,CAAA;IAClB,CAAC"}
|
package/dist/esm/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { EthereumGasEtherscanPlugin } from './Plugin';
|
|
2
|
-
export * from './Config';
|
|
3
|
-
export * from './Schema';
|
|
4
|
-
export * from './Witness';
|
|
5
|
-
export { EthereumGasEtherscanPlugin };
|
|
6
|
-
// eslint-disable-next-line import/no-default-export
|
|
7
|
-
export default EthereumGasEtherscanPlugin;
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAErD,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,0BAA0B,EAAE,CAAA;AAErC,oDAAoD;AACpD,eAAe,0BAA0B,CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { axios } from '@xyo-network/axios';
|
|
2
|
-
export const getGasFromEtherscan = async (apiKey) => {
|
|
3
|
-
const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`;
|
|
4
|
-
return (await axios.get(url)).data;
|
|
5
|
-
};
|
|
6
|
-
//# sourceMappingURL=getGasFromEtherscan.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getGasFromEtherscan.js","sourceRoot":"","sources":["../../../src/lib/getGasFromEtherscan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAG1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EAAE,MAAc,EAAyC,EAAE;IACjG,MAAM,GAAG,GAAG,0EAA0E,MAAM,EAAE,CAAA;IAC9F,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,CAA+B,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA;AAClE,CAAC,CAAA"}
|
package/dist/esm/lib/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/types/Config.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WitnessConfig } from '@xyo-network/witness';
|
|
2
|
-
import { EthereumGasEtherscanWitnessConfigSchema } from './Schema';
|
|
3
|
-
export type EthereumGasEtherscanWitnessConfig = WitnessConfig<{
|
|
4
|
-
apiKey: string;
|
|
5
|
-
schema: EthereumGasEtherscanWitnessConfigSchema;
|
|
6
|
-
}>;
|
|
7
|
-
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,OAAO,EAAE,uCAAuC,EAAE,MAAM,UAAU,CAAA;AAElE,MAAM,MAAM,iCAAiC,GAAG,aAAa,CAAC;IAC5D,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,uCAAuC,CAAA;CAChD,CAAC,CAAA"}
|
package/dist/types/Plugin.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAA;AAEvD,eAAO,MAAM,0BAA0B,qGASpC,CAAA"}
|
package/dist/types/Schema.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uCAAuC,GAAG,8DAA8D,CAAA;AACpH,eAAO,MAAM,uCAAuC,EAAE,uCACU,CAAA"}
|
package/dist/types/Witness.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
2
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
-
import { AbstractWitness, WitnessParams } from '@xyo-network/witness';
|
|
4
|
-
import { EthereumGasEtherscanWitnessConfig } from './Config';
|
|
5
|
-
export declare class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {
|
|
6
|
-
static configSchemas: "network.xyo.blockchain.ethereum.gas.etherscan.witness.config"[];
|
|
7
|
-
protected observeHandler(): Promise<Payload[]>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAErE,OAAO,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAA;AAI5D,qBAAa,2BAA4B,SAAQ,eAAe,CAAC,aAAa,CAAC,eAAe,CAAC,iCAAiC,CAAC,CAAC,CAAC;IACjI,OAAgB,aAAa,mEAA4C;cAEhD,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAO9D"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAErD,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,0BAA0B,EAAE,CAAA;AAGrC,eAAe,0BAA0B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getGasFromEtherscan.d.ts","sourceRoot":"","sources":["../../../src/lib/getGasFromEtherscan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAA;AAEjG,eAAO,MAAM,mBAAmB,WAAkB,MAAM,KAAG,QAAQ,4BAA4B,CAG9F,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|