@xyo-network/etherscan-ethereum-gas-plugin 7.0.2 → 7.0.4

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.
@@ -1,5 +1,2 @@
1
- export * from './Config.ts';
2
- export { EthereumGasEtherscanPlugin as default, EthereumGasEtherscanPlugin } from './Plugin.ts';
3
- export * from './Schema.ts';
4
- export * from './Witness.ts';
1
+ export * from '@xyo-network/payloadset-plugins/etherscan-ethereum-gas';
5
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,0BAA0B,IAAI,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC/F,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,wDAAwD,CAAA"}
@@ -1,50 +1,3 @@
1
- // src/Plugin.ts
2
- import { EthereumGasEtherscanSchema as EthereumGasEtherscanSchema2 } from "@xyo-network/etherscan-ethereum-gas-payload-plugin";
3
- import { createPayloadSetWitnessPlugin, PayloadSetSchema } from "@xyo-network/sdk";
4
-
5
- // src/Witness.ts
6
- import { assertEx as assertEx2 } from "@ariestools/sdk";
7
- import { EthereumGasEtherscanSchema } from "@xyo-network/etherscan-ethereum-gas-payload-plugin";
8
- import { AbstractWitness, PayloadBuilder } from "@xyo-network/sdk";
9
-
10
- // src/lib/getGasFromEtherscan.ts
11
- import { assertEx, fetchJsonClient } from "@ariestools/sdk";
12
- var getGasFromEtherscan = async (apiKey) => {
13
- const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`;
14
- const response = await fetchJsonClient.get(url);
15
- return assertEx(response.data, () => "Empty Etherscan response");
16
- };
17
-
18
- // src/Schema.ts
19
- import { asSchema } from "@xyo-network/sdk";
20
- var EthereumGasEtherscanWitnessConfigSchema = asSchema("network.xyo.blockchain.ethereum.gas.etherscan.witness.config", true);
21
-
22
- // src/Witness.ts
23
- var EthereumGasEtherscanWitness = class extends AbstractWitness {
24
- static configSchemas = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema];
25
- static defaultConfigSchema = EthereumGasEtherscanWitnessConfigSchema;
26
- async observeHandler() {
27
- const apiKey = assertEx2(this.config?.apiKey, () => "apiKey is required");
28
- const builder = new PayloadBuilder({ schema: EthereumGasEtherscanSchema });
29
- const payload = builder.fields(await getGasFromEtherscan(apiKey)).build();
30
- return [payload];
31
- }
32
- };
33
-
34
- // src/Plugin.ts
35
- var EthereumGasEtherscanPlugin = () => createPayloadSetWitnessPlugin(
36
- { required: { [EthereumGasEtherscanSchema2]: 1 }, schema: PayloadSetSchema },
37
- {
38
- witness: async (params) => {
39
- const result = await EthereumGasEtherscanWitness.create(params);
40
- return result;
41
- }
42
- }
43
- );
44
- export {
45
- EthereumGasEtherscanPlugin,
46
- EthereumGasEtherscanWitness,
47
- EthereumGasEtherscanWitnessConfigSchema,
48
- EthereumGasEtherscanPlugin as default
49
- };
1
+ // src/index.ts
2
+ export * from "@xyo-network/payloadset-plugins/etherscan-ethereum-gas";
50
3
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/Plugin.ts", "../../src/Witness.ts", "../../src/lib/getGasFromEtherscan.ts", "../../src/Schema.ts"],
4
- "sourcesContent": ["import { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { createPayloadSetWitnessPlugin, PayloadSetSchema } from '@xyo-network/sdk'\n\nimport { EthereumGasEtherscanWitness } from './Witness.ts'\n\nexport const EthereumGasEtherscanPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEtherscanWitness>(\n { required: { [EthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await EthereumGasEtherscanWitness.create(params)\n return result\n },\n },\n )\n", "import { assertEx } from '@ariestools/sdk'\nimport type { EthereumGasEtherscanPayload } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport { EthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\nimport type {\n AnyConfigSchema, Payload, Schema, WitnessParams,\n} from '@xyo-network/sdk'\nimport { AbstractWitness, PayloadBuilder } from '@xyo-network/sdk'\n\nimport type { EthereumGasEtherscanWitnessConfig } from './Config.ts'\nimport { getGasFromEtherscan } from './lib/index.ts'\nimport { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts'\n\nexport class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherscanWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherscanWitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const apiKey = assertEx(this.config?.apiKey, () => 'apiKey is required')\n const builder = new PayloadBuilder<EthereumGasEtherscanPayload>({ schema: EthereumGasEtherscanSchema })\n const payload = builder\n .fields(await getGasFromEtherscan(apiKey))\n .build()\n return [payload]\n }\n}\n", "import { assertEx, fetchJsonClient } from '@ariestools/sdk'\nimport type { EthereumGasEtherscanResponse } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'\n\nexport const getGasFromEtherscan = async (apiKey: string): Promise<EthereumGasEtherscanResponse> => {\n const url = `https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${apiKey}`\n const response = await fetchJsonClient.get<EthereumGasEtherscanResponse>(url)\n return assertEx(response.data, () => 'Empty Etherscan response')\n}\n", "import { asSchema } from '@xyo-network/sdk'\n\nexport type EthereumGasEtherscanWitnessConfigSchema = typeof EthereumGasEtherscanWitnessConfigSchema\nexport const EthereumGasEtherscanWitnessConfigSchema\n = asSchema('network.xyo.blockchain.ethereum.gas.etherscan.witness.config', true)\n"],
5
- "mappings": ";AAAA,SAAS,8BAAAA,mCAAkC;AAC3C,SAAS,+BAA+B,wBAAwB;;;ACDhE,SAAS,YAAAC,iBAAgB;AAEzB,SAAS,kCAAkC;AAI3C,SAAS,iBAAiB,sBAAsB;;;ACNhD,SAAS,UAAU,uBAAuB;AAGnC,IAAM,sBAAsB,OAAO,WAA0D;AAClG,QAAM,MAAM,0EAA0E,MAAM;AAC5F,QAAM,WAAW,MAAM,gBAAgB,IAAkC,GAAG;AAC5E,SAAO,SAAS,SAAS,MAAM,MAAM,0BAA0B;AACjE;;;ACPA,SAAS,gBAAgB;AAGlB,IAAM,0CACT,SAAS,gEAAgE,IAAI;;;AFQ1E,IAAM,8BAAN,cAA0C,gBAAmF;AAAA,EAClI,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,uCAAuC;AAAA,EACnH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,SAASC,UAAS,KAAK,QAAQ,QAAQ,MAAM,oBAAoB;AACvE,UAAM,UAAU,IAAI,eAA4C,EAAE,QAAQ,2BAA2B,CAAC;AACtG,UAAM,UAAU,QACb,OAAO,MAAM,oBAAoB,MAAM,CAAC,EACxC,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADnBO,IAAM,6BAA6B,MACxC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,2BAA0B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC1E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,4BAA4B,OAAO,MAAM;AAC9D,aAAO;AAAA,IACT;AAAA,EACF;AACF;",
6
- "names": ["EthereumGasEtherscanSchema", "assertEx", "assertEx", "EthereumGasEtherscanSchema"]
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["// Compatibility shim: this package re-exports from @xyo-network/payloadset-plugins/etherscan-ethereum-gas.\nexport * from '@xyo-network/payloadset-plugins/etherscan-ethereum-gas'\n"],
5
+ "mappings": ";AACA,cAAc;",
6
+ "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/etherscan-ethereum-gas-plugin",
3
- "version": "7.0.2",
3
+ "version": "7.0.4",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -31,65 +31,122 @@
31
31
  "README.md"
32
32
  ],
33
33
  "dependencies": {
34
- "@xyo-network/etherscan-ethereum-gas-payload-plugin": "~7.0.2"
34
+ "@xyo-network/payloadset-plugins": "~7.0.4"
35
35
  },
36
36
  "devDependencies": {
37
- "@ariestools/sdk": "^7.0.5",
37
+ "@ariestools/crypto": "~8.0.3",
38
+ "@ariestools/eth-address": "~8.0.3",
39
+ "@ariestools/sdk": "~8.0.3",
40
+ "@ariestools/threads": "~8.0.3",
41
+ "@ariestools/toolchain": "~8.6.12",
42
+ "@ariestools/tsconfig": "~8.6.12",
38
43
  "@bitauth/libauth": "~3.0.0",
44
+ "@metamask/providers": "~22.1.1",
39
45
  "@noble/post-quantum": "~0.6.1",
46
+ "@opentelemetry/api": "~1.9.1",
47
+ "@opentelemetry/sdk-trace-base": "~2.9.0",
48
+ "@scure/base": "~2.2.0",
49
+ "@scure/bip39": "~2.2.0",
50
+ "@uniswap/v3-sdk": "~3.31.0",
51
+ "@xyo-network/diviner-hash-lease": "~7.0.11",
52
+ "@xyo-network/diviner-indexing": "~7.0.11",
53
+ "@xyo-network/open-zeppelin-typechain": "~4.1.3",
54
+ "@xyo-network/sdk": "~7.0.11",
55
+ "@xyo-network/sdk-protocol": "~7.0.15",
56
+ "@xyo-network/uniswap-typechain": "~4.1.3",
57
+ "@xyo-network/witness-blockchain-abstract": "~7.0.11",
58
+ "@xyo-network/witness-evm-abstract": "~7.0.11",
59
+ "@xyo-network/witness-timestamp": "~7.0.11",
60
+ "ajv": "~8.20.0",
61
+ "async-mutex": "~0.5.0",
62
+ "base64-js": "~1.5.1",
63
+ "bowser": "~2.14.1",
64
+ "crypto-js": "~4.2.0",
65
+ "debug": "~4.4.3",
66
+ "es6-dynamic-template": "~2.0.0",
67
+ "eslint": "~10.6.0",
68
+ "eslint-import-resolver-typescript": "~4.4.5",
69
+ "ethers": "~6.17.0",
70
+ "file-type": "~22.0.1",
71
+ "fluent-ffmpeg": "~2.1.3",
72
+ "geotiff": "~3.0.5",
73
+ "gm": "~1.25.1",
74
+ "graphql": "~17.0.2",
75
+ "hasbin": "~1.2.3",
76
+ "hash-wasm": "~4.12.0",
77
+ "idb": "~8.0.3",
78
+ "lru-cache": "~11.5.1",
79
+ "node-screenlogic": "~2.1.1",
80
+ "observable-fns": "~0.6.1",
81
+ "parse-data-url": "~6.0.0",
82
+ "prom-client": "~15.1.3",
83
+ "regression": "~2.0.1",
84
+ "sha.js": "~2.4.12",
85
+ "svg-parser": "~2.0.4",
86
+ "systeminformation": "~5.31.14",
87
+ "typescript": "~6.0.3",
88
+ "uuid": "~14.0.1",
89
+ "webextension-polyfill": "~0.12.0",
90
+ "xml2js": "~0.6.2",
91
+ "zod": "~4.4.3"
92
+ },
93
+ "peerDependencies": {
94
+ "@ariestools/crypto": "^8.0.3",
95
+ "@ariestools/eth-address": "^8.0.3",
96
+ "@ariestools/sdk": "^8.0.3",
97
+ "@ariestools/threads": "^8.0.3",
98
+ "@bitauth/libauth": "^3.0.0",
99
+ "@metamask/providers": "^22.1.1",
100
+ "@noble/post-quantum": "^0.6.1",
40
101
  "@opentelemetry/api": "^1.9.1",
41
- "@opentelemetry/sdk-trace-base": "^2.8.0",
102
+ "@opentelemetry/sdk-trace-base": "^2.9.0",
42
103
  "@scure/base": "^2.2.0",
43
- "@scure/bip39": "~2.2.0",
44
- "@xylabs/geo": "^7.0.5",
45
- "@xylabs/threads": "^7.0.5",
46
- "@xylabs/toolchain": "~8.5.15",
47
- "@xylabs/tsconfig": "~8.5.15",
48
- "@xylabs/vitest-extended": "^7.0.5",
49
- "@xyo-network/sdk": "~7.0.5",
50
- "@xyo-network/sdk-protocol": "^7.0.8",
104
+ "@scure/bip39": "^2.2.0",
105
+ "@uniswap/v3-sdk": "^3.31.0",
106
+ "@xyo-network/diviner-hash-lease": "^7.0.11",
107
+ "@xyo-network/diviner-indexing": "^7.0.11",
108
+ "@xyo-network/open-zeppelin-typechain": "^4.1.3",
109
+ "@xyo-network/sdk": "^7.0.11",
110
+ "@xyo-network/sdk-protocol": "^7.0.15",
111
+ "@xyo-network/uniswap-typechain": "^4.1.3",
112
+ "@xyo-network/witness-blockchain-abstract": "^7.0.11",
113
+ "@xyo-network/witness-evm-abstract": "^7.0.11",
114
+ "@xyo-network/witness-timestamp": "^7.0.11",
51
115
  "ajv": "^8.20.0",
52
116
  "async-mutex": "^0.5.0",
53
- "browserslist": "4.28.4",
54
- "debug": "~4.4.3",
55
- "eslint": "^10.6.0",
56
- "eslint-import-resolver-typescript": "^4.4.5",
117
+ "base64-js": "^1.5.1",
118
+ "bowser": "^2.14.1",
119
+ "crypto-js": "^4.2.0",
120
+ "debug": "^4.4.3",
121
+ "es6-dynamic-template": "^2.0.0",
57
122
  "ethers": "^6.17.0",
123
+ "file-type": "^22.0.1",
124
+ "fluent-ffmpeg": "^2.1.3",
125
+ "geotiff": "^3.0.5",
126
+ "gm": "^1.25.1",
127
+ "graphql": "^17.0.2",
128
+ "hasbin": "^1.2.3",
58
129
  "hash-wasm": "^4.12.0",
59
130
  "idb": "^8.0.3",
60
131
  "lru-cache": "^11.5.1",
61
- "observable-fns": "~0.6.1",
62
- "typescript": "~6.0.3",
63
- "vite": "^8.1.2",
64
- "vitest": "^4.1.9",
132
+ "node-screenlogic": "^2.1.1",
133
+ "observable-fns": "^0.6.1",
134
+ "parse-data-url": "^6.0.0",
135
+ "prom-client": "^15.1.3",
136
+ "regression": "^2.0.1",
137
+ "sha.js": "^2.4.12",
138
+ "svg-parser": "^2.0.4",
139
+ "systeminformation": "^5.31.14",
140
+ "uuid": "^14.0.1",
141
+ "webextension-polyfill": "^0.12.0",
142
+ "xml2js": "^0.6.2",
65
143
  "zod": "^4.4.3"
66
144
  },
67
- "peerDependencies": {
68
- "@ariestools/sdk": "^7.0",
69
- "@bitauth/libauth": "~3.0",
70
- "@noble/post-quantum": "~0.6.1",
71
- "@opentelemetry/api": "^1.9",
72
- "@opentelemetry/sdk-trace-base": "^2.7",
73
- "@scure/base": "^2.2",
74
- "@scure/bip39": "~2.2",
75
- "@xylabs/geo": "^7.0",
76
- "@xylabs/threads": "^7.0",
77
- "@xyo-network/sdk": "^7.0",
78
- "@xyo-network/sdk-protocol": "^7.0",
79
- "ajv": "^8.20",
80
- "async-mutex": "^0.5",
81
- "debug": "~4.4",
82
- "ethers": "^6.16",
83
- "hash-wasm": "^4.12",
84
- "idb": "^8.0",
85
- "lru-cache": "^11.3",
86
- "observable-fns": "~0.6",
87
- "zod": "^4.4"
88
- },
89
145
  "engines": {
90
146
  "node": "^24"
91
147
  },
92
148
  "publishConfig": {
93
149
  "access": "public"
94
- }
150
+ },
151
+ "deprecated": "Use @xyo-network/payloadset-plugins/etherscan-ethereum-gas instead. Replace @xyo-network/etherscan-ethereum-gas-plugin with @xyo-network/payloadset-plugins/etherscan-ethereum-gas. This package is a compatibility shim only and will not receive further updates."
95
152
  }
@@ -1,7 +0,0 @@
1
- import type { WitnessConfig } from '@xyo-network/sdk';
2
- import type { EthereumGasEtherscanWitnessConfigSchema } from './Schema.ts';
3
- export type EthereumGasEtherscanWitnessConfig = WitnessConfig<{
4
- apiKey: string;
5
- schema: EthereumGasEtherscanWitnessConfigSchema;
6
- }>;
7
- //# 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,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,aAAa,CAAA;AAE1E,MAAM,MAAM,iCAAiC,GAAG,aAAa,CAAC;IAC5D,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,uCAAuC,CAAA;CAChD,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { EthereumGasEtherscanWitness } from './Witness.ts';
2
- export declare const EthereumGasEtherscanPlugin: () => import("@xyo-network/sdk").PayloadSetWitnessPlugin<EthereumGasEtherscanWitness>;
3
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAA;AAE1D,eAAO,MAAM,0BAA0B,uFASpC,CAAA"}
@@ -1,5 +0,0 @@
1
- export type EthereumGasEtherscanWitnessConfigSchema = typeof EthereumGasEtherscanWitnessConfigSchema;
2
- export declare const EthereumGasEtherscanWitnessConfigSchema: "network.xyo.blockchain.ethereum.gas.etherscan.witness.config" & {
3
- readonly __schema: true;
4
- };
5
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,uCAAuC,GAAG,OAAO,uCAAuC,CAAA;AACpG,eAAO,MAAM,uCAAuC;;CAC8B,CAAA"}
@@ -1,9 +0,0 @@
1
- import type { AnyConfigSchema, Payload, Schema, WitnessParams } from '@xyo-network/sdk';
2
- import { AbstractWitness } from '@xyo-network/sdk';
3
- import type { EthereumGasEtherscanWitnessConfig } from './Config.ts';
4
- export declare class EthereumGasEtherscanWitness extends AbstractWitness<WitnessParams<AnyConfigSchema<EthereumGasEtherscanWitnessConfig>>> {
5
- static readonly configSchemas: Schema[];
6
- static readonly defaultConfigSchema: Schema;
7
- protected observeHandler(): Promise<Payload[]>;
8
- }
9
- //# sourceMappingURL=Witness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAChD,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,eAAe,EAAkB,MAAM,kBAAkB,CAAA;AAElE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAA;AAIpE,qBAAa,2BAA4B,SAAQ,eAAe,CAAC,aAAa,CAAC,eAAe,CAAC,iCAAiC,CAAC,CAAC,CAAC;IACjI,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAoE;IACpH,gBAAyB,mBAAmB,EAAE,MAAM,CAA0C;cAErE,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAQ9D"}
@@ -1,3 +0,0 @@
1
- import type { EthereumGasEtherscanResponse } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
2
- export declare const getGasFromEtherscan: (apiKey: string) => Promise<EthereumGasEtherscanResponse>;
3
- //# sourceMappingURL=getGasFromEtherscan.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getGasFromEtherscan.d.ts","sourceRoot":"","sources":["../../../src/lib/getGasFromEtherscan.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAA;AAEtG,eAAO,MAAM,mBAAmB,GAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,4BAA4B,CAI9F,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './getGasFromEtherscan.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA"}