@xyo-network/etherchain-ethereum-gas-v2-plugin 6.0.3 → 7.0.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.
Files changed (37) hide show
  1. package/README.md +5 -0
  2. package/dist/neutral/index.mjs +2 -1
  3. package/dist/neutral/index.mjs.map +2 -2
  4. package/dist/neutral/lib/getV2GasFromEtherchain.d.ts.map +1 -1
  5. package/package.json +18 -19
  6. package/dist/browser/Config.d.ts +0 -6
  7. package/dist/browser/Config.d.ts.map +0 -1
  8. package/dist/browser/Plugin.d.ts +0 -2
  9. package/dist/browser/Plugin.d.ts.map +0 -1
  10. package/dist/browser/Schema.d.ts +0 -5
  11. package/dist/browser/Schema.d.ts.map +0 -1
  12. package/dist/browser/Witness.d.ts +0 -10
  13. package/dist/browser/Witness.d.ts.map +0 -1
  14. package/dist/browser/index.d.ts +0 -5
  15. package/dist/browser/index.d.ts.map +0 -1
  16. package/dist/browser/index.mjs +0 -49
  17. package/dist/browser/index.mjs.map +0 -7
  18. package/dist/browser/lib/getV2GasFromEtherchain.d.ts +0 -3
  19. package/dist/browser/lib/getV2GasFromEtherchain.d.ts.map +0 -1
  20. package/dist/browser/lib/index.d.ts +0 -2
  21. package/dist/browser/lib/index.d.ts.map +0 -1
  22. package/dist/node/Config.d.ts +0 -6
  23. package/dist/node/Config.d.ts.map +0 -1
  24. package/dist/node/Plugin.d.ts +0 -2
  25. package/dist/node/Plugin.d.ts.map +0 -1
  26. package/dist/node/Schema.d.ts +0 -5
  27. package/dist/node/Schema.d.ts.map +0 -1
  28. package/dist/node/Witness.d.ts +0 -10
  29. package/dist/node/Witness.d.ts.map +0 -1
  30. package/dist/node/index.d.ts +0 -5
  31. package/dist/node/index.d.ts.map +0 -1
  32. package/dist/node/index.mjs +0 -49
  33. package/dist/node/index.mjs.map +0 -7
  34. package/dist/node/lib/getV2GasFromEtherchain.d.ts +0 -3
  35. package/dist/node/lib/getV2GasFromEtherchain.d.ts.map +0 -1
  36. package/dist/node/lib/index.d.ts +0 -2
  37. package/dist/node/lib/index.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/etherchain-ethereum-gas-v2-plugin
2
4
 
3
5
  [![npm][npm-badge]][npm-link]
@@ -36,9 +38,12 @@ bun add {{name}}
36
38
 
37
39
  See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
38
40
 
41
+ ## Credits
39
42
 
43
+ [Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
40
44
 
41
45
  [npm-badge]: https://img.shields.io/npm/v/@xyo-network/etherchain-ethereum-gas-v2-plugin.svg
42
46
  [npm-link]: https://www.npmjs.com/package/@xyo-network/etherchain-ethereum-gas-v2-plugin
43
47
  [license-badge]: https://img.shields.io/npm/l/@xyo-network/etherchain-ethereum-gas-v2-plugin.svg
44
48
  [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
49
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
@@ -10,7 +10,8 @@ import { AbstractWitness } from "@xyo-network/sdk-js";
10
10
  import { assertEx, fetchJsonClient } from "@xylabs/sdk-js";
11
11
  var url = "https://beaconcha.in/api/v1/execution/gasnow";
12
12
  var getV2GasFromEtherchain = async () => {
13
- return assertEx((await fetchJsonClient.get(url)).data, () => "Empty Etherchain response");
13
+ const response = await fetchJsonClient.get(url);
14
+ return assertEx(response.data, () => "Empty Etherchain response");
14
15
  };
15
16
 
16
17
  // src/Schema.ts
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Plugin.ts", "../../src/Witness.ts", "../../src/lib/getV2GasFromEtherchain.ts", "../../src/Schema.ts"],
4
- "sourcesContent": ["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { createPayloadSetWitnessPlugin, PayloadSetSchema } from '@xyo-network/sdk-js'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n", "import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport type {\n AnyConfigSchema, Payload, Schema, WitnessParams,\n} from '@xyo-network/sdk-js'\nimport { AbstractWitness } from '@xyo-network/sdk-js'\n\nimport type { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n", "import { assertEx, fetchJsonClient } from '@xylabs/sdk-js'\nimport type { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return assertEx((await fetchJsonClient.get<EthereumGasEtherchainV2Response>(url)).data, () => 'Empty Etherchain response')\n}\n", "import { asSchema } from '@xyo-network/sdk-js'\n\nexport type EthereumGasEtherchainV2WitnessConfigSchema = typeof EthereumGasEtherchainV2WitnessConfigSchema\nexport const EthereumGasEtherchainV2WitnessConfigSchema\n = asSchema('network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config', true)\n"],
5
- "mappings": ";AAAA,SAAS,iCAAAA,sCAAqC;AAC9C,SAAS,+BAA+B,wBAAwB;;;ACAhE,SAAS,qCAAqC;AAI9C,SAAS,uBAAuB;;;ACLhC,SAAS,UAAU,uBAAuB;AAG1C,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,SAAO,UAAU,MAAM,gBAAgB,IAAqC,GAAG,GAAG,MAAM,MAAM,2BAA2B;AAC3H;;;ACPA,SAAS,gBAAgB;AAGlB,IAAM,6CACT,SAAS,oEAAoE,IAAI;;;AFS9E,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0CAA0C;AAAA,EACtH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADpBO,IAAM,gCAAgC,MAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,8BAA6B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { createPayloadSetWitnessPlugin, PayloadSetSchema } from '@xyo-network/sdk-js'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params))\n },\n },\n )\n", "import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport type {\n AnyConfigSchema, Payload, Schema, WitnessParams,\n} from '@xyo-network/sdk-js'\nimport { AbstractWitness } from '@xyo-network/sdk-js'\n\nimport type { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n", "import { assertEx, fetchJsonClient } from '@xylabs/sdk-js'\nimport type { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n const response = await fetchJsonClient.get<EthereumGasEtherchainV2Response>(url)\n return assertEx(response.data, () => 'Empty Etherchain response')\n}\n", "import { asSchema } from '@xyo-network/sdk-js'\n\nexport type EthereumGasEtherchainV2WitnessConfigSchema = typeof EthereumGasEtherchainV2WitnessConfigSchema\nexport const EthereumGasEtherchainV2WitnessConfigSchema\n = asSchema('network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config', true)\n"],
5
+ "mappings": ";AAAA,SAAS,iCAAAA,sCAAqC;AAC9C,SAAS,+BAA+B,wBAAwB;;;ACAhE,SAAS,qCAAqC;AAI9C,SAAS,uBAAuB;;;ACLhC,SAAS,UAAU,uBAAuB;AAG1C,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,QAAM,WAAW,MAAM,gBAAgB,IAAqC,GAAG;AAC/E,SAAO,SAAS,SAAS,MAAM,MAAM,2BAA2B;AAClE;;;ACRA,SAAS,gBAAgB;AAGlB,IAAM,6CACT,SAAS,oEAAoE,IAAI;;;AFS9E,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0CAA0C;AAAA,EACtH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADpBO,IAAM,gCAAgC,MAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,8BAA6B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;",
6
6
  "names": ["EthereumGasEtherchainV2Schema", "EthereumGasEtherchainV2Schema"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getV2GasFromEtherchain.d.ts","sourceRoot":"","sources":["../../../src/lib/getV2GasFromEtherchain.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAA;AAI7G,eAAO,MAAM,sBAAsB,QAAa,OAAO,CAAC,+BAA+B,CAEtF,CAAA"}
1
+ {"version":3,"file":"getV2GasFromEtherchain.d.ts","sourceRoot":"","sources":["../../../src/lib/getV2GasFromEtherchain.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAA;AAI7G,eAAO,MAAM,sBAAsB,QAAa,OAAO,CAAC,+BAA+B,CAGtF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/etherchain-ethereum-gas-v2-plugin",
3
- "version": "6.0.3",
3
+ "version": "7.0.0",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -31,30 +31,28 @@
31
31
  "README.md"
32
32
  ],
33
33
  "dependencies": {
34
- "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin": "~6.0.3"
34
+ "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin": "~7.0.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@bitauth/libauth": "~3.0.0",
38
38
  "@metamask/providers": "^22.1.1",
39
39
  "@noble/post-quantum": "~0.6.1",
40
40
  "@opentelemetry/api": "^1.9.1",
41
- "@opentelemetry/sdk-trace-base": "^2.7.1",
41
+ "@opentelemetry/sdk-trace-base": "^2.8.0",
42
42
  "@scure/base": "^2.2.0",
43
43
  "@scure/bip39": "~2.2.0",
44
- "@xylabs/geo": "^6.0.8",
45
- "@xylabs/sdk-js": "^6.0.8",
46
- "@xylabs/threads": "^6.0.8",
47
- "@xylabs/toolchain": "~8.1.16",
48
- "@xylabs/tsconfig": "~8.1.16",
49
- "@xylabs/vitest-extended": "~6.0.8",
50
- "@xyo-network/sdk-js": "^6.0.4",
51
- "@xyo-network/sdk-protocol-js": "~6.0.9",
44
+ "@xylabs/geo": "^6.1.3",
45
+ "@xylabs/sdk-js": "^6.1.3",
46
+ "@xylabs/threads": "^6.1.3",
47
+ "@xylabs/toolchain": "~8.2.7",
48
+ "@xylabs/tsconfig": "~8.2.7",
49
+ "@xylabs/vitest-extended": "^6.1.3",
50
+ "@xyo-network/sdk-js": "^7.0.0",
51
+ "@xyo-network/sdk-protocol-js": "~7.0",
52
52
  "ajv": "^8.20.0",
53
53
  "async-mutex": "^0.5.0",
54
- "bn.js": "^5.2.3",
55
- "buffer": "^6.0.3",
56
54
  "debug": "~4.4.3",
57
- "eslint": "^10.4.1",
55
+ "eslint": "^10.5.0",
58
56
  "ethers": "^6.16.0",
59
57
  "hash-wasm": "^4.12.0",
60
58
  "idb": "^8.0.3",
@@ -62,7 +60,7 @@
62
60
  "observable-fns": "~0.6.1",
63
61
  "typescript": "~6.0.3",
64
62
  "vite": "^8.0.16",
65
- "vitest": "^4.1.8",
63
+ "vitest": "^4.1.9",
66
64
  "webextension-polyfill": "^0.12.0",
67
65
  "zod": "^4.4.3"
68
66
  },
@@ -77,12 +75,10 @@
77
75
  "@xylabs/geo": "^6.0",
78
76
  "@xylabs/sdk-js": "^6.0",
79
77
  "@xylabs/threads": "^6.0",
80
- "@xyo-network/sdk-js": "^6.0",
81
- "@xyo-network/sdk-protocol-js": "~6.0",
78
+ "@xyo-network/sdk-js": "^7.0",
79
+ "@xyo-network/sdk-protocol-js": "^7.0",
82
80
  "ajv": "^8.20",
83
81
  "async-mutex": "^0.5",
84
- "bn.js": "^5.2",
85
- "buffer": "^6.0",
86
82
  "debug": "~4.4",
87
83
  "ethers": "^6.16",
88
84
  "hash-wasm": "^4.12",
@@ -92,6 +88,9 @@
92
88
  "webextension-polyfill": "^0.12",
93
89
  "zod": "^4.4"
94
90
  },
91
+ "engines": {
92
+ "node": "^24"
93
+ },
95
94
  "publishConfig": {
96
95
  "access": "public"
97
96
  }
@@ -1,6 +0,0 @@
1
- import type { WitnessConfig } from '@xyo-network/sdk-js';
2
- import type { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
- export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
- schema: EthereumGasEtherchainV2WitnessConfigSchema;
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,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,aAAa,CAAA;AAE7E,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC;IAC/D,MAAM,EAAE,0CAA0C,CAAA;CACnD,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/sdk-js").PayloadSetWitnessPlugin<import("@xyo-network/sdk-js").WitnessModule<import("@xyo-network/sdk-js").WitnessParams<import("@xyo-network/sdk-js").AnyConfigSchema<import("@xyo-network/sdk-js").WitnessConfig>>, import("@xyo-network/sdk-js").WitnessModuleEventData>>;
2
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B,ySAQvC,CAAA"}
@@ -1,5 +0,0 @@
1
- export type EthereumGasEtherchainV2WitnessConfigSchema = typeof EthereumGasEtherchainV2WitnessConfigSchema;
2
- export declare const EthereumGasEtherchainV2WitnessConfigSchema: "network.xyo.blockchain.ethereum.gas.etherchain.v2.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,0CAA0C,GAAG,OAAO,0CAA0C,CAAA;AAC1G,eAAO,MAAM,0CAA0C;;CAC+B,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { AnyConfigSchema, Payload, Schema, WitnessParams } from '@xyo-network/sdk-js';
2
- import { AbstractWitness } from '@xyo-network/sdk-js';
3
- import type { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
4
- export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
5
- export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
6
- static readonly configSchemas: Schema[];
7
- static readonly defaultConfigSchema: Schema;
8
- protected observeHandler(): Promise<Payload[]>;
9
- }
10
- //# sourceMappingURL=Witness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAChD,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,aAAa,CAAA;AAIvE,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC,eAAe,CAAC,oCAAoC,CAAC,CAAC,CAAA;AAEvH,qBAAa,8BAA+B,SAAQ,eAAe,CAAC,oCAAoC,CAAC;IACvG,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAuE;IACvH,gBAAyB,mBAAmB,EAAE,MAAM,CAA6C;cAExE,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAQ9D"}
@@ -1,5 +0,0 @@
1
- export * from './Config.ts';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
- export * from './Schema.ts';
4
- export * from './Witness.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,6BAA6B,IAAI,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AACrG,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -1,49 +0,0 @@
1
- // src/Plugin.ts
2
- import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
3
- import { createPayloadSetWitnessPlugin, PayloadSetSchema } from "@xyo-network/sdk-js";
4
-
5
- // src/Witness.ts
6
- import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
7
- import { AbstractWitness } from "@xyo-network/sdk-js";
8
-
9
- // src/lib/getV2GasFromEtherchain.ts
10
- import { assertEx, fetchJsonClient } from "@xylabs/sdk-js";
11
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
12
- var getV2GasFromEtherchain = async () => {
13
- return assertEx((await fetchJsonClient.get(url)).data, () => "Empty Etherchain response");
14
- };
15
-
16
- // src/Schema.ts
17
- import { asSchema } from "@xyo-network/sdk-js";
18
- var EthereumGasEtherchainV2WitnessConfigSchema = asSchema("network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config", true);
19
-
20
- // src/Witness.ts
21
- var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
22
- static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
23
- static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
24
- async observeHandler() {
25
- const payload = {
26
- ...await getV2GasFromEtherchain(),
27
- schema: EthereumGasEtherchainV2Schema,
28
- timestamp: Date.now()
29
- };
30
- return [payload];
31
- }
32
- };
33
-
34
- // src/Plugin.ts
35
- var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
36
- { required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
37
- {
38
- witness: async (params) => {
39
- return await EtherchainEthereumGasWitnessV2.create(params);
40
- }
41
- }
42
- );
43
- export {
44
- EtherchainEthereumGasWitnessV2,
45
- EthereumGasEtherchainV2Plugin,
46
- EthereumGasEtherchainV2WitnessConfigSchema,
47
- EthereumGasEtherchainV2Plugin as default
48
- };
49
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Plugin.ts", "../../src/Witness.ts", "../../src/lib/getV2GasFromEtherchain.ts", "../../src/Schema.ts"],
4
- "sourcesContent": ["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { createPayloadSetWitnessPlugin, PayloadSetSchema } from '@xyo-network/sdk-js'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n", "import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport type {\n AnyConfigSchema, Payload, Schema, WitnessParams,\n} from '@xyo-network/sdk-js'\nimport { AbstractWitness } from '@xyo-network/sdk-js'\n\nimport type { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n", "import { assertEx, fetchJsonClient } from '@xylabs/sdk-js'\nimport type { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return assertEx((await fetchJsonClient.get<EthereumGasEtherchainV2Response>(url)).data, () => 'Empty Etherchain response')\n}\n", "import { asSchema } from '@xyo-network/sdk-js'\n\nexport type EthereumGasEtherchainV2WitnessConfigSchema = typeof EthereumGasEtherchainV2WitnessConfigSchema\nexport const EthereumGasEtherchainV2WitnessConfigSchema\n = asSchema('network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config', true)\n"],
5
- "mappings": ";AAAA,SAAS,iCAAAA,sCAAqC;AAC9C,SAAS,+BAA+B,wBAAwB;;;ACAhE,SAAS,qCAAqC;AAI9C,SAAS,uBAAuB;;;ACLhC,SAAS,UAAU,uBAAuB;AAG1C,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,SAAO,UAAU,MAAM,gBAAgB,IAAqC,GAAG,GAAG,MAAM,MAAM,2BAA2B;AAC3H;;;ACPA,SAAS,gBAAgB;AAGlB,IAAM,6CACT,SAAS,oEAAoE,IAAI;;;AFS9E,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0CAA0C;AAAA,EACtH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADpBO,IAAM,gCAAgC,MAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,8BAA6B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;",
6
- "names": ["EthereumGasEtherchainV2Schema", "EthereumGasEtherchainV2Schema"]
7
- }
@@ -1,3 +0,0 @@
1
- import type { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin';
2
- export declare const getV2GasFromEtherchain: () => Promise<EthereumGasEtherchainV2Response>;
3
- //# sourceMappingURL=getV2GasFromEtherchain.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getV2GasFromEtherchain.d.ts","sourceRoot":"","sources":["../../../src/lib/getV2GasFromEtherchain.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAA;AAI7G,eAAO,MAAM,sBAAsB,QAAa,OAAO,CAAC,+BAA+B,CAEtF,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './getV2GasFromEtherchain.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,6BAA6B,CAAA"}
@@ -1,6 +0,0 @@
1
- import type { WitnessConfig } from '@xyo-network/sdk-js';
2
- import type { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts';
3
- export type EthereumGasEtherchainV2WitnessConfig = WitnessConfig<{
4
- schema: EthereumGasEtherchainV2WitnessConfigSchema;
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,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,aAAa,CAAA;AAE7E,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC;IAC/D,MAAM,EAAE,0CAA0C,CAAA;CACnD,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const EthereumGasEtherchainV2Plugin: () => import("@xyo-network/sdk-js").PayloadSetWitnessPlugin<import("@xyo-network/sdk-js").WitnessModule<import("@xyo-network/sdk-js").WitnessParams<import("@xyo-network/sdk-js").AnyConfigSchema<import("@xyo-network/sdk-js").WitnessConfig>>, import("@xyo-network/sdk-js").WitnessModuleEventData>>;
2
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B,ySAQvC,CAAA"}
@@ -1,5 +0,0 @@
1
- export type EthereumGasEtherchainV2WitnessConfigSchema = typeof EthereumGasEtherchainV2WitnessConfigSchema;
2
- export declare const EthereumGasEtherchainV2WitnessConfigSchema: "network.xyo.blockchain.ethereum.gas.etherchain.v2.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,0CAA0C,GAAG,OAAO,0CAA0C,CAAA;AAC1G,eAAO,MAAM,0CAA0C;;CAC+B,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { AnyConfigSchema, Payload, Schema, WitnessParams } from '@xyo-network/sdk-js';
2
- import { AbstractWitness } from '@xyo-network/sdk-js';
3
- import type { EthereumGasEtherchainV2WitnessConfig } from './Config.ts';
4
- export type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>;
5
- export declare class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {
6
- static readonly configSchemas: Schema[];
7
- static readonly defaultConfigSchema: Schema;
8
- protected observeHandler(): Promise<Payload[]>;
9
- }
10
- //# sourceMappingURL=Witness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAChD,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,aAAa,CAAA;AAIvE,MAAM,MAAM,oCAAoC,GAAG,aAAa,CAAC,eAAe,CAAC,oCAAoC,CAAC,CAAC,CAAA;AAEvH,qBAAa,8BAA+B,SAAQ,eAAe,CAAC,oCAAoC,CAAC;IACvG,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAuE;IACvH,gBAAyB,mBAAmB,EAAE,MAAM,CAA6C;cAExE,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAQ9D"}
@@ -1,5 +0,0 @@
1
- export * from './Config.ts';
2
- export { EthereumGasEtherchainV2Plugin as default, EthereumGasEtherchainV2Plugin } from './Plugin.ts';
3
- export * from './Schema.ts';
4
- export * from './Witness.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,6BAA6B,IAAI,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AACrG,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -1,49 +0,0 @@
1
- // src/Plugin.ts
2
- import { EthereumGasEtherchainV2Schema as EthereumGasEtherchainV2Schema2 } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
3
- import { createPayloadSetWitnessPlugin, PayloadSetSchema } from "@xyo-network/sdk-js";
4
-
5
- // src/Witness.ts
6
- import { EthereumGasEtherchainV2Schema } from "@xyo-network/etherchain-ethereum-gas-v2-payload-plugin";
7
- import { AbstractWitness } from "@xyo-network/sdk-js";
8
-
9
- // src/lib/getV2GasFromEtherchain.ts
10
- import { assertEx, fetchJsonClient } from "@xylabs/sdk-js";
11
- var url = "https://beaconcha.in/api/v1/execution/gasnow";
12
- var getV2GasFromEtherchain = async () => {
13
- return assertEx((await fetchJsonClient.get(url)).data, () => "Empty Etherchain response");
14
- };
15
-
16
- // src/Schema.ts
17
- import { asSchema } from "@xyo-network/sdk-js";
18
- var EthereumGasEtherchainV2WitnessConfigSchema = asSchema("network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config", true);
19
-
20
- // src/Witness.ts
21
- var EtherchainEthereumGasWitnessV2 = class extends AbstractWitness {
22
- static configSchemas = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema];
23
- static defaultConfigSchema = EthereumGasEtherchainV2WitnessConfigSchema;
24
- async observeHandler() {
25
- const payload = {
26
- ...await getV2GasFromEtherchain(),
27
- schema: EthereumGasEtherchainV2Schema,
28
- timestamp: Date.now()
29
- };
30
- return [payload];
31
- }
32
- };
33
-
34
- // src/Plugin.ts
35
- var EthereumGasEtherchainV2Plugin = () => createPayloadSetWitnessPlugin(
36
- { required: { [EthereumGasEtherchainV2Schema2]: 1 }, schema: PayloadSetSchema },
37
- {
38
- witness: async (params) => {
39
- return await EtherchainEthereumGasWitnessV2.create(params);
40
- }
41
- }
42
- );
43
- export {
44
- EtherchainEthereumGasWitnessV2,
45
- EthereumGasEtherchainV2Plugin,
46
- EthereumGasEtherchainV2WitnessConfigSchema,
47
- EthereumGasEtherchainV2Plugin as default
48
- };
49
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Plugin.ts", "../../src/Witness.ts", "../../src/lib/getV2GasFromEtherchain.ts", "../../src/Schema.ts"],
4
- "sourcesContent": ["import { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { createPayloadSetWitnessPlugin, PayloadSetSchema } from '@xyo-network/sdk-js'\n\nimport { EtherchainEthereumGasWitnessV2 } from './Witness.ts'\n\nexport const EthereumGasEtherchainV2Plugin = () =>\n createPayloadSetWitnessPlugin(\n { required: { [EthereumGasEtherchainV2Schema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EtherchainEthereumGasWitnessV2.create(params)) as EtherchainEthereumGasWitnessV2\n },\n },\n )\n", "import type { EthereumGasEtherchainV2Payload } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport { EthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\nimport type {\n AnyConfigSchema, Payload, Schema, WitnessParams,\n} from '@xyo-network/sdk-js'\nimport { AbstractWitness } from '@xyo-network/sdk-js'\n\nimport type { EthereumGasEtherchainV2WitnessConfig } from './Config.ts'\nimport { getV2GasFromEtherchain } from './lib/index.ts'\nimport { EthereumGasEtherchainV2WitnessConfigSchema } from './Schema.ts'\n\nexport type EtherchainEthereumGasWitnessV2Params = WitnessParams<AnyConfigSchema<EthereumGasEtherchainV2WitnessConfig>>\n\nexport class EtherchainEthereumGasWitnessV2 extends AbstractWitness<EtherchainEthereumGasWitnessV2Params> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEtherchainV2WitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEtherchainV2WitnessConfigSchema\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload: EthereumGasEtherchainV2Payload = {\n ...(await getV2GasFromEtherchain()),\n schema: EthereumGasEtherchainV2Schema,\n timestamp: Date.now(),\n }\n return [payload]\n }\n}\n", "import { assertEx, fetchJsonClient } from '@xylabs/sdk-js'\nimport type { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'\n\nconst url = 'https://beaconcha.in/api/v1/execution/gasnow'\n\nexport const getV2GasFromEtherchain = async (): Promise<EthereumGasEtherchainV2Response> => {\n return assertEx((await fetchJsonClient.get<EthereumGasEtherchainV2Response>(url)).data, () => 'Empty Etherchain response')\n}\n", "import { asSchema } from '@xyo-network/sdk-js'\n\nexport type EthereumGasEtherchainV2WitnessConfigSchema = typeof EthereumGasEtherchainV2WitnessConfigSchema\nexport const EthereumGasEtherchainV2WitnessConfigSchema\n = asSchema('network.xyo.blockchain.ethereum.gas.etherchain.v2.witness.config', true)\n"],
5
- "mappings": ";AAAA,SAAS,iCAAAA,sCAAqC;AAC9C,SAAS,+BAA+B,wBAAwB;;;ACAhE,SAAS,qCAAqC;AAI9C,SAAS,uBAAuB;;;ACLhC,SAAS,UAAU,uBAAuB;AAG1C,IAAM,MAAM;AAEL,IAAM,yBAAyB,YAAsD;AAC1F,SAAO,UAAU,MAAM,gBAAgB,IAAqC,GAAG,GAAG,MAAM,MAAM,2BAA2B;AAC3H;;;ACPA,SAAS,gBAAgB;AAGlB,IAAM,6CACT,SAAS,oEAAoE,IAAI;;;AFS9E,IAAM,iCAAN,cAA6C,gBAAsD;AAAA,EACxG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,0CAA0C;AAAA,EACtH,OAAyB,sBAA8B;AAAA,EAEvD,MAAyB,iBAAqC;AAC5D,UAAM,UAA0C;AAAA,MAC9C,GAAI,MAAM,uBAAuB;AAAA,MACjC,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADpBO,IAAM,gCAAgC,MAC3C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,8BAA6B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC7E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,+BAA+B,OAAO,MAAM;AAAA,IAC5D;AAAA,EACF;AACF;",
6
- "names": ["EthereumGasEtherchainV2Schema", "EthereumGasEtherchainV2Schema"]
7
- }
@@ -1,3 +0,0 @@
1
- import type { EthereumGasEtherchainV2Response } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin';
2
- export declare const getV2GasFromEtherchain: () => Promise<EthereumGasEtherchainV2Response>;
3
- //# sourceMappingURL=getV2GasFromEtherchain.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getV2GasFromEtherchain.d.ts","sourceRoot":"","sources":["../../../src/lib/getV2GasFromEtherchain.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAA;AAI7G,eAAO,MAAM,sBAAsB,QAAa,OAAO,CAAC,+BAA+B,CAEtF,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './getV2GasFromEtherchain.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,6BAA6B,CAAA"}