@xyo-network/blocknative-ethereum-gas-plugin 3.0.1 → 3.0.3
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/neutral/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/Config.ts +2 -2
- package/src/Witness.ts +6 -5
- package/src/lib/getGasFromBlocknative.ts +1 -1
- package/xy.config.ts +1 -1
|
@@ -1 +1 @@
|
|
|
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.ts'\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
|
|
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.ts'\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 type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { Payload, Schema } from '@xyo-network/payload-model'\nimport type { TimestampWitnessParams } from '@xyo-network/witness-timestamp'\n\nimport type { EthereumGasBlocknativeWitnessConfig } from './Config.ts'\nimport { getGasFromBlocknative } from './lib/index.ts'\nimport { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'\n\nexport type EthereumGasBlocknativeWitnessParams = TimestampWitnessParams<AnyConfigSchema<EthereumGasBlocknativeWitnessConfig>>\nexport class EthereumGasBlocknativeWitness extends AbstractWitness<EthereumGasBlocknativeWitnessParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EthereumGasBlocknativeWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = 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 type { 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;AAEhC,SAAS,oCAAoC;AAE7C,SAAS,sBAAsB;;;ACJ/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,4CACT;;;AFWG,IAAM,gCAAN,cAA4C,gBAAqD;AAAA,EACtG,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,yCAAyC;AAAA,EACrH,OAAyB,sBAA8B;AAAA,EAEvD,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;;;ADpBO,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
|
@@ -7,22 +7,22 @@
|
|
|
7
7
|
},
|
|
8
8
|
"bugs": {
|
|
9
9
|
"email": "support@xyo.network",
|
|
10
|
-
"url": "https://github.com/XYOracleNetwork/plugins/issues"
|
|
10
|
+
"url": "git+https://github.com/XYOracleNetwork/plugins/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/axios": "^4.0.
|
|
14
|
-
"@xyo-network/abstract-witness": "^3.0.
|
|
15
|
-
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.0.
|
|
16
|
-
"@xyo-network/module-model": "^3.0.
|
|
17
|
-
"@xyo-network/payload-builder": "^3.0.
|
|
18
|
-
"@xyo-network/payload-model": "^3.0.
|
|
19
|
-
"@xyo-network/payloadset-plugin": "^3.0.
|
|
20
|
-
"@xyo-network/witness-timestamp": "^3.0.
|
|
13
|
+
"@xylabs/axios": "^4.0.2",
|
|
14
|
+
"@xyo-network/abstract-witness": "^3.0.3",
|
|
15
|
+
"@xyo-network/blocknative-ethereum-gas-payload-plugin": "^3.0.3",
|
|
16
|
+
"@xyo-network/module-model": "^3.0.3",
|
|
17
|
+
"@xyo-network/payload-builder": "^3.0.3",
|
|
18
|
+
"@xyo-network/payload-model": "^3.0.3",
|
|
19
|
+
"@xyo-network/payloadset-plugin": "^3.0.3",
|
|
20
|
+
"@xyo-network/witness-timestamp": "^3.0.3"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.
|
|
24
|
-
"@xylabs/tsconfig": "^4.0.0-rc.
|
|
25
|
-
"@xyo-network/payload-wrapper": "^3.0.
|
|
23
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.20",
|
|
24
|
+
"@xylabs/tsconfig": "^4.0.0-rc.20",
|
|
25
|
+
"@xyo-network/payload-wrapper": "^3.0.3",
|
|
26
26
|
"typescript": "^5.5.4"
|
|
27
27
|
},
|
|
28
28
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"repository": {
|
|
44
44
|
"type": "git",
|
|
45
|
-
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
45
|
+
"url": "git+https://github.com/XYOracleNetwork/plugins.git"
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
|
-
"version": "3.0.
|
|
48
|
+
"version": "3.0.3",
|
|
49
49
|
"type": "module"
|
|
50
50
|
}
|
package/src/Config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TimestampWitnessConfig } from '@xyo-network/witness-timestamp'
|
|
1
|
+
import type { TimestampWitnessConfig } from '@xyo-network/witness-timestamp'
|
|
2
2
|
|
|
3
|
-
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'
|
|
3
|
+
import type { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'
|
|
4
4
|
|
|
5
5
|
export type EthereumGasBlocknativeWitnessConfig = TimestampWitnessConfig<{
|
|
6
6
|
schema: EthereumGasBlocknativeWitnessConfigSchema
|
package/src/Witness.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness'
|
|
2
|
-
import { EthereumGasBlocknativePayload
|
|
3
|
-
import {
|
|
2
|
+
import type { EthereumGasBlocknativePayload } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
3
|
+
import { EthereumGasBlocknativeSchema } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
4
|
+
import type { AnyConfigSchema } from '@xyo-network/module-model'
|
|
4
5
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
5
|
-
import { Payload, Schema } from '@xyo-network/payload-model'
|
|
6
|
-
import { TimestampWitnessParams } from '@xyo-network/witness-timestamp'
|
|
6
|
+
import type { Payload, Schema } from '@xyo-network/payload-model'
|
|
7
|
+
import type { TimestampWitnessParams } from '@xyo-network/witness-timestamp'
|
|
7
8
|
|
|
8
|
-
import { EthereumGasBlocknativeWitnessConfig } from './Config.ts'
|
|
9
|
+
import type { EthereumGasBlocknativeWitnessConfig } from './Config.ts'
|
|
9
10
|
import { getGasFromBlocknative } from './lib/index.ts'
|
|
10
11
|
import { EthereumGasBlocknativeWitnessConfigSchema } from './Schema.ts'
|
|
11
12
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { axios } from '@xylabs/axios'
|
|
2
|
-
import { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
2
|
+
import type { EthereumGasBlocknativeResponse } from '@xyo-network/blocknative-ethereum-gas-payload-plugin'
|
|
3
3
|
|
|
4
4
|
const url = 'https://api.blocknative.com/gasprices/blockprices'
|
|
5
5
|
|
package/xy.config.ts
CHANGED