@xyo-network/blocknative-ethereum-gas-plugin 2.75.0 → 2.75.2
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 +6 -0
- package/dist/browser/Config.d.cts.map +1 -0
- package/dist/browser/Plugin.d.cts +3 -0
- package/dist/browser/Plugin.d.cts.map +1 -0
- package/dist/browser/Plugin.js +4 -35
- package/dist/browser/Plugin.js.map +1 -1
- package/dist/browser/Schema.d.cts +3 -0
- package/dist/browser/Schema.d.cts.map +1 -0
- package/dist/browser/Schema.js +1 -2
- package/dist/browser/Schema.js.map +1 -1
- package/dist/browser/Witness.d.cts +10 -0
- package/dist/browser/Witness.d.cts.map +1 -0
- package/dist/browser/Witness.js +4 -17
- package/dist/browser/Witness.js.map +1 -1
- package/dist/browser/index.d.cts +7 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/index.js +4 -47
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/lib/getGasFromBlocknative.d.cts +3 -0
- package/dist/browser/lib/getGasFromBlocknative.d.cts.map +1 -0
- package/dist/browser/lib/getGasFromBlocknative.js +4 -5
- package/dist/browser/lib/getGasFromBlocknative.js.map +1 -1
- package/dist/browser/lib/index.d.cts +2 -0
- package/dist/browser/lib/index.d.cts.map +1 -0
- package/dist/browser/lib/index.js +1 -11
- package/dist/browser/lib/index.js.map +1 -1
- package/dist/docs.json +16258 -0
- package/dist/node/Config.d.cts +6 -0
- package/dist/node/Config.d.cts.map +1 -0
- package/dist/node/Config.js +2 -0
- package/dist/node/Config.js.map +1 -1
- package/dist/node/Plugin.d.cts +3 -0
- package/dist/node/Plugin.d.cts.map +1 -0
- package/dist/node/Plugin.js +37 -5
- package/dist/node/Plugin.js.map +1 -1
- package/dist/node/Plugin.mjs +35 -4
- package/dist/node/Plugin.mjs.map +1 -1
- package/dist/node/Schema.d.cts +3 -0
- package/dist/node/Schema.d.cts.map +1 -0
- package/dist/node/Schema.js +3 -1
- package/dist/node/Schema.js.map +1 -1
- package/dist/node/Schema.mjs +2 -1
- package/dist/node/Schema.mjs.map +1 -1
- package/dist/node/Witness.d.cts +10 -0
- package/dist/node/Witness.d.cts.map +1 -0
- package/dist/node/Witness.js +20 -6
- package/dist/node/Witness.js.map +1 -1
- package/dist/node/Witness.mjs +17 -4
- package/dist/node/Witness.mjs.map +1 -1
- package/dist/node/index.d.cts +7 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +54 -10
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +47 -4
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/lib/getGasFromBlocknative.d.cts +3 -0
- package/dist/node/lib/getGasFromBlocknative.d.cts.map +1 -0
- package/dist/node/lib/getGasFromBlocknative.js +6 -4
- package/dist/node/lib/getGasFromBlocknative.js.map +1 -1
- package/dist/node/lib/getGasFromBlocknative.mjs +5 -4
- package/dist/node/lib/getGasFromBlocknative.mjs.map +1 -1
- package/dist/node/lib/index.d.cts +2 -0
- package/dist/node/lib/index.d.cts.map +1 -0
- package/dist/node/lib/index.js +19 -3
- package/dist/node/lib/index.js.map +1 -1
- package/dist/node/lib/index.mjs +11 -1
- package/dist/node/lib/index.mjs.map +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TimestampWitnessConfig } from '@xyo-network/witness';
|
|
2
|
+
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema';
|
|
3
|
+
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
4
|
+
schema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,EAAE,yCAAyC,EAAE,MAAM,UAAU,CAAA;AAEpE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;IACvE,MAAM,EAAE,yCAAyC,CAAA;CAClD,CAAC,CAAA"}
|
package/dist/node/Config.js
CHANGED
|
@@ -12,6 +12,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
12
12
|
return to;
|
|
13
13
|
};
|
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/Config.ts
|
|
15
17
|
var Config_exports = {};
|
|
16
18
|
module.exports = __toCommonJS(Config_exports);
|
|
17
19
|
//# sourceMappingURL=Config.js.map
|
package/dist/node/Config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Config.ts"],"sourcesContent":["import { TimestampWitnessConfig } from '@xyo-network/witness'\n\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{\n schema: EthereumGasBlocknativeWitnessConfigSchema\n}>\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Config.ts"],"sourcesContent":["import { TimestampWitnessConfig } from '@xyo-network/witness'\n\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{\n schema: EthereumGasBlocknativeWitnessConfigSchema\n}>\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAA;AAEzD,eAAO,MAAM,4BAA4B,uGAQtC,CAAA"}
|
package/dist/node/Plugin.js
CHANGED
|
@@ -16,20 +16,52 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/Plugin.ts
|
|
19
21
|
var Plugin_exports = {};
|
|
20
22
|
__export(Plugin_exports, {
|
|
21
23
|
EthereumGasBlocknativePlugin: () => EthereumGasBlocknativePlugin
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(Plugin_exports);
|
|
24
|
-
var
|
|
26
|
+
var import_blocknative_ethereum_gas_payload_plugin2 = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
|
|
25
27
|
var import_payload_model = require("@xyo-network/payload-model");
|
|
26
28
|
var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
// src/Witness.ts
|
|
31
|
+
var import_blocknative_ethereum_gas_payload_plugin = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
|
|
32
|
+
var import_payload_builder = require("@xyo-network/payload-builder");
|
|
33
|
+
var import_witness = require("@xyo-network/witness");
|
|
34
|
+
|
|
35
|
+
// src/lib/getGasFromBlocknative.ts
|
|
36
|
+
var import_axios = require("@xyo-network/axios");
|
|
37
|
+
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
38
|
+
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
39
|
+
var config = { headers: { Authorization } };
|
|
40
|
+
var getGasFromBlocknative = async () => {
|
|
41
|
+
return (await import_axios.axios.get(url, config)).data;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// src/Schema.ts
|
|
45
|
+
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
46
|
+
|
|
47
|
+
// src/Witness.ts
|
|
48
|
+
var EthereumGasBlocknativeWitness = class extends import_witness.AbstractWitness {
|
|
49
|
+
static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
|
|
50
|
+
async observeHandler() {
|
|
51
|
+
const fields = await getGasFromBlocknative();
|
|
52
|
+
const payload = new import_payload_builder.PayloadBuilder({
|
|
53
|
+
schema: import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema
|
|
54
|
+
}).fields(fields).build();
|
|
55
|
+
return [payload];
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// src/Plugin.ts
|
|
60
|
+
var EthereumGasBlocknativePlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
61
|
+
{ required: { [import_blocknative_ethereum_gas_payload_plugin2.EthereumGasBlocknativeSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
30
62
|
{
|
|
31
63
|
witness: async (params) => {
|
|
32
|
-
return await
|
|
64
|
+
return await EthereumGasBlocknativeWitness.create(params);
|
|
33
65
|
}
|
|
34
66
|
}
|
|
35
67
|
);
|
package/dist/node/Plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { AbstractWitness, TimestampWitnessParams } from '@xyo-network/witness'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,qDAA4E;AAE5E,6BAA+B;AAE/B,qBAAwD;;;ACJxD,mBAAsB;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,mBAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFSK,IAAM,gCAAN,cAA4C,+BAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,sCAA8C;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,+BAA+B,UAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,4EAA4B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":["import_blocknative_ethereum_gas_payload_plugin"]}
|
package/dist/node/Plugin.mjs
CHANGED
|
@@ -1,9 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
// src/Plugin.ts
|
|
2
|
+
import { EthereumGasBlocknativeSchema as EthereumGasBlocknativeSchema2 } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
|
|
2
3
|
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
3
4
|
import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
// src/Witness.ts
|
|
7
|
+
import { EthereumGasBlocknativeSchema } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
|
|
8
|
+
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
9
|
+
import { AbstractWitness } from "@xyo-network/witness";
|
|
10
|
+
|
|
11
|
+
// src/lib/getGasFromBlocknative.ts
|
|
12
|
+
import { axios } from "@xyo-network/axios";
|
|
13
|
+
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
14
|
+
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
15
|
+
var config = { headers: { Authorization } };
|
|
16
|
+
var getGasFromBlocknative = async () => {
|
|
17
|
+
return (await axios.get(url, config)).data;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/Schema.ts
|
|
21
|
+
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
22
|
+
|
|
23
|
+
// src/Witness.ts
|
|
24
|
+
var EthereumGasBlocknativeWitness = class extends AbstractWitness {
|
|
25
|
+
static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
|
|
26
|
+
async observeHandler() {
|
|
27
|
+
const fields = await getGasFromBlocknative();
|
|
28
|
+
const payload = new PayloadBuilder({
|
|
29
|
+
schema: EthereumGasBlocknativeSchema
|
|
30
|
+
}).fields(fields).build();
|
|
31
|
+
return [payload];
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/Plugin.ts
|
|
36
|
+
var EthereumGasBlocknativePlugin = () => createPayloadSetWitnessPlugin(
|
|
37
|
+
{ required: { [EthereumGasBlocknativeSchema2]: 1 }, schema: PayloadSetSchema },
|
|
7
38
|
{
|
|
8
39
|
witness: async (params) => {
|
|
9
40
|
return await EthereumGasBlocknativeWitness.create(params);
|
package/dist/node/Plugin.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n"],"mappings":"AAAA,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { AbstractWitness, TimestampWitnessParams } from '@xyo-network/witness'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;AAE/B,SAAS,uBAA+C;;;ACJxD,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFSK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,eAA8C;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yCAAyC,GAAG,gEAAgE,CAAA;AACxH,eAAO,MAAM,yCAAyC,EAAE,yCACU,CAAA"}
|
package/dist/node/Schema.js
CHANGED
|
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/Schema.ts
|
|
19
21
|
var Schema_exports = {};
|
|
20
22
|
__export(Schema_exports, {
|
|
21
23
|
EthereumGasBlocknativeWitnessConfigSchema: () => EthereumGasBlocknativeWitnessConfigSchema
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(Schema_exports);
|
|
24
|
-
|
|
26
|
+
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
25
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
28
|
0 && (module.exports = {
|
|
27
29
|
EthereumGasBlocknativeWitnessConfigSchema
|
package/dist/node/Schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAM,4CACX;","names":[]}
|
package/dist/node/Schema.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// src/Schema.ts
|
|
2
|
+
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
2
3
|
export {
|
|
3
4
|
EthereumGasBlocknativeWitnessConfigSchema
|
|
4
5
|
};
|
package/dist/node/Schema.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":"AACO,
|
|
1
|
+
{"version":3,"sources":["../../src/Schema.ts"],"sourcesContent":["export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";AACO,IAAM,4CACX;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnyConfigSchema } from '@xyo-network/module';
|
|
2
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { AbstractWitness, TimestampWitnessParams } from '@xyo-network/witness';
|
|
4
|
+
import { EthereumGasBlocknativeWitnessConfig } from './Config';
|
|
5
|
+
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
6
|
+
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
7
|
+
static configSchemas: "network.xyo.blockchain.ethereum.gas.blocknative.witness.config"[];
|
|
8
|
+
protected observeHandler(): Promise<Payload[]>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE9E,OAAO,EAAE,mCAAmC,EAAE,MAAM,UAAU,CAAA;AAI9D,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC,eAAe,CAAC,mCAAmC,CAAC,CAAC,CAAA;AAC9H,qBAAa,6BAA8B,SAAQ,eAAe,CAAC,mCAAmC,CAAC;IACrG,OAAgB,aAAa,qEAA8C;cAElD,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAS9D"}
|
package/dist/node/Witness.js
CHANGED
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/Witness.ts
|
|
19
21
|
var Witness_exports = {};
|
|
20
22
|
__export(Witness_exports, {
|
|
21
23
|
EthereumGasBlocknativeWitness: () => EthereumGasBlocknativeWitness
|
|
@@ -24,18 +26,30 @@ module.exports = __toCommonJS(Witness_exports);
|
|
|
24
26
|
var import_blocknative_ethereum_gas_payload_plugin = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
|
|
25
27
|
var import_payload_builder = require("@xyo-network/payload-builder");
|
|
26
28
|
var import_witness = require("@xyo-network/witness");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
|
|
30
|
+
// src/lib/getGasFromBlocknative.ts
|
|
31
|
+
var import_axios = require("@xyo-network/axios");
|
|
32
|
+
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
33
|
+
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
34
|
+
var config = { headers: { Authorization } };
|
|
35
|
+
var getGasFromBlocknative = async () => {
|
|
36
|
+
return (await import_axios.axios.get(url, config)).data;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/Schema.ts
|
|
40
|
+
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
41
|
+
|
|
42
|
+
// src/Witness.ts
|
|
43
|
+
var EthereumGasBlocknativeWitness = class extends import_witness.AbstractWitness {
|
|
44
|
+
static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
|
|
31
45
|
async observeHandler() {
|
|
32
|
-
const fields = await
|
|
46
|
+
const fields = await getGasFromBlocknative();
|
|
33
47
|
const payload = new import_payload_builder.PayloadBuilder({
|
|
34
48
|
schema: import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema
|
|
35
49
|
}).fields(fields).build();
|
|
36
50
|
return [payload];
|
|
37
51
|
}
|
|
38
|
-
}
|
|
52
|
+
};
|
|
39
53
|
// Annotate the CommonJS export names for ESM import in node:
|
|
40
54
|
0 && (module.exports = {
|
|
41
55
|
EthereumGasBlocknativeWitness
|
package/dist/node/Witness.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Witness.ts"],"sourcesContent":["import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { AbstractWitness, TimestampWitnessParams } from '@xyo-network/witness'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { AbstractWitness, TimestampWitnessParams } from '@xyo-network/witness'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qDAA4E;AAE5E,6BAA+B;AAE/B,qBAAwD;;;ACJxD,mBAAsB;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,mBAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFSK,IAAM,gCAAN,cAA4C,+BAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,sCAA8C;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;","names":[]}
|
package/dist/node/Witness.mjs
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
|
+
// src/Witness.ts
|
|
1
2
|
import { EthereumGasBlocknativeSchema } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
|
|
2
3
|
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
3
4
|
import { AbstractWitness } from "@xyo-network/witness";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
// src/lib/getGasFromBlocknative.ts
|
|
7
|
+
import { axios } from "@xyo-network/axios";
|
|
8
|
+
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
9
|
+
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
10
|
+
var config = { headers: { Authorization } };
|
|
11
|
+
var getGasFromBlocknative = async () => {
|
|
12
|
+
return (await axios.get(url, config)).data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// src/Schema.ts
|
|
16
|
+
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
17
|
+
|
|
18
|
+
// src/Witness.ts
|
|
19
|
+
var EthereumGasBlocknativeWitness = class extends AbstractWitness {
|
|
7
20
|
static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
|
|
8
21
|
async observeHandler() {
|
|
9
22
|
const fields = await getGasFromBlocknative();
|
|
@@ -12,7 +25,7 @@ class EthereumGasBlocknativeWitness extends AbstractWitness {
|
|
|
12
25
|
}).fields(fields).build();
|
|
13
26
|
return [payload];
|
|
14
27
|
}
|
|
15
|
-
}
|
|
28
|
+
};
|
|
16
29
|
export {
|
|
17
30
|
EthereumGasBlocknativeWitness
|
|
18
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Witness.ts"],"sourcesContent":["import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { AbstractWitness, TimestampWitnessParams } from '@xyo-network/witness'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n"],"mappings":"AAAA,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;AAE/B,SAAS,uBAA+C
|
|
1
|
+
{"version":3,"sources":["../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { AbstractWitness, TimestampWitnessParams } from '@xyo-network/witness'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";AAAA,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;AAE/B,SAAS,uBAA+C;;;ACJxD,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFSK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,eAA8C;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EthereumGasBlocknativePlugin } from './Plugin';
|
|
2
|
+
export * from './Config';
|
|
3
|
+
export * from './Schema';
|
|
4
|
+
export * from './Witness';
|
|
5
|
+
export { EthereumGasBlocknativePlugin };
|
|
6
|
+
export default EthereumGasBlocknativePlugin;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAEvD,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,4BAA4B,EAAE,CAAA;AAGvC,eAAe,4BAA4B,CAAA"}
|
package/dist/node/index.js
CHANGED
|
@@ -15,24 +15,68 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
20
21
|
var src_exports = {};
|
|
21
22
|
__export(src_exports, {
|
|
22
|
-
EthereumGasBlocknativePlugin: () =>
|
|
23
|
+
EthereumGasBlocknativePlugin: () => EthereumGasBlocknativePlugin,
|
|
24
|
+
EthereumGasBlocknativeWitness: () => EthereumGasBlocknativeWitness,
|
|
25
|
+
EthereumGasBlocknativeWitnessConfigSchema: () => EthereumGasBlocknativeWitnessConfigSchema,
|
|
23
26
|
default: () => src_default
|
|
24
27
|
});
|
|
25
28
|
module.exports = __toCommonJS(src_exports);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var
|
|
29
|
+
|
|
30
|
+
// src/Plugin.ts
|
|
31
|
+
var import_blocknative_ethereum_gas_payload_plugin2 = require("@xyo-network/blocknative-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_blocknative_ethereum_gas_payload_plugin = require("@xyo-network/blocknative-ethereum-gas-payload-plugin");
|
|
37
|
+
var import_payload_builder = require("@xyo-network/payload-builder");
|
|
38
|
+
var import_witness = require("@xyo-network/witness");
|
|
39
|
+
|
|
40
|
+
// src/lib/getGasFromBlocknative.ts
|
|
41
|
+
var import_axios = require("@xyo-network/axios");
|
|
42
|
+
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
43
|
+
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
44
|
+
var config = { headers: { Authorization } };
|
|
45
|
+
var getGasFromBlocknative = async () => {
|
|
46
|
+
return (await import_axios.axios.get(url, config)).data;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// src/Schema.ts
|
|
50
|
+
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
51
|
+
|
|
52
|
+
// src/Witness.ts
|
|
53
|
+
var EthereumGasBlocknativeWitness = class extends import_witness.AbstractWitness {
|
|
54
|
+
static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
|
|
55
|
+
async observeHandler() {
|
|
56
|
+
const fields = await getGasFromBlocknative();
|
|
57
|
+
const payload = new import_payload_builder.PayloadBuilder({
|
|
58
|
+
schema: import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema
|
|
59
|
+
}).fields(fields).build();
|
|
60
|
+
return [payload];
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// src/Plugin.ts
|
|
65
|
+
var EthereumGasBlocknativePlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
66
|
+
{ required: { [import_blocknative_ethereum_gas_payload_plugin2.EthereumGasBlocknativeSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
67
|
+
{
|
|
68
|
+
witness: async (params) => {
|
|
69
|
+
return await EthereumGasBlocknativeWitness.create(params);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
// src/index.ts
|
|
75
|
+
var src_default = EthereumGasBlocknativePlugin;
|
|
31
76
|
// Annotate the CommonJS export names for ESM import in node:
|
|
32
77
|
0 && (module.exports = {
|
|
33
78
|
EthereumGasBlocknativePlugin,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
...require("./Witness")
|
|
79
|
+
EthereumGasBlocknativeWitness,
|
|
80
|
+
EthereumGasBlocknativeWitnessConfigSchema
|
|
37
81
|
});
|
|
38
82
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n","import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { AbstractWitness, TimestampWitnessParams } from '@xyo-network/witness'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,qDAA4E;AAE5E,6BAA+B;AAE/B,qBAAwD;;;ACJxD,mBAAsB;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,mBAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFSK,IAAM,gCAAN,cAA4C,+BAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,sCAA8C;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,+BAA+B,UAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,4EAA4B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;;;ADLF,IAAO,cAAQ;","names":["import_blocknative_ethereum_gas_payload_plugin"]}
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,10 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// src/Plugin.ts
|
|
2
|
+
import { EthereumGasBlocknativeSchema as EthereumGasBlocknativeSchema2 } from "@xyo-network/blocknative-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 { EthereumGasBlocknativeSchema } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
|
|
8
|
+
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
9
|
+
import { AbstractWitness } from "@xyo-network/witness";
|
|
10
|
+
|
|
11
|
+
// src/lib/getGasFromBlocknative.ts
|
|
12
|
+
import { axios } from "@xyo-network/axios";
|
|
13
|
+
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
14
|
+
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
15
|
+
var config = { headers: { Authorization } };
|
|
16
|
+
var getGasFromBlocknative = async () => {
|
|
17
|
+
return (await axios.get(url, config)).data;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/Schema.ts
|
|
21
|
+
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
22
|
+
|
|
23
|
+
// src/Witness.ts
|
|
24
|
+
var EthereumGasBlocknativeWitness = class extends AbstractWitness {
|
|
25
|
+
static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
|
|
26
|
+
async observeHandler() {
|
|
27
|
+
const fields = await getGasFromBlocknative();
|
|
28
|
+
const payload = new PayloadBuilder({
|
|
29
|
+
schema: EthereumGasBlocknativeSchema
|
|
30
|
+
}).fields(fields).build();
|
|
31
|
+
return [payload];
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/Plugin.ts
|
|
36
|
+
var EthereumGasBlocknativePlugin = () => createPayloadSetWitnessPlugin(
|
|
37
|
+
{ required: { [EthereumGasBlocknativeSchema2]: 1 }, schema: PayloadSetSchema },
|
|
38
|
+
{
|
|
39
|
+
witness: async (params) => {
|
|
40
|
+
return await EthereumGasBlocknativeWitness.create(params);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// src/index.ts
|
|
5
46
|
var src_default = EthereumGasBlocknativePlugin;
|
|
6
47
|
export {
|
|
7
48
|
EthereumGasBlocknativePlugin,
|
|
49
|
+
EthereumGasBlocknativeWitness,
|
|
50
|
+
EthereumGasBlocknativeWitnessConfigSchema,
|
|
8
51
|
src_default as default
|
|
9
52
|
};
|
|
10
53
|
//# sourceMappingURL=index.mjs.map
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n"],"mappings":"AAAA,SAAS,oCAAoC;
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts","../../src/index.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { AbstractWitness, TimestampWitnessParams } from '@xyo-network/witness'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xyo-network/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n","import { EthereumGasBlocknativePlugin } from './Plugin'\n\nexport * from './Config'\nexport * from './Schema'\nexport * from './Witness'\n\nexport { EthereumGasBlocknativePlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default EthereumGasBlocknativePlugin\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;AAE/B,SAAS,uBAA+C;;;ACJxD,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFSK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,eAA8C;AAAA,MAChE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;;;AILF,IAAO,cAAQ;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getGasFromBlocknative.d.ts","sourceRoot":"","sources":["../../../src/lib/getGasFromBlocknative.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAA;AAOrG,eAAO,MAAM,qBAAqB,QAAa,QAAQ,8BAA8B,CAEpF,CAAA"}
|
|
@@ -16,16 +16,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/lib/getGasFromBlocknative.ts
|
|
19
21
|
var getGasFromBlocknative_exports = {};
|
|
20
22
|
__export(getGasFromBlocknative_exports, {
|
|
21
23
|
getGasFromBlocknative: () => getGasFromBlocknative
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(getGasFromBlocknative_exports);
|
|
24
26
|
var import_axios = require("@xyo-network/axios");
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
28
|
+
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
29
|
+
var config = { headers: { Authorization } };
|
|
30
|
+
var getGasFromBlocknative = async () => {
|
|
29
31
|
return (await import_axios.axios.get(url, config)).data;
|
|
30
32
|
};
|
|
31
33
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/getGasFromBlocknative.ts"],"sourcesContent":["import { axios } from '@xyo-network/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/getGasFromBlocknative.ts"],"sourcesContent":["import { axios } from '@xyo-network/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsB;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,mBAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;","names":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
// src/lib/getGasFromBlocknative.ts
|
|
1
2
|
import { axios } from "@xyo-network/axios";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
4
|
+
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
5
|
+
var config = { headers: { Authorization } };
|
|
6
|
+
var getGasFromBlocknative = async () => {
|
|
6
7
|
return (await axios.get(url, config)).data;
|
|
7
8
|
};
|
|
8
9
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/getGasFromBlocknative.ts"],"sourcesContent":["import { axios } from '@xyo-network/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n"],"mappings":"AAAA,SAAS,aAAa;AAGtB,
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/getGasFromBlocknative.ts"],"sourcesContent":["import { axios } from '@xyo-network/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n"],"mappings":";AAAA,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}
|