@xyo-network/gas-price-plugin 2.51.9 → 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.
- package/dist/cjs/Diviner.js +0 -9
- package/dist/cjs/Diviner.js.map +1 -1
- package/dist/cjs/Plugin.js +2 -2
- package/dist/cjs/Plugin.js.map +1 -1
- package/dist/docs.json +12533 -7773
- package/dist/esm/Diviner.js +0 -3
- package/dist/esm/Diviner.js.map +1 -1
- package/dist/esm/Plugin.js +3 -3
- package/dist/esm/Plugin.js.map +1 -1
- package/dist/types/Diviner.d.ts +6 -6
- package/dist/types/Diviner.d.ts.map +1 -1
- package/dist/types/Plugin.d.ts +1 -15
- package/dist/types/Plugin.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/Diviner.ts +9 -9
- package/src/Plugin.ts +4 -5
package/dist/esm/Diviner.js
CHANGED
|
@@ -5,9 +5,6 @@ import { XyoEthereumGasDivinerConfigSchema } from './Schema';
|
|
|
5
5
|
export class XyoEthereumGasDiviner extends AbstractDiviner {
|
|
6
6
|
static configSchema = XyoEthereumGasDivinerConfigSchema;
|
|
7
7
|
static targetSchema = XyoEthereumGasSchema;
|
|
8
|
-
static async create(params) {
|
|
9
|
-
return (await super.create(params));
|
|
10
|
-
}
|
|
11
8
|
divine(payloads) {
|
|
12
9
|
const cost = divineGas(payloads ?? []);
|
|
13
10
|
return [cost];
|
package/dist/esm/Diviner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.js","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,
|
|
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;IAElD,MAAM,CAAC,QAAsB;QACpC,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAA;QACtC,OAAO,CAAC,IAAI,CAAC,CAAA;IACf,CAAC"}
|
package/dist/esm/Plugin.js
CHANGED
|
@@ -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 {
|
|
3
|
+
import { createPayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin';
|
|
4
4
|
import { XyoEthereumGasDiviner } from './Diviner';
|
|
5
|
-
export const XyoEthereumGasPlugin = () =>
|
|
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
|
package/dist/esm/Plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,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"}
|
package/dist/types/Diviner.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { AbstractDiviner, DivinerConfig, DivinerModule } from '@xyo-network/diviner';
|
|
2
|
-
import {
|
|
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
|
|
10
|
-
|
|
11
|
-
static
|
|
12
|
-
static
|
|
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
13
|
divine(payloads?: XyoPayloads): Promisable<XyoPayloads>;
|
|
14
14
|
}
|
|
15
15
|
//# 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;
|
|
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;IAElD,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;CAIjE"}
|
package/dist/types/Plugin.d.ts
CHANGED
|
@@ -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: () =>
|
|
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":"
|
|
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.
|
|
15
|
-
"@xyo-network/diviner": "^2.51.
|
|
16
|
-
"@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.51.
|
|
17
|
-
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.51.
|
|
18
|
-
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.51.
|
|
19
|
-
"@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.51.
|
|
20
|
-
"@xyo-network/gas-price-payload-plugin": "^2.51.
|
|
21
|
-
"@xyo-network/module": "^2.51.
|
|
22
|
-
"@xyo-network/payload-builder": "^2.51.
|
|
23
|
-
"@xyo-network/payload-model": "^2.51.
|
|
24
|
-
"@xyo-network/payloadset-plugin": "^2.51.
|
|
25
|
-
"@xyo-network/promise": "^2.51.
|
|
14
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.51.10",
|
|
15
|
+
"@xyo-network/diviner": "^2.51.10",
|
|
16
|
+
"@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.51.10",
|
|
17
|
+
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.51.10",
|
|
18
|
+
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.51.10",
|
|
19
|
+
"@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.51.10",
|
|
20
|
+
"@xyo-network/gas-price-payload-plugin": "^2.51.10",
|
|
21
|
+
"@xyo-network/module": "^2.51.10",
|
|
22
|
+
"@xyo-network/payload-builder": "^2.51.10",
|
|
23
|
+
"@xyo-network/payload-model": "^2.51.10",
|
|
24
|
+
"@xyo-network/payloadset-plugin": "^2.51.10",
|
|
25
|
+
"@xyo-network/promise": "^2.51.10",
|
|
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.
|
|
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,5 @@
|
|
|
82
82
|
},
|
|
83
83
|
"sideEffects": false,
|
|
84
84
|
"types": "dist/types/index.d.ts",
|
|
85
|
-
"version": "2.51.
|
|
85
|
+
"version": "2.51.10"
|
|
86
86
|
}
|
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 {
|
|
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,14 +8,14 @@ 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
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
static override
|
|
17
|
-
|
|
18
|
-
}
|
|
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
|
|
19
19
|
|
|
20
20
|
override divine(payloads?: XyoPayloads): Promisable<XyoPayloads> {
|
|
21
21
|
const cost = divineGas(payloads ?? [])
|
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 {
|
|
3
|
+
import { createPayloadSetDivinerPlugin } from '@xyo-network/payloadset-plugin'
|
|
5
4
|
|
|
6
|
-
import { XyoEthereumGasDiviner
|
|
5
|
+
import { XyoEthereumGasDiviner } from './Diviner'
|
|
7
6
|
|
|
8
7
|
export const XyoEthereumGasPlugin = () =>
|
|
9
|
-
|
|
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
|
)
|