@xyo-network/ethers-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.
- package/dist/cjs/Plugin.js +2 -3
- package/dist/cjs/Plugin.js.map +1 -1
- package/dist/cjs/Witness.js +4 -11
- package/dist/cjs/Witness.js.map +1 -1
- package/dist/docs.json +10238 -4605
- package/dist/esm/Plugin.js +3 -4
- package/dist/esm/Plugin.js.map +1 -1
- package/dist/esm/Witness.js +4 -7
- package/dist/esm/Witness.js.map +1 -1
- package/dist/types/Plugin.d.ts +2 -3
- package/dist/types/Plugin.d.ts.map +1 -1
- package/dist/types/Witness.d.ts +7 -8
- package/dist/types/Witness.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/Plugin.ts +4 -5
- package/src/Witness.ts +12 -13
package/dist/esm/Plugin.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { XyoEthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin';
|
|
2
2
|
import { PayloadSetSchema } from '@xyo-network/payload-model';
|
|
3
|
-
import {
|
|
3
|
+
import { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin';
|
|
4
4
|
import { XyoEthereumGasEthersWitness } from './Witness';
|
|
5
|
-
export const XyoEthereumGasEthersPlugin = () =>
|
|
5
|
+
export const XyoEthereumGasEthersPlugin = () => createPayloadSetWitnessPlugin({ required: { [XyoEthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema }, {
|
|
6
6
|
witness: async (params) => {
|
|
7
|
-
|
|
8
|
-
return result;
|
|
7
|
+
return await XyoEthereumGasEthersWitness.create(params);
|
|
9
8
|
},
|
|
10
9
|
});
|
|
11
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,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAA;AAE9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAA;AAEvD,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,EAAE,CAC7C,6BAA6B,CAC3B,EAAE,QAAQ,EAAE,EAAE,CAAC,0BAA0B,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAC3E;IACE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QACxB,OAAO,MAAM,2BAA2B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACzD,CAAC;CACF,CACF,CAAA"}
|
package/dist/esm/Witness.js
CHANGED
|
@@ -6,13 +6,10 @@ import { getGasFromEthers } from './lib';
|
|
|
6
6
|
import { XyoEthereumGasEthersWitnessConfigSchema } from './Schema';
|
|
7
7
|
export class XyoEthereumGasEthersWitness extends TimestampWitness {
|
|
8
8
|
static configSchema = XyoEthereumGasEthersWitnessConfigSchema;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
this.
|
|
13
|
-
}
|
|
14
|
-
static async create(params) {
|
|
15
|
-
return (await super.create(params));
|
|
9
|
+
_provider;
|
|
10
|
+
get provider() {
|
|
11
|
+
this._provider = this._provider ?? this.params?.provider;
|
|
12
|
+
return this._provider;
|
|
16
13
|
}
|
|
17
14
|
async observe() {
|
|
18
15
|
const payload = new XyoPayloadBuilder({ schema: XyoEthereumGasEthersSchema })
|
package/dist/esm/Witness.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.js","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAA+B,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AAEzH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAEhE,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Witness.js","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAA+B,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AAEzH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAGvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,uCAAuC,EAAE,MAAM,UAAU,CAAA;AAUlE,MAAM,OAAO,2BAEX,SAAQ,gBAAyB;IACjC,MAAM,CAAU,YAAY,GAAG,uCAAuC,CAAA;IAE9D,SAAS,CAAW;IAE5B,IAAc,QAAQ;QACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAA;QACxD,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;IAEQ,KAAK,CAAC,OAAO;QACpB,MAAM,OAAO,GAAG,IAAI,iBAAiB,CAA8B,EAAE,MAAM,EAAE,0BAA0B,EAAE,CAAC;aACvG,MAAM,CAAC,MAAM,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC;aAC5E,KAAK,EAAE,CAAA;QACV,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IACjC,CAAC"}
|
package/dist/types/Plugin.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const XyoEthereumGasEthersPlugin: () => PayloadSetWitnessPlugin<XyoEthereumGasEthersWitness, XyoEthereumGasEthersWitnessParams>;
|
|
1
|
+
import { XyoEthereumGasEthersWitness } from './Witness';
|
|
2
|
+
export declare const XyoEthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<XyoEthereumGasEthersWitness<import("./Witness").XyoEthereumGasEthersWitnessParams>>;
|
|
4
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,2BAA2B,EAAE,MAAM,WAAW,CAAA;AAEvD,eAAO,MAAM,0BAA0B,4JAQpC,CAAA"}
|
package/dist/types/Witness.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { Provider } from '@ethersproject/providers';
|
|
2
|
-
import { ModuleParams } from '@xyo-network/module';
|
|
2
|
+
import { AnyConfigSchema, ModuleParams } from '@xyo-network/module';
|
|
3
3
|
import { XyoPayload } from '@xyo-network/payload-model';
|
|
4
|
-
import { TimestampWitness
|
|
4
|
+
import { TimestampWitness } from '@xyo-network/witness';
|
|
5
5
|
import { XyoEthereumGasEthersWitnessConfig } from './Config';
|
|
6
|
-
export type XyoEthereumGasEthersWitnessParams = ModuleParams<XyoEthereumGasEthersWitnessConfig, {
|
|
7
|
-
provider
|
|
6
|
+
export type XyoEthereumGasEthersWitnessParams = ModuleParams<AnyConfigSchema<XyoEthereumGasEthersWitnessConfig>, undefined, {
|
|
7
|
+
provider?: Provider;
|
|
8
8
|
}>;
|
|
9
|
-
export declare class XyoEthereumGasEthersWitness extends TimestampWitness<
|
|
9
|
+
export declare class XyoEthereumGasEthersWitness<TParams extends XyoEthereumGasEthersWitnessParams = XyoEthereumGasEthersWitnessParams> extends TimestampWitness<TParams> {
|
|
10
10
|
static configSchema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
11
|
-
|
|
12
|
-
protected
|
|
13
|
-
static create(params?: XyoEthereumGasEthersWitnessParams): Promise<XyoEthereumGasEthersWitness>;
|
|
11
|
+
private _provider?;
|
|
12
|
+
protected get provider(): Provider | undefined;
|
|
14
13
|
observe(): Promise<XyoPayload[]>;
|
|
15
14
|
}
|
|
16
15
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAGnD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAA;AAI5D,MAAM,MAAM,iCAAiC,GAAG,YAAY,CAC1D,eAAe,CAAC,iCAAiC,CAAC,EAClD,SAAS,EACT;IACE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,CACF,CAAA;AAED,qBAAa,2BAA2B,CACtC,OAAO,SAAS,iCAAiC,GAAG,iCAAiC,CACrF,SAAQ,gBAAgB,CAAC,OAAO,CAAC;IACjC,OAAgB,YAAY,8DAA0C;IAEtE,OAAO,CAAC,SAAS,CAAC,CAAU;IAE5B,SAAS,KAAK,QAAQ,yBAGrB;IAEc,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;CAMhD"}
|
package/package.json
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@ethersproject/providers": "^5.7.2",
|
|
14
14
|
"@xylabs/assert": "^2.7.4",
|
|
15
|
-
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.51.
|
|
16
|
-
"@xyo-network/module": "^2.51.
|
|
17
|
-
"@xyo-network/payload-builder": "^2.51.
|
|
18
|
-
"@xyo-network/payload-model": "^2.51.
|
|
19
|
-
"@xyo-network/payloadset-plugin": "^2.51.
|
|
20
|
-
"@xyo-network/witness": "^2.51.
|
|
15
|
+
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.51.10",
|
|
16
|
+
"@xyo-network/module": "^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.
|
|
60
|
+
"version": "2.51.10"
|
|
61
61
|
}
|
package/src/Plugin.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { XyoEthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
2
2
|
import { PayloadSetSchema } from '@xyo-network/payload-model'
|
|
3
|
-
import {
|
|
3
|
+
import { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'
|
|
4
4
|
|
|
5
|
-
import { XyoEthereumGasEthersWitness
|
|
5
|
+
import { XyoEthereumGasEthersWitness } from './Witness'
|
|
6
6
|
|
|
7
7
|
export const XyoEthereumGasEthersPlugin = () =>
|
|
8
|
-
|
|
8
|
+
createPayloadSetWitnessPlugin<XyoEthereumGasEthersWitness>(
|
|
9
9
|
{ required: { [XyoEthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },
|
|
10
10
|
{
|
|
11
11
|
witness: async (params) => {
|
|
12
|
-
|
|
13
|
-
return result
|
|
12
|
+
return await XyoEthereumGasEthersWitness.create(params)
|
|
14
13
|
},
|
|
15
14
|
},
|
|
16
15
|
)
|
package/src/Witness.ts
CHANGED
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
import { Provider } from '@ethersproject/providers'
|
|
2
2
|
import { assertEx } from '@xylabs/assert'
|
|
3
3
|
import { XyoEthereumGasEthersPayload, XyoEthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'
|
|
4
|
-
import { ModuleParams } from '@xyo-network/module'
|
|
4
|
+
import { AnyConfigSchema, ModuleParams } from '@xyo-network/module'
|
|
5
5
|
import { XyoPayloadBuilder } from '@xyo-network/payload-builder'
|
|
6
6
|
import { XyoPayload } from '@xyo-network/payload-model'
|
|
7
|
-
import { TimestampWitness
|
|
7
|
+
import { TimestampWitness } from '@xyo-network/witness'
|
|
8
8
|
|
|
9
9
|
import { XyoEthereumGasEthersWitnessConfig } from './Config'
|
|
10
10
|
import { getGasFromEthers } from './lib'
|
|
11
11
|
import { XyoEthereumGasEthersWitnessConfigSchema } from './Schema'
|
|
12
12
|
|
|
13
13
|
export type XyoEthereumGasEthersWitnessParams = ModuleParams<
|
|
14
|
-
XyoEthereumGasEthersWitnessConfig
|
|
14
|
+
AnyConfigSchema<XyoEthereumGasEthersWitnessConfig>,
|
|
15
|
+
undefined,
|
|
15
16
|
{
|
|
16
|
-
provider
|
|
17
|
+
provider?: Provider
|
|
17
18
|
}
|
|
18
19
|
>
|
|
19
20
|
|
|
20
|
-
export class XyoEthereumGasEthersWitness
|
|
21
|
+
export class XyoEthereumGasEthersWitness<
|
|
22
|
+
TParams extends XyoEthereumGasEthersWitnessParams = XyoEthereumGasEthersWitnessParams,
|
|
23
|
+
> extends TimestampWitness<TParams> {
|
|
21
24
|
static override configSchema = XyoEthereumGasEthersWitnessConfigSchema
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
private _provider?: Provider
|
|
24
27
|
|
|
25
|
-
protected
|
|
26
|
-
|
|
27
|
-
this.
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static override async create(params?: XyoEthereumGasEthersWitnessParams): Promise<XyoEthereumGasEthersWitness> {
|
|
31
|
-
return (await super.create(params)) as XyoEthereumGasEthersWitness
|
|
28
|
+
protected get provider() {
|
|
29
|
+
this._provider = this._provider ?? this.params?.provider
|
|
30
|
+
return this._provider
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
override async observe(): Promise<XyoPayload[]> {
|