@xyo-network/blocknative-ethereum-gas-plugin 3.4.0 → 3.4.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/neutral/index.d.ts +23 -5
- package/dist/neutral/index.mjs +1 -1
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +12 -12
- package/src/Witness.ts +1 -1
- package/dist/neutral/Config.d.ts +0 -6
- package/dist/neutral/Config.d.ts.map +0 -1
- package/dist/neutral/Plugin.d.ts +0 -3
- package/dist/neutral/Plugin.d.ts.map +0 -1
- package/dist/neutral/Schema.d.ts +0 -3
- package/dist/neutral/Schema.d.ts.map +0 -1
- package/dist/neutral/Witness.d.ts +0 -12
- package/dist/neutral/Witness.d.ts.map +0 -1
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/neutral/lib/getGasFromBlocknative.d.ts +0 -3
- package/dist/neutral/lib/getGasFromBlocknative.d.ts.map +0 -1
- package/dist/neutral/lib/index.d.ts +0 -2
- package/dist/neutral/lib/index.d.ts.map +0 -1
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { TimestampWitnessConfig, TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
2
|
+
import * as _xyo_network_payloadset_plugin from '@xyo-network/payloadset-plugin';
|
|
3
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
4
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
5
|
+
import { Schema, Payload } from '@xyo-network/payload-model';
|
|
6
|
+
|
|
7
|
+
type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config';
|
|
8
|
+
declare const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
9
|
+
|
|
10
|
+
type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
11
|
+
schema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
15
|
+
declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
16
|
+
static readonly configSchemas: Schema[];
|
|
17
|
+
static readonly defaultConfigSchema: Schema;
|
|
18
|
+
protected observeHandler(): Promise<Payload[]>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare const EthereumGasBlocknativePlugin: () => _xyo_network_payloadset_plugin.PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
|
|
22
|
+
|
|
23
|
+
export { EthereumGasBlocknativePlugin, EthereumGasBlocknativeWitness, type EthereumGasBlocknativeWitnessConfig, EthereumGasBlocknativeWitnessConfigSchema, type EthereumGasBlocknativeWitnessParams, EthereumGasBlocknativePlugin as default };
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -26,7 +26,7 @@ var EthereumGasBlocknativeWitness = class extends AbstractWitness {
|
|
|
26
26
|
static defaultConfigSchema = EthereumGasBlocknativeWitnessConfigSchema;
|
|
27
27
|
async observeHandler() {
|
|
28
28
|
const fields = await getGasFromBlocknative();
|
|
29
|
-
const payload =
|
|
29
|
+
const payload = new PayloadBuilder({ schema: EthereumGasBlocknativeSchema }).fields(fields).build();
|
|
30
30
|
return [payload];
|
|
31
31
|
}
|
|
32
32
|
};
|
|
@@ -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.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 type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { Payload, Schema } from '@xyo-network/payload-model'\nimport type { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport type { 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 =
|
|
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 type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { Payload, Schema } from '@xyo-network/payload-model'\nimport type { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport type { 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 = new PayloadBuilder<EthereumGasBlocknativePayload>({ schema: EthereumGasBlocknativeSchema })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport type { 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;AAEhC,SAAS,oCAAoC;AAE7C,SAAS,sBAAsB;;;ACJ/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,4CACT;;;AFWG,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EACrH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,IAAI,eAA8C,EAAE,QAAQ,6BAA6B,CAAC,EACvG,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/blocknative-ethereum-gas-plugin",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -30,21 +30,21 @@
|
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@xylabs/axios": "^4.5.1",
|
|
33
|
-
"@xyo-network/abstract-witness": "^3.
|
|
34
|
-
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.4.
|
|
35
|
-
"@xyo-network/module-model": "^3.
|
|
36
|
-
"@xyo-network/payload-builder": "^3.
|
|
37
|
-
"@xyo-network/payload-model": "^3.
|
|
38
|
-
"@xyo-network/payloadset-plugin": "^3.
|
|
39
|
-
"@xyo-network/witness-timestamp": "^3.
|
|
33
|
+
"@xyo-network/abstract-witness": "^3.9.16",
|
|
34
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.4.2",
|
|
35
|
+
"@xyo-network/module-model": "^3.9.16",
|
|
36
|
+
"@xyo-network/payload-builder": "^3.9.16",
|
|
37
|
+
"@xyo-network/payload-model": "^3.9.16",
|
|
38
|
+
"@xyo-network/payloadset-plugin": "^3.9.16",
|
|
39
|
+
"@xyo-network/witness-timestamp": "^3.9.16"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
43
|
-
"@xylabs/tsconfig": "^
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^5.0.24",
|
|
43
|
+
"@xylabs/tsconfig": "^5.0.24",
|
|
44
44
|
"@xylabs/vitest-extended": "^4.5.1",
|
|
45
|
-
"@xyo-network/payload-wrapper": "^3.
|
|
45
|
+
"@xyo-network/payload-wrapper": "^3.9.16",
|
|
46
46
|
"typescript": "^5.7.3",
|
|
47
|
-
"vitest": "^3.0.
|
|
47
|
+
"vitest": "^3.0.6"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
package/src/Witness.ts
CHANGED
|
@@ -17,7 +17,7 @@ export class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBl
|
|
|
17
17
|
|
|
18
18
|
protected override async observeHandler(): Promise<Payload[]> {
|
|
19
19
|
const fields = await getGasFromBlocknative()
|
|
20
|
-
const payload =
|
|
20
|
+
const payload = new PayloadBuilder<EthereumGasBlocknativePayload>({ schema: EthereumGasBlocknativeSchema })
|
|
21
21
|
.fields(fields)
|
|
22
22
|
.build()
|
|
23
23
|
return [payload]
|
package/dist/neutral/Config.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
|
|
2
|
-
import type { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
|
|
3
|
-
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
4
|
-
schema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
5
|
-
}>;
|
|
6
|
-
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAE5E,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAA;AAE5E,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;IACvE,MAAM,EAAE,yCAAyC,CAAA;CAClD,CAAC,CAAA"}
|
package/dist/neutral/Plugin.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAA;AAE5D,eAAO,MAAM,4BAA4B,uGAQtC,CAAA"}
|
package/dist/neutral/Schema.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
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,12 +0,0 @@
|
|
|
1
|
-
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
|
-
import type { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import type { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
|
-
import type { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
|
-
import type { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
|
|
6
|
-
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
7
|
-
export declare class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {
|
|
8
|
-
static readonly configSchemas: Schema[];
|
|
9
|
-
static readonly defaultConfigSchema: Schema;
|
|
10
|
-
protected observeHandler(): Promise<Payload[]>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAG/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAE5E,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAA;AAItE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC,eAAe,CAAC,mCAAmC,CAAC,CAAC,CAAA;AAC9H,qBAAa,6BAA8B,SAAQ,eAAe,CAAC,mCAAmC,CAAC;IACrG,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsE;IACtH,gBAAyB,mBAAmB,EAAE,MAAM,CAA4C;cAEvE,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAO9D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AACnG,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getGasFromBlocknative.d.ts","sourceRoot":"","sources":["../../../src/lib/getGasFromBlocknative.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAA;AAO1G,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,8BAA8B,CAEpF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA"}
|