@xyo-network/blocknative-ethereum-gas-plugin 2.84.5 → 2.85.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/browser/index.cjs +1 -4
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +1 -3
- package/dist/browser/index.d.cts.map +1 -1
- package/dist/browser/index.d.mts +1 -3
- package/dist/browser/index.d.mts.map +1 -1
- package/dist/browser/index.d.ts +1 -3
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -4
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.cjs +1 -4
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +1 -3
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.mts +1 -3
- package/dist/node/index.d.mts.map +1 -1
- package/dist/node/index.d.ts +1 -3
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +1 -4
- package/dist/node/index.js.map +1 -1
- package/package.json +11 -11
- package/src/index.ts +1 -7
package/dist/browser/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ __export(src_exports, {
|
|
|
23
23
|
EthereumGasBlocknativePlugin: () => EthereumGasBlocknativePlugin,
|
|
24
24
|
EthereumGasBlocknativeWitness: () => EthereumGasBlocknativeWitness,
|
|
25
25
|
EthereumGasBlocknativeWitnessConfigSchema: () => EthereumGasBlocknativeWitnessConfigSchema,
|
|
26
|
-
default: () =>
|
|
26
|
+
default: () => EthereumGasBlocknativePlugin
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(src_exports);
|
|
29
29
|
|
|
@@ -70,7 +70,4 @@ var EthereumGasBlocknativePlugin = () => (0, import_payloadset_plugin.createPayl
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
|
-
|
|
74
|
-
// src/index.ts
|
|
75
|
-
var src_default = EthereumGasBlocknativePlugin;
|
|
76
73
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config'\nexport { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Witness'\n","import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,mBAAsB;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,mBAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,wCAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,sCAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,UAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,4EAA4B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":["import_blocknative_ethereum_gas_payload_plugin"]}
|
package/dist/browser/index.d.cts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePlugin } from './Plugin';
|
|
2
1
|
export * from './Config';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin';
|
|
3
3
|
export * from './Schema';
|
|
4
4
|
export * from './Witness';
|
|
5
|
-
export { EthereumGasBlocknativePlugin };
|
|
6
|
-
export default EthereumGasBlocknativePlugin;
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAChG,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA"}
|
package/dist/browser/index.d.mts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePlugin } from './Plugin';
|
|
2
1
|
export * from './Config';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin';
|
|
3
3
|
export * from './Schema';
|
|
4
4
|
export * from './Witness';
|
|
5
|
-
export { EthereumGasBlocknativePlugin };
|
|
6
|
-
export default EthereumGasBlocknativePlugin;
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAChG,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA"}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePlugin } from './Plugin';
|
|
2
1
|
export * from './Config';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin';
|
|
3
3
|
export * from './Schema';
|
|
4
4
|
export * from './Witness';
|
|
5
|
-
export { EthereumGasBlocknativePlugin };
|
|
6
|
-
export default EthereumGasBlocknativePlugin;
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAChG,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA"}
|
package/dist/browser/index.js
CHANGED
|
@@ -41,13 +41,10 @@ var EthereumGasBlocknativePlugin = () => createPayloadSetWitnessPlugin(
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
|
-
|
|
45
|
-
// src/index.ts
|
|
46
|
-
var src_default = EthereumGasBlocknativePlugin;
|
|
47
44
|
export {
|
|
48
45
|
EthereumGasBlocknativePlugin,
|
|
49
46
|
EthereumGasBlocknativeWitness,
|
|
50
47
|
EthereumGasBlocknativeWitnessConfigSchema,
|
|
51
|
-
|
|
48
|
+
EthereumGasBlocknativePlugin as default
|
|
52
49
|
};
|
|
53
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,eAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
|
package/dist/node/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ __export(src_exports, {
|
|
|
23
23
|
EthereumGasBlocknativePlugin: () => EthereumGasBlocknativePlugin,
|
|
24
24
|
EthereumGasBlocknativeWitness: () => EthereumGasBlocknativeWitness,
|
|
25
25
|
EthereumGasBlocknativeWitnessConfigSchema: () => EthereumGasBlocknativeWitnessConfigSchema,
|
|
26
|
-
default: () =>
|
|
26
|
+
default: () => EthereumGasBlocknativePlugin
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(src_exports);
|
|
29
29
|
|
|
@@ -70,9 +70,6 @@ var EthereumGasBlocknativePlugin = () => (0, import_payloadset_plugin.createPayl
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
|
-
|
|
74
|
-
// src/index.ts
|
|
75
|
-
var src_default = EthereumGasBlocknativePlugin;
|
|
76
73
|
// Annotate the CommonJS export names for ESM import in node:
|
|
77
74
|
0 && (module.exports = {
|
|
78
75
|
EthereumGasBlocknativePlugin,
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["export * from './Config'\nexport { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin'\nexport * from './Schema'\nexport * from './Witness'\n","import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,kDAA6C;AAC7C,2BAAiC;AACjC,+BAA8C;;;ACF9C,8BAAgC;AAChC,qDAA4E;AAE5E,6BAA+B;;;ACH/B,mBAAsB;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,mBAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,wCAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,sCAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,UAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,4EAA4B,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":["import_blocknative_ethereum_gas_payload_plugin"]}
|
package/dist/node/index.d.cts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePlugin } from './Plugin';
|
|
2
1
|
export * from './Config';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin';
|
|
3
3
|
export * from './Schema';
|
|
4
4
|
export * from './Witness';
|
|
5
|
-
export { EthereumGasBlocknativePlugin };
|
|
6
|
-
export default EthereumGasBlocknativePlugin;
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAChG,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA"}
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePlugin } from './Plugin';
|
|
2
1
|
export * from './Config';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin';
|
|
3
3
|
export * from './Schema';
|
|
4
4
|
export * from './Witness';
|
|
5
|
-
export { EthereumGasBlocknativePlugin };
|
|
6
|
-
export default EthereumGasBlocknativePlugin;
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAChG,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA"}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePlugin } from './Plugin';
|
|
2
1
|
export * from './Config';
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin';
|
|
3
3
|
export * from './Schema';
|
|
4
4
|
export * from './Witness';
|
|
5
|
-
export { EthereumGasBlocknativePlugin };
|
|
6
|
-
export default EthereumGasBlocknativePlugin;
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,4BAA4B,IAAI,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAChG,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA"}
|
package/dist/node/index.js
CHANGED
|
@@ -41,13 +41,10 @@ var EthereumGasBlocknativePlugin = () => createPayloadSetWitnessPlugin(
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
|
-
|
|
45
|
-
// src/index.ts
|
|
46
|
-
var src_default = EthereumGasBlocknativePlugin;
|
|
47
44
|
export {
|
|
48
45
|
EthereumGasBlocknativePlugin,
|
|
49
46
|
EthereumGasBlocknativeWitness,
|
|
50
47
|
EthereumGasBlocknativeWitnessConfigSchema,
|
|
51
|
-
|
|
48
|
+
EthereumGasBlocknativePlugin as default
|
|
52
49
|
};
|
|
53
50
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts","../../src/lib/getGasFromBlocknative.ts","../../src/Schema.ts"],"sourcesContent":["import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\n\nimport { EthereumGasBlocknativeWitness } from './Witness'\n\nexport const EthereumGasBlocknativePlugin = () =>\n createPayloadSetWitnessPlugin<EthereumGasBlocknativeWitness>(\n { required: { [EthereumGasBlocknativeSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n return (await EthereumGasBlocknativeWitness.create(params)) as EthereumGasBlocknativeWitness\n },\n },\n )\n","import { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { EthereumGasBlocknativePayload, EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport { EthereumGasBlocknativeWitnessConfig } from './Config'\nimport { getGasFromBlocknative } from './lib'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override configSchemas = [EthereumGasBlocknativeWitnessConfigSchema]\n\n protected override async observeHandler(): Promise<Payload[]> {\n const fields = await getGasFromBlocknative()\n const payload = await new PayloadBuilder<EthereumGasBlocknativePayload>({\n schema: EthereumGasBlocknativeSchema,\n })\n .fields(fields)\n .build()\n return [payload]\n }\n}\n","import { axios } from '@xylabs/axios'\nimport { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\n\nconst url = 'https://api.blocknative.com/gasprices/blockprices'\n\nconst Authorization = '9d3e23c3-e31d-4f9c-9d7c-c579cb75d226'\nconst config = { headers: { Authorization } }\n\nexport const getGasFromBlocknative = async (): Promise<EthereumGasBlocknativeResponse> => {\n return (await axios.get<EthereumGasBlocknativeResponse>(url, config)).data\n}\n","export type EthereumGasBlocknativeWitnessConfigSchema = 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\nexport const EthereumGasBlocknativeWitnessConfigSchema: EthereumGasBlocknativeWitnessConfigSchema =\n 'network.xyo.blockchain.ethereum.gas.blocknative.witness.config'\n"],"mappings":";AAAA,SAAS,gCAAAA,qCAAoC;AAC7C,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;;;ACF9C,SAAS,uBAAuB;AAChC,SAAwC,oCAAoC;AAE5E,SAAS,sBAAsB;;;ACH/B,SAAS,aAAa;AAGtB,IAAM,MAAM;AAEZ,IAAM,gBAAgB;AACtB,IAAM,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE;AAErC,IAAM,wBAAwB,YAAqD;AACxF,UAAQ,MAAM,MAAM,IAAoC,KAAK,MAAM,GAAG;AACxE;;;ACTO,IAAM,4CACX;;;AFUK,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAgB,gBAAgB,CAAC,yCAAyC;AAAA,EAE1E,MAAyB,iBAAqC;AAC5D,UAAM,SAAS,MAAM,sBAAsB;AAC3C,UAAM,UAAU,MAAM,IAAI,eAA8C;AAAA,MACtE,QAAQ;AAAA,IACV,CAAC,EACE,OAAO,MAAM,EACb,MAAM;AACT,WAAO,CAAC,OAAO;AAAA,EACjB;AACF;;;ADlBO,IAAM,+BAA+B,MAC1C;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,6BAA4B,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EAC5E;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,aAAQ,MAAM,8BAA8B,OAAO,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":["EthereumGasBlocknativeSchema","EthereumGasBlocknativeSchema"]}
|
package/package.json
CHANGED
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/plugins/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/axios": "^2.13.
|
|
14
|
-
"@xyo-network/abstract-witness": "^2.
|
|
15
|
-
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "~2.
|
|
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-timestamp": "^2.
|
|
13
|
+
"@xylabs/axios": "^2.13.22",
|
|
14
|
+
"@xyo-network/abstract-witness": "^2.85.3",
|
|
15
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "~2.85.1",
|
|
16
|
+
"@xyo-network/module-model": "^2.85.3",
|
|
17
|
+
"@xyo-network/payload-builder": "^2.85.3",
|
|
18
|
+
"@xyo-network/payload-model": "^2.85.3",
|
|
19
|
+
"@xyo-network/payloadset-plugin": "^2.85.3",
|
|
20
|
+
"@xyo-network/witness-timestamp": "^2.85.3"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@xylabs/ts-scripts-yarn3": "^3.2.25",
|
|
24
24
|
"@xylabs/tsconfig": "^3.2.25",
|
|
25
|
-
"@xyo-network/account": "^2.
|
|
26
|
-
"@xyo-network/payload-wrapper": "^2.
|
|
25
|
+
"@xyo-network/account": "^2.85.3",
|
|
26
|
+
"@xyo-network/payload-wrapper": "^2.85.3",
|
|
27
27
|
"typescript": "^5.3.3"
|
|
28
28
|
},
|
|
29
29
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
66
66
|
},
|
|
67
67
|
"sideEffects": false,
|
|
68
|
-
"version": "2.
|
|
68
|
+
"version": "2.85.1",
|
|
69
69
|
"type": "module"
|
|
70
70
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import { EthereumGasBlocknativePlugin } from './Plugin'
|
|
2
|
-
|
|
3
1
|
export * from './Config'
|
|
2
|
+
export { EthereumGasBlocknativePlugin as default, EthereumGasBlocknativePlugin } from './Plugin'
|
|
4
3
|
export * from './Schema'
|
|
5
4
|
export * from './Witness'
|
|
6
|
-
|
|
7
|
-
export { EthereumGasBlocknativePlugin }
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line import/no-default-export
|
|
10
|
-
export default EthereumGasBlocknativePlugin
|