@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.
- package/dist/cjs/Diviner.js +1 -1
- 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 +9510 -7405
- package/dist/esm/Diviner.js +1 -1
- 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 +29 -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 +15 -14
- package/src/Diviner.ts +11 -7
- package/src/Plugin.ts +4 -5
package/dist/esm/Diviner.js
CHANGED
|
@@ -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
|
|
9
|
+
return await super.create(params);
|
|
10
10
|
}
|
|
11
11
|
divine(payloads) {
|
|
12
12
|
const cost = divineGas(payloads ?? []);
|
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;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"}
|
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,38 @@
|
|
|
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
|
+
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;
|
|
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"}
|
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.
|
|
15
|
-
"@xyo-network/diviner": "^2.
|
|
16
|
-
"@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.
|
|
17
|
-
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.
|
|
18
|
-
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.
|
|
19
|
-
"@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.
|
|
20
|
-
"@xyo-network/gas-price-payload-plugin": "^2.
|
|
21
|
-
"@xyo-network/module": "^2.
|
|
22
|
-
"@xyo-network/payload-builder": "^2.
|
|
23
|
-
"@xyo-network/payload-model": "^2.
|
|
24
|
-
"@xyo-network/payloadset-plugin": "^2.
|
|
25
|
-
"@xyo-network/promise": "^2.
|
|
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.
|
|
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.
|
|
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 {
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
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?:
|
|
17
|
-
return
|
|
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 {
|
|
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
|
)
|