@xyo-network/etherscan-ethereum-gas-plugin 2.51.8 → 2.51.10

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,8 +1,8 @@
1
1
  import { XyoEthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin';
2
2
  import { PayloadSetSchema } from '@xyo-network/payload-model';
3
- import { createPayloadSetPlugin } from '@xyo-network/payloadset-plugin';
3
+ import { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin';
4
4
  import { XyoEthereumGasEtherscanWitness } from './Witness';
5
- export const XyoEthereumGasEtherscanPlugin = () => createPayloadSetPlugin({ required: { [XyoEthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema }, {
5
+ export const XyoEthereumGasEtherscanPlugin = () => createPayloadSetWitnessPlugin({ required: { [XyoEthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema }, {
6
6
  witness: async (params) => {
7
7
  const result = await XyoEthereumGasEtherscanWitness.create(params);
8
8
  return result;
@@ -1 +1 @@
1
- {"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAA;AAElG,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAA2B,MAAM,gCAAgC,CAAA;AAGhG,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAA;AAE1D,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,EAAE,CAChD,sBAAsB,CACpB,EAAE,QAAQ,EAAE,EAAE,CAAC,6BAA6B,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAC9E;IACE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QACxB,MAAM,MAAM,GAAG,MAAM,8BAA8B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAClE,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CACF,CAAA"}
1
+ {"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAA;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAA;AAE9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAA;AAE1D,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,EAAE,CAChD,6BAA6B,CAC3B,EAAE,QAAQ,EAAE,EAAE,CAAC,6BAA6B,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAC9E;IACE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QACxB,MAAM,MAAM,GAAG,MAAM,8BAA8B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAClE,OAAO,MAAwC,CAAA;IACjD,CAAC;CACF,CACF,CAAA"}
@@ -6,10 +6,6 @@ import { getGasFromEtherscan } from './lib';
6
6
  import { XyoEthereumGasEtherscanWitnessConfigSchema } from './Schema';
7
7
  export class XyoEthereumGasEtherscanWitness extends TimestampWitness {
8
8
  static configSchema = XyoEthereumGasEtherscanWitnessConfigSchema;
9
- static async create(params) {
10
- assertEx(params?.config?.apiKey, 'apiKey is required');
11
- return (await super.create(params));
12
- }
13
9
  async observe() {
14
10
  const apiKey = assertEx(this.config?.apiKey, 'apiKey is required');
15
11
  const payload = new XyoPayloadBuilder({ schema: XyoEthereumGasEtherscanSchema })
@@ -1 +1 @@
1
- {"version":3,"file":"Witness.js","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAkC,6BAA6B,EAAE,MAA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OAAO,EAAE,0CAA0C,EAAE,MAAM,UAAU,CAAA;AAErE,MAAM,OAAO,8BAA+B,SAAQ,gBAAsF;IACxI,MAAM,CAAU,YAAY,GAAG,0CAA0C,CAAA;IAEhE,KAAK,CAAC,OAAO;QACpB,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAA;QAClE,MAAM,OAAO,GAAG,IAAI,iBAAiB,CAAiC,EAAE,MAAM,EAAE,6BAA6B,EAAE,CAAC;aAC7G,MAAM,CAAC,MAAM,mBAAmB,CAAC,MAAM,CAAC,CAAC;aACzC,KAAK,EAAE,CAAA;QACV,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IACjC,CAAC"}
@@ -1,20 +1,3 @@
1
- import { ModuleParams } from '@xyo-network/module';
2
- import { PayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin';
3
1
  import { XyoEthereumGasEtherscanWitness } from './Witness';
4
- export declare const XyoEthereumGasEtherscanPlugin: () => PayloadSetWitnessPlugin<XyoEthereumGasEtherscanWitness, ModuleParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
5
- name?: string | undefined;
6
- security?: {
7
- allowAnonymous?: boolean | undefined;
8
- allowed?: Record<string, (string | import("@xyo-network/module").CosigningAddressSet)[]> | undefined;
9
- disallowed?: Record<string, string[]> | undefined;
10
- } | undefined;
11
- storeQueries?: boolean | undefined;
12
- } & {
13
- apiKey: string;
14
- schema: "network.xyo.blockchain.ethereum.gas.etherscan.witness.config";
15
- } & {
16
- targetSet?: (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("@xyo-network/payload-model").PayloadSet & {
17
- schema: "network.xyo.payload.set";
18
- }) | undefined;
19
- }, undefined>>;
2
+ export declare const XyoEthereumGasEtherscanPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<XyoEthereumGasEtherscanWitness>;
20
3
  //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAA0B,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAGhG,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAA;AAE1D,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;cASvC,CAAA"}
1
+ {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAA;AAE1D,eAAO,MAAM,6BAA6B,wGASvC,CAAA"}
@@ -1,10 +1,9 @@
1
- import { ModuleParams } from '@xyo-network/module';
1
+ import { AnyConfigSchema } from '@xyo-network/module-model';
2
2
  import { XyoPayload } from '@xyo-network/payload-model';
3
3
  import { TimestampWitness, WitnessParams } from '@xyo-network/witness';
4
4
  import { XyoEthereumGasEtherscanWitnessConfig } from './Config';
5
- export declare class XyoEthereumGasEtherscanWitness extends TimestampWitness<WitnessParams<XyoEthereumGasEtherscanWitnessConfig>> {
5
+ export declare class XyoEthereumGasEtherscanWitness extends TimestampWitness<WitnessParams<AnyConfigSchema<XyoEthereumGasEtherscanWitnessConfig>>> {
6
6
  static configSchema: "network.xyo.blockchain.ethereum.gas.etherscan.witness.config";
7
- static create(params?: ModuleParams<XyoEthereumGasEtherscanWitnessConfig>): Promise<XyoEthereumGasEtherscanWitness>;
8
7
  observe(): Promise<XyoPayload[]>;
9
8
  }
10
9
  //# sourceMappingURL=Witness.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEtE,OAAO,EAAE,oCAAoC,EAAE,MAAM,UAAU,CAAA;AAI/D,qBAAa,8BAA+B,SAAQ,gBAAgB,CAAC,aAAa,CAAC,oCAAoC,CAAC,CAAC;IACvH,OAAgB,YAAY,iEAA6C;WAEnD,MAAM,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,oCAAoC,CAAC,GAAG,OAAO,CAAC,8BAA8B,CAAC;IAKnH,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;CAOhD"}
1
+ {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEtE,OAAO,EAAE,oCAAoC,EAAE,MAAM,UAAU,CAAA;AAI/D,qBAAa,8BAA+B,SAAQ,gBAAgB,CAAC,aAAa,CAAC,eAAe,CAAC,oCAAoC,CAAC,CAAC,CAAC;IACxI,OAAgB,YAAY,iEAA6C;IAE1D,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;CAOhD"}
package/package.json CHANGED
@@ -11,13 +11,13 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@xylabs/assert": "^2.7.4",
14
- "@xyo-network/axios": "^2.51.8",
15
- "@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.51.8",
16
- "@xyo-network/module": "^2.51.8",
17
- "@xyo-network/payload-builder": "^2.51.8",
18
- "@xyo-network/payload-model": "^2.51.8",
19
- "@xyo-network/payloadset-plugin": "^2.51.8",
20
- "@xyo-network/witness": "^2.51.8"
14
+ "@xyo-network/axios": "^2.51.10",
15
+ "@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.51.10",
16
+ "@xyo-network/module-model": "^2.51.10",
17
+ "@xyo-network/payload-builder": "^2.51.10",
18
+ "@xyo-network/payload-model": "^2.51.10",
19
+ "@xyo-network/payloadset-plugin": "^2.51.10",
20
+ "@xyo-network/witness": "^2.51.10"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@xylabs/ts-scripts-yarn3": "^2.16.1",
@@ -57,5 +57,5 @@
57
57
  },
58
58
  "sideEffects": false,
59
59
  "types": "dist/types/index.d.ts",
60
- "version": "2.51.8"
60
+ "version": "2.51.10"
61
61
  }
package/src/Plugin.ts CHANGED
@@ -1,18 +1,16 @@
1
1
  import { XyoEthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
2
- import { ModuleParams } from '@xyo-network/module'
3
2
  import { PayloadSetSchema } from '@xyo-network/payload-model'
4
- import { createPayloadSetPlugin, PayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'
3
+ import { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'
5
4
 
6
- import { XyoEthereumGasEtherscanWitnessConfig } from './Config'
7
5
  import { XyoEthereumGasEtherscanWitness } from './Witness'
8
6
 
9
7
  export const XyoEthereumGasEtherscanPlugin = () =>
10
- createPayloadSetPlugin<PayloadSetWitnessPlugin<XyoEthereumGasEtherscanWitness, ModuleParams<XyoEthereumGasEtherscanWitnessConfig>>>(
8
+ createPayloadSetWitnessPlugin<XyoEthereumGasEtherscanWitness>(
11
9
  { required: { [XyoEthereumGasEtherscanSchema]: 1 }, schema: PayloadSetSchema },
12
10
  {
13
11
  witness: async (params) => {
14
12
  const result = await XyoEthereumGasEtherscanWitness.create(params)
15
- return result
13
+ return result as XyoEthereumGasEtherscanWitness
16
14
  },
17
15
  },
18
16
  )
package/src/Witness.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { assertEx } from '@xylabs/assert'
2
2
  import { XyoEthereumGasEtherscanPayload, XyoEthereumGasEtherscanSchema } from '@xyo-network/etherscan-ethereum-gas-payload-plugin'
3
- import { ModuleParams } from '@xyo-network/module'
3
+ import { AnyConfigSchema } from '@xyo-network/module-model'
4
4
  import { XyoPayloadBuilder } from '@xyo-network/payload-builder'
5
5
  import { XyoPayload } from '@xyo-network/payload-model'
6
6
  import { TimestampWitness, WitnessParams } from '@xyo-network/witness'
@@ -9,14 +9,9 @@ import { XyoEthereumGasEtherscanWitnessConfig } from './Config'
9
9
  import { getGasFromEtherscan } from './lib'
10
10
  import { XyoEthereumGasEtherscanWitnessConfigSchema } from './Schema'
11
11
 
12
- export class XyoEthereumGasEtherscanWitness extends TimestampWitness<WitnessParams<XyoEthereumGasEtherscanWitnessConfig>> {
12
+ export class XyoEthereumGasEtherscanWitness extends TimestampWitness<WitnessParams<AnyConfigSchema<XyoEthereumGasEtherscanWitnessConfig>>> {
13
13
  static override configSchema = XyoEthereumGasEtherscanWitnessConfigSchema
14
14
 
15
- static override async create(params?: ModuleParams<XyoEthereumGasEtherscanWitnessConfig>): Promise<XyoEthereumGasEtherscanWitness> {
16
- assertEx(params?.config?.apiKey, 'apiKey is required')
17
- return (await super.create(params)) as XyoEthereumGasEtherscanWitness
18
- }
19
-
20
15
  override async observe(): Promise<XyoPayload[]> {
21
16
  const apiKey = assertEx(this.config?.apiKey, 'apiKey is required')
22
17
  const payload = new XyoPayloadBuilder<XyoEthereumGasEtherscanPayload>({ schema: XyoEthereumGasEtherscanSchema })