@xyo-network/gas-price-plugin 2.51.9 → 2.52.0-rc.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.
@@ -6,7 +6,7 @@ export class XyoEthereumGasDiviner extends AbstractDiviner {
6
6
  static configSchema = XyoEthereumGasDivinerConfigSchema;
7
7
  static targetSchema = XyoEthereumGasSchema;
8
8
  static async create(params) {
9
- return (await super.create(params));
9
+ return await super.create(params);
10
10
  }
11
11
  divine(payloads) {
12
12
  const cost = divineGas(payloads ?? []);
@@ -1 +1 @@
1
- {"version":3,"file":"Diviner.js","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAgC,MAAM,sBAAsB,CAAA;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAK5E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAA;AAI5D,MAAM,OAAO,qBAAsB,SAAQ,eAAe;IACxD,MAAM,CAAU,YAAY,GAAG,iCAAiC,CAAA;IAChE,MAAM,CAAU,YAAY,GAAG,oBAAoB,CAAA;IAEnD,MAAM,CAAU,KAAK,CAAC,MAAM,CAAC,MAAkD;QAC7E,OAAO,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAA0B,CAAA;IAC9D,CAAC;IAEQ,MAAM,CAAC,QAAsB;QACpC,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAA;QACtC,OAAO,CAAC,IAAI,CAAC,CAAA;IACf,CAAC"}
1
+ {"version":3,"file":"Diviner.js","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAA+C,MAAM,sBAAsB,CAAA;AACnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAK5E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAA;AAK5D,MAAM,OAAO,qBACX,SAAQ,eAAwB;IAGhC,MAAM,CAAU,YAAY,GAAW,iCAAiC,CAAA;IACxE,MAAM,CAAU,YAAY,GAAW,oBAAoB,CAAA;IAE3D,MAAM,CAAU,KAAK,CAAC,MAAM,CAA8C,MAAgB;QACxF,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACnC,CAAC;IAEQ,MAAM,CAAC,QAAsB;QACpC,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAA;QACtC,OAAO,CAAC,IAAI,CAAC,CAAA;IACf,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { XyoEthereumGasSchema } from '@xyo-network/gas-price-payload-plugin';
2
2
  import { PayloadSetSchema } from '@xyo-network/payload-model';
3
- import { createPayloadSetPlugin } from '@xyo-network/payloadset-plugin';
3
+ import { createPayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin';
4
4
  import { XyoEthereumGasDiviner } from './Diviner';
5
- export const XyoEthereumGasPlugin = () => createPayloadSetPlugin({ required: { [XyoEthereumGasSchema]: 1 }, schema: PayloadSetSchema }, {
5
+ export const XyoEthereumGasPlugin = () => createPayloadSetDivinerPlugin({ required: { [XyoEthereumGasSchema]: 1 }, schema: PayloadSetSchema }, {
6
6
  diviner: async (params) => {
7
- return await XyoEthereumGasDiviner.create(params);
7
+ return (await XyoEthereumGasDiviner.create(params));
8
8
  },
9
9
  });
10
10
  //# sourceMappingURL=Plugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAA2B,MAAM,gCAAgC,CAAA;AAEhG,OAAO,EAAE,qBAAqB,EAA+B,MAAM,WAAW,CAAA;AAE9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CACvC,sBAAsB,CACpB,EAAE,QAAQ,EAAE,EAAE,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,EACrE;IACE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QACxB,OAAO,MAAM,qBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACnD,CAAC;CACF,CACF,CAAA"}
1
+ {"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAA;AAE9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CACvC,6BAA6B,CAC3B,EAAE,QAAQ,EAAE,EAAE,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,EACrE;IACE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QACxB,OAAO,CAAC,MAAM,qBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,CAA0B,CAAA;IAC9E,CAAC;CACF,CACF,CAAA"}
@@ -1,15 +1,38 @@
1
- import { AbstractDiviner, DivinerConfig, DivinerModule } from '@xyo-network/diviner';
2
- import { ModuleParams } from '@xyo-network/module';
1
+ import { AbstractDiviner, DivinerConfig, DivinerModule, DivinerParams } from '@xyo-network/diviner';
2
+ import { AnyConfigSchema } from '@xyo-network/module';
3
3
  import { XyoPayloads } from '@xyo-network/payload-model';
4
4
  import { Promisable } from '@xyo-network/promise';
5
5
  import { XyoEthereumGasDivinerConfigSchema } from './Schema';
6
6
  export type XyoEthereumGasDivinerConfig = DivinerConfig<{
7
7
  schema: XyoEthereumGasDivinerConfigSchema;
8
8
  }>;
9
- export declare class XyoEthereumGasDiviner extends AbstractDiviner implements DivinerModule {
10
- static configSchema: "network.xyo.blockchain.ethereum.gas.diviner.config";
11
- static targetSchema: "network.xyo.blockchain.ethereum.gas";
12
- static create(params?: ModuleParams<XyoEthereumGasDivinerConfig>): Promise<XyoEthereumGasDiviner>;
9
+ export type XyoEthereumGasDivinerParams = DivinerParams<AnyConfigSchema<XyoEthereumGasDivinerConfig>>;
10
+ export declare class XyoEthereumGasDiviner<TParams extends XyoEthereumGasDivinerParams = XyoEthereumGasDivinerParams> extends AbstractDiviner<TParams> implements DivinerModule {
11
+ static configSchema: string;
12
+ static targetSchema: string;
13
+ static create<TParams extends XyoEthereumGasDivinerParams>(params?: TParams): Promise<DivinerModule<DivinerParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
14
+ name?: string | undefined;
15
+ schema: string;
16
+ security?: {
17
+ allowAnonymous?: boolean | undefined;
18
+ allowed?: Record<string, (string | import("@xyo-network/module").CosigningAddressSet)[]> | undefined;
19
+ disallowed?: Record<string, string[]> | undefined;
20
+ } | undefined;
21
+ storeQueries?: boolean | undefined;
22
+ } & Omit<Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
23
+ name?: string | undefined;
24
+ schema: "network.xyo.diviner.config";
25
+ security?: {
26
+ allowAnonymous?: boolean | undefined;
27
+ allowed?: Record<string, (string | import("@xyo-network/module").CosigningAddressSet)[]> | undefined;
28
+ disallowed?: Record<string, string[]> | undefined;
29
+ } | undefined;
30
+ storeQueries?: boolean | undefined;
31
+ } & Omit<{
32
+ schema: "network.xyo.diviner.config";
33
+ } & Omit<undefined, "schema">, "schema">, "schema"> & {
34
+ schema: string;
35
+ }, "schema">, undefined, undefined>>>;
13
36
  divine(payloads?: XyoPayloads): Promisable<XyoPayloads>;
14
37
  }
15
38
  //# sourceMappingURL=Diviner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGjD,OAAO,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAA;AAE5D,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IAAE,MAAM,EAAE,iCAAiC,CAAA;CAAE,CAAC,CAAA;AAEtG,qBAAa,qBAAsB,SAAQ,eAAgB,YAAW,aAAa;IACjF,OAAgB,YAAY,uDAAoC;IAChE,OAAgB,YAAY,wCAAuB;WAE7B,MAAM,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,2BAA2B,CAAC;IAItE,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;CAIjE"}
1
+ {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEnG,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGjD,OAAO,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAA;AAE5D,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IAAE,MAAM,EAAE,iCAAiC,CAAA;CAAE,CAAC,CAAA;AACtG,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC,CAAA;AAErG,qBAAa,qBAAqB,CAAC,OAAO,SAAS,2BAA2B,GAAG,2BAA2B,CAC1G,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,aAAa;IAExB,OAAgB,YAAY,EAAE,MAAM,CAAoC;IACxE,OAAgB,YAAY,EAAE,MAAM,CAAuB;WAErC,MAAM,CAAC,OAAO,SAAS,2BAA2B,EAAE,MAAM,CAAC,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;IAIjF,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;CAIjE"}
@@ -1,17 +1,3 @@
1
- import { ModuleParams } from '@xyo-network/module';
2
- import { PayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin';
3
1
  import { XyoEthereumGasDiviner } from './Diviner';
4
- export declare const XyoEthereumGasPlugin: () => PayloadSetDivinerPlugin<XyoEthereumGasDiviner, 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
- targetSchema?: "network.xyo.blockchain.ethereum.gas.diviner.config" | undefined;
14
- } & {
15
- schema: string;
16
- }, undefined>>;
2
+ export declare const XyoEthereumGasPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetDivinerPlugin<XyoEthereumGasDiviner<import("./Diviner").XyoEthereumGasDivinerParams>>;
17
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;AAEhG,OAAO,EAAE,qBAAqB,EAA+B,MAAM,WAAW,CAAA;AAE9E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;cAQ9B,CAAA"}
1
+ {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEjD,eAAO,MAAM,oBAAoB,gJAQ9B,CAAA"}
package/package.json CHANGED
@@ -11,18 +11,18 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@xylabs/exists": "^2.7.4",
14
- "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.51.9",
15
- "@xyo-network/diviner": "^2.51.9",
16
- "@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.51.9",
17
- "@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.51.9",
18
- "@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.51.9",
19
- "@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.51.9",
20
- "@xyo-network/gas-price-payload-plugin": "^2.51.9",
21
- "@xyo-network/module": "^2.51.9",
22
- "@xyo-network/payload-builder": "^2.51.9",
23
- "@xyo-network/payload-model": "^2.51.9",
24
- "@xyo-network/payloadset-plugin": "^2.51.9",
25
- "@xyo-network/promise": "^2.51.9",
14
+ "@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.52.0-rc.1",
15
+ "@xyo-network/diviner": "^2.52.0-rc.1",
16
+ "@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.52.0-rc.1",
17
+ "@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.52.0-rc.1",
18
+ "@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.52.0-rc.1",
19
+ "@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.52.0-rc.1",
20
+ "@xyo-network/gas-price-payload-plugin": "^2.52.0-rc.1",
21
+ "@xyo-network/module": "^2.52.0-rc.1",
22
+ "@xyo-network/payload-builder": "^2.52.0-rc.1",
23
+ "@xyo-network/payload-model": "^2.52.0-rc.1",
24
+ "@xyo-network/payloadset-plugin": "^2.52.0-rc.1",
25
+ "@xyo-network/promise": "^2.52.0-rc.1",
26
26
  "regression": "^2.0.1"
27
27
  },
28
28
  "devDependencies": {
@@ -33,7 +33,7 @@
33
33
  "@ethersproject/solidity": "^5.7.0",
34
34
  "@types/regression": "^2.0.2",
35
35
  "@uniswap/sdk": "^3.0.3",
36
- "@uniswap/sdk-core": "^3.2.0",
36
+ "@uniswap/sdk-core": "^3.2.2",
37
37
  "@uniswap/v3-sdk": "^3.9.0",
38
38
  "@xylabs/ts-scripts-yarn3": "^2.16.1",
39
39
  "@xylabs/tsconfig": "^2.16.1",
@@ -82,5 +82,6 @@
82
82
  },
83
83
  "sideEffects": false,
84
84
  "types": "dist/types/index.d.ts",
85
- "version": "2.51.9"
85
+ "version": "2.52.0-rc.1",
86
+ "stableVersion": "2.51.9"
86
87
  }
package/src/Diviner.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { AbstractDiviner, DivinerConfig, DivinerModule } from '@xyo-network/diviner'
1
+ import { AbstractDiviner, DivinerConfig, DivinerModule, DivinerParams } from '@xyo-network/diviner'
2
2
  import { XyoEthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
3
- import { ModuleParams } from '@xyo-network/module'
3
+ import { AnyConfigSchema } from '@xyo-network/module'
4
4
  import { XyoPayloads } from '@xyo-network/payload-model'
5
5
  import { Promisable } from '@xyo-network/promise'
6
6
 
@@ -8,13 +8,17 @@ import { divineGas } from './lib'
8
8
  import { XyoEthereumGasDivinerConfigSchema } from './Schema'
9
9
 
10
10
  export type XyoEthereumGasDivinerConfig = DivinerConfig<{ schema: XyoEthereumGasDivinerConfigSchema }>
11
+ export type XyoEthereumGasDivinerParams = DivinerParams<AnyConfigSchema<XyoEthereumGasDivinerConfig>>
11
12
 
12
- export class XyoEthereumGasDiviner extends AbstractDiviner implements DivinerModule {
13
- static override configSchema = XyoEthereumGasDivinerConfigSchema
14
- static override targetSchema = XyoEthereumGasSchema
13
+ export class XyoEthereumGasDiviner<TParams extends XyoEthereumGasDivinerParams = XyoEthereumGasDivinerParams>
14
+ extends AbstractDiviner<TParams>
15
+ implements DivinerModule
16
+ {
17
+ static override configSchema: string = XyoEthereumGasDivinerConfigSchema
18
+ static override targetSchema: string = XyoEthereumGasSchema
15
19
 
16
- static override async create(params?: ModuleParams<XyoEthereumGasDivinerConfig>) {
17
- return (await super.create(params)) as XyoEthereumGasDiviner
20
+ static override async create<TParams extends XyoEthereumGasDivinerParams>(params?: TParams) {
21
+ return await super.create(params)
18
22
  }
19
23
 
20
24
  override divine(payloads?: XyoPayloads): Promisable<XyoPayloads> {
package/src/Plugin.ts CHANGED
@@ -1,16 +1,15 @@
1
1
  import { XyoEthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
2
- import { ModuleParams } from '@xyo-network/module'
3
2
  import { PayloadSetSchema } from '@xyo-network/payload-model'
4
- import { createPayloadSetPlugin, PayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin'
3
+ import { createPayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin'
5
4
 
6
- import { XyoEthereumGasDiviner, XyoEthereumGasDivinerConfig } from './Diviner'
5
+ import { XyoEthereumGasDiviner } from './Diviner'
7
6
 
8
7
  export const XyoEthereumGasPlugin = () =>
9
- createPayloadSetPlugin<PayloadSetDivinerPlugin<XyoEthereumGasDiviner, ModuleParams<XyoEthereumGasDivinerConfig>>>(
8
+ createPayloadSetDivinerPlugin<XyoEthereumGasDiviner>(
10
9
  { required: { [XyoEthereumGasSchema]: 1 }, schema: PayloadSetSchema },
11
10
  {
12
11
  diviner: async (params) => {
13
- return await XyoEthereumGasDiviner.create(params)
12
+ return (await XyoEthereumGasDiviner.create(params)) as XyoEthereumGasDiviner
14
13
  },
15
14
  },
16
15
  )