@xyo-network/blocknative-ethereum-gas-plugin 2.92.0 → 2.93.0
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/Witness.d.cts +3 -2
- package/dist/browser/Witness.d.cts.map +1 -1
- package/dist/browser/Witness.d.mts +3 -2
- package/dist/browser/Witness.d.mts.map +1 -1
- package/dist/browser/Witness.d.ts +3 -2
- package/dist/browser/Witness.d.ts.map +1 -1
- package/dist/browser/index.cjs +2 -1
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +2 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/node/Witness.d.cts +3 -2
- package/dist/node/Witness.d.cts.map +1 -1
- package/dist/node/Witness.d.mts +3 -2
- package/dist/node/Witness.d.mts.map +1 -1
- package/dist/node/Witness.d.ts +3 -2
- package/dist/node/Witness.d.ts.map +1 -1
- package/dist/node/index.cjs +2 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +2 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +13 -13
- package/src/Witness.ts +3 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
5
|
import { EthereumGasBlocknativeWitnessConfig } from './Config';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
|
-
static configSchemas:
|
|
8
|
+
static configSchemas: Schema[];
|
|
9
|
+
static defaultConfigSchema: Schema;
|
|
9
10
|
protected observeHandler(): Promise<Payload[]>;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,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,EAAE,MAAM,EAAE,CAAsE;IAC7G,OAAgB,mBAAmB,EAAE,MAAM,CAA4C;cAE9D,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAS9D"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
5
|
import { EthereumGasBlocknativeWitnessConfig } from './Config';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
|
-
static configSchemas:
|
|
8
|
+
static configSchemas: Schema[];
|
|
9
|
+
static defaultConfigSchema: Schema;
|
|
9
10
|
protected observeHandler(): Promise<Payload[]>;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,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,EAAE,MAAM,EAAE,CAAsE;IAC7G,OAAgB,mBAAmB,EAAE,MAAM,CAA4C;cAE9D,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAS9D"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
5
|
import { EthereumGasBlocknativeWitnessConfig } from './Config';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
|
-
static configSchemas:
|
|
8
|
+
static configSchemas: Schema[];
|
|
9
|
+
static defaultConfigSchema: Schema;
|
|
9
10
|
protected observeHandler(): Promise<Payload[]>;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,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,EAAE,MAAM,EAAE,CAAsE;IAC7G,OAAgB,mBAAmB,EAAE,MAAM,CAA4C;cAE9D,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAS9D"}
|
package/dist/browser/index.cjs
CHANGED
|
@@ -51,7 +51,8 @@ var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum
|
|
|
51
51
|
|
|
52
52
|
// src/Witness.ts
|
|
53
53
|
var EthereumGasBlocknativeWitness = class extends import_abstract_witness.AbstractWitness {
|
|
54
|
-
static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
|
|
54
|
+
static configSchemas = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema];
|
|
55
|
+
static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
|
|
55
56
|
async observeHandler() {
|
|
56
57
|
const fields = await getGasFromBlocknative();
|
|
57
58
|
const payload = await new import_payload_builder.PayloadBuilder({
|
|
@@ -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'\nexport { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Witness'\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 { 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 } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\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 = 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,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;;;AFUK,IAAM,gCAAN,cAA4C,wCAAqD;AAAA,EACtG,OAAgB,
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config'\nexport { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Witness'\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 { 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'\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: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,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;;;AFUK,IAAM,gCAAN,cAA4C,wCAAqD;AAAA,EACtG,OAAgB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EAC5G,OAAgB,sBAA8B;AAAA,EAE9C,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,sCAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADnBO,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/browser/index.js
CHANGED
|
@@ -22,7 +22,8 @@ var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum
|
|
|
22
22
|
|
|
23
23
|
// src/Witness.ts
|
|
24
24
|
var EthereumGasBlocknativeWitness = class extends AbstractWitness {
|
|
25
|
-
static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
|
|
25
|
+
static configSchemas = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema];
|
|
26
|
+
static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
|
|
26
27
|
async observeHandler() {
|
|
27
28
|
const fields = await getGasFromBlocknative();
|
|
28
29
|
const payload = await new PayloadBuilder({
|
|
@@ -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'\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 } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\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 = 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,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,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;;;AFUK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,
|
|
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 { 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'\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: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override 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,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,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;;;AFUK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EAC5G,OAAgB,sBAA8B;AAAA,EAE9C,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,eAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADnBO,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"]}
|
package/dist/node/Witness.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
5
|
import { EthereumGasBlocknativeWitnessConfig } from './Config';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
|
-
static configSchemas:
|
|
8
|
+
static configSchemas: Schema[];
|
|
9
|
+
static defaultConfigSchema: Schema;
|
|
9
10
|
protected observeHandler(): Promise<Payload[]>;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,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,EAAE,MAAM,EAAE,CAAsE;IAC7G,OAAgB,mBAAmB,EAAE,MAAM,CAA4C;cAE9D,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAS9D"}
|
package/dist/node/Witness.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
5
|
import { EthereumGasBlocknativeWitnessConfig } from './Config';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
|
-
static configSchemas:
|
|
8
|
+
static configSchemas: Schema[];
|
|
9
|
+
static defaultConfigSchema: Schema;
|
|
9
10
|
protected observeHandler(): Promise<Payload[]>;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,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,EAAE,MAAM,EAAE,CAAsE;IAC7G,OAAgB,mBAAmB,EAAE,MAAM,CAA4C;cAE9D,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAS9D"}
|
package/dist/node/Witness.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
5
|
import { EthereumGasBlocknativeWitnessConfig } from './Config';
|
|
6
6
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
7
|
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
|
-
static configSchemas:
|
|
8
|
+
static configSchemas: Schema[];
|
|
9
|
+
static defaultConfigSchema: Schema;
|
|
9
10
|
protected observeHandler(): Promise<Payload[]>;
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,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,EAAE,MAAM,EAAE,CAAsE;IAC7G,OAAgB,mBAAmB,EAAE,MAAM,CAA4C;cAE9D,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAS9D"}
|
package/dist/node/index.cjs
CHANGED
|
@@ -51,7 +51,8 @@ var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum
|
|
|
51
51
|
|
|
52
52
|
// src/Witness.ts
|
|
53
53
|
var EthereumGasBlocknativeWitness = class extends import_abstract_witness.AbstractWitness {
|
|
54
|
-
static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
|
|
54
|
+
static configSchemas = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema];
|
|
55
|
+
static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
|
|
55
56
|
async observeHandler() {
|
|
56
57
|
const fields = await getGasFromBlocknative();
|
|
57
58
|
const payload = await new import_payload_builder.PayloadBuilder({
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -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'\nexport { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Witness'\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 { 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 } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\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 = 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,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;;;AFUK,IAAM,gCAAN,cAA4C,wCAAqD;AAAA,EACtG,OAAgB,
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config'\nexport { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Witness'\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 { 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'\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: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,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;;;AFUK,IAAM,gCAAN,cAA4C,wCAAqD;AAAA,EACtG,OAAgB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EAC5G,OAAgB,sBAA8B;AAAA,EAE9C,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,sCAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADnBO,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/index.js
CHANGED
|
@@ -22,7 +22,8 @@ var EthereumGasBlocknativeWitnessConfigSchema = "network.xyo.blockchain.ethereum
|
|
|
22
22
|
|
|
23
23
|
// src/Witness.ts
|
|
24
24
|
var EthereumGasBlocknativeWitness = class extends AbstractWitness {
|
|
25
|
-
static configSchemas = [EthereumGasBlocknativeWitnessConfigSchema];
|
|
25
|
+
static configSchemas = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema];
|
|
26
|
+
static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
|
|
26
27
|
async observeHandler() {
|
|
27
28
|
const fields = await getGasFromBlocknative();
|
|
28
29
|
const payload = await new PayloadBuilder({
|
package/dist/node/index.js.map
CHANGED
|
@@ -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'\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 } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\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 = 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,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,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;;;AFUK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,
|
|
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 { 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'\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: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override 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,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,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;;;AFUK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EAC5G,OAAgB,sBAA8B;AAAA,EAE9C,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,eAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADnBO,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"]}
|
package/package.json
CHANGED
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/plugins/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/axios": "^3.1.
|
|
14
|
-
"@xyo-network/abstract-witness": "^2.
|
|
15
|
-
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "~2.
|
|
16
|
-
"@xyo-network/module-model": "^2.
|
|
17
|
-
"@xyo-network/payload-builder": "^2.
|
|
18
|
-
"@xyo-network/payload-model": "^2.
|
|
19
|
-
"@xyo-network/payloadset-plugin": "^2.
|
|
20
|
-
"@xyo-network/witness-timestamp": "^2.
|
|
13
|
+
"@xylabs/axios": "^3.1.8",
|
|
14
|
+
"@xyo-network/abstract-witness": "^2.97.0",
|
|
15
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "~2.93.0",
|
|
16
|
+
"@xyo-network/module-model": "^2.97.0",
|
|
17
|
+
"@xyo-network/payload-builder": "^2.97.0",
|
|
18
|
+
"@xyo-network/payload-model": "^2.97.0",
|
|
19
|
+
"@xyo-network/payloadset-plugin": "^2.97.0",
|
|
20
|
+
"@xyo-network/witness-timestamp": "^2.97.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@xylabs/ts-scripts-yarn3": "^3.9.
|
|
24
|
-
"@xylabs/tsconfig": "^3.9.
|
|
25
|
-
"@xyo-network/account": "^2.
|
|
26
|
-
"@xyo-network/payload-wrapper": "^2.
|
|
23
|
+
"@xylabs/ts-scripts-yarn3": "^3.9.1",
|
|
24
|
+
"@xylabs/tsconfig": "^3.9.1",
|
|
25
|
+
"@xyo-network/account": "^2.97.0",
|
|
26
|
+
"@xyo-network/payload-wrapper": "^2.97.0",
|
|
27
27
|
"typescript": "^5.4.5"
|
|
28
28
|
},
|
|
29
29
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
66
66
|
},
|
|
67
67
|
"sideEffects": false,
|
|
68
|
-
"version": "2.
|
|
68
|
+
"version": "2.93.0",
|
|
69
69
|
"type": "module"
|
|
70
70
|
}
|
package/src/Witness.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AbstractWitness } from '@xyo-network/abstract-witness'
|
|
|
2
2
|
import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
3
3
|
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
4
4
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
5
|
-
import { Payload } from '@xyo-network/payload-model'
|
|
5
|
+
import { Payload, Schema } from '@xyo-network/payload-model'
|
|
6
6
|
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp'
|
|
7
7
|
|
|
8
8
|
import { EthereumGasBlocknativeWitnessConfig } from './Config'
|
|
@@ -11,7 +11,8 @@ import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'
|
|
|
11
11
|
|
|
12
12
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>
|
|
13
13
|
export class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
14
|
-
static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]
|
|
14
|
+
static override configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]
|
|
15
|
+
static override defaultConfigSchema: Schema = EthereumGasBlocknativeWitnessConfigSchema
|
|
15
16
|
|
|
16
17
|
protected override async observeHandler(): Promise<Payload[]> {
|
|
17
18
|
const fields = await getGasFromBlocknative()
|