@xyo-network/api 2.29.0-rc.1 → 2.29.0-rc.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 +2037 -2037
- package/package.json +9 -10
- package/src/Archivist/Api.spec.ts +1 -2
- package/src/Archivist/Node/Api.spec.ts +1 -1
- package/src/Archivist/Payload/Api.spec.ts +2 -3
package/package.json
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xylabs/sdk-js": "^2.6.7",
|
|
13
|
-
"@xyo-network/account": "^2.29.0-rc.
|
|
14
|
-
"@xyo-network/archivist": "^2.29.0-rc.
|
|
15
|
-
"@xyo-network/boundwitness": "^2.29.0-rc.
|
|
16
|
-
"@xyo-network/core": "^2.29.0-rc.
|
|
17
|
-
"@xyo-network/payload": "^2.29.0-rc.
|
|
18
|
-
"@xyo-network/schema-payload-plugin": "^2.29.0-rc.
|
|
19
|
-
"@xyo-network/typeof": "^2.29.0-rc.
|
|
13
|
+
"@xyo-network/account": "^2.29.0-rc.10",
|
|
14
|
+
"@xyo-network/archivist": "^2.29.0-rc.10",
|
|
15
|
+
"@xyo-network/boundwitness": "^2.29.0-rc.10",
|
|
16
|
+
"@xyo-network/core": "^2.29.0-rc.10",
|
|
17
|
+
"@xyo-network/payload": "^2.29.0-rc.10",
|
|
18
|
+
"@xyo-network/schema-payload-plugin": "^2.29.0-rc.10",
|
|
19
|
+
"@xyo-network/typeof": "^2.29.0-rc.10",
|
|
20
20
|
"axios": "^0.27.2",
|
|
21
21
|
"pako": "^2.0.4",
|
|
22
22
|
"tslib": "^2.4.0"
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@ethersproject/wallet": "^5.7.0",
|
|
27
|
-
"@types/pako": "^2.0.0"
|
|
28
|
-
"@xylabs/tsconfig": "^2.5.138"
|
|
27
|
+
"@types/pako": "^2.0.0"
|
|
29
28
|
},
|
|
30
29
|
"browser": "dist/esm/index.js",
|
|
31
30
|
"docs": "dist/docs.json",
|
|
@@ -60,6 +59,6 @@
|
|
|
60
59
|
},
|
|
61
60
|
"sideEffects": false,
|
|
62
61
|
"types": "dist/esm/index.d.ts",
|
|
63
|
-
"version": "2.29.0-rc.
|
|
62
|
+
"version": "2.29.0-rc.10",
|
|
64
63
|
"stableVersion": "2.28.1"
|
|
65
64
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { XyoAccount } from '@xyo-network/account'
|
|
2
2
|
import { XyoBoundWitness, XyoBoundWitnessBuilder } from '@xyo-network/boundwitness'
|
|
3
|
-
import { XyoQuerySchema } from '@xyo-network/payload'
|
|
4
3
|
|
|
5
4
|
import { XyoApiConfig, XyoApiError } from '../models'
|
|
6
5
|
import { testPayload } from '../Test'
|
|
@@ -199,7 +198,7 @@ describe.skip('XyoArchivistApi', () => {
|
|
|
199
198
|
const boundWitness = new XyoBoundWitnessBuilder().witness(XyoAccount.random()).build()
|
|
200
199
|
await api.archives.archive(archive).block.post([boundWitness])
|
|
201
200
|
const timestamp = Date.now() - 10000
|
|
202
|
-
const response = await api.archives.archive(archive).block.find({ order: 'asc',
|
|
201
|
+
const response = await api.archives.archive(archive).block.find({ order: 'asc', timestamp })
|
|
203
202
|
expect(response?.length).toBe(1)
|
|
204
203
|
const actual = response?.[0]
|
|
205
204
|
expect(actual?._timestamp).toBeTruthy()
|
|
@@ -88,7 +88,7 @@ describe('XyoArchivistNodeApi', () => {
|
|
|
88
88
|
describe.skip('perform', () => {
|
|
89
89
|
it('creates and issues the query and returns the result', async () => {
|
|
90
90
|
const api = new XyoArchivistApi(config)
|
|
91
|
-
const response = await api.node().perform({
|
|
91
|
+
const response = await api.node().perform({}, schema)
|
|
92
92
|
expect(response).toBeDefined()
|
|
93
93
|
expect((response as unknown as XyoPayload).schema).toBe(schema)
|
|
94
94
|
})
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { XyoAccount } from '@xyo-network/account'
|
|
2
2
|
import { XyoBoundWitnessBuilder } from '@xyo-network/boundwitness'
|
|
3
|
-
import { XyoQuerySchema } from '@xyo-network/payload'
|
|
4
3
|
|
|
5
4
|
import { XyoApiConfig, XyoApiError } from '../../models'
|
|
6
5
|
import { XyoArchivistApi } from '../Api'
|
|
@@ -28,7 +27,7 @@ describe('XyoArchivistPayloadApi', () => {
|
|
|
28
27
|
const boundWitness = new XyoBoundWitnessBuilder().witness(XyoAccount.random()).build()
|
|
29
28
|
const blockResult = await api.archive(archive).block.post([boundWitness])
|
|
30
29
|
expect(blockResult?.length).toBe(1)
|
|
31
|
-
const response = await api.archive(archive).block.find({ order: 'asc',
|
|
30
|
+
const response = await api.archive(archive).block.find({ order: 'asc', timestamp })
|
|
32
31
|
expect(response?.length).toBe(1)
|
|
33
32
|
const actual = response?.[0]
|
|
34
33
|
expect(actual?._timestamp).toBeTruthy()
|
|
@@ -47,7 +46,7 @@ describe('XyoArchivistPayloadApi', () => {
|
|
|
47
46
|
const blockResult = await api.archive(archive).block.post([boundWitness])
|
|
48
47
|
expect(blockResult?.length).toBe(1)
|
|
49
48
|
const timestamp = getTimestampMinutesFromNow(1)
|
|
50
|
-
const response = await api.archive(archive).block.find({ order: 'desc',
|
|
49
|
+
const response = await api.archive(archive).block.find({ order: 'desc', timestamp })
|
|
51
50
|
expect(response?.length).toBe(1)
|
|
52
51
|
const actual = response?.[0]
|
|
53
52
|
expect(actual?._timestamp).toBeTruthy()
|