@xyo-network/blocknative-ethereum-gas-plugin 2.99.4 → 2.99.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/Config.d.cts +1 -1
- package/dist/browser/Config.d.mts +1 -1
- package/dist/browser/Config.d.ts +1 -1
- package/dist/browser/Plugin.d.cts +1 -1
- package/dist/browser/Plugin.d.mts +1 -1
- package/dist/browser/Plugin.d.ts +1 -1
- package/dist/browser/Schema.d.cts.map +1 -1
- package/dist/browser/Schema.d.mts.map +1 -1
- package/dist/browser/Schema.d.ts.map +1 -1
- package/dist/browser/Witness.d.cts +1 -1
- package/dist/browser/Witness.d.mts +1 -1
- package/dist/browser/Witness.d.ts +1 -1
- package/dist/browser/index.cjs +28 -13
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +4 -4
- package/dist/browser/index.d.mts +4 -4
- package/dist/browser/index.d.ts +4 -4
- package/dist/browser/{index.js → index.mjs} +31 -14
- package/dist/{node/index.js.map → browser/index.mjs.map} +1 -1
- package/dist/browser/lib/index.d.cts +1 -1
- package/dist/browser/lib/index.d.mts +1 -1
- package/dist/browser/lib/index.d.ts +1 -1
- package/dist/neutral/Config.d.cts +1 -1
- package/dist/neutral/Config.d.mts +1 -1
- package/dist/neutral/Config.d.ts +1 -1
- package/dist/neutral/Plugin.d.cts +1 -1
- package/dist/neutral/Plugin.d.mts +1 -1
- package/dist/neutral/Plugin.d.ts +1 -1
- package/dist/neutral/Schema.d.cts.map +1 -1
- package/dist/neutral/Schema.d.mts.map +1 -1
- package/dist/neutral/Schema.d.ts.map +1 -1
- package/dist/neutral/Witness.d.cts +1 -1
- package/dist/neutral/Witness.d.mts +1 -1
- package/dist/neutral/Witness.d.ts +1 -1
- package/dist/neutral/index.cjs +28 -13
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +4 -4
- package/dist/neutral/index.d.mts +4 -4
- package/dist/neutral/index.d.ts +4 -4
- package/dist/{node/index.js → neutral/index.mjs} +31 -14
- package/dist/{browser/index.js.map → neutral/index.mjs.map} +1 -1
- package/dist/neutral/lib/index.d.cts +1 -1
- package/dist/neutral/lib/index.d.mts +1 -1
- package/dist/neutral/lib/index.d.ts +1 -1
- package/dist/node/Config.d.cts +1 -1
- package/dist/node/Config.d.mts +1 -1
- package/dist/node/Config.d.ts +1 -1
- package/dist/node/Plugin.d.cts +1 -1
- package/dist/node/Plugin.d.mts +1 -1
- package/dist/node/Plugin.d.ts +1 -1
- package/dist/node/Schema.d.cts.map +1 -1
- package/dist/node/Schema.d.mts.map +1 -1
- package/dist/node/Schema.d.ts.map +1 -1
- package/dist/node/Witness.d.cts +1 -1
- package/dist/node/Witness.d.mts +1 -1
- package/dist/node/Witness.d.ts +1 -1
- package/dist/node/index.cjs +34 -15
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +4 -4
- package/dist/node/index.d.mts +4 -4
- package/dist/node/index.d.ts +4 -4
- package/dist/node/index.mjs +72 -0
- package/dist/{neutral/index.js.map → node/index.mjs.map} +1 -1
- package/dist/node/lib/index.d.cts +1 -1
- package/dist/node/lib/index.d.mts +1 -1
- package/dist/node/lib/index.d.ts +1 -1
- package/package.json +16 -16
- package/src/Config.ts +1 -1
- package/src/Plugin.ts +1 -1
- package/src/Schema.ts +2 -2
- package/src/Witness.ts +3 -3
- package/src/index.ts +4 -4
- package/src/lib/index.ts +1 -1
- package/dist/neutral/index.js +0 -51
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
|
|
2
|
-
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
4
4
|
schema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
5
5
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
|
|
2
|
-
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
4
4
|
schema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
5
5
|
}>;
|
package/dist/browser/Config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
|
|
2
|
-
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
4
4
|
schema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
5
5
|
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EthereumGasBlocknativeWitness } from './Witness.
|
|
1
|
+
import { EthereumGasBlocknativeWitness } from './Witness.ts';
|
|
2
2
|
export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
|
|
3
3
|
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EthereumGasBlocknativeWitness } from './Witness.
|
|
1
|
+
import { EthereumGasBlocknativeWitness } from './Witness.ts';
|
|
2
2
|
export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
|
|
3
3
|
//# sourceMappingURL=Plugin.d.ts.map
|
package/dist/browser/Plugin.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EthereumGasBlocknativeWitness } from './Witness.
|
|
1
|
+
import { EthereumGasBlocknativeWitness } from './Witness.ts';
|
|
2
2
|
export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
|
|
3
3
|
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -1 +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,
|
|
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,yCACY,CAAA"}
|
|
@@ -1 +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,
|
|
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,yCACY,CAAA"}
|
|
@@ -1 +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,
|
|
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,yCACY,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
|
-
import { EthereumGasBlocknativeWitnessConfig } from './Config.
|
|
5
|
+
import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
|
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
|
-
import { EthereumGasBlocknativeWitnessConfig } from './Config.
|
|
5
|
+
import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
|
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
|
-
import { EthereumGasBlocknativeWitnessConfig } from './Config.
|
|
5
|
+
import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
package/dist/browser/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
7
|
var __export = (target, all) => {
|
|
7
8
|
for (var name in all)
|
|
8
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -41,34 +42,48 @@ var import_payload_builder = require("@xyo-network/payload-builder");
|
|
|
41
42
|
var import_axios = require("@xylabs/axios");
|
|
42
43
|
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
43
44
|
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
44
|
-
var config = {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
var config = {
|
|
46
|
+
headers: {
|
|
47
|
+
Authorization
|
|
48
|
+
}
|
|
47
49
|
};
|
|
50
|
+
var getGasFromBlocknative = /* @__PURE__ */ __name(async () => {
|
|
51
|
+
return (await import_axios.axios.get(url, config)).data;
|
|
52
|
+
}, "getGasFromBlocknative");
|
|
48
53
|
|
|
49
54
|
// src/Schema.ts
|
|
50
55
|
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
51
56
|
|
|
52
57
|
// src/Witness.ts
|
|
53
58
|
var EthereumGasBlocknativeWitness = class extends import_abstract_witness.AbstractWitness {
|
|
54
|
-
static
|
|
59
|
+
static {
|
|
60
|
+
__name(this, "EthereumGasBlocknativeWitness");
|
|
61
|
+
}
|
|
62
|
+
static configSchemas = [
|
|
63
|
+
...super.configSchemas,
|
|
64
|
+
EthereumGasBlocknativeWitnessConfigSchema
|
|
65
|
+
];
|
|
55
66
|
static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
|
|
56
67
|
async observeHandler() {
|
|
57
68
|
const fields = await getGasFromBlocknative();
|
|
58
69
|
const payload = await new import_payload_builder.PayloadBuilder({
|
|
59
70
|
schema: import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema
|
|
60
71
|
}).fields(fields).build();
|
|
61
|
-
return [
|
|
72
|
+
return [
|
|
73
|
+
payload
|
|
74
|
+
];
|
|
62
75
|
}
|
|
63
76
|
};
|
|
64
77
|
|
|
65
78
|
// src/Plugin.ts
|
|
66
|
-
var EthereumGasBlocknativePlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
);
|
|
79
|
+
var EthereumGasBlocknativePlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
|
|
80
|
+
required: {
|
|
81
|
+
[import_blocknative_ethereum_gas_payload_plugin2.EthereumGasBlocknativeSchema]: 1
|
|
82
|
+
},
|
|
83
|
+
schema: import_payload_model.PayloadSetSchema
|
|
84
|
+
}, {
|
|
85
|
+
witness: /* @__PURE__ */ __name(async (params) => {
|
|
86
|
+
return await EthereumGasBlocknativeWitness.create(params);
|
|
87
|
+
}, "witness")
|
|
88
|
+
}), "EthereumGasBlocknativePlugin");
|
|
74
89
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\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.ts'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config.ts'\nimport { getGasFromBlocknative } from './lib/index.ts'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasBlocknativeWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,mBAAsB;AAGtB,IAAMC,MAAM;AAEZ,IAAMC,gBAAgB;AACtB,IAAMC,SAAS;EAAEC,SAAS;IAAEF;EAAc;AAAE;AAErC,IAAMG,wBAAwB,mCAAA;AACnC,UAAQ,MAAMC,mBAAMC,IAAoCN,KAAKE,MAAAA,GAASK;AACxE,GAFqC;;;ACP9B,IAAMC,4CACT;;;AFUG,IAAMC,gCAAN,cAA4CC,wCAAAA;EAZnD,OAYmDA;;;EACjD,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,SAAS,MAAMC,sBAAAA;AACrB,UAAMC,UAAU,MAAM,IAAIC,sCAA8C;MACtEC,QAAQC;IACV,CAAA,EACGL,OAAOA,MAAAA,EACPM,MAAK;AACR,WAAO;MAACJ;;EACV;AACF;;;ADnBO,IAAMK,+BAA+B,iCAC1CC,wDACE;EAAEC,UAAU;IAAE,CAACC,4EAAAA,GAA+B;EAAE;EAAGC,QAAQC;AAAiB,GAC5E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,8BAA8BC,OAAOF,MAAAA;EACrD,GAFS;AAGX,CAAA,GAPwC;","names":["import_blocknative_ethereum_gas_payload_plugin","url","Authorization","config","headers","getGasFromBlocknative","axios","get","data","EthereumGasBlocknativeWitnessConfigSchema","EthereumGasBlocknativeWitness","AbstractWitness","configSchemas","EthereumGasBlocknativeWitnessConfigSchema","defaultConfigSchema","observeHandler","fields","getGasFromBlocknative","payload","PayloadBuilder","schema","EthereumGasBlocknativeSchema","build","EthereumGasBlocknativePlugin","createPayloadSetWitnessPlugin","required","EthereumGasBlocknativeSchema","schema","PayloadSetSchema","witness","params","EthereumGasBlocknativeWitness","create"]}
|
package/dist/browser/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
1
4
|
// src/Plugin.ts
|
|
2
5
|
import { EthereumGasBlocknativeSchema as EthereumGasBlocknativeSchema2 } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
|
|
3
6
|
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
@@ -12,40 +15,54 @@ import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
|
12
15
|
import { axios } from "@xylabs/axios";
|
|
13
16
|
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
14
17
|
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
15
|
-
var config = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
var config = {
|
|
19
|
+
headers: {
|
|
20
|
+
Authorization
|
|
21
|
+
}
|
|
18
22
|
};
|
|
23
|
+
var getGasFromBlocknative = /* @__PURE__ */ __name(async () => {
|
|
24
|
+
return (await axios.get(url, config)).data;
|
|
25
|
+
}, "getGasFromBlocknative");
|
|
19
26
|
|
|
20
27
|
// src/Schema.ts
|
|
21
28
|
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
22
29
|
|
|
23
30
|
// src/Witness.ts
|
|
24
31
|
var EthereumGasBlocknativeWitness = class extends AbstractWitness {
|
|
25
|
-
static
|
|
32
|
+
static {
|
|
33
|
+
__name(this, "EthereumGasBlocknativeWitness");
|
|
34
|
+
}
|
|
35
|
+
static configSchemas = [
|
|
36
|
+
...super.configSchemas,
|
|
37
|
+
EthereumGasBlocknativeWitnessConfigSchema
|
|
38
|
+
];
|
|
26
39
|
static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
|
|
27
40
|
async observeHandler() {
|
|
28
41
|
const fields = await getGasFromBlocknative();
|
|
29
42
|
const payload = await new PayloadBuilder({
|
|
30
43
|
schema: EthereumGasBlocknativeSchema
|
|
31
44
|
}).fields(fields).build();
|
|
32
|
-
return [
|
|
45
|
+
return [
|
|
46
|
+
payload
|
|
47
|
+
];
|
|
33
48
|
}
|
|
34
49
|
};
|
|
35
50
|
|
|
36
51
|
// src/Plugin.ts
|
|
37
|
-
var EthereumGasBlocknativePlugin = () => createPayloadSetWitnessPlugin(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
);
|
|
52
|
+
var EthereumGasBlocknativePlugin = /* @__PURE__ */ __name(() => createPayloadSetWitnessPlugin({
|
|
53
|
+
required: {
|
|
54
|
+
[EthereumGasBlocknativeSchema2]: 1
|
|
55
|
+
},
|
|
56
|
+
schema: PayloadSetSchema
|
|
57
|
+
}, {
|
|
58
|
+
witness: /* @__PURE__ */ __name(async (params) => {
|
|
59
|
+
return await EthereumGasBlocknativeWitness.create(params);
|
|
60
|
+
}, "witness")
|
|
61
|
+
}), "EthereumGasBlocknativePlugin");
|
|
45
62
|
export {
|
|
46
63
|
EthereumGasBlocknativePlugin,
|
|
47
64
|
EthereumGasBlocknativeWitness,
|
|
48
65
|
EthereumGasBlocknativeWitnessConfigSchema,
|
|
49
66
|
EthereumGasBlocknativePlugin as default
|
|
50
67
|
};
|
|
51
|
-
//# sourceMappingURL=index.
|
|
68
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness.
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness.ts'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config.ts'\nimport { getGasFromBlocknative } from './lib/index.ts'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasBlocknativeWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;AAAA,SAASA,gCAAAA,qCAAoC;AAC7C,SAASC,wBAAwB;AACjC,SAASC,qCAAqC;;;ACF9C,SAASC,uBAAuB;AAChC,SAAwCC,oCAAoC;AAE5E,SAASC,sBAAsB;;;ACH/B,SAASC,aAAa;AAGtB,IAAMC,MAAM;AAEZ,IAAMC,gBAAgB;AACtB,IAAMC,SAAS;EAAEC,SAAS;IAAEF;EAAc;AAAE;AAErC,IAAMG,wBAAwB,mCAAA;AACnC,UAAQ,MAAMC,MAAMC,IAAoCN,KAAKE,MAAAA,GAASK;AACxE,GAFqC;;;ACP9B,IAAMC,4CACT;;;AFUG,IAAMC,gCAAN,cAA4CC,gBAAAA;EAZnD,OAYmDA;;;EACjD,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,SAAS,MAAMC,sBAAAA;AACrB,UAAMC,UAAU,MAAM,IAAIC,eAA8C;MACtEC,QAAQC;IACV,CAAA,EACGL,OAAOA,MAAAA,EACPM,MAAK;AACR,WAAO;MAACJ;;EACV;AACF;;;ADnBO,IAAMK,+BAA+B,6BAC1CC,8BACE;EAAEC,UAAU;IAAE,CAACC,6BAAAA,GAA+B;EAAE;EAAGC,QAAQC;AAAiB,GAC5E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,8BAA8BC,OAAOF,MAAAA;EACrD,GAFS;AAGX,CAAA,GAPwC;","names":["EthereumGasBlocknativeSchema","PayloadSetSchema","createPayloadSetWitnessPlugin","AbstractWitness","EthereumGasBlocknativeSchema","PayloadBuilder","axios","url","Authorization","config","headers","getGasFromBlocknative","axios","get","data","EthereumGasBlocknativeWitnessConfigSchema","EthereumGasBlocknativeWitness","AbstractWitness","configSchemas","EthereumGasBlocknativeWitnessConfigSchema","defaultConfigSchema","observeHandler","fields","getGasFromBlocknative","payload","PayloadBuilder","schema","EthereumGasBlocknativeSchema","build","EthereumGasBlocknativePlugin","createPayloadSetWitnessPlugin","required","EthereumGasBlocknativeSchema","schema","PayloadSetSchema","witness","params","EthereumGasBlocknativeWitness","create"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromBlocknative.
|
|
1
|
+
export * from './getGasFromBlocknative.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromBlocknative.
|
|
1
|
+
export * from './getGasFromBlocknative.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromBlocknative.
|
|
1
|
+
export * from './getGasFromBlocknative.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
|
|
2
|
-
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
4
4
|
schema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
5
5
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
|
|
2
|
-
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
4
4
|
schema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
5
5
|
}>;
|
package/dist/neutral/Config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
|
|
2
|
-
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
4
4
|
schema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
5
5
|
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EthereumGasBlocknativeWitness } from './Witness.
|
|
1
|
+
import { EthereumGasBlocknativeWitness } from './Witness.ts';
|
|
2
2
|
export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
|
|
3
3
|
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EthereumGasBlocknativeWitness } from './Witness.
|
|
1
|
+
import { EthereumGasBlocknativeWitness } from './Witness.ts';
|
|
2
2
|
export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
|
|
3
3
|
//# sourceMappingURL=Plugin.d.ts.map
|
package/dist/neutral/Plugin.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EthereumGasBlocknativeWitness } from './Witness.
|
|
1
|
+
import { EthereumGasBlocknativeWitness } from './Witness.ts';
|
|
2
2
|
export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
|
|
3
3
|
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -1 +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,
|
|
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,yCACY,CAAA"}
|
|
@@ -1 +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,
|
|
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,yCACY,CAAA"}
|
|
@@ -1 +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,
|
|
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,yCACY,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
|
-
import { EthereumGasBlocknativeWitnessConfig } from './Config.
|
|
5
|
+
import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
|
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
|
-
import { EthereumGasBlocknativeWitnessConfig } from './Config.
|
|
5
|
+
import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
|
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
|
-
import { EthereumGasBlocknativeWitnessConfig } from './Config.
|
|
5
|
+
import { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
8
|
static readonly configSchemas: Schema[];
|
package/dist/neutral/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
7
|
var __export = (target, all) => {
|
|
7
8
|
for (var name in all)
|
|
8
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -41,34 +42,48 @@ var import_payload_builder = require("@xyo-network/payload-builder");
|
|
|
41
42
|
var import_axios = require("@xylabs/axios");
|
|
42
43
|
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
43
44
|
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
44
|
-
var config = {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
var config = {
|
|
46
|
+
headers: {
|
|
47
|
+
Authorization
|
|
48
|
+
}
|
|
47
49
|
};
|
|
50
|
+
var getGasFromBlocknative = /* @__PURE__ */ __name(async () => {
|
|
51
|
+
return (await import_axios.axios.get(url, config)).data;
|
|
52
|
+
}, "getGasFromBlocknative");
|
|
48
53
|
|
|
49
54
|
// src/Schema.ts
|
|
50
55
|
var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum.gas.blocknative.witness.config";
|
|
51
56
|
|
|
52
57
|
// src/Witness.ts
|
|
53
58
|
var EthereumGasBlocknativeWitness = class extends import_abstract_witness.AbstractWitness {
|
|
54
|
-
static
|
|
59
|
+
static {
|
|
60
|
+
__name(this, "EthereumGasBlocknativeWitness");
|
|
61
|
+
}
|
|
62
|
+
static configSchemas = [
|
|
63
|
+
...super.configSchemas,
|
|
64
|
+
EthereumGasBlocknativeWitnessConfigSchema
|
|
65
|
+
];
|
|
55
66
|
static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
|
|
56
67
|
async observeHandler() {
|
|
57
68
|
const fields = await getGasFromBlocknative();
|
|
58
69
|
const payload = await new import_payload_builder.PayloadBuilder({
|
|
59
70
|
schema: import_blocknative_ethereum_gas_payload_plugin.EthereumGasBlocknativeSchema
|
|
60
71
|
}).fields(fields).build();
|
|
61
|
-
return [
|
|
72
|
+
return [
|
|
73
|
+
payload
|
|
74
|
+
];
|
|
62
75
|
}
|
|
63
76
|
};
|
|
64
77
|
|
|
65
78
|
// src/Plugin.ts
|
|
66
|
-
var EthereumGasBlocknativePlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
);
|
|
79
|
+
var EthereumGasBlocknativePlugin = /* @__PURE__ */ __name(() => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)({
|
|
80
|
+
required: {
|
|
81
|
+
[import_blocknative_ethereum_gas_payload_plugin2.EthereumGasBlocknativeSchema]: 1
|
|
82
|
+
},
|
|
83
|
+
schema: import_payload_model.PayloadSetSchema
|
|
84
|
+
}, {
|
|
85
|
+
witness: /* @__PURE__ */ __name(async (params) => {
|
|
86
|
+
return await EthereumGasBlocknativeWitness.create(params);
|
|
87
|
+
}, "witness")
|
|
88
|
+
}), "EthereumGasBlocknativePlugin");
|
|
74
89
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\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.ts'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config.ts'\nimport { getGasFromBlocknative } from './lib/index.ts'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasBlocknativeWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema\n = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,mBAAsB;AAGtB,IAAMC,MAAM;AAEZ,IAAMC,gBAAgB;AACtB,IAAMC,SAAS;EAAEC,SAAS;IAAEF;EAAc;AAAE;AAErC,IAAMG,wBAAwB,mCAAA;AACnC,UAAQ,MAAMC,mBAAMC,IAAoCN,KAAKE,MAAAA,GAASK;AACxE,GAFqC;;;ACP9B,IAAMC,4CACT;;;AFUG,IAAMC,gCAAN,cAA4CC,wCAAAA;EAZnD,OAYmDA;;;EACjD,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EAEvD,MAAyBE,iBAAqC;AAC5D,UAAMC,SAAS,MAAMC,sBAAAA;AACrB,UAAMC,UAAU,MAAM,IAAIC,sCAA8C;MACtEC,QAAQC;IACV,CAAA,EACGL,OAAOA,MAAAA,EACPM,MAAK;AACR,WAAO;MAACJ;;EACV;AACF;;;ADnBO,IAAMK,+BAA+B,iCAC1CC,wDACE;EAAEC,UAAU;IAAE,CAACC,4EAAAA,GAA+B;EAAE;EAAGC,QAAQC;AAAiB,GAC5E;EACEC,SAAS,8BAAOC,WAAAA;AACd,WAAQ,MAAMC,8BAA8BC,OAAOF,MAAAA;EACrD,GAFS;AAGX,CAAA,GAPwC;","names":["import_blocknative_ethereum_gas_payload_plugin","url","Authorization","config","headers","getGasFromBlocknative","axios","get","data","EthereumGasBlocknativeWitnessConfigSchema","EthereumGasBlocknativeWitness","AbstractWitness","configSchemas","EthereumGasBlocknativeWitnessConfigSchema","defaultConfigSchema","observeHandler","fields","getGasFromBlocknative","payload","PayloadBuilder","schema","EthereumGasBlocknativeSchema","build","EthereumGasBlocknativePlugin","createPayloadSetWitnessPlugin","required","EthereumGasBlocknativeSchema","schema","PayloadSetSchema","witness","params","EthereumGasBlocknativeWitness","create"]}
|
package/dist/neutral/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/neutral/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|