@xyo-network/etherchain-ethereum-gas-v2-plugin 2.47.8 → 2.47.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs.json +648 -940
- package/dist/types/Plugin.d.ts +1 -1
- package/dist/types/Plugin.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/Witness.spec.ts +0 -34
- package/src/lib/spec/getV2GasFromEtherchain.spec.ts +0 -16
- package/src/spec/Plugin.spec.ts +0 -13
package/dist/types/Plugin.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ export declare const XyoEthereumGasEtherchainV2Plugin: () => PayloadSetWitnessPl
|
|
|
14
14
|
targetSet?: (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("@xyo-network/payload-model").PayloadSet & {
|
|
15
15
|
schema: "network.xyo.payload.set";
|
|
16
16
|
}) | undefined;
|
|
17
|
-
}, import("@xyo-network/core").
|
|
17
|
+
}, import("@xyo-network/core").AnyObject>>;
|
|
18
18
|
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAA0B,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAGhG,OAAO,EAAE,iCAAiC,EAAE,MAAM,WAAW,CAAA;AAE7D,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAA0B,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAGhG,OAAO,EAAE,iCAAiC,EAAE,MAAM,WAAW,CAAA;AAE7D,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;0CAS1C,CAAA"}
|
package/package.json
CHANGED
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xyo-network/axios": "^2.47.
|
|
14
|
-
"@xyo-network/etherchain-ethereum-gas-v2-payload-plugin": "^2.47.
|
|
15
|
-
"@xyo-network/module": "^2.47.
|
|
16
|
-
"@xyo-network/payload-model": "^2.47.
|
|
17
|
-
"@xyo-network/payloadset-plugin": "^2.47.
|
|
18
|
-
"@xyo-network/witness": "^2.47.
|
|
13
|
+
"@xyo-network/axios": "^2.47.10",
|
|
14
|
+
"@xyo-network/etherchain-ethereum-gas-v2-payload-plugin": "^2.47.10",
|
|
15
|
+
"@xyo-network/module": "^2.47.10",
|
|
16
|
+
"@xyo-network/payload-model": "^2.47.10",
|
|
17
|
+
"@xyo-network/payloadset-plugin": "^2.47.10",
|
|
18
|
+
"@xyo-network/witness": "^2.47.10"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@xylabs/ts-scripts-yarn3": "^2.
|
|
22
|
-
"@xylabs/tsconfig": "^2.
|
|
21
|
+
"@xylabs/ts-scripts-yarn3": "^2.15.0",
|
|
22
|
+
"@xylabs/tsconfig": "^2.15.0",
|
|
23
23
|
"typescript": "^4.9.5"
|
|
24
24
|
},
|
|
25
25
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
},
|
|
56
56
|
"sideEffects": false,
|
|
57
57
|
"types": "dist/types/index.d.ts",
|
|
58
|
-
"version": "2.47.
|
|
58
|
+
"version": "2.47.10"
|
|
59
59
|
}
|
package/src/Witness.spec.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { XyoEthereumGasEtherchainV2Payload, XyoEthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'
|
|
2
|
-
import { PayloadWrapper } from '@xyo-network/payload-wrapper'
|
|
3
|
-
|
|
4
|
-
import { XyoEthereumGasEtherchainV2WitnessConfigSchema } from './Schema'
|
|
5
|
-
import { XyoEtherchainEthereumGasWitnessV2 } from './Witness'
|
|
6
|
-
|
|
7
|
-
describe('XyoEtherchainEthereumGasWitnessV2', () => {
|
|
8
|
-
test('returns observation', async () => {
|
|
9
|
-
const sut = await XyoEtherchainEthereumGasWitnessV2.create({
|
|
10
|
-
config: { schema: XyoEthereumGasEtherchainV2WitnessConfigSchema },
|
|
11
|
-
})
|
|
12
|
-
const [actual] = (await sut.observe()) as XyoEthereumGasEtherchainV2Payload[]
|
|
13
|
-
expect(actual).toBeObject()
|
|
14
|
-
expect(actual.code).toBeNumber()
|
|
15
|
-
expect(actual.data).toBeObject()
|
|
16
|
-
expect(actual.timestamp).toBeNumber()
|
|
17
|
-
expect(actual.schema).toBe(XyoEthereumGasEtherchainV2Schema)
|
|
18
|
-
|
|
19
|
-
const answerWrapper = new PayloadWrapper(actual)
|
|
20
|
-
expect(answerWrapper.valid).toBe(true)
|
|
21
|
-
})
|
|
22
|
-
test('returns observation [no config]', async () => {
|
|
23
|
-
const sut = await XyoEtherchainEthereumGasWitnessV2.create()
|
|
24
|
-
const [actual] = (await sut.observe()) as XyoEthereumGasEtherchainV2Payload[]
|
|
25
|
-
expect(actual).toBeObject()
|
|
26
|
-
expect(actual.code).toBeNumber()
|
|
27
|
-
expect(actual.data).toBeObject()
|
|
28
|
-
expect(actual.timestamp).toBeNumber()
|
|
29
|
-
expect(actual.schema).toBe(XyoEthereumGasEtherchainV2Schema)
|
|
30
|
-
|
|
31
|
-
const answerWrapper = new PayloadWrapper(actual)
|
|
32
|
-
expect(answerWrapper.valid).toBe(true)
|
|
33
|
-
})
|
|
34
|
-
})
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { getV2GasFromEtherchain } from '../getV2GasFromEtherchain'
|
|
2
|
-
|
|
3
|
-
describe('getV2GasFromEtherchain', () => {
|
|
4
|
-
test('returns prices', async () => {
|
|
5
|
-
const gas = await getV2GasFromEtherchain()
|
|
6
|
-
expect(gas).toBeObject()
|
|
7
|
-
expect(gas.code).toBeNumber()
|
|
8
|
-
expect(gas.data).toBeObject()
|
|
9
|
-
expect(gas.data.fast).toBeNumber()
|
|
10
|
-
expect(gas.data.priceUSD).toBeNumber()
|
|
11
|
-
expect(gas.data.rapid).toBeNumber()
|
|
12
|
-
expect(gas.data.slow).toBeNumber()
|
|
13
|
-
expect(gas.data.standard).toBeNumber()
|
|
14
|
-
expect(gas.data.timestamp).toBeNumber()
|
|
15
|
-
})
|
|
16
|
-
})
|
package/src/spec/Plugin.spec.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { XyoEthereumGasEtherchainV2Schema } from '@xyo-network/etherchain-ethereum-gas-v2-payload-plugin'
|
|
2
|
-
import { PayloadSetPluginResolver } from '@xyo-network/payloadset-plugin'
|
|
3
|
-
|
|
4
|
-
import { XyoEthereumGasEtherchainV2Plugin } from '../Plugin'
|
|
5
|
-
|
|
6
|
-
describe('XyoEthereumGasEtherchainV2Plugin', () => {
|
|
7
|
-
test('Add to Resolver', () => {
|
|
8
|
-
const plugin = XyoEthereumGasEtherchainV2Plugin()
|
|
9
|
-
const resolver = new PayloadSetPluginResolver().register(plugin)
|
|
10
|
-
expect(resolver.resolve(plugin.set)).toBeObject()
|
|
11
|
-
expect(resolver.witness(XyoEthereumGasEtherchainV2Schema)).toBeObject()
|
|
12
|
-
})
|
|
13
|
-
})
|