@xyo-network/blocknative-ethereum-gas-plugin 5.4.10 → 5.5.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/neutral/index.mjs +2 -2
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +32 -34
package/dist/neutral/index.mjs
CHANGED
|
@@ -9,12 +9,12 @@ import { PayloadBuilder } from "@xyo-network/sdk-js";
|
|
|
9
9
|
import { AbstractWitness } from "@xyo-network/witness-abstract";
|
|
10
10
|
|
|
11
11
|
// src/lib/getGasFromBlocknative.ts
|
|
12
|
-
import {
|
|
12
|
+
import { assertEx, fetchJsonClient } from "@xylabs/sdk-js";
|
|
13
13
|
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
14
14
|
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
15
15
|
var config = { headers: { Authorization } };
|
|
16
16
|
var getGasFromBlocknative = async () => {
|
|
17
|
-
return (await
|
|
17
|
+
return assertEx((await fetchJsonClient.get(url, config)).data, () => "Empty Blocknative response");
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
// src/Schema.ts
|
|
@@ -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/sdk-js'\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 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 type { Payload, Schema } from '@xyo-network/payload-model'\nimport { PayloadBuilder } from '@xyo-network/sdk-js'\nimport { AbstractWitness } from '@xyo-network/witness-abstract'\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 {
|
|
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/sdk-js'\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 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 type { Payload, Schema } from '@xyo-network/payload-model'\nimport { PayloadBuilder } from '@xyo-network/sdk-js'\nimport { AbstractWitness } from '@xyo-network/witness-abstract'\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 { assertEx, fetchJsonClient } from '@xylabs/sdk-js'\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 assertEx((await fetchJsonClient.get<EthereumGasBlocknativeResponse>(url, config)).data, () => 'Empty Blocknative response')\n}\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport type EthereumGasBlocknativeWitnessConfigSchema = typeof EthereumGasBlocknativeWitnessConfigSchema\nexport const EthereumGasBlocknativeWitnessConfigSchema\n = asSchema('network.xyo.blockchain.ethereum.gas.blocknative.witness.config', true)\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACD9C,SAAS,oCAAoC;AAG7C,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;;;ACLhC,SAAS,UAAU,uBAAuB;AAG1C,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,SAAO,UAAU,MAAM,gBAAgB,IAAoC,KAAK,MAAM,GAAG,MAAM,MAAM,4BAA4B;AACnI;;;ACVA,SAAS,gBAAgB;AAGlB,IAAM,4CACT,SAAS,kEAAkE,IAAI;;;AFS5E,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": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -31,23 +31,22 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "~5.
|
|
34
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "~5.5.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@bitauth/libauth": "~3.0.0",
|
|
38
38
|
"@metamask/providers": "^22.1.1",
|
|
39
39
|
"@opentelemetry/api": "^1.9.1",
|
|
40
|
-
"@opentelemetry/sdk-trace-base": "^2.7.
|
|
40
|
+
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
41
41
|
"@scure/base": "^2.2.0",
|
|
42
42
|
"@scure/bip39": "~2.2.0",
|
|
43
43
|
"@types/node": "^25.6.0",
|
|
44
|
-
"@xylabs/geo": "^5.0
|
|
45
|
-
"@xylabs/sdk-js": "^5.0
|
|
46
|
-
"@xylabs/threads": "^5.0
|
|
47
|
-
"@xylabs/toolchain": "~7.
|
|
48
|
-
"@xylabs/tsconfig": "~7.
|
|
49
|
-
"@xylabs/vitest-extended": "~5.0
|
|
50
|
-
"@xylabs/vitest-matchers": "~5.0.100",
|
|
44
|
+
"@xylabs/geo": "^5.1.0",
|
|
45
|
+
"@xylabs/sdk-js": "^5.1.0",
|
|
46
|
+
"@xylabs/threads": "^5.1.0",
|
|
47
|
+
"@xylabs/toolchain": "~7.12.3",
|
|
48
|
+
"@xylabs/tsconfig": "~7.12.3",
|
|
49
|
+
"@xylabs/vitest-extended": "~5.1.0",
|
|
51
50
|
"@xyo-network/account": "~5.5.2",
|
|
52
51
|
"@xyo-network/account-model": "^5.5.2",
|
|
53
52
|
"@xyo-network/api": "~5.5.2",
|
|
@@ -59,32 +58,31 @@
|
|
|
59
58
|
"@xyo-network/config-payload-plugin": "~5.5.2",
|
|
60
59
|
"@xyo-network/huri": "~5.5.2",
|
|
61
60
|
"@xyo-network/manifest-model": "~5.5.2",
|
|
62
|
-
"@xyo-network/module-model": "^5.
|
|
61
|
+
"@xyo-network/module-model": "^5.6.2",
|
|
63
62
|
"@xyo-network/payload-builder": "~5.5.2",
|
|
64
63
|
"@xyo-network/payload-model": "^5.5.2",
|
|
65
64
|
"@xyo-network/payload-plugin": "~5.5.2",
|
|
66
65
|
"@xyo-network/payload-wrapper": "~5.5.2",
|
|
67
66
|
"@xyo-network/query-payload-plugin": "~5.5.2",
|
|
68
|
-
"@xyo-network/sdk-js": "^5.
|
|
67
|
+
"@xyo-network/sdk-js": "^5.6.2",
|
|
69
68
|
"@xyo-network/sdk-protocol-js": "~5.5.2",
|
|
70
69
|
"@xyo-network/wallet": "~5.5.2",
|
|
71
70
|
"@xyo-network/wallet-model": "~5.5.2",
|
|
72
|
-
"@xyo-network/witness-abstract": "^5.
|
|
73
|
-
"@xyo-network/witness-timestamp": "^5.
|
|
74
|
-
"ajv": "^8.
|
|
71
|
+
"@xyo-network/witness-abstract": "^5.6.2",
|
|
72
|
+
"@xyo-network/witness-timestamp": "^5.6.2",
|
|
73
|
+
"ajv": "^8.20.0",
|
|
75
74
|
"async-mutex": "^0.5.0",
|
|
76
|
-
"axios": "^1.15.2",
|
|
77
75
|
"bn.js": "^5.2.3",
|
|
78
76
|
"buffer": "^6.0.3",
|
|
79
77
|
"chalk": "^5.6.2",
|
|
80
78
|
"debug": "~4.4.3",
|
|
81
79
|
"esbuild": "~0.28.0",
|
|
82
|
-
"eslint": "^10.
|
|
80
|
+
"eslint": "^10.3.0",
|
|
83
81
|
"ethers": "^6.16.0",
|
|
84
82
|
"hash-wasm": "^4.12.0",
|
|
85
83
|
"idb": "^8.0.3",
|
|
86
|
-
"lru-cache": "^11.3.
|
|
87
|
-
"mapbox-gl": "
|
|
84
|
+
"lru-cache": "^11.3.6",
|
|
85
|
+
"mapbox-gl": "~3.23.1",
|
|
88
86
|
"observable-fns": "~0.6.1",
|
|
89
87
|
"pako": "~2.1.0",
|
|
90
88
|
"store2": "~2.14.4",
|
|
@@ -93,26 +91,26 @@
|
|
|
93
91
|
"vitest": "^4.1.5",
|
|
94
92
|
"wasm-feature-detect": "~1.8.0",
|
|
95
93
|
"webextension-polyfill": "^0.12.0",
|
|
96
|
-
"zod": "^4.3
|
|
94
|
+
"zod": "^4.4.3"
|
|
97
95
|
},
|
|
98
96
|
"peerDependencies": {
|
|
99
|
-
"@xylabs/sdk-js": ">=5.0
|
|
100
|
-
"@xyo-network/account": ">=5.5.2 <6",
|
|
97
|
+
"@xylabs/sdk-js": ">=5.1.0 <6",
|
|
98
|
+
"@xyo-network/account": ">=5.5.2 <5.6",
|
|
101
99
|
"@xyo-network/account-model": ">=5.5.2 <6",
|
|
102
|
-
"@xyo-network/api-models": ">=5.5.2 <6",
|
|
103
|
-
"@xyo-network/boundwitness-builder": ">=5.5.2 <6",
|
|
100
|
+
"@xyo-network/api-models": ">=5.5.2 <5.6",
|
|
101
|
+
"@xyo-network/boundwitness-builder": ">=5.5.2 <5.6",
|
|
104
102
|
"@xyo-network/boundwitness-validator": ">=5.5.2 <6",
|
|
105
|
-
"@xyo-network/config-payload-plugin": ">=5.5.2 <6",
|
|
106
|
-
"@xyo-network/huri": ">=5.5.2 <6",
|
|
107
|
-
"@xyo-network/manifest-model": ">=5.5.2 <6",
|
|
108
|
-
"@xyo-network/module-model": ">=5.
|
|
109
|
-
"@xyo-network/payload-builder": ">=5.5.2 <6",
|
|
103
|
+
"@xyo-network/config-payload-plugin": ">=5.5.2 <5.6",
|
|
104
|
+
"@xyo-network/huri": ">=5.5.2 <5.6",
|
|
105
|
+
"@xyo-network/manifest-model": ">=5.5.2 <5.6",
|
|
106
|
+
"@xyo-network/module-model": ">=5.6.2 <6",
|
|
107
|
+
"@xyo-network/payload-builder": ">=5.5.2 <5.6",
|
|
110
108
|
"@xyo-network/payload-model": ">=5.5.2 <6",
|
|
111
|
-
"@xyo-network/sdk-js": ">=5.
|
|
112
|
-
"@xyo-network/wallet-model": ">=5.5.2 <6",
|
|
113
|
-
"@xyo-network/witness-abstract": ">=5.
|
|
114
|
-
"@xyo-network/witness-timestamp": ">=5.
|
|
115
|
-
"zod": ">=4.3
|
|
109
|
+
"@xyo-network/sdk-js": ">=5.6.2 <6",
|
|
110
|
+
"@xyo-network/wallet-model": ">=5.5.2 <5.6",
|
|
111
|
+
"@xyo-network/witness-abstract": ">=5.6.2 <6",
|
|
112
|
+
"@xyo-network/witness-timestamp": ">=5.6.2 <6",
|
|
113
|
+
"zod": ">=4.4.3 <5"
|
|
116
114
|
},
|
|
117
115
|
"publishConfig": {
|
|
118
116
|
"access": "public"
|