@xyo-network/ethers-ethereum-gas-plugin 2.99.4 → 2.99.6
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/browser/Config.d.cts +1 -1
- package/dist/browser/Config.d.mts +1 -1
- package/dist/browser/Config.d.ts +1 -1
- package/dist/browser/Plugin.d.cts +5 -5
- package/dist/browser/Plugin.d.mts +5 -5
- package/dist/browser/Plugin.d.ts +5 -5
- package/dist/browser/Witness.d.cts +1 -1
- package/dist/browser/Witness.d.mts +1 -1
- package/dist/browser/Witness.d.ts +1 -1
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +4 -4
- package/dist/browser/index.d.mts +4 -4
- package/dist/browser/index.d.ts +4 -4
- package/dist/browser/{index.js → index.mjs} +1 -1
- package/dist/browser/{index.js.map → index.mjs.map} +1 -1
- package/dist/browser/lib/index.d.cts +1 -1
- package/dist/browser/lib/index.d.mts +1 -1
- package/dist/browser/lib/index.d.ts +1 -1
- package/dist/neutral/Config.d.cts +1 -1
- package/dist/neutral/Config.d.mts +1 -1
- package/dist/neutral/Config.d.ts +1 -1
- package/dist/neutral/Plugin.d.cts +5 -5
- package/dist/neutral/Plugin.d.mts +5 -5
- package/dist/neutral/Plugin.d.ts +5 -5
- package/dist/neutral/Witness.d.cts +1 -1
- package/dist/neutral/Witness.d.mts +1 -1
- package/dist/neutral/Witness.d.ts +1 -1
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +4 -4
- package/dist/neutral/index.d.mts +4 -4
- package/dist/neutral/index.d.ts +4 -4
- package/dist/neutral/{index.js → index.mjs} +1 -1
- package/dist/neutral/{index.js.map → index.mjs.map} +1 -1
- package/dist/neutral/lib/index.d.cts +1 -1
- package/dist/neutral/lib/index.d.mts +1 -1
- package/dist/neutral/lib/index.d.ts +1 -1
- package/dist/node/Config.d.cts +1 -1
- package/dist/node/Config.d.mts +1 -1
- package/dist/node/Config.d.ts +1 -1
- package/dist/node/Plugin.d.cts +5 -5
- package/dist/node/Plugin.d.mts +5 -5
- package/dist/node/Plugin.d.ts +5 -5
- package/dist/node/Witness.d.cts +1 -1
- package/dist/node/Witness.d.mts +1 -1
- package/dist/node/Witness.d.ts +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +4 -4
- package/dist/node/index.d.mts +4 -4
- package/dist/node/index.d.ts +4 -4
- package/dist/node/{index.js → index.mjs} +1 -1
- package/dist/node/{index.js.map → index.mjs.map} +1 -1
- package/dist/node/lib/index.d.cts +1 -1
- package/dist/node/lib/index.d.mts +1 -1
- package/dist/node/lib/index.d.ts +1 -1
- package/package.json +19 -19
- package/src/Config.ts +1 -1
- package/src/Plugin.ts +1 -1
- package/src/Witness.ts +3 -3
- package/src/index.ts +4 -4
- package/src/lib/index.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasEthersWitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEthersWitnessConfigSchema;
|
|
5
5
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasEthersWitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEthersWitnessConfigSchema;
|
|
5
5
|
}>;
|
package/dist/browser/Config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasEthersWitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEthersWitnessConfigSchema;
|
|
5
5
|
}>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EthereumGasEthersWitness } from './Witness.
|
|
2
|
-
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("
|
|
3
|
-
account?: import("
|
|
1
|
+
import { EthereumGasEthersWitness } from './Witness.ts';
|
|
2
|
+
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
3
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
4
4
|
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import("
|
|
5
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
6
6
|
allowNameResolution?: boolean;
|
|
7
7
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
8
8
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
9
9
|
} & {
|
|
10
|
-
schema: import("./Schema.
|
|
10
|
+
schema: import("./Schema.ts").EthereumGasEthersWitnessConfigSchema;
|
|
11
11
|
}, "schema"> & {
|
|
12
12
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
13
13
|
}, "schema"> & {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EthereumGasEthersWitness } from './Witness.
|
|
2
|
-
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("
|
|
3
|
-
account?: import("
|
|
1
|
+
import { EthereumGasEthersWitness } from './Witness.ts';
|
|
2
|
+
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
3
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
4
4
|
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import("
|
|
5
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
6
6
|
allowNameResolution?: boolean;
|
|
7
7
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
8
8
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
9
9
|
} & {
|
|
10
|
-
schema: import("./Schema.
|
|
10
|
+
schema: import("./Schema.ts").EthereumGasEthersWitnessConfigSchema;
|
|
11
11
|
}, "schema"> & {
|
|
12
12
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
13
13
|
}, "schema"> & {
|
package/dist/browser/Plugin.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EthereumGasEthersWitness } from './Witness.
|
|
2
|
-
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("
|
|
3
|
-
account?: import("
|
|
1
|
+
import { EthereumGasEthersWitness } from './Witness.ts';
|
|
2
|
+
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
3
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
4
4
|
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import("
|
|
5
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
6
6
|
allowNameResolution?: boolean;
|
|
7
7
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
8
8
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
9
9
|
} & {
|
|
10
|
-
schema: import("./Schema.
|
|
10
|
+
schema: import("./Schema.ts").EthereumGasEthersWitnessConfigSchema;
|
|
11
11
|
}, "schema"> & {
|
|
12
12
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
13
13
|
}, "schema"> & {
|
|
@@ -3,7 +3,7 @@ import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
import { Provider } from 'ethers';
|
|
6
|
-
import { EthereumGasEthersWitnessConfig } from './Config.
|
|
6
|
+
import { EthereumGasEthersWitnessConfig } from './Config.ts';
|
|
7
7
|
export type EthereumGasEthersWitnessParams = WitnessParams<AnyConfigSchema<EthereumGasEthersWitnessConfig>, {
|
|
8
8
|
provider?: Provider;
|
|
9
9
|
}>;
|
|
@@ -3,7 +3,7 @@ import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
import { Provider } from 'ethers';
|
|
6
|
-
import { EthereumGasEthersWitnessConfig } from './Config.
|
|
6
|
+
import { EthereumGasEthersWitnessConfig } from './Config.ts';
|
|
7
7
|
export type EthereumGasEthersWitnessParams = WitnessParams<AnyConfigSchema<EthereumGasEthersWitnessConfig>, {
|
|
8
8
|
provider?: Provider;
|
|
9
9
|
}>;
|
|
@@ -3,7 +3,7 @@ import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
import { Provider } from 'ethers';
|
|
6
|
-
import { EthereumGasEthersWitnessConfig } from './Config.
|
|
6
|
+
import { EthereumGasEthersWitnessConfig } from './Config.ts';
|
|
7
7
|
export type EthereumGasEthersWitnessParams = WitnessParams<AnyConfigSchema<EthereumGasEthersWitnessConfig>, {
|
|
8
8
|
provider?: Provider;
|
|
9
9
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,6CAAwC;AACxC,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,gDAAkE;AAElE,6BAA+B;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AACvB,SAAK,YAAY,KAAK,aAAa,KAAK,QAAQ;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,sCAAyC,EAAE,QAAQ,kEAAwB,CAAC,EACnG,OAAO,MAAM,qBAAiB,wBAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,UACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,kEAAuB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["import_ethers_ethereum_gas_payload_plugin"]}
|
package/dist/browser/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";AAAA,SAAS,2BAAAA,gCAA+B;AACxC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAmC,+BAA+B;AAElE,SAAS,sBAAsB;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AACvB,SAAK,YAAY,KAAK,aAAa,KAAK,QAAQ;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,eAAyC,EAAE,QAAQ,wBAAwB,CAAC,EACnG,OAAO,MAAM,iBAAiB,SAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,MACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,wBAAuB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["EthereumGasEthersSchema","EthereumGasEthersSchema"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromEthers.
|
|
1
|
+
export * from './getGasFromEthers.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromEthers.
|
|
1
|
+
export * from './getGasFromEthers.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromEthers.
|
|
1
|
+
export * from './getGasFromEthers.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasEthersWitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEthersWitnessConfigSchema;
|
|
5
5
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasEthersWitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEthersWitnessConfigSchema;
|
|
5
5
|
}>;
|
package/dist/neutral/Config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasEthersWitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEthersWitnessConfigSchema;
|
|
5
5
|
}>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EthereumGasEthersWitness } from './Witness.
|
|
2
|
-
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("
|
|
3
|
-
account?: import("
|
|
1
|
+
import { EthereumGasEthersWitness } from './Witness.ts';
|
|
2
|
+
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
3
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
4
4
|
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import("
|
|
5
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
6
6
|
allowNameResolution?: boolean;
|
|
7
7
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
8
8
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
9
9
|
} & {
|
|
10
|
-
schema: import("./Schema.
|
|
10
|
+
schema: import("./Schema.ts").EthereumGasEthersWitnessConfigSchema;
|
|
11
11
|
}, "schema"> & {
|
|
12
12
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
13
13
|
}, "schema"> & {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EthereumGasEthersWitness } from './Witness.
|
|
2
|
-
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("
|
|
3
|
-
account?: import("
|
|
1
|
+
import { EthereumGasEthersWitness } from './Witness.ts';
|
|
2
|
+
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
3
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
4
4
|
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import("
|
|
5
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
6
6
|
allowNameResolution?: boolean;
|
|
7
7
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
8
8
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
9
9
|
} & {
|
|
10
|
-
schema: import("./Schema.
|
|
10
|
+
schema: import("./Schema.ts").EthereumGasEthersWitnessConfigSchema;
|
|
11
11
|
}, "schema"> & {
|
|
12
12
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
13
13
|
}, "schema"> & {
|
package/dist/neutral/Plugin.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EthereumGasEthersWitness } from './Witness.
|
|
2
|
-
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("
|
|
3
|
-
account?: import("
|
|
1
|
+
import { EthereumGasEthersWitness } from './Witness.ts';
|
|
2
|
+
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
3
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
4
4
|
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import("
|
|
5
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
6
6
|
allowNameResolution?: boolean;
|
|
7
7
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
8
8
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
9
9
|
} & {
|
|
10
|
-
schema: import("./Schema.
|
|
10
|
+
schema: import("./Schema.ts").EthereumGasEthersWitnessConfigSchema;
|
|
11
11
|
}, "schema"> & {
|
|
12
12
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
13
13
|
}, "schema"> & {
|
|
@@ -3,7 +3,7 @@ import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
import { Provider } from 'ethers';
|
|
6
|
-
import { EthereumGasEthersWitnessConfig } from './Config.
|
|
6
|
+
import { EthereumGasEthersWitnessConfig } from './Config.ts';
|
|
7
7
|
export type EthereumGasEthersWitnessParams = WitnessParams<AnyConfigSchema<EthereumGasEthersWitnessConfig>, {
|
|
8
8
|
provider?: Provider;
|
|
9
9
|
}>;
|
|
@@ -3,7 +3,7 @@ import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
import { Provider } from 'ethers';
|
|
6
|
-
import { EthereumGasEthersWitnessConfig } from './Config.
|
|
6
|
+
import { EthereumGasEthersWitnessConfig } from './Config.ts';
|
|
7
7
|
export type EthereumGasEthersWitnessParams = WitnessParams<AnyConfigSchema<EthereumGasEthersWitnessConfig>, {
|
|
8
8
|
provider?: Provider;
|
|
9
9
|
}>;
|
|
@@ -3,7 +3,7 @@ import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
import { Provider } from 'ethers';
|
|
6
|
-
import { EthereumGasEthersWitnessConfig } from './Config.
|
|
6
|
+
import { EthereumGasEthersWitnessConfig } from './Config.ts';
|
|
7
7
|
export type EthereumGasEthersWitnessParams = WitnessParams<AnyConfigSchema<EthereumGasEthersWitnessConfig>, {
|
|
8
8
|
provider?: Provider;
|
|
9
9
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,6CAAwC;AACxC,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,gDAAkE;AAElE,6BAA+B;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AACvB,SAAK,YAAY,KAAK,aAAa,KAAK,QAAQ;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,sCAAyC,EAAE,QAAQ,kEAAwB,CAAC,EACnG,OAAO,MAAM,qBAAiB,wBAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,UACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,kEAAuB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["import_ethers_ethereum_gas_payload_plugin"]}
|
package/dist/neutral/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/neutral/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";AAAA,SAAS,2BAAAA,gCAA+B;AACxC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAmC,+BAA+B;AAElE,SAAS,sBAAsB;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AACvB,SAAK,YAAY,KAAK,aAAa,KAAK,QAAQ;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,eAAyC,EAAE,QAAQ,wBAAwB,CAAC,EACnG,OAAO,MAAM,iBAAiB,SAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,MACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,wBAAuB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["EthereumGasEthersSchema","EthereumGasEthersSchema"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromEthers.
|
|
1
|
+
export * from './getGasFromEthers.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromEthers.
|
|
1
|
+
export * from './getGasFromEthers.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromEthers.
|
|
1
|
+
export * from './getGasFromEthers.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/Config.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasEthersWitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEthersWitnessConfigSchema;
|
|
5
5
|
}>;
|
package/dist/node/Config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasEthersWitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEthersWitnessConfigSchema;
|
|
5
5
|
}>;
|
package/dist/node/Config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WitnessConfig } from '@xyo-network/witness-model';
|
|
2
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
2
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts';
|
|
3
3
|
export type EthereumGasEthersWitnessConfig = WitnessConfig<{
|
|
4
4
|
schema: EthereumGasEthersWitnessConfigSchema;
|
|
5
5
|
}>;
|
package/dist/node/Plugin.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EthereumGasEthersWitness } from './Witness.
|
|
2
|
-
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("
|
|
3
|
-
account?: import("
|
|
1
|
+
import { EthereumGasEthersWitness } from './Witness.ts';
|
|
2
|
+
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
3
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
4
4
|
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import("
|
|
5
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
6
6
|
allowNameResolution?: boolean;
|
|
7
7
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
8
8
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
9
9
|
} & {
|
|
10
|
-
schema: import("./Schema.
|
|
10
|
+
schema: import("./Schema.ts").EthereumGasEthersWitnessConfigSchema;
|
|
11
11
|
}, "schema"> & {
|
|
12
12
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
13
13
|
}, "schema"> & {
|
package/dist/node/Plugin.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EthereumGasEthersWitness } from './Witness.
|
|
2
|
-
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("
|
|
3
|
-
account?: import("
|
|
1
|
+
import { EthereumGasEthersWitness } from './Witness.ts';
|
|
2
|
+
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
3
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
4
4
|
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import("
|
|
5
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
6
6
|
allowNameResolution?: boolean;
|
|
7
7
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
8
8
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
9
9
|
} & {
|
|
10
|
-
schema: import("./Schema.
|
|
10
|
+
schema: import("./Schema.ts").EthereumGasEthersWitnessConfigSchema;
|
|
11
11
|
}, "schema"> & {
|
|
12
12
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
13
13
|
}, "schema"> & {
|
package/dist/node/Plugin.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EthereumGasEthersWitness } from './Witness.
|
|
2
|
-
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import("
|
|
3
|
-
account?: import("
|
|
1
|
+
import { EthereumGasEthersWitness } from './Witness.ts';
|
|
2
|
+
export declare const EthereumGasEthersPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<EthereumGasEthersWitness<import(".store/@xylabs-object-npm-3.6.12-443b813787/package").BaseParamsFields & {
|
|
3
|
+
account?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance | "random";
|
|
4
4
|
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import("
|
|
5
|
+
additionalSigners?: import(".store/@xyo-network-account-model-virtual-c593258ccf/package").AccountInstance[];
|
|
6
6
|
allowNameResolution?: boolean;
|
|
7
7
|
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
8
8
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
9
9
|
} & {
|
|
10
|
-
schema: import("./Schema.
|
|
10
|
+
schema: import("./Schema.ts").EthereumGasEthersWitnessConfigSchema;
|
|
11
11
|
}, "schema"> & {
|
|
12
12
|
schema: "network.xyo.blockchain.ethereum.gas.ethers.witness.config";
|
|
13
13
|
}, "schema"> & {
|
package/dist/node/Witness.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
import { Provider } from 'ethers';
|
|
6
|
-
import { EthereumGasEthersWitnessConfig } from './Config.
|
|
6
|
+
import { EthereumGasEthersWitnessConfig } from './Config.ts';
|
|
7
7
|
export type EthereumGasEthersWitnessParams = WitnessParams<AnyConfigSchema<EthereumGasEthersWitnessConfig>, {
|
|
8
8
|
provider?: Provider;
|
|
9
9
|
}>;
|
package/dist/node/Witness.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
import { Provider } from 'ethers';
|
|
6
|
-
import { EthereumGasEthersWitnessConfig } from './Config.
|
|
6
|
+
import { EthereumGasEthersWitnessConfig } from './Config.ts';
|
|
7
7
|
export type EthereumGasEthersWitnessParams = WitnessParams<AnyConfigSchema<EthereumGasEthersWitnessConfig>, {
|
|
8
8
|
provider?: Provider;
|
|
9
9
|
}>;
|
package/dist/node/Witness.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
|
3
3
|
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
import { Provider } from 'ethers';
|
|
6
|
-
import { EthereumGasEthersWitnessConfig } from './Config.
|
|
6
|
+
import { EthereumGasEthersWitnessConfig } from './Config.ts';
|
|
7
7
|
export type EthereumGasEthersWitnessParams = WitnessParams<AnyConfigSchema<EthereumGasEthersWitnessConfig>, {
|
|
8
8
|
provider?: Provider;
|
|
9
9
|
}>;
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config.ts'\n// eslint-disable-next-line import/no-default-export\nexport { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts'\nexport * from './Schema.ts'\nexport * from './Witness.ts'\n","import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,6CAAwC;AACxC,2BAAiC;AACjC,+BAA8C;;;ACF9C,oBAAyB;AACzB,8BAAgC;AAChC,gDAAkE;AAElE,6BAA+B;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AA5B3B;AA6BI,SAAK,YAAY,KAAK,eAAa,UAAK,WAAL,mBAAa;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,sCAAyC,EAAE,QAAQ,kEAAwB,CAAC,EACnG,OAAO,MAAM,qBAAiB,wBAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,UACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,kEAAuB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["import_ethers_ethereum_gas_payload_plugin"]}
|
package/dist/node/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
2
|
-
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.
|
|
3
|
-
export * from './Schema.
|
|
4
|
-
export * from './Witness.
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts';
|
|
3
|
+
export * from './Schema.ts';
|
|
4
|
+
export * from './Witness.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromEthers.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasEthersWitness } from './Witness.ts'\n\nexport const EthereumGasEthersPlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(\n { required: { [EthereumGasEthersSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return await EthereumGasEthersWitness.create(params)\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasEthersPayload, EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { WitnessParams } from '@xyo-network/witness-model'\nimport { Provider } from 'ethers'\n\nimport { EthereumGasEthersWitnessConfig } from './Config.ts'\nimport { getGasFromEthers } from './lib/index.ts'\nimport { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasEthersWitnessParams = WitnessParams<\n AnyConfigSchema<EthereumGasEthersWitnessConfig>,\n {\n provider?: Provider\n }\n>\n\nexport class EthereumGasEthersWitness<\n TParams extends EthereumGasEthersWitnessParams = EthereumGasEthersWitnessParams,\n> extends AbstractWitness<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasEthersWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = EthereumGasEthersWitnessConfigSchema\n\n private _provider?: Provider\n\n protected get provider() {\n this._provider = this._provider ?? this.params?.provider\n return this._provider\n }\n\n protected override async observeHandler(): Promise<Payload[]> {\n const payload = await new PayloadBuilder<EthereumGasEthersPayload>({ schema: EthereumGasEthersSchema })\n .fields(await getGasFromEthers(assertEx(this.provider, () => 'Provider Required')))\n .build()\n return [payload]\n }\n}\n","import { EthereumGasEthersResponse } from '@xyo-network/ethers-ethereum-gas-payload-plugin'\nimport { Provider } from 'ethers'\n\nconst formatFeeDataValue = (value: bigint | null) => {\n return value ? Number(value) : null\n}\n\nexport const getGasFromEthers = async (provider: Provider): Promise<EthereumGasEthersResponse> => {\n // https://docs.ethers.io/v5/api/providers/provider/#Provider-getFeeData\n const feeData = await provider.getFeeData()\n const formattedFeeData: EthereumGasEthersResponse = {\n gasPrice: formatFeeDataValue(feeData.gasPrice),\n maxFeePerGas: formatFeeDataValue(feeData.maxFeePerGas),\n maxPriorityFeePerGas: formatFeeDataValue(feeData.maxPriorityFeePerGas),\n timestamp: Date.now(),\n }\n return formattedFeeData\n}\n","export type EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\nexport const EthereumGasEthersWitnessConfigSchema: EthereumGasEthersWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.ethers.witness.config'\n"],"mappings":";AAAA,SAAS,2BAAAA,gCAA+B;AACxC,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAmC,+BAA+B;AAElE,SAAS,sBAAsB;;;ACD/B,IAAM,qBAAqB,CAAC,UAAyB;AACnD,SAAO,QAAQ,OAAO,KAAK,IAAI;AACjC;AAEO,IAAM,mBAAmB,OAAO,aAA2D;AAEhG,QAAM,UAAU,MAAM,SAAS,WAAW;AAC1C,QAAM,mBAA8C;AAAA,IAClD,UAAU,mBAAmB,QAAQ,QAAQ;AAAA,IAC7C,cAAc,mBAAmB,QAAQ,YAAY;AAAA,IACrD,sBAAsB,mBAAmB,QAAQ,oBAAoB;AAAA,IACrE,WAAW,KAAK,IAAI;AAAA,EACtB;AACA,SAAO;AACT;;;AChBO,IAAM,uCAA6E;;;AFmBnF,IAAM,2BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAE/C;AAAA,EAER,IAAc,WAAW;AA5B3B;AA6BI,SAAK,YAAY,KAAK,eAAa,UAAK,WAAL,mBAAa;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,iBAAqC;AAC5D,UAAM,UAAU,MAAM,IAAI,eAAyC,EAAE,QAAQ,wBAAwB,CAAC,EACnG,OAAO,MAAM,iBAAiB,SAAS,KAAK,UAAU,MAAM,mBAAmB,CAAC,CAAC,EACjF,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADjCO,IAAM,0BAA0B,MACrC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,wBAAuB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACvE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAO,MAAM,yBAAyB,OAAO,MAAM;AAAA,IACrD;AAAA,EACF;AACF;","names":["EthereumGasEthersSchema","EthereumGasEthersSchema"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromEthers.
|
|
1
|
+
export * from './getGasFromEthers.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromEthers.
|
|
1
|
+
export * from './getGasFromEthers.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './getGasFromEthers.
|
|
1
|
+
export * from './getGasFromEthers.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -10,24 +10,24 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/plugins/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/assert": "^3.6.
|
|
14
|
-
"@xyo-network/abstract-witness": "^2.
|
|
15
|
-
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.99.
|
|
16
|
-
"@xyo-network/module-model": "^2.
|
|
17
|
-
"@xyo-network/payload-builder": "^2.
|
|
18
|
-
"@xyo-network/payload-model": "^2.
|
|
19
|
-
"@xyo-network/payloadset-plugin": "^2.
|
|
20
|
-
"@xyo-network/witness-model": "^2.
|
|
21
|
-
"ethers": "^6.13.
|
|
13
|
+
"@xylabs/assert": "^3.6.12",
|
|
14
|
+
"@xyo-network/abstract-witness": "^2.111.3",
|
|
15
|
+
"@xyo-network/ethers-ethereum-gas-payload-plugin": "^2.99.6",
|
|
16
|
+
"@xyo-network/module-model": "^2.111.3",
|
|
17
|
+
"@xyo-network/payload-builder": "^2.111.3",
|
|
18
|
+
"@xyo-network/payload-model": "^2.111.3",
|
|
19
|
+
"@xyo-network/payloadset-plugin": "^2.111.3",
|
|
20
|
+
"@xyo-network/witness-model": "^2.111.3",
|
|
21
|
+
"ethers": "^6.13.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@xylabs/jest-helpers": "^3.6.
|
|
25
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
26
|
-
"@xylabs/tsconfig": "^3.
|
|
27
|
-
"@xyo-network/payload-wrapper": "^2.
|
|
28
|
-
"@xyo-network/witness-blockchain-abstract": "^2.
|
|
24
|
+
"@xylabs/jest-helpers": "^3.6.12",
|
|
25
|
+
"@xylabs/ts-scripts-yarn3": "^3.15.14",
|
|
26
|
+
"@xylabs/tsconfig": "^3.15.14",
|
|
27
|
+
"@xyo-network/payload-wrapper": "^2.111.3",
|
|
28
|
+
"@xyo-network/witness-blockchain-abstract": "^2.111.3",
|
|
29
29
|
"jest": "^29.7.0",
|
|
30
|
-
"typescript": "^5.5.
|
|
30
|
+
"typescript": "^5.5.4"
|
|
31
31
|
},
|
|
32
32
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
33
33
|
"types": "dist/node/index.d.ts",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"import": {
|
|
42
42
|
"types": "./dist/browser/index.d.mts",
|
|
43
|
-
"default": "./dist/browser/index.
|
|
43
|
+
"default": "./dist/browser/index.mjs"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"node": {
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
},
|
|
51
51
|
"import": {
|
|
52
52
|
"types": "./dist/node/index.d.mts",
|
|
53
|
-
"default": "./dist/node/index.
|
|
53
|
+
"default": "./dist/node/index.mjs"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"./package.json": "./package.json"
|
|
58
58
|
},
|
|
59
59
|
"main": "dist/node/index.cjs",
|
|
60
|
-
"module": "dist/node/index.
|
|
60
|
+
"module": "dist/node/index.mjs",
|
|
61
61
|
"homepage": "https://xyo.network",
|
|
62
62
|
"license": "LGPL-3.0-only",
|
|
63
63
|
"publishConfig": {
|
|
@@ -68,6 +68,6 @@
|
|
|
68
68
|
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
69
69
|
},
|
|
70
70
|
"sideEffects": false,
|
|
71
|
-
"version": "2.99.
|
|
71
|
+
"version": "2.99.6",
|
|
72
72
|
"type": "module"
|
|
73
73
|
}
|
package/src/Config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WitnessConfig } from '@xyo-network/witness-model'
|
|
2
2
|
|
|
3
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
3
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'
|
|
4
4
|
|
|
5
5
|
export type EthereumGasEthersWitnessConfig = WitnessConfig<{
|
|
6
6
|
schema: EthereumGasEthersWitnessConfigSchema
|
package/src/Plugin.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { EthereumGasEthersSchema } from '@xyo-network/ethers-ethereum-gas-payloa
|
|
|
2
2
|
import { PayloadSetSchema } from '@xyo-network/payload-model'
|
|
3
3
|
import { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'
|
|
4
4
|
|
|
5
|
-
import { EthereumGasEthersWitness } from './Witness.
|
|
5
|
+
import { EthereumGasEthersWitness } from './Witness.ts'
|
|
6
6
|
|
|
7
7
|
export const EthereumGasEthersPlugin = () =>
|
|
8
8
|
createPayloadSetWitnessPlugin<EthereumGasEthersWitness>(
|
package/src/Witness.ts
CHANGED
|
@@ -7,9 +7,9 @@ import { Payload, Schema } from '@xyo-network/payload-model'
|
|
|
7
7
|
import { WitnessParams } from '@xyo-network/witness-model'
|
|
8
8
|
import { Provider } from 'ethers'
|
|
9
9
|
|
|
10
|
-
import { EthereumGasEthersWitnessConfig } from './Config.
|
|
11
|
-
import { getGasFromEthers } from './lib/index.
|
|
12
|
-
import { EthereumGasEthersWitnessConfigSchema } from './Schema.
|
|
10
|
+
import { EthereumGasEthersWitnessConfig } from './Config.ts'
|
|
11
|
+
import { getGasFromEthers } from './lib/index.ts'
|
|
12
|
+
import { EthereumGasEthersWitnessConfigSchema } from './Schema.ts'
|
|
13
13
|
|
|
14
14
|
export type EthereumGasEthersWitnessParams = WitnessParams<
|
|
15
15
|
AnyConfigSchema<EthereumGasEthersWitnessConfig>,
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Config.
|
|
1
|
+
export * from './Config.ts'
|
|
2
2
|
// eslint-disable-next-line import/no-default-export
|
|
3
|
-
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.
|
|
4
|
-
export * from './Schema.
|
|
5
|
-
export * from './Witness.
|
|
3
|
+
export { EthereumGasEthersPlugin as default, EthereumGasEthersPlugin } from './Plugin.ts'
|
|
4
|
+
export * from './Schema.ts'
|
|
5
|
+
export * from './Witness.ts'
|
package/src/lib/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './getGasFromEthers.
|
|
1
|
+
export * from './getGasFromEthers.ts'
|