@xyo-network/gas-price-plugin 2.64.10 → 2.65.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 +2 -2
- package/dist/cjs/Diviner.js.map +1 -1
- package/dist/docs.json +1789 -1424
- package/dist/esm/Diviner.js +3 -3
- package/dist/esm/Diviner.js.map +1 -1
- package/dist/types/Diviner.d.ts +4 -4
- package/dist/types/Diviner.d.ts.map +1 -1
- package/package.json +16 -16
- package/src/Diviner.ts +5 -5
package/dist/esm/Diviner.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AbstractDirectDiviner } from '@xyo-network/abstract-diviner';
|
|
2
2
|
import { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin';
|
|
3
3
|
import { divineGas } from './lib';
|
|
4
4
|
import { EthereumGasDivinerConfigSchema } from './Schema';
|
|
5
|
-
export class EthereumGasDiviner extends
|
|
5
|
+
export class EthereumGasDiviner extends AbstractDirectDiviner {
|
|
6
6
|
static configSchemas = [EthereumGasDivinerConfigSchema];
|
|
7
7
|
static targetSchema = EthereumGasSchema;
|
|
8
|
-
|
|
8
|
+
divineHandler(payloads) {
|
|
9
9
|
const cost = divineGas(payloads ?? []);
|
|
10
10
|
return [cost];
|
|
11
11
|
}
|
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,
|
|
1
|
+
{"version":3,"file":"Diviner.js","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAKzE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAA;AAKzD,MAAM,OAAO,kBACX,SAAQ,qBAA8B;IAGtC,MAAM,CAAmB,aAAa,GAAa,CAAC,8BAA8B,CAAC,CAAA;IACnF,MAAM,CAAU,YAAY,GAAW,iBAAiB,CAAA;IAErC,aAAa,CAAC,QAAoB;QACnD,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAA;QACtC,OAAO,CAAC,IAAI,CAAC,CAAA;IACf,CAAC"}
|
package/dist/types/Diviner.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DivinerConfig,
|
|
1
|
+
import { AbstractDirectDiviner } from '@xyo-network/abstract-diviner';
|
|
2
|
+
import { DivinerConfig, DivinerParams, IndirectDivinerModule } from '@xyo-network/diviner';
|
|
3
3
|
import { AnyConfigSchema } from '@xyo-network/module';
|
|
4
4
|
import { Payload } from '@xyo-network/payload-model';
|
|
5
5
|
import { Promisable } from '@xyo-network/promise';
|
|
@@ -8,9 +8,9 @@ export type EthereumGasDivinerConfig = DivinerConfig<{
|
|
|
8
8
|
schema: EthereumGasDivinerConfigSchema;
|
|
9
9
|
}>;
|
|
10
10
|
export type EthereumGasDivinerParams = DivinerParams<AnyConfigSchema<EthereumGasDivinerConfig>>;
|
|
11
|
-
export declare class EthereumGasDiviner<TParams extends EthereumGasDivinerParams = EthereumGasDivinerParams> extends
|
|
11
|
+
export declare class EthereumGasDiviner<TParams extends EthereumGasDivinerParams = EthereumGasDivinerParams> extends AbstractDirectDiviner<TParams> implements IndirectDivinerModule {
|
|
12
12
|
static readonly configSchemas: string[];
|
|
13
13
|
static targetSchema: string;
|
|
14
|
-
|
|
14
|
+
protected divineHandler(payloads?: Payload[]): Promisable<Payload[]>;
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=Diviner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE1F,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGjD,OAAO,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAA;AAEzD,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC;IAAE,MAAM,EAAE,8BAA8B,CAAA;CAAE,CAAC,CAAA;AAChG,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,eAAe,CAAC,wBAAwB,CAAC,CAAC,CAAA;AAE/F,qBAAa,kBAAkB,CAAC,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,CACjG,SAAQ,qBAAqB,CAAC,OAAO,CACrC,YAAW,qBAAqB;IAEhC,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAmC;IACnF,OAAgB,YAAY,EAAE,MAAM,CAAoB;cAErC,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;CAI9E"}
|
package/package.json
CHANGED
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@xylabs/exists": "^2.9.3",
|
|
14
|
-
"@xyo-network/abstract-diviner": "^2.
|
|
15
|
-
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.
|
|
16
|
-
"@xyo-network/diviner": "^2.
|
|
17
|
-
"@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.
|
|
18
|
-
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.
|
|
19
|
-
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.
|
|
20
|
-
"@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.
|
|
21
|
-
"@xyo-network/gas-price-payload-plugin": "^2.
|
|
22
|
-
"@xyo-network/module": "^2.
|
|
23
|
-
"@xyo-network/payload-builder": "^2.
|
|
24
|
-
"@xyo-network/payload-model": "^2.
|
|
25
|
-
"@xyo-network/payloadset-plugin": "^2.
|
|
26
|
-
"@xyo-network/promise": "^2.
|
|
14
|
+
"@xyo-network/abstract-diviner": "^2.65.1",
|
|
15
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^2.65.1",
|
|
16
|
+
"@xyo-network/diviner": "^2.65.1",
|
|
17
|
+
"@xyo-network/etherchain-gas-ethereum-blockchain-payload-plugins": "^2.65.1",
|
|
18
|
+
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.65.1",
|
|
19
|
+
"@xyo-network/etherscan-ethereum-gas-payload-plugin": "^2.65.1",
|
|
20
|
+
"@xyo-network/ethgasstation-ethereum-gas-payload-plugin": "^2.65.1",
|
|
21
|
+
"@xyo-network/gas-price-payload-plugin": "^2.65.1",
|
|
22
|
+
"@xyo-network/module": "^2.65.1",
|
|
23
|
+
"@xyo-network/payload-builder": "^2.65.1",
|
|
24
|
+
"@xyo-network/payload-model": "^2.65.1",
|
|
25
|
+
"@xyo-network/payloadset-plugin": "^2.65.1",
|
|
26
|
+
"@xyo-network/promise": "^2.65.1",
|
|
27
27
|
"regression": "^2.0.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"@uniswap/sdk": "^3.0.3",
|
|
37
37
|
"@uniswap/sdk-core": "^3.2.6",
|
|
38
38
|
"@uniswap/v3-sdk": "^3.9.0",
|
|
39
|
-
"@xylabs/ts-scripts-yarn3": "^2.18.
|
|
40
|
-
"@xylabs/tsconfig": "^2.18.
|
|
39
|
+
"@xylabs/ts-scripts-yarn3": "^2.18.10",
|
|
40
|
+
"@xylabs/tsconfig": "^2.18.10",
|
|
41
41
|
"typescript": "^5.1.6"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
},
|
|
84
84
|
"sideEffects": false,
|
|
85
85
|
"types": "dist/types/index.d.ts",
|
|
86
|
-
"version": "2.
|
|
86
|
+
"version": "2.65.1"
|
|
87
87
|
}
|
package/src/Diviner.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DivinerConfig,
|
|
1
|
+
import { AbstractDirectDiviner } from '@xyo-network/abstract-diviner'
|
|
2
|
+
import { DivinerConfig, DivinerParams, IndirectDivinerModule } from '@xyo-network/diviner'
|
|
3
3
|
import { EthereumGasSchema } from '@xyo-network/gas-price-payload-plugin'
|
|
4
4
|
import { AnyConfigSchema } from '@xyo-network/module'
|
|
5
5
|
import { Payload } from '@xyo-network/payload-model'
|
|
@@ -12,13 +12,13 @@ export type EthereumGasDivinerConfig = DivinerConfig<{ schema: EthereumGasDivine
|
|
|
12
12
|
export type EthereumGasDivinerParams = DivinerParams<AnyConfigSchema<EthereumGasDivinerConfig>>
|
|
13
13
|
|
|
14
14
|
export class EthereumGasDiviner<TParams extends EthereumGasDivinerParams = EthereumGasDivinerParams>
|
|
15
|
-
extends
|
|
16
|
-
implements
|
|
15
|
+
extends AbstractDirectDiviner<TParams>
|
|
16
|
+
implements IndirectDivinerModule
|
|
17
17
|
{
|
|
18
18
|
static override readonly configSchemas: string[] = [EthereumGasDivinerConfigSchema]
|
|
19
19
|
static override targetSchema: string = EthereumGasSchema
|
|
20
20
|
|
|
21
|
-
override
|
|
21
|
+
protected override divineHandler(payloads?: Payload[]): Promisable<Payload[]> {
|
|
22
22
|
const cost = divineGas(payloads ?? [])
|
|
23
23
|
return [cost]
|
|
24
24
|
}
|