@xyo-network/abstract-witness 5.1.21 → 5.1.23
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/abstract-witness",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.23",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -30,30 +30,33 @@
|
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|
|
33
|
-
"src"
|
|
33
|
+
"src",
|
|
34
|
+
"!**/*.bench.*",
|
|
35
|
+
"!**/*.spec.*",
|
|
36
|
+
"!**/*.test.*"
|
|
34
37
|
],
|
|
35
38
|
"dependencies": {
|
|
36
|
-
"@xylabs/assert": "~5.0.
|
|
37
|
-
"@xylabs/base": "~5.0.
|
|
38
|
-
"@xylabs/hex": "~5.0.
|
|
39
|
-
"@xylabs/promise": "~5.0.
|
|
40
|
-
"@xylabs/telemetry": "~5.0.
|
|
41
|
-
"@xyo-network/account-model": "~5.1.
|
|
42
|
-
"@xyo-network/archivist-model": "~5.1.
|
|
43
|
-
"@xyo-network/boundwitness-model": "~5.1.
|
|
44
|
-
"@xyo-network/boundwitness-wrapper": "~5.1.
|
|
45
|
-
"@xyo-network/module-abstract": "~5.1.
|
|
46
|
-
"@xyo-network/module-model": "~5.1.
|
|
47
|
-
"@xyo-network/payload-builder": "~5.1.
|
|
48
|
-
"@xyo-network/payload-model": "~5.1.
|
|
49
|
-
"@xyo-network/witness-model": "~5.1.
|
|
39
|
+
"@xylabs/assert": "~5.0.33",
|
|
40
|
+
"@xylabs/base": "~5.0.33",
|
|
41
|
+
"@xylabs/hex": "~5.0.33",
|
|
42
|
+
"@xylabs/promise": "~5.0.33",
|
|
43
|
+
"@xylabs/telemetry": "~5.0.33",
|
|
44
|
+
"@xyo-network/account-model": "~5.1.23",
|
|
45
|
+
"@xyo-network/archivist-model": "~5.1.23",
|
|
46
|
+
"@xyo-network/boundwitness-model": "~5.1.23",
|
|
47
|
+
"@xyo-network/boundwitness-wrapper": "~5.1.23",
|
|
48
|
+
"@xyo-network/module-abstract": "~5.1.23",
|
|
49
|
+
"@xyo-network/module-model": "~5.1.23",
|
|
50
|
+
"@xyo-network/payload-builder": "~5.1.23",
|
|
51
|
+
"@xyo-network/payload-model": "~5.1.23",
|
|
52
|
+
"@xyo-network/witness-model": "~5.1.23"
|
|
50
53
|
},
|
|
51
54
|
"devDependencies": {
|
|
52
55
|
"@xylabs/ts-scripts-yarn3": "~7.2.8",
|
|
53
56
|
"@xylabs/tsconfig": "~7.2.8",
|
|
54
|
-
"@xylabs/vitest-extended": "~5.0.
|
|
57
|
+
"@xylabs/vitest-extended": "~5.0.33",
|
|
55
58
|
"typescript": "~5.9.3",
|
|
56
|
-
"vitest": "~4.0.
|
|
59
|
+
"vitest": "~4.0.9"
|
|
57
60
|
},
|
|
58
61
|
"publishConfig": {
|
|
59
62
|
"access": "public"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractWitness.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/AbstractWitness.spec.ts"],"names":[],"mappings":"AAWA,OAAO,yBAAyB,CAAA"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
import { Account } from '@xyo-network/account'
|
|
3
|
-
import { AccountInstance } from '@xyo-network/account-model'
|
|
4
|
-
import { Module, ModuleParams } from '@xyo-network/module'
|
|
5
|
-
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
6
|
-
import { WitnessConfig, WitnessConfigSchema, WitnessModule } from '@xyo-network/witness-model'
|
|
7
|
-
import { WitnessWrapper } from '@xyo-network/witness-wrapper'
|
|
8
|
-
|
|
9
|
-
import { AbstractWitness } from '../AbstractWitness'
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import '@xylabs/vitest-extended'
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
describe, expect, it,
|
|
16
|
-
} from 'vitest'
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @group witness
|
|
20
|
-
* @group module
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
describe('Witness', () => {
|
|
24
|
-
it('Stub', () => {
|
|
25
|
-
expect(true).toBeTrue()
|
|
26
|
-
})
|
|
27
|
-
/* const config: WitnessConfig = { schema: WitnessConfigSchema }
|
|
28
|
-
const params: ModuleParams<WitnessConfig> = { config }
|
|
29
|
-
const observed = await new PayloadBuilder({ schema: 'network.xyo.test' }).build()
|
|
30
|
-
|
|
31
|
-
describe('fulfills type of', () => {
|
|
32
|
-
let account: AccountInstance
|
|
33
|
-
beforeAll(() => {
|
|
34
|
-
account = Account.randomSync()
|
|
35
|
-
})
|
|
36
|
-
it('Module', async () => {
|
|
37
|
-
const witness: Module = await AbstractWitness.create(params)
|
|
38
|
-
expect(witness).toBeObject()
|
|
39
|
-
const wrapper = new WitnessWrapper({ account, module: witness })
|
|
40
|
-
expect(wrapper).toBeObject()
|
|
41
|
-
})
|
|
42
|
-
it('AbstractModule', async () => {
|
|
43
|
-
const witness = await AbstractWitness.create(params)
|
|
44
|
-
expect(witness).toBeObject()
|
|
45
|
-
const wrapper = new WitnessWrapper({ account, module: witness })
|
|
46
|
-
expect(wrapper).toBeObject()
|
|
47
|
-
})
|
|
48
|
-
it('WitnessModule', async () => {
|
|
49
|
-
const witness: WitnessModule = await AbstractWitness.create(params)
|
|
50
|
-
expect(witness).toBeObject()
|
|
51
|
-
const wrapper = new WitnessWrapper({ account, module: witness })
|
|
52
|
-
expect(wrapper).toBeObject()
|
|
53
|
-
})
|
|
54
|
-
})
|
|
55
|
-
describe('observe', () => {
|
|
56
|
-
describe('with payload supplied to observe', () => {
|
|
57
|
-
describe('returns payloads', () => {
|
|
58
|
-
let account: AccountInstance
|
|
59
|
-
beforeAll(() => {
|
|
60
|
-
account = Account.randomSync()
|
|
61
|
-
})
|
|
62
|
-
it('when module queried directly', async () => {
|
|
63
|
-
const witness = await AbstractWitness.create(params)
|
|
64
|
-
const observation = await witness.observe([observed])
|
|
65
|
-
expect(observation).toBeArrayOfSize(1)
|
|
66
|
-
})
|
|
67
|
-
it('when module queried with WitnessWrapper', async () => {
|
|
68
|
-
const witness = await AbstractWitness.create(params)
|
|
69
|
-
const wrapper = new WitnessWrapper({ account, module: witness })
|
|
70
|
-
const observation = await wrapper.observe([observed])
|
|
71
|
-
expect(observation).toBeArrayOfSize(1)
|
|
72
|
-
})
|
|
73
|
-
})
|
|
74
|
-
})
|
|
75
|
-
}) */
|
|
76
|
-
})
|