@xyo-network/blocknative-ethereum-gas-plugin 3.4.2 → 3.4.3
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/Config.d.ts +6 -0
- package/dist/neutral/Config.d.ts.map +1 -0
- package/dist/neutral/Plugin.d.ts +3 -0
- package/dist/neutral/Plugin.d.ts.map +1 -0
- package/dist/neutral/Schema.d.ts +3 -0
- package/dist/neutral/Schema.d.ts.map +1 -0
- package/dist/neutral/Witness.d.ts +12 -0
- package/dist/neutral/Witness.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +5 -23
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/lib/getGasFromBlocknative.d.ts +3 -0
- package/dist/neutral/lib/getGasFromBlocknative.d.ts.map +1 -0
- package/dist/neutral/lib/index.d.ts +2 -0
- package/dist/neutral/lib/index.d.ts.map +1 -0
- package/package.json +13 -13
- package/src/Config.ts +2 -2
- package/src/Witness.ts +5 -6
- package/src/lib/getGasFromBlocknative.ts +1 -1
- package/xy.config.ts +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp';
|
|
2
|
+
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts';
|
|
3
|
+
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
4
|
+
schema: EthereumGasBlocknativeWitnessConfigSchema;
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,yCAAyC,EAAE,MAAM,aAAa,CAAA;AAEvE,MAAM,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;IACvE,MAAM,EAAE,yCAAyC,CAAA;CAClD,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yCAAyC,GAAG,gEAAgE,CAAA;AACxH,eAAO,MAAM,yCAAyC,EAAE,yCACY,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
|
+
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
5
|
+
import { 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
|
|
@@ -0,0 +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,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAA;AAIjE,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"}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 };
|
|
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
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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 +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
|
|
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 = new PayloadBuilder<EthereumGasBlocknativePayload>({ schema: EthereumGasBlocknativeSchema })\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,4CACT;;;AFUG,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;;;ADjBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getGasFromBlocknative.d.ts","sourceRoot":"","sources":["../../../src/lib/getGasFromBlocknative.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAA;AAOrG,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,8BAA8B,CAEpF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA"}
|
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.3",
|
|
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.9.
|
|
34
|
-
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.4.
|
|
35
|
-
"@xyo-network/module-model": "^3.9.
|
|
36
|
-
"@xyo-network/payload-builder": "^3.9.
|
|
37
|
-
"@xyo-network/payload-model": "^3.9.
|
|
38
|
-
"@xyo-network/payloadset-plugin": "^3.9.
|
|
39
|
-
"@xyo-network/witness-timestamp": "^3.9.
|
|
33
|
+
"@xyo-network/abstract-witness": "^3.9.23",
|
|
34
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.4.3",
|
|
35
|
+
"@xyo-network/module-model": "^3.9.23",
|
|
36
|
+
"@xyo-network/payload-builder": "^3.9.23",
|
|
37
|
+
"@xyo-network/payload-model": "^3.9.23",
|
|
38
|
+
"@xyo-network/payloadset-plugin": "^3.9.23",
|
|
39
|
+
"@xyo-network/witness-timestamp": "^3.9.23"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@xylabs/ts-scripts-yarn3": "^5.0.
|
|
43
|
-
"@xylabs/tsconfig": "^5.0.
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^5.0.39",
|
|
43
|
+
"@xylabs/tsconfig": "^5.0.39",
|
|
44
44
|
"@xylabs/vitest-extended": "^4.5.1",
|
|
45
|
-
"@xyo-network/payload-wrapper": "^3.9.
|
|
46
|
-
"typescript": "^5.
|
|
47
|
-
"vitest": "^3.0.
|
|
45
|
+
"@xyo-network/payload-wrapper": "^3.9.23",
|
|
46
|
+
"typescript": "^5.8.2",
|
|
47
|
+
"vitest": "^3.0.7"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
package/src/Config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'
|
|
4
4
|
|
|
5
5
|
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
6
6
|
schema: EthereumGasBlocknativeWitnessConfigSchema
|
package/src/Witness.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness'
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import type { AnyConfigSchema } from '@xyo-network/module-model'
|
|
2
|
+
import { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
3
|
+
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
5
4
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import { Payload, Schema } from '@xyo-network/payload-model'
|
|
6
|
+
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp'
|
|
8
7
|
|
|
9
|
-
import
|
|
8
|
+
import { EthereumGasBlocknativeWitnessConfig } from './Config.ts'
|
|
10
9
|
import { getGasFromBlocknative } from './lib/index.ts'
|
|
11
10
|
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'
|
|
12
11
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { axios } from '@xylabs/axios'
|
|
2
|
-
import
|
|
2
|
+
import { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
3
3
|
|
|
4
4
|
const url = 'https://api.blocknative.com/gasprices/blockprices'
|
|
5
5
|
|
package/xy.config.ts
CHANGED