@xyo-network/blocknative-ethereum-gas-plugin 7.0.0 → 7.0.1
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/Plugin.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { EthereumGasBlocknativeWitness } from './Witness.ts';
|
|
2
|
-
export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/sdk
|
|
2
|
+
export declare const EthereumGasBlocknativePlugin: () => import("@xyo-network/sdk").PayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>;
|
|
3
3
|
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAA;AAE5D,eAAO,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAA;AAE5D,eAAO,MAAM,4BAA4B,yFAQtC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AnyConfigSchema, Payload, Schema } from '@xyo-network/sdk
|
|
2
|
-
import { AbstractWitness } from '@xyo-network/sdk
|
|
1
|
+
import type { AnyConfigSchema, Payload, Schema } from '@xyo-network/sdk';
|
|
2
|
+
import { AbstractWitness } from '@xyo-network/sdk';
|
|
3
3
|
import type { TimestampWitnessParams } from '@xyo-network/witness-timestamp';
|
|
4
4
|
import type { EthereumGasBlocknativeWitnessConfig } from './Config.ts';
|
|
5
5
|
export type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EAAE,OAAO,EAAE,MAAM,EACjC,MAAM,
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EAAE,OAAO,EAAE,MAAM,EACjC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,eAAe,EAAkB,MAAM,kBAAkB,CAAA;AAClE,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;CAQ9D"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// src/Plugin.ts
|
|
2
2
|
import { EthereumGasBlocknativeSchema as EthereumGasBlocknativeSchema2 } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
|
|
3
|
-
import { createPayloadSetWitnessPlugin, PayloadSetSchema } from "@xyo-network/sdk
|
|
3
|
+
import { createPayloadSetWitnessPlugin, PayloadSetSchema } from "@xyo-network/sdk";
|
|
4
4
|
|
|
5
5
|
// src/Witness.ts
|
|
6
6
|
import { EthereumGasBlocknativeSchema } from "@xyo-network/blocknative-ethereum-gas-payload-plugin";
|
|
7
|
-
import { AbstractWitness, PayloadBuilder } from "@xyo-network/sdk
|
|
7
|
+
import { AbstractWitness, PayloadBuilder } from "@xyo-network/sdk";
|
|
8
8
|
|
|
9
9
|
// src/lib/getGasFromBlocknative.ts
|
|
10
|
-
import { assertEx, fetchJsonClient } from "@xylabs/sdk
|
|
10
|
+
import { assertEx, fetchJsonClient } from "@xylabs/sdk";
|
|
11
11
|
var url = "https://api.blocknative.com/gasprices/blockprices";
|
|
12
12
|
var Authorization = "9d3e23c3-e31d-4f9c-9d7c-c579cb75d226";
|
|
13
13
|
var config = { headers: { Authorization } };
|
|
@@ -17,7 +17,7 @@ var getGasFromBlocknative = async () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
// src/Schema.ts
|
|
20
|
-
import { asSchema } from "@xyo-network/sdk
|
|
20
|
+
import { asSchema } from "@xyo-network/sdk";
|
|
21
21
|
var EthereumGasBlocknativeWitnessConfigSchema = asSchema("network.xyo.blockchain.ethereum.gas.blocknative.witness.config", true);
|
|
22
22
|
|
|
23
23
|
// src/Witness.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Plugin.ts", "../../src/Witness.ts", "../../src/lib/getGasFromBlocknative.ts", "../../src/Schema.ts"],
|
|
4
|
-
"sourcesContent": ["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { createPayloadSetWitnessPlugin, PayloadSetSchema } from '@xyo-network/sdk
|
|
4
|
+
"sourcesContent": ["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { createPayloadSetWitnessPlugin, PayloadSetSchema } from '@xyo-network/sdk'\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))\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 {\n AnyConfigSchema, Payload, Schema,\n} from '@xyo-network/sdk'\nimport { AbstractWitness, PayloadBuilder } from '@xyo-network/sdk'\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 builder = new PayloadBuilder<EthereumGasBlocknativePayload>({ schema: EthereumGasBlocknativeSchema })\n const payload = builder\n .fields(fields)\n .build()\n return [payload]\n }\n}\n", "import { assertEx, fetchJsonClient } from '@xylabs/sdk'\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 const response = await fetchJsonClient.get<EthereumGasBlocknativeResponse>(url, config)\n return assertEx(response.data, () => 'Empty Blocknative response')\n}\n", "import { asSchema } from '@xyo-network/sdk'\n\nexport type EthereumGasBlocknativeWitnessConfigSchema = typeof EthereumGasBlocknativeWitnessConfigSchema\nexport const EthereumGasBlocknativeWitnessConfigSchema\n = asSchema('network.xyo.blockchain.ethereum.gas.blocknative.witness.config', true)\n"],
|
|
5
5
|
"mappings": ";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,+BAA+B,wBAAwB;;;ACAhE,SAAS,oCAAoC;AAI7C,SAAS,iBAAiB,sBAAsB;;;ACLhD,SAAS,UAAU,uBAAuB;AAG1C,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,QAAM,WAAW,MAAM,gBAAgB,IAAoC,KAAK,MAAM;AACtF,SAAO,SAAS,SAAS,MAAM,MAAM,4BAA4B;AACnE;;;ACXA,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;AAC1G,UAAM,UAAU,QACb,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADpBO,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;",
|
|
6
6
|
"names": ["EthereumGasBlocknativeSchema", "EthereumGasBlocknativeSchema"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/blocknative-ethereum-gas-plugin",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -31,53 +31,52 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "~7.0.
|
|
34
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "~7.0.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@bitauth/libauth": "~3.0.0",
|
|
38
|
-
"@metamask/providers": "^22.1.1",
|
|
39
38
|
"@noble/post-quantum": "~0.6.1",
|
|
40
39
|
"@opentelemetry/api": "^1.9.1",
|
|
41
40
|
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
42
41
|
"@scure/base": "^2.2.0",
|
|
43
42
|
"@scure/bip39": "~2.2.0",
|
|
44
|
-
"@xylabs/geo": "^
|
|
45
|
-
"@xylabs/sdk
|
|
46
|
-
"@xylabs/threads": "^
|
|
47
|
-
"@xylabs/toolchain": "~8.
|
|
48
|
-
"@xylabs/tsconfig": "~8.
|
|
49
|
-
"@xylabs/vitest-extended": "^
|
|
50
|
-
"@xyo-network/sdk
|
|
51
|
-
"@xyo-network/sdk-protocol
|
|
52
|
-
"@xyo-network/witness-timestamp": "^7.0.
|
|
43
|
+
"@xylabs/geo": "^7.0.1",
|
|
44
|
+
"@xylabs/sdk": "^7.0.1",
|
|
45
|
+
"@xylabs/threads": "^7.0.1",
|
|
46
|
+
"@xylabs/toolchain": "~8.5.3",
|
|
47
|
+
"@xylabs/tsconfig": "~8.5.3",
|
|
48
|
+
"@xylabs/vitest-extended": "^7.0.1",
|
|
49
|
+
"@xyo-network/sdk": "~7.0.3",
|
|
50
|
+
"@xyo-network/sdk-protocol": "^7.0.4",
|
|
51
|
+
"@xyo-network/witness-timestamp": "^7.0.3",
|
|
53
52
|
"ajv": "^8.20.0",
|
|
54
53
|
"async-mutex": "^0.5.0",
|
|
54
|
+
"browserslist": "4.28.4",
|
|
55
55
|
"debug": "~4.4.3",
|
|
56
|
-
"eslint": "^10.
|
|
57
|
-
"
|
|
56
|
+
"eslint": "^10.6.0",
|
|
57
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
58
|
+
"ethers": "^6.17.0",
|
|
58
59
|
"hash-wasm": "^4.12.0",
|
|
59
60
|
"idb": "^8.0.3",
|
|
60
61
|
"lru-cache": "^11.5.1",
|
|
61
62
|
"observable-fns": "~0.6.1",
|
|
62
63
|
"typescript": "~6.0.3",
|
|
63
|
-
"vite": "^8.0
|
|
64
|
+
"vite": "^8.1.0",
|
|
64
65
|
"vitest": "^4.1.9",
|
|
65
|
-
"webextension-polyfill": "^0.12.0",
|
|
66
66
|
"zod": "^4.4.3"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@bitauth/libauth": "~3.0",
|
|
70
|
-
"@metamask/providers": "^22.1",
|
|
71
70
|
"@noble/post-quantum": "~0.6.1",
|
|
72
71
|
"@opentelemetry/api": "^1.9",
|
|
73
72
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
74
73
|
"@scure/base": "^2.2",
|
|
75
74
|
"@scure/bip39": "~2.2",
|
|
76
|
-
"@xylabs/geo": "^
|
|
77
|
-
"@xylabs/sdk
|
|
78
|
-
"@xylabs/threads": "^
|
|
79
|
-
"@xyo-network/sdk
|
|
80
|
-
"@xyo-network/sdk-protocol
|
|
75
|
+
"@xylabs/geo": "^7.0",
|
|
76
|
+
"@xylabs/sdk": "^7.0",
|
|
77
|
+
"@xylabs/threads": "^7.0",
|
|
78
|
+
"@xyo-network/sdk": "^7.0",
|
|
79
|
+
"@xyo-network/sdk-protocol": "^7.0",
|
|
81
80
|
"@xyo-network/witness-timestamp": "^7.0",
|
|
82
81
|
"ajv": "^8.20",
|
|
83
82
|
"async-mutex": "^0.5",
|
|
@@ -87,7 +86,6 @@
|
|
|
87
86
|
"idb": "^8.0",
|
|
88
87
|
"lru-cache": "^11.3",
|
|
89
88
|
"observable-fns": "~0.6",
|
|
90
|
-
"webextension-polyfill": "^0.12",
|
|
91
89
|
"zod": "^4.4"
|
|
92
90
|
},
|
|
93
91
|
"engines": {
|